blob: d2766bc435dd2f945e5b4a5b46af35bd03f4cddd [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 Deily4829bc62016-09-12 17:29:04 -04003# Generated by GNU Autoconf 2.69 for python 3.7.
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 Deily4829bc62016-09-12 17:29:04 -0400583PACKAGE_VERSION='3.7'
584PACKAGE_STRING='python 3.7'
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
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700645DTRACE_OBJS
646DTRACE_HEADERS
647DFLAGS
648DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000649THREADOBJ
650LDLAST
651USE_THREAD_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700652TCLTK_LIBS
653TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000654LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100655PKG_CONFIG_LIBDIR
656PKG_CONFIG_PATH
657PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000658SHLIBS
659CFLAGSFORSHARED
660LINKFORSHARED
661CCSHARED
662BLDSHARED
663LDCXXSHARED
664LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700665SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000666LIBTOOL_CRUFT
667OTHER_LIBTOOL_OPT
668UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700669CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000670BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200671CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000672OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700673LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700674target_os
675target_vendor
676target_cpu
677target
678LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700679LLVM_PROF_ERR
680LLVM_PROF_FILE
681LLVM_PROF_MERGER
682PGO_PROF_USE_FLAG
683PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700684LTOFLAGS
Brett Cannon63d98bc2016-09-06 17:12:40 -0700685DEF_MAKE_RULE
686DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000687ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000688LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100689MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000690INSTALL_DATA
691INSTALL_SCRIPT
692INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200693ac_ct_READELF
694READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000695ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200696ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000697AR
698RANLIB
699GNULD
700LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000701LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702RUNSHARED
703INSTSONAME
704LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000705PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000706BLDLIBRARY
707DLLLIBRARY
708LDLIBRARY
709LIBRARY
710BUILDEXEEXT
711EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200712NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200713MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714PLATFORM_TRIPLET
715MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200716ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MAINCC
718CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700719SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200720GREP
721CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000722OBJEXT
723EXEEXT
724ac_ct_CC
725CPPFLAGS
726LDFLAGS
727CFLAGS
728CC
729EXPORT_MACOSX_DEPLOYMENT_TARGET
730CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200731_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000732MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000733FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000734FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800735FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000736FRAMEWORKALTINSTALLLAST
737FRAMEWORKALTINSTALLFIRST
738FRAMEWORKINSTALLLAST
739FRAMEWORKINSTALLFIRST
740PYTHONFRAMEWORKINSTALLDIR
741PYTHONFRAMEWORKPREFIX
742PYTHONFRAMEWORKDIR
743PYTHONFRAMEWORKIDENTIFIER
744PYTHONFRAMEWORK
745LIPO_32BIT_FLAGS
746ARCH_RUN_32BIT
747UNIVERSALSDK
748CONFIG_ARGS
749SOVERSION
750VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200751PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200752PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100753host_os
754host_vendor
755host_cpu
756host
757build_os
758build_vendor
759build_cpu
760build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500761HAS_GIT
762GITBRANCH
763GITTAG
764GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400765BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000766target_alias
767host_alias
768build_alias
769LIBS
770ECHO_T
771ECHO_N
772ECHO_C
773DEFS
774mandir
775localedir
776libdir
777psdir
778pdfdir
779dvidir
780htmldir
781infodir
782docdir
783oldincludedir
784includedir
INADA Naokia8f8d5b2017-06-29 00:31:53 +0900785runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000805ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000806ac_user_opts='
807enable_option_checking
808enable_universalsdk
809with_universal_archs
810with_framework_name
811enable_framework
812with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600813with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000814with_cxx_main
815with_suffix
816enable_shared
817enable_profiling
818with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200819with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000820enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700821with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100822with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100823with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_libs
825with_system_expat
826with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100827with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000828enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700829with_tcltk_includes
830with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_threads
833with_thread
834enable_ipv6
835with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000837with_c_locale_coercion
838with_c_locale_warning
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700840with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_fpectl
842with_libm
843with_libc
844enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000845with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800846with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000847'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000848 ac_precious_vars='build_alias
849host_alias
850target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100851MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000852CC
853CFLAGS
854LDFLAGS
855LIBS
856CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100857CPP
858PKG_CONFIG
859PKG_CONFIG_PATH
860PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861
Guido van Rossum627b2d71993-12-24 10:39:16 +0000862
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000864ac_init_help=
865ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000866ac_unrecognized_opts=
867ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868# The variables have the same names as the options, with
869# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000870cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873no_recursion=
874prefix=NONE
875program_prefix=NONE
876program_suffix=NONE
877program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882x_includes=NONE
883x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000884
885# Installation directory options.
886# These are left unexpanded so users can "make install exec_prefix=/foo"
887# and all the variables that are supposed to be based on exec_prefix
888# by default will actually change.
889# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891bindir='${exec_prefix}/bin'
892sbindir='${exec_prefix}/sbin'
893libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894datarootdir='${prefix}/share'
895datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000896sysconfdir='${prefix}/etc'
897sharedstatedir='${prefix}/com'
898localstatedir='${prefix}/var'
INADA Naokia8f8d5b2017-06-29 00:31:53 +0900899runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900includedir='${prefix}/include'
901oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
903infodir='${datarootdir}/info'
904htmldir='${docdir}'
905dvidir='${docdir}'
906pdfdir='${docdir}'
907psdir='${docdir}'
908libdir='${exec_prefix}/lib'
909localedir='${datarootdir}/locale'
910mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000915do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 # If the previous option needs an argument, assign it.
917 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919 ac_prev=
920 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000921 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200924 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
925 *=) ac_optarg= ;;
926 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929 # Accept the important Cygnus configure options, so we can diagnose typos.
930
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931 case $ac_dashdash$ac_option in
932 --)
933 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -bindir | --bindir | --bindi | --bind | --bin | --bi)
936 ac_prev=bindir ;;
937 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939
940 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000945 -cache-file | --cache-file | --cache-fil | --cache-fi \
946 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
947 ac_prev=cache_file ;;
948 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
949 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 cache_file=$ac_optarg ;;
951
952 --config-cache | -C)
953 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000960 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
961 | --dataroo | --dataro | --datar)
962 ac_prev=datarootdir ;;
963 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
964 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
965 datarootdir=$ac_optarg ;;
966
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000969 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200971 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000972 ac_useropt_orig=$ac_useropt
973 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
974 case $ac_user_opts in
975 *"
976"enable_$ac_useropt"
977"*) ;;
978 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
979 ac_unrecognized_sep=', ';;
980 esac
981 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000982
983 -docdir | --docdir | --docdi | --doc | --do)
984 ac_prev=docdir ;;
985 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
986 docdir=$ac_optarg ;;
987
988 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
989 ac_prev=dvidir ;;
990 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
991 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
993 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200997 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000998 ac_useropt_orig=$ac_useropt
999 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1000 case $ac_user_opts in
1001 *"
1002"enable_$ac_useropt"
1003"*) ;;
1004 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1005 ac_unrecognized_sep=', ';;
1006 esac
1007 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1010 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1011 | --exec | --exe | --ex)
1012 ac_prev=exec_prefix ;;
1013 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1014 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1015 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001019 # Obsolete; use --with-gas.
1020 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 -help | --help | --hel | --he | -h)
1023 ac_init_help=long ;;
1024 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1025 ac_init_help=recursive ;;
1026 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1027 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
1029 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001034 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1035 ac_prev=htmldir ;;
1036 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1037 | --ht=*)
1038 htmldir=$ac_optarg ;;
1039
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040 -includedir | --includedir | --includedi | --included | --include \
1041 | --includ | --inclu | --incl | --inc)
1042 ac_prev=includedir ;;
1043 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1044 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -infodir | --infodir | --infodi | --infod | --info | --inf)
1048 ac_prev=infodir ;;
1049 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
1052 -libdir | --libdir | --libdi | --libd)
1053 ac_prev=libdir ;;
1054 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
1057 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1058 | --libexe | --libex | --libe)
1059 ac_prev=libexecdir ;;
1060 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1061 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001064 -localedir | --localedir | --localedi | --localed | --locale)
1065 ac_prev=localedir ;;
1066 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1067 localedir=$ac_optarg ;;
1068
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 ac_prev=localstatedir ;;
1072 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001073 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
1076 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1077 ac_prev=mandir ;;
1078 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082 # Obsolete; use --without-fp.
1083 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087 no_create=yes ;;
1088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1090 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1091 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1094 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1095 | --oldin | --oldi | --old | --ol | --o)
1096 ac_prev=oldincludedir ;;
1097 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1098 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1099 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001101
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1103 ac_prev=prefix ;;
1104 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
1107 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1108 | --program-pre | --program-pr | --program-p)
1109 ac_prev=program_prefix ;;
1110 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1111 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1115 | --program-suf | --program-su | --program-s)
1116 ac_prev=program_suffix ;;
1117 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1118 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120
1121 -program-transform-name | --program-transform-name \
1122 | --program-transform-nam | --program-transform-na \
1123 | --program-transform-n | --program-transform- \
1124 | --program-transform | --program-transfor \
1125 | --program-transfo | --program-transf \
1126 | --program-trans | --program-tran \
1127 | --progr-tra | --program-tr | --program-t)
1128 ac_prev=program_transform_name ;;
1129 -program-transform-name=* | --program-transform-name=* \
1130 | --program-transform-nam=* | --program-transform-na=* \
1131 | --program-transform-n=* | --program-transform-=* \
1132 | --program-transform=* | --program-transfor=* \
1133 | --program-transfo=* | --program-transf=* \
1134 | --program-trans=* | --program-tran=* \
1135 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001138 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1139 ac_prev=pdfdir ;;
1140 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1141 pdfdir=$ac_optarg ;;
1142
1143 -psdir | --psdir | --psdi | --psd | --ps)
1144 ac_prev=psdir ;;
1145 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1146 psdir=$ac_optarg ;;
1147
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1149 | -silent | --silent | --silen | --sile | --sil)
1150 silent=yes ;;
1151
INADA Naokia8f8d5b2017-06-29 00:31:53 +09001152 -runstatedir | --runstatedir | --runstatedi | --runstated \
1153 | --runstate | --runstat | --runsta | --runst | --runs \
1154 | --run | --ru | --r)
1155 ac_prev=runstatedir ;;
1156 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1157 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1158 | --run=* | --ru=* | --r=*)
1159 runstatedir=$ac_optarg ;;
1160
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001161 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1162 ac_prev=sbindir ;;
1163 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1164 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001166
1167 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1168 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1169 | --sharedst | --shareds | --shared | --share | --shar \
1170 | --sha | --sh)
1171 ac_prev=sharedstatedir ;;
1172 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1173 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1174 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1175 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001177
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001178 -site | --site | --sit)
1179 ac_prev=site ;;
1180 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001182
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1184 ac_prev=srcdir ;;
1185 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001188 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1189 | --syscon | --sysco | --sysc | --sys | --sy)
1190 ac_prev=sysconfdir ;;
1191 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1192 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001194
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
1200 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1201 verbose=yes ;;
1202
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 -version | --version | --versio | --versi | --vers | -V)
1204 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205
1206 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001208 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001210 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 ac_useropt_orig=$ac_useropt
1212 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1213 case $ac_user_opts in
1214 *"
1215"with_$ac_useropt"
1216"*) ;;
1217 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1218 ac_unrecognized_sep=', ';;
1219 esac
1220 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221
1222 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001224 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001226 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001227 ac_useropt_orig=$ac_useropt
1228 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1229 case $ac_user_opts in
1230 *"
1231"with_$ac_useropt"
1232"*) ;;
1233 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1234 ac_unrecognized_sep=', ';;
1235 esac
1236 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001238 --x)
1239 # Obsolete; use --with-x.
1240 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241
1242 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1243 | --x-incl | --x-inc | --x-in | --x-i)
1244 ac_prev=x_includes ;;
1245 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1246 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248
1249 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1250 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1251 ac_prev=x_libraries ;;
1252 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1253 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001256 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1257Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001258 ;;
1259
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 *=*)
1261 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1262 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 case $ac_envvar in #(
1264 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001265 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001267 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 export $ac_envvar ;;
1269
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001270 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001272 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001274 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001275 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276 ;;
1277
1278 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279done
1280
Guido van Rossum7f43da71994-08-01 12:15:30 +00001281if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001282 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001283 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001284fi
1285
Matthias Kloseb9621712010-04-24 17:59:49 +00001286if test -n "$ac_unrecognized_opts"; then
1287 case $enable_option_checking in
1288 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001289 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001290 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1291 esac
1292fi
1293
1294# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1296 datadir sysconfdir sharedstatedir localstatedir includedir \
1297 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
INADA Naokia8f8d5b2017-06-29 00:31:53 +09001298 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001299do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001300 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001301 # Remove trailing slashes.
1302 case $ac_val in
1303 */ )
1304 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1305 eval $ac_var=\$ac_val;;
1306 esac
1307 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001308 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309 [\\/$]* | ?:[\\/]* ) continue;;
1310 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001311 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001312 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001313done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314
Martin v. Löwis11437992002-04-12 09:54:03 +00001315# There might be people who depend on the old broken behavior: `$host'
1316# used to hold the argument of --host etc.
1317# FIXME: To remove some day.
1318build=$build_alias
1319host=$host_alias
1320target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001321
Martin v. Löwis11437992002-04-12 09:54:03 +00001322# FIXME: To remove some day.
1323if test "x$host_alias" != x; then
1324 if test "x$build_alias" = x; then
1325 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001326 elif test "x$build_alias" != "x$host_alias"; then
1327 cross_compiling=yes
1328 fi
1329fi
1330
1331ac_tool_prefix=
1332test -n "$host_alias" && ac_tool_prefix=$host_alias-
1333
1334test "$silent" = yes && exec 6>/dev/null
1335
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337ac_pwd=`pwd` && test -n "$ac_pwd" &&
1338ac_ls_di=`ls -di .` &&
1339ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001340 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001342 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343
1344
Guido van Rossum627b2d71993-12-24 10:39:16 +00001345# Find the source files, if location was not specified.
1346if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001347 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001348 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001349 ac_confdir=`$as_dirname -- "$as_myself" ||
1350$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1351 X"$as_myself" : 'X\(//\)[^/]' \| \
1352 X"$as_myself" : 'X\(//\)$' \| \
1353 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1354$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001355 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1356 s//\1/
1357 q
1358 }
1359 /^X\(\/\/\)[^/].*/{
1360 s//\1/
1361 q
1362 }
1363 /^X\(\/\/\)$/{
1364 s//\1/
1365 q
1366 }
1367 /^X\(\/\).*/{
1368 s//\1/
1369 q
1370 }
1371 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001372 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001374 srcdir=..
1375 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001376else
1377 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001379if test ! -r "$srcdir/$ac_unique_file"; then
1380 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001381 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001383ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1384ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001385 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001386 pwd)`
1387# When building in place, set srcdir=.
1388if test "$ac_abs_confdir" = "$ac_pwd"; then
1389 srcdir=.
1390fi
1391# Remove unnecessary trailing slashes from srcdir.
1392# Double slashes in file names in object file debugging info
1393# mess up M-x gdb in Emacs.
1394case $srcdir in
1395*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1396esac
1397for ac_var in $ac_precious_vars; do
1398 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1399 eval ac_env_${ac_var}_value=\$${ac_var}
1400 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1401 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1402done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001403
Martin v. Löwis11437992002-04-12 09:54:03 +00001404#
1405# Report the --help message.
1406#
1407if test "$ac_init_help" = "long"; then
1408 # Omit some internal or obsolete options to make the list less imposing.
1409 # This message is too long to be a string in the A/UX 3.1 sh.
1410 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001411\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001412
1413Usage: $0 [OPTION]... [VAR=VALUE]...
1414
1415To assign environment variables (e.g., CC, CFLAGS...), specify them as
1416VAR=VALUE. See below for descriptions of some of the useful variables.
1417
1418Defaults for the options are specified in brackets.
1419
1420Configuration:
1421 -h, --help display this help and exit
1422 --help=short display options specific to this package
1423 --help=recursive display the short help of all the included packages
1424 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001425 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 --cache-file=FILE cache test results in FILE [disabled]
1427 -C, --config-cache alias for \`--cache-file=config.cache'
1428 -n, --no-create do not create output files
1429 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1430
Martin v. Löwis11437992002-04-12 09:54:03 +00001431Installation directories:
1432 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001436
1437By default, \`make install' will install all the files in
1438\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1439an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1440for instance \`--prefix=\$HOME'.
1441
1442For better control, use the options below.
1443
1444Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001445 --bindir=DIR user executables [EPREFIX/bin]
1446 --sbindir=DIR system admin executables [EPREFIX/sbin]
1447 --libexecdir=DIR program executables [EPREFIX/libexec]
1448 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1449 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1450 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
INADA Naokia8f8d5b2017-06-29 00:31:53 +09001451 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001452 --libdir=DIR object code libraries [EPREFIX/lib]
1453 --includedir=DIR C header files [PREFIX/include]
1454 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1455 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1456 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1457 --infodir=DIR info documentation [DATAROOTDIR/info]
1458 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1459 --mandir=DIR man documentation [DATAROOTDIR/man]
1460 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1461 --htmldir=DIR html documentation [DOCDIR]
1462 --dvidir=DIR dvi documentation [DOCDIR]
1463 --pdfdir=DIR pdf documentation [DOCDIR]
1464 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001465_ACEOF
1466
1467 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001468
1469System types:
1470 --build=BUILD configure for building on BUILD [guessed]
1471 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001472 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001473_ACEOF
1474fi
1475
1476if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001477 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001478 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001479 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001480 cat <<\_ACEOF
1481
1482Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001483 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001484 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1485 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001486 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001487 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001488 --enable-framework[=INSTALLDIR]
1489 Build (MacOSX|Darwin) framework
1490 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001491 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001492 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1493 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001494 --enable-loadable-sqlite-extensions
1495 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001496 --enable-ipv6 Enable ipv6 (with ipv4) support
1497 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001498 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001499 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001500
1501Optional Packages:
1502 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1503 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001504 --with-universal-archs=ARCH
1505 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001506 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001507 --with-framework-name=FRAMEWORK
1508 specify an alternate name of the framework built
1509 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001510 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001511 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001512 --with-cxx-main=<compiler>
1513 compile main() and link python executable with C++
1514 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001515 --with-suffix=.exe set executable suffix
1516 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001517 --with-assertions build with C assertions enabled
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001518 --with-lto Enable Link Time Optimization in PGO builds.
1519 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001520 --with-hash-algorithm=[fnv|siphash24]
1521 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001522 --with-address-sanitizer
1523 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001524 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001525 --with-system-expat build pyexpat module using an installed expat
1526 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001527 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001528 --with-system-libmpdec build _decimal module using an installed libmpdec
1529 library
Ned Deilyd819b932013-09-06 01:07:05 -07001530 --with-tcltk-includes='-I...'
1531 override search for Tcl and Tk include files
1532 --with-tcltk-libs='-L...'
1533 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001534 --with-dbmliborder=db1:db2:...
1535 order to check db backends for dbm. Valid value is a
1536 colon separated string with the backend names
1537 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001538 --with(out)-threads[=DIRECTORY]
1539 disable/enable thread support
1540 --with(out)-thread[=DIRECTORY]
1541 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001542 --with(out)-doc-strings disable/enable documentation strings
1543 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001544 --with(out)-c-locale-coercion
1545 disable/enable C locale coercion to a UTF-8 based
1546 locale
1547 --with(out)-c-locale-warning
1548 disable/enable locale compatibility warning in the C
1549 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001550 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001551 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001552 --with-fpectl enable SIGFPE catching
1553 --with-libm=STRING math library
1554 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001555 --with(out)-computed-gotos
1556 Use computed gotos in evaluation loop (enabled by
1557 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001558 --with(out)-ensurepip=[=upgrade]
1559 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001560
1561Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001562 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 CC C compiler command
1564 CFLAGS C compiler flags
1565 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1566 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001568 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001570 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001571 PKG_CONFIG path to pkg-config utility
1572 PKG_CONFIG_PATH
1573 directories to add to pkg-config's search path
1574 PKG_CONFIG_LIBDIR
1575 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001576
1577Use these variables to override the choices made by `configure' or to help
1578it to find libraries and programs with nonstandard names/locations.
1579
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001580Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001581_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001582ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001583fi
1584
1585if test "$ac_init_help" = "recursive"; then
1586 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001587 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001588 test -d "$ac_dir" ||
1589 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1590 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 ac_builddir=.
1592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593case "$ac_dir" in
1594.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1595*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001596 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001598 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 case $ac_top_builddir_sub in
1600 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1601 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1602 esac ;;
1603esac
1604ac_abs_top_builddir=$ac_pwd
1605ac_abs_builddir=$ac_pwd$ac_dir_suffix
1606# for backward compatibility:
1607ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001608
1609case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001610 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001612 ac_top_srcdir=$ac_top_builddir_sub
1613 ac_abs_top_srcdir=$ac_pwd ;;
1614 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001615 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 ac_top_srcdir=$srcdir
1617 ac_abs_top_srcdir=$srcdir ;;
1618 *) # Relative name.
1619 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1620 ac_top_srcdir=$ac_top_build_prefix$srcdir
1621 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001622esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001623ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001624
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001625 cd "$ac_dir" || { ac_status=$?; continue; }
1626 # Check for guested configure.
1627 if test -f "$ac_srcdir/configure.gnu"; then
1628 echo &&
1629 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1630 elif test -f "$ac_srcdir/configure"; then
1631 echo &&
1632 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001633 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001634 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001635 fi || ac_status=$?
1636 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001637 done
1638fi
1639
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001640test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001641if $ac_init_version; then
1642 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001643python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001644generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001645
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001646Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001647This configure script is free software; the Free Software Foundation
1648gives unlimited permission to copy, distribute and modify it.
1649_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001650 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001652
1653## ------------------------ ##
1654## Autoconf initialization. ##
1655## ------------------------ ##
1656
1657# ac_fn_c_try_compile LINENO
1658# --------------------------
1659# Try to compile conftest.$ac_ext, and return whether this succeeded.
1660ac_fn_c_try_compile ()
1661{
1662 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1663 rm -f conftest.$ac_objext
1664 if { { ac_try="$ac_compile"
1665case "(($ac_try" in
1666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1667 *) ac_try_echo=$ac_try;;
1668esac
1669eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1670$as_echo "$ac_try_echo"; } >&5
1671 (eval "$ac_compile") 2>conftest.err
1672 ac_status=$?
1673 if test -s conftest.err; then
1674 grep -v '^ *+' conftest.err >conftest.er1
1675 cat conftest.er1 >&5
1676 mv -f conftest.er1 conftest.err
1677 fi
1678 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1679 test $ac_status = 0; } && {
1680 test -z "$ac_c_werror_flag" ||
1681 test ! -s conftest.err
1682 } && test -s conftest.$ac_objext; then :
1683 ac_retval=0
1684else
1685 $as_echo "$as_me: failed program was:" >&5
1686sed 's/^/| /' conftest.$ac_ext >&5
1687
1688 ac_retval=1
1689fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001690 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001691 as_fn_set_status $ac_retval
1692
1693} # ac_fn_c_try_compile
1694
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001695# ac_fn_c_try_cpp LINENO
1696# ----------------------
1697# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1698ac_fn_c_try_cpp ()
1699{
1700 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1701 if { { ac_try="$ac_cpp conftest.$ac_ext"
1702case "(($ac_try" in
1703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1704 *) ac_try_echo=$ac_try;;
1705esac
1706eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1707$as_echo "$ac_try_echo"; } >&5
1708 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1709 ac_status=$?
1710 if test -s conftest.err; then
1711 grep -v '^ *+' conftest.err >conftest.er1
1712 cat conftest.er1 >&5
1713 mv -f conftest.er1 conftest.err
1714 fi
1715 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1716 test $ac_status = 0; } > conftest.i && {
1717 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1718 test ! -s conftest.err
1719 }; then :
1720 ac_retval=0
1721else
1722 $as_echo "$as_me: failed program was:" >&5
1723sed 's/^/| /' conftest.$ac_ext >&5
1724
1725 ac_retval=1
1726fi
1727 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1728 as_fn_set_status $ac_retval
1729
1730} # ac_fn_c_try_cpp
1731
Matthias Kloseb9621712010-04-24 17:59:49 +00001732# ac_fn_c_try_link LINENO
1733# -----------------------
1734# Try to link conftest.$ac_ext, and return whether this succeeded.
1735ac_fn_c_try_link ()
1736{
1737 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1738 rm -f conftest.$ac_objext conftest$ac_exeext
1739 if { { ac_try="$ac_link"
1740case "(($ac_try" in
1741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1742 *) ac_try_echo=$ac_try;;
1743esac
1744eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1745$as_echo "$ac_try_echo"; } >&5
1746 (eval "$ac_link") 2>conftest.err
1747 ac_status=$?
1748 if test -s conftest.err; then
1749 grep -v '^ *+' conftest.err >conftest.er1
1750 cat conftest.er1 >&5
1751 mv -f conftest.er1 conftest.err
1752 fi
1753 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1754 test $ac_status = 0; } && {
1755 test -z "$ac_c_werror_flag" ||
1756 test ! -s conftest.err
1757 } && test -s conftest$ac_exeext && {
1758 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001759 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001760 }; then :
1761 ac_retval=0
1762else
1763 $as_echo "$as_me: failed program was:" >&5
1764sed 's/^/| /' conftest.$ac_ext >&5
1765
1766 ac_retval=1
1767fi
1768 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1769 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1770 # interfere with the next link command; also delete a directory that is
1771 # left behind by Apple's compiler. We do this before executing the actions.
1772 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001773 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001774 as_fn_set_status $ac_retval
1775
1776} # ac_fn_c_try_link
1777
Matthias Kloseb9621712010-04-24 17:59:49 +00001778# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1779# -------------------------------------------------------
1780# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1781# the include files in INCLUDES and setting the cache variable VAR
1782# accordingly.
1783ac_fn_c_check_header_mongrel ()
1784{
1785 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001786 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1788$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001789if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001790 $as_echo_n "(cached) " >&6
1791fi
1792eval ac_res=\$$3
1793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1794$as_echo "$ac_res" >&6; }
1795else
1796 # Is the header compilable?
1797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1798$as_echo_n "checking $2 usability... " >&6; }
1799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1800/* end confdefs.h. */
1801$4
1802#include <$2>
1803_ACEOF
1804if ac_fn_c_try_compile "$LINENO"; then :
1805 ac_header_compiler=yes
1806else
1807 ac_header_compiler=no
1808fi
1809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1811$as_echo "$ac_header_compiler" >&6; }
1812
1813# Is the header present?
1814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1815$as_echo_n "checking $2 presence... " >&6; }
1816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1817/* end confdefs.h. */
1818#include <$2>
1819_ACEOF
1820if ac_fn_c_try_cpp "$LINENO"; then :
1821 ac_header_preproc=yes
1822else
1823 ac_header_preproc=no
1824fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001825rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1827$as_echo "$ac_header_preproc" >&6; }
1828
1829# So? What about this header?
1830case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1831 yes:no: )
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1833$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1835$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1836 ;;
1837 no:yes:* )
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1839$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1841$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1843$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1845$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1847$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001848( $as_echo "## --------------------------------------- ##
1849## Report this to https://bugs.python.org/ ##
1850## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001851 ) | sed "s/^/$as_me: WARNING: /" >&2
1852 ;;
1853esac
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1855$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001856if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001857 $as_echo_n "(cached) " >&6
1858else
1859 eval "$3=\$ac_header_compiler"
1860fi
1861eval ac_res=\$$3
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1863$as_echo "$ac_res" >&6; }
1864fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001865 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001866
1867} # ac_fn_c_check_header_mongrel
1868
1869# ac_fn_c_try_run LINENO
1870# ----------------------
1871# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1872# that executables *can* be run.
1873ac_fn_c_try_run ()
1874{
1875 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1876 if { { ac_try="$ac_link"
1877case "(($ac_try" in
1878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1879 *) ac_try_echo=$ac_try;;
1880esac
1881eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1882$as_echo "$ac_try_echo"; } >&5
1883 (eval "$ac_link") 2>&5
1884 ac_status=$?
1885 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1886 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1887 { { case "(($ac_try" in
1888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1889 *) ac_try_echo=$ac_try;;
1890esac
1891eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1892$as_echo "$ac_try_echo"; } >&5
1893 (eval "$ac_try") 2>&5
1894 ac_status=$?
1895 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1896 test $ac_status = 0; }; }; then :
1897 ac_retval=0
1898else
1899 $as_echo "$as_me: program exited with status $ac_status" >&5
1900 $as_echo "$as_me: failed program was:" >&5
1901sed 's/^/| /' conftest.$ac_ext >&5
1902
1903 ac_retval=$ac_status
1904fi
1905 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001906 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001907 as_fn_set_status $ac_retval
1908
1909} # ac_fn_c_try_run
1910
1911# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1912# -------------------------------------------------------
1913# Tests whether HEADER exists and can be compiled using the include files in
1914# INCLUDES, setting the cache variable VAR accordingly.
1915ac_fn_c_check_header_compile ()
1916{
1917 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1919$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001920if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001921 $as_echo_n "(cached) " >&6
1922else
1923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1924/* end confdefs.h. */
1925$4
1926#include <$2>
1927_ACEOF
1928if ac_fn_c_try_compile "$LINENO"; then :
1929 eval "$3=yes"
1930else
1931 eval "$3=no"
1932fi
1933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1934fi
1935eval ac_res=\$$3
1936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1937$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001938 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001939
1940} # ac_fn_c_check_header_compile
1941
Matthias Kloseb9621712010-04-24 17:59:49 +00001942# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1943# -------------------------------------------
1944# Tests whether TYPE exists after having included INCLUDES, setting cache
1945# variable VAR accordingly.
1946ac_fn_c_check_type ()
1947{
1948 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1950$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001951if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001952 $as_echo_n "(cached) " >&6
1953else
1954 eval "$3=no"
1955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1956/* end confdefs.h. */
1957$4
1958int
1959main ()
1960{
1961if (sizeof ($2))
1962 return 0;
1963 ;
1964 return 0;
1965}
1966_ACEOF
1967if ac_fn_c_try_compile "$LINENO"; then :
1968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1969/* end confdefs.h. */
1970$4
1971int
1972main ()
1973{
1974if (sizeof (($2)))
1975 return 0;
1976 ;
1977 return 0;
1978}
1979_ACEOF
1980if ac_fn_c_try_compile "$LINENO"; then :
1981
1982else
1983 eval "$3=yes"
1984fi
1985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1986fi
1987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1988fi
1989eval ac_res=\$$3
1990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1991$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001992 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001993
1994} # ac_fn_c_check_type
1995
Matthias Kloseb9621712010-04-24 17:59:49 +00001996# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1997# --------------------------------------------
1998# Tries to find the compile-time value of EXPR in a program that includes
1999# INCLUDES, setting VAR accordingly. Returns whether the value could be
2000# computed
2001ac_fn_c_compute_int ()
2002{
2003 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2004 if test "$cross_compiling" = yes; then
2005 # Depending upon the size, compute the lo and hi bounds.
2006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2007/* end confdefs.h. */
2008$4
2009int
2010main ()
2011{
2012static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002013test_array [0] = 0;
2014return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002015
2016 ;
2017 return 0;
2018}
2019_ACEOF
2020if ac_fn_c_try_compile "$LINENO"; then :
2021 ac_lo=0 ac_mid=0
2022 while :; do
2023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2024/* end confdefs.h. */
2025$4
2026int
2027main ()
2028{
2029static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002030test_array [0] = 0;
2031return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002032
2033 ;
2034 return 0;
2035}
2036_ACEOF
2037if ac_fn_c_try_compile "$LINENO"; then :
2038 ac_hi=$ac_mid; break
2039else
2040 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2041 if test $ac_lo -le $ac_mid; then
2042 ac_lo= ac_hi=
2043 break
2044 fi
2045 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2046fi
2047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2048 done
2049else
2050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051/* end confdefs.h. */
2052$4
2053int
2054main ()
2055{
2056static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002057test_array [0] = 0;
2058return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002059
2060 ;
2061 return 0;
2062}
2063_ACEOF
2064if ac_fn_c_try_compile "$LINENO"; then :
2065 ac_hi=-1 ac_mid=-1
2066 while :; do
2067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2068/* end confdefs.h. */
2069$4
2070int
2071main ()
2072{
2073static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002074test_array [0] = 0;
2075return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002076
2077 ;
2078 return 0;
2079}
2080_ACEOF
2081if ac_fn_c_try_compile "$LINENO"; then :
2082 ac_lo=$ac_mid; break
2083else
2084 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2085 if test $ac_mid -le $ac_hi; then
2086 ac_lo= ac_hi=
2087 break
2088 fi
2089 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2090fi
2091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2092 done
2093else
2094 ac_lo= ac_hi=
2095fi
2096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099# Binary search between lo and hi bounds.
2100while test "x$ac_lo" != "x$ac_hi"; do
2101 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2103/* end confdefs.h. */
2104$4
2105int
2106main ()
2107{
2108static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002109test_array [0] = 0;
2110return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002111
2112 ;
2113 return 0;
2114}
2115_ACEOF
2116if ac_fn_c_try_compile "$LINENO"; then :
2117 ac_hi=$ac_mid
2118else
2119 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2120fi
2121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2122done
2123case $ac_lo in #((
2124?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2125'') ac_retval=1 ;;
2126esac
2127 else
2128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2129/* end confdefs.h. */
2130$4
2131static long int longval () { return $2; }
2132static unsigned long int ulongval () { return $2; }
2133#include <stdio.h>
2134#include <stdlib.h>
2135int
2136main ()
2137{
2138
2139 FILE *f = fopen ("conftest.val", "w");
2140 if (! f)
2141 return 1;
2142 if (($2) < 0)
2143 {
2144 long int i = longval ();
2145 if (i != ($2))
2146 return 1;
2147 fprintf (f, "%ld", i);
2148 }
2149 else
2150 {
2151 unsigned long int i = ulongval ();
2152 if (i != ($2))
2153 return 1;
2154 fprintf (f, "%lu", i);
2155 }
2156 /* Do not output a trailing newline, as this causes \r\n confusion
2157 on some platforms. */
2158 return ferror (f) || fclose (f) != 0;
2159
2160 ;
2161 return 0;
2162}
2163_ACEOF
2164if ac_fn_c_try_run "$LINENO"; then :
2165 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2166else
2167 ac_retval=1
2168fi
2169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2170 conftest.$ac_objext conftest.beam conftest.$ac_ext
2171rm -f conftest.val
2172
2173 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002174 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002175 as_fn_set_status $ac_retval
2176
2177} # ac_fn_c_compute_int
2178
2179# ac_fn_c_check_func LINENO FUNC VAR
2180# ----------------------------------
2181# Tests whether FUNC exists, setting the cache variable VAR accordingly
2182ac_fn_c_check_func ()
2183{
2184 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2186$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002187if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002188 $as_echo_n "(cached) " >&6
2189else
2190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191/* end confdefs.h. */
2192/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2193 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2194#define $2 innocuous_$2
2195
2196/* System header to define __stub macros and hopefully few prototypes,
2197 which can conflict with char $2 (); below.
2198 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2199 <limits.h> exists even on freestanding compilers. */
2200
2201#ifdef __STDC__
2202# include <limits.h>
2203#else
2204# include <assert.h>
2205#endif
2206
2207#undef $2
2208
2209/* Override any GCC internal prototype to avoid an error.
2210 Use char because int might match the return type of a GCC
2211 builtin and then its argument prototype would still apply. */
2212#ifdef __cplusplus
2213extern "C"
2214#endif
2215char $2 ();
2216/* The GNU C library defines this for functions which it implements
2217 to always fail with ENOSYS. Some functions are actually named
2218 something starting with __ and the normal name is an alias. */
2219#if defined __stub_$2 || defined __stub___$2
2220choke me
2221#endif
2222
2223int
2224main ()
2225{
2226return $2 ();
2227 ;
2228 return 0;
2229}
2230_ACEOF
2231if ac_fn_c_try_link "$LINENO"; then :
2232 eval "$3=yes"
2233else
2234 eval "$3=no"
2235fi
2236rm -f core conftest.err conftest.$ac_objext \
2237 conftest$ac_exeext conftest.$ac_ext
2238fi
2239eval ac_res=\$$3
2240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2241$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002242 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002243
2244} # ac_fn_c_check_func
2245
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002246# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2247# ---------------------------------------------
2248# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2249# accordingly.
2250ac_fn_c_check_decl ()
2251{
2252 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2253 as_decl_name=`echo $2|sed 's/ *(.*//'`
2254 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2256$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2257if eval \${$3+:} false; then :
2258 $as_echo_n "(cached) " >&6
2259else
2260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261/* end confdefs.h. */
2262$4
2263int
2264main ()
2265{
2266#ifndef $as_decl_name
2267#ifdef __cplusplus
2268 (void) $as_decl_use;
2269#else
2270 (void) $as_decl_name;
2271#endif
2272#endif
2273
2274 ;
2275 return 0;
2276}
2277_ACEOF
2278if ac_fn_c_try_compile "$LINENO"; then :
2279 eval "$3=yes"
2280else
2281 eval "$3=no"
2282fi
2283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2284fi
2285eval ac_res=\$$3
2286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2287$as_echo "$ac_res" >&6; }
2288 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2289
2290} # ac_fn_c_check_decl
2291
Matthias Kloseb9621712010-04-24 17:59:49 +00002292# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2293# ----------------------------------------------------
2294# Tries to find if the field MEMBER exists in type AGGR, after including
2295# INCLUDES, setting cache variable VAR accordingly.
2296ac_fn_c_check_member ()
2297{
2298 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2300$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002301if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002302 $as_echo_n "(cached) " >&6
2303else
2304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2305/* end confdefs.h. */
2306$5
2307int
2308main ()
2309{
2310static $2 ac_aggr;
2311if (ac_aggr.$3)
2312return 0;
2313 ;
2314 return 0;
2315}
2316_ACEOF
2317if ac_fn_c_try_compile "$LINENO"; then :
2318 eval "$4=yes"
2319else
2320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2321/* end confdefs.h. */
2322$5
2323int
2324main ()
2325{
2326static $2 ac_aggr;
2327if (sizeof ac_aggr.$3)
2328return 0;
2329 ;
2330 return 0;
2331}
2332_ACEOF
2333if ac_fn_c_try_compile "$LINENO"; then :
2334 eval "$4=yes"
2335else
2336 eval "$4=no"
2337fi
2338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2339fi
2340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2341fi
2342eval ac_res=\$$4
2343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2344$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002345 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002346
2347} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002348cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002349This file contains any messages produced by compilers while
2350running configure, to aid debugging if configure makes a mistake.
2351
Ned Deily4829bc62016-09-12 17:29:04 -04002352It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002353generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002354
2355 $ $0 $@
2356
2357_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002358exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002359{
2360cat <<_ASUNAME
2361## --------- ##
2362## Platform. ##
2363## --------- ##
2364
2365hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2366uname -m = `(uname -m) 2>/dev/null || echo unknown`
2367uname -r = `(uname -r) 2>/dev/null || echo unknown`
2368uname -s = `(uname -s) 2>/dev/null || echo unknown`
2369uname -v = `(uname -v) 2>/dev/null || echo unknown`
2370
2371/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2372/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2373
2374/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2375/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2376/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002377/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002378/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2379/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2380/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2381
2382_ASUNAME
2383
2384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2385for as_dir in $PATH
2386do
2387 IFS=$as_save_IFS
2388 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002389 $as_echo "PATH: $as_dir"
2390 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002391IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002392
2393} >&5
2394
2395cat >&5 <<_ACEOF
2396
2397
2398## ----------- ##
2399## Core tests. ##
2400## ----------- ##
2401
2402_ACEOF
2403
2404
2405# Keep a trace of the command line.
2406# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002407# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002408# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002409# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002410ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002411ac_configure_args0=
2412ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002413ac_must_keep_next=false
2414for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002415do
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 for ac_arg
2417 do
2418 case $ac_arg in
2419 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2420 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2421 | -silent | --silent | --silen | --sile | --sil)
2422 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002423 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002424 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 esac
2426 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002427 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002429 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002431 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002433 case $ac_arg in
2434 *=* | --config-cache | -C | -disable-* | --disable-* \
2435 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2436 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2437 | -with-* | --with-* | -without-* | --without-* | --x)
2438 case "$ac_configure_args0 " in
2439 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2440 esac
2441 ;;
2442 -* ) ac_must_keep_next=true ;;
2443 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002444 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002445 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002446 ;;
2447 esac
2448 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002449done
Matthias Kloseb9621712010-04-24 17:59:49 +00002450{ ac_configure_args0=; unset ac_configure_args0;}
2451{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002452
2453# When interrupted or exit'd, cleanup temporary files, and complete
2454# config.log. We remove comments because anyway the quotes in there
2455# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456# WARNING: Use '\'' to represent an apostrophe within the trap.
2457# 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 +00002458trap 'exit_status=$?
2459 # Save into config.log some information that might help in debugging.
2460 {
2461 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002462
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002463 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002464## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002465## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002466 echo
2467 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468(
2469 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2470 eval ac_val=\$$ac_var
2471 case $ac_val in #(
2472 *${as_nl}*)
2473 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002474 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2475$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 esac
2477 case $ac_var in #(
2478 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002479 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2480 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 esac ;;
2482 esac
2483 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2486 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 "s/'\''/'\''\\\\'\'''\''/g;
2489 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2490 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002491 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002493 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 esac |
2495 sort
2496)
Martin v. Löwis11437992002-04-12 09:54:03 +00002497 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002498
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002499 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002500## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002501## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 echo
2503 for ac_var in $ac_subst_vars
2504 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505 eval ac_val=\$$ac_var
2506 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 done | sort
2511 echo
2512
2513 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002514 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 echo
2518 for ac_var in $ac_subst_files
2519 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 eval ac_val=\$$ac_var
2521 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002522 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 done | sort
2526 echo
2527 fi
2528
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002530 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002531## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002532## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 echo
2536 fi
2537 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002538 $as_echo "$as_me: caught signal $ac_signal"
2539 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 rm -f core *.core core.conftest.* &&
2542 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002543 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002545for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002546 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002547done
2548ac_signal=0
2549
2550# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002552
Matthias Kloseb9621712010-04-24 17:59:49 +00002553$as_echo "/* confdefs.h */" > confdefs.h
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555# Predefined preprocessor variables.
2556
2557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_NAME "$PACKAGE_NAME"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_VERSION "$PACKAGE_VERSION"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_STRING "$PACKAGE_STRING"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573cat >>confdefs.h <<_ACEOF
2574#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2575_ACEOF
2576
Matthias Kloseb9621712010-04-24 17:59:49 +00002577cat >>confdefs.h <<_ACEOF
2578#define PACKAGE_URL "$PACKAGE_URL"
2579_ACEOF
2580
Martin v. Löwis11437992002-04-12 09:54:03 +00002581
2582# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002583# Prefer an explicitly selected file to automatically selected ones.
2584ac_site_file1=NONE
2585ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002587 # We do not want a PATH search for config.site.
2588 case $CONFIG_SITE in #((
2589 -*) ac_site_file1=./$CONFIG_SITE;;
2590 */*) ac_site_file1=$CONFIG_SITE;;
2591 *) ac_site_file1=./$CONFIG_SITE;;
2592 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 ac_site_file1=$prefix/share/config.site
2595 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596else
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 ac_site_file1=$ac_default_prefix/share/config.site
2598 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002600for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601do
Matthias Kloseb9621712010-04-24 17:59:49 +00002602 test "x$ac_site_file" = xNONE && continue
2603 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2604 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2605$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002607 . "$ac_site_file" \
2608 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2609$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2610as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002611See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612 fi
2613done
2614
2615if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002616 # Some versions of bash will fail to source /dev/null (special files
2617 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2618 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2620$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2623 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 esac
2625 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002626else
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2628$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 >$cache_file
2630fi
2631
2632# Check that the precious variables saved in the cache have kept the same
2633# value.
2634ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002635for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2637 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2639 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 case $ac_old_set,$ac_new_set in
2641 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2643$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 +00002644 ac_cache_corrupted=: ;;
2645 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002646 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2647$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 ac_cache_corrupted=: ;;
2649 ,);;
2650 *)
2651 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002652 # differences in whitespace do not lead to failure.
2653 ac_old_val_w=`echo x $ac_old_val`
2654 ac_new_val_w=`echo x $ac_new_val`
2655 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2657$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2658 ac_cache_corrupted=:
2659 else
2660 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2661$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2662 eval $ac_var=\$ac_old_val
2663 fi
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2665$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2667$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 fi;;
2669 esac
2670 # Pass precious variables to config.status.
2671 if test "$ac_new_set" = set; then
2672 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002673 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 *) ac_arg=$ac_var=$ac_new_val ;;
2675 esac
2676 case " $ac_configure_args " in
2677 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002679 esac
2680 fi
2681done
2682if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002683 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2686$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002687 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002689## -------------------- ##
2690## Main body of script. ##
2691## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002692
Guido van Rossum7f43da71994-08-01 12:15:30 +00002693ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002695ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2696ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2697ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002698
Guido van Rossum627b2d71993-12-24 10:39:16 +00002699
Michael W. Hudson54241132001-12-07 15:38:26 +00002700
Trent Nelson4d4ec652012-10-16 08:51:24 -04002701
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002702if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002703 # If we're building out-of-tree, we need to make sure the following
2704 # resources get picked up before their $srcdir counterparts.
2705 # Objects/ -> typeslots.inc
2706 # Include/ -> Python-ast.h, graminit.h
2707 # Python/ -> importlib.h
2708 # (A side effect of this is that these resources will automatically be
2709 # regenerated when building out-of-tree, regardless of whether or not
2710 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2711 # off.)
2712 BASECPPFLAGS="-IObjects -IInclude -IPython"
2713else
2714 BASECPPFLAGS=""
2715fi
2716
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002717
2718
2719
2720
Victor Stinner9ed34a82017-05-02 22:35:58 +02002721if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002722then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002723# Extract the first word of "git", so it can be a program name with args.
2724set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2726$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002727if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002728 $as_echo_n "(cached) " >&6
2729else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002730 if test -n "$HAS_GIT"; then
2731 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002732else
2733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2734for as_dir in $PATH
2735do
2736 IFS=$as_save_IFS
2737 test -z "$as_dir" && as_dir=.
2738 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002739 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002740 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002741 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2742 break 2
2743 fi
2744done
2745 done
2746IFS=$as_save_IFS
2747
Ned Deily5c4b0d02017-03-04 00:19:55 -05002748 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002749fi
2750fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002751HAS_GIT=$ac_cv_prog_HAS_GIT
2752if test -n "$HAS_GIT"; then
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2754$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755else
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2757$as_echo "no" >&6; }
2758fi
2759
2760
2761else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002762HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002763fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002764if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002765then
Ned Deily554626a2017-03-20 23:41:52 -04002766 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2767 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002768 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002769else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002770 GITVERSION=""
2771 GITTAG=""
2772 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002773fi
2774
2775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002776ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002777
2778
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002779ac_aux_dir=
2780for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2781 if test -f "$ac_dir/install-sh"; then
2782 ac_aux_dir=$ac_dir
2783 ac_install_sh="$ac_aux_dir/install-sh -c"
2784 break
2785 elif test -f "$ac_dir/install.sh"; then
2786 ac_aux_dir=$ac_dir
2787 ac_install_sh="$ac_aux_dir/install.sh -c"
2788 break
2789 elif test -f "$ac_dir/shtool"; then
2790 ac_aux_dir=$ac_dir
2791 ac_install_sh="$ac_aux_dir/shtool install -c"
2792 break
2793 fi
2794done
2795if test -z "$ac_aux_dir"; then
2796 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2797fi
2798
2799# These three variables are undocumented and unsupported,
2800# and are intended to be withdrawn in a future Autoconf release.
2801# They can cause serious problems if a builder's source tree is in a directory
2802# whose full name contains unusual characters.
2803ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2804ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2805ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2806
2807
2808# Make sure we can run config.sub.
2809$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2810 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2811
2812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2813$as_echo_n "checking build system type... " >&6; }
2814if ${ac_cv_build+:} false; then :
2815 $as_echo_n "(cached) " >&6
2816else
2817 ac_build_alias=$build_alias
2818test "x$ac_build_alias" = x &&
2819 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2820test "x$ac_build_alias" = x &&
2821 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2822ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2823 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2824
2825fi
2826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2827$as_echo "$ac_cv_build" >&6; }
2828case $ac_cv_build in
2829*-*-*) ;;
2830*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2831esac
2832build=$ac_cv_build
2833ac_save_IFS=$IFS; IFS='-'
2834set x $ac_cv_build
2835shift
2836build_cpu=$1
2837build_vendor=$2
2838shift; shift
2839# Remember, the first character of IFS is used to create $*,
2840# except with old shells:
2841build_os=$*
2842IFS=$ac_save_IFS
2843case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2844
2845
2846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2847$as_echo_n "checking host system type... " >&6; }
2848if ${ac_cv_host+:} false; then :
2849 $as_echo_n "(cached) " >&6
2850else
2851 if test "x$host_alias" = x; then
2852 ac_cv_host=$ac_cv_build
2853else
2854 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2855 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2856fi
2857
2858fi
2859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2860$as_echo "$ac_cv_host" >&6; }
2861case $ac_cv_host in
2862*-*-*) ;;
2863*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2864esac
2865host=$ac_cv_host
2866ac_save_IFS=$IFS; IFS='-'
2867set x $ac_cv_host
2868shift
2869host_cpu=$1
2870host_vendor=$2
2871shift; shift
2872# Remember, the first character of IFS is used to create $*,
2873# except with old shells:
2874host_os=$*
2875IFS=$ac_save_IFS
2876case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2877
2878
2879
doko@python.orga10e4a92013-01-25 18:45:12 +01002880
2881
Ned Deilyfcbc2462014-08-22 13:32:49 -07002882# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2883rm -f pybuilddir.txt
2884
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002885for ac_prog in python$PACKAGE_VERSION python3 python
2886do
2887 # Extract the first word of "$ac_prog", so it can be a program name with args.
2888set dummy $ac_prog; ac_word=$2
2889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2890$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002891if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002892 $as_echo_n "(cached) " >&6
2893else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002894 if test -n "$PYTHON_FOR_REGEN"; then
2895 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002896else
2897as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2898for as_dir in $PATH
2899do
2900 IFS=$as_save_IFS
2901 test -z "$as_dir" && as_dir=.
2902 for ac_exec_ext in '' $ac_executable_extensions; do
2903 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002904 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002905 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2906 break 2
2907 fi
2908done
2909 done
2910IFS=$as_save_IFS
2911
2912fi
2913fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002914PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2915if test -n "$PYTHON_FOR_REGEN"; then
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2917$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002918else
2919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2920$as_echo "no" >&6; }
2921fi
2922
2923
Victor Stinnera5c62a82017-05-03 18:21:48 +02002924 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002925done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002926test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002927
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002928
2929
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002930if test "$cross_compiling" = yes; then
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2932$as_echo_n "checking for python interpreter for cross build... " >&6; }
2933 if test -z "$PYTHON_FOR_BUILD"; then
2934 for interp in python$PACKAGE_VERSION python3 python; do
2935 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002936 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 +02002937 break
2938 fi
2939 interp=
2940 done
2941 if test x$interp = x; then
2942 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2943 fi
2944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2945$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002946 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 +02002947 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002948elif test "$cross_compiling" = maybe; then
2949 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002950else
2951 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2952fi
2953
2954
Martin v. Löwis11437992002-04-12 09:54:03 +00002955
Benjamin Petersond23f8222009-04-05 19:13:16 +00002956if test "$prefix" != "/"; then
2957 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2958fi
2959
2960
Martin v. Löwis11437992002-04-12 09:54:03 +00002961
2962
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002963# We don't use PACKAGE_ variables, and they cause conflicts
2964# with other autoconf-based packages that include Python.h
2965grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2966rm confdefs.h
2967mv confdefs.h.new confdefs.h
2968
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002969
Ned Deily4829bc62016-09-12 17:29:04 -04002970VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002971
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002972# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002973
2974SOVERSION=1.0
2975
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002976# The later defininition of _XOPEN_SOURCE disables certain features
2977# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2978
Matthias Kloseb9621712010-04-24 17:59:49 +00002979$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002980
2981
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002982# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2983# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2984# them.
2985
Matthias Kloseb9621712010-04-24 17:59:49 +00002986$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002987
2988
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002989# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2990# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2991# them.
2992
Matthias Kloseb9621712010-04-24 17:59:49 +00002993$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002994
2995
Martin v. Löwisd6320502004-08-12 13:45:08 +00002996# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002997# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2998# them.
2999
Matthias Kloseb9621712010-04-24 17:59:49 +00003000$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003001
3002
3003
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003004define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003005
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003006# Arguments passed to configure.
3007
3008CONFIG_ARGS="$ac_configure_args"
3009
Matthias Kloseb9621712010-04-24 17:59:49 +00003010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3011$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003012# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003013if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003014 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003015 case $enableval in
3016 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003017 # Locate the best usable SDK, see Mac/README.txt for more
3018 # information
3019 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003020 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003021 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003022 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3023 if test ! -d "${enableval}"
3024 then
3025 enableval=/
3026 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003027 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003028 ;;
3029 esac
3030 case $enableval in
3031 no)
3032 UNIVERSALSDK=
3033 enable_universalsdk=
3034 ;;
3035 *)
3036 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003037 if test ! -d "${UNIVERSALSDK}"
3038 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003039 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003040 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003041 ;;
3042 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003043
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044
Thomas Wouters477c8d52006-05-27 19:21:47 +00003045else
3046
3047 UNIVERSALSDK=
3048 enable_universalsdk=
3049
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003050fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003051
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003052if test -n "${UNIVERSALSDK}"
3053then
Matthias Kloseb9621712010-04-24 17:59:49 +00003054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3055$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003056else
Matthias Kloseb9621712010-04-24 17:59:49 +00003057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3058$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003059fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003061
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003062
Ned Deily87adb6e2013-10-18 21:09:56 -07003063ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003064
Ned Deilycbfb9a52012-06-23 16:02:19 -07003065# For backward compatibility reasons we prefer to select '32-bit' if available,
3066# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003067UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003068if test "`uname -s`" = "Darwin"
3069then
3070 if test -n "${UNIVERSALSDK}"
3071 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003072 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003073 then
3074 UNIVERSAL_ARCHS="intel"
3075 fi
3076 fi
3077fi
3078
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003079
Matthias Kloseb9621712010-04-24 17:59:49 +00003080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3081$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003082
3083# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003084if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003085 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086 UNIVERSAL_ARCHS="$withval"
3087
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003088fi
3089
Ned Deily87adb6e2013-10-18 21:09:56 -07003090if test -n "${UNIVERSALSDK}"
3091then
3092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3093$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3094else
3095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3096$as_echo "no" >&6; }
3097fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003098
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003099
3100# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003101if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003102 withval=$with_framework_name;
3103 PYTHONFRAMEWORK=${withval}
3104 PYTHONFRAMEWORKDIR=${withval}.framework
3105 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3106
3107else
3108
3109 PYTHONFRAMEWORK=Python
3110 PYTHONFRAMEWORKDIR=Python.framework
3111 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3112
3113fi
3114
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003115# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003116if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003117 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003118 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003119 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003120 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003121 esac
3122 case $enableval in
3123 no)
3124 PYTHONFRAMEWORK=
3125 PYTHONFRAMEWORKDIR=no-framework
3126 PYTHONFRAMEWORKPREFIX=
3127 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003128 FRAMEWORKINSTALLFIRST=
3129 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003130 FRAMEWORKALTINSTALLFIRST=
3131 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003132 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003133 if test "x${prefix}" = "xNONE"; then
3134 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3135 else
3136 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3137 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003138 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003139 ;;
3140 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003141 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003142 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003143 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003144 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003145 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3146 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003147 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003148 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003149
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003150 if test "x${prefix}" = "xNONE" ; then
3151 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003152
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003153 else
3154 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3155 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003156
3157 case "${enableval}" in
3158 /System*)
3159 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3160 if test "${prefix}" = "NONE" ; then
3161 # See below
3162 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3163 fi
3164 ;;
3165
3166 /Library*)
3167 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3168 ;;
3169
3170 */Library/Frameworks)
3171 MDIR="`dirname "${enableval}"`"
3172 MDIR="`dirname "${MDIR}"`"
3173 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3174
3175 if test "${prefix}" = "NONE"; then
3176 # User hasn't specified the
3177 # --prefix option, but wants to install
3178 # the framework in a non-default location,
3179 # ensure that the compatibility links get
3180 # installed relative to that prefix as well
3181 # instead of in /usr/local.
3182 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3183 fi
3184 ;;
3185
3186 *)
3187 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3188 ;;
3189 esac
3190
Jack Jansen127e56e2001-09-11 14:41:54 +00003191 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003192
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003193 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003194 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003195 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003196
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003197 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003198
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003199 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3200
3201 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3202
Jack Jansene578a632001-08-15 01:27:14 +00003203 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003204
Guido van Rossum563e7081996-09-10 18:20:48 +00003205else
Martin v. Löwis11437992002-04-12 09:54:03 +00003206
Jack Jansene578a632001-08-15 01:27:14 +00003207 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003208 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003209 PYTHONFRAMEWORKPREFIX=
3210 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003211 FRAMEWORKINSTALLFIRST=
3212 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003213 FRAMEWORKALTINSTALLFIRST=
3214 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003215 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003216 if test "x${prefix}" = "xNONE" ; then
3217 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3218 else
3219 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3220 fi
Jack Jansene578a632001-08-15 01:27:14 +00003221 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003222
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003223
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003224fi
3225
Thomas Wouters477c8d52006-05-27 19:21:47 +00003226
3227
Michael W. Hudson54241132001-12-07 15:38:26 +00003228
3229
3230
3231
Jack Jansene578a632001-08-15 01:27:14 +00003232
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003233
3234
3235
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003236
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003237
Ned Deilyb8f944f2013-11-21 22:42:25 -08003238
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003239
3240cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003241#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003242_ACEOF
3243
3244
Jack Jansene578a632001-08-15 01:27:14 +00003245##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003246## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003247## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003248##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003249# Set name for machine-dependent library files
3250
Matthias Kloseb9621712010-04-24 17:59:49 +00003251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3252$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003253if test -z "$MACHDEP"
3254then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003255 # avoid using uname for cross builds
3256 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003257 # ac_sys_system and ac_sys_release are used for setting
3258 # a lot of different things including 'define_xopen_source'
3259 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003260 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003261 *-*-linux-android*)
3262 ac_sys_system=Linux-android
3263 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003264 *-*-linux*)
3265 ac_sys_system=Linux
3266 ;;
3267 *-*-cygwin*)
3268 ac_sys_system=Cygwin
3269 ;;
3270 *)
3271 # for now, limit cross builds to known configurations
3272 MACHDEP="unknown"
3273 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3274 esac
3275 ac_sys_release=
3276 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003277 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003278 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003279 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003280 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003281 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003282 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003283 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003284 fi
3285 ac_md_system=`echo $ac_sys_system |
3286 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3287 ac_md_release=`echo $ac_sys_release |
3288 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3289 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003290
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003292 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003293 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003294 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003295 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003296 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003297fi
Guido van Rossum91922671997-10-09 20:24:13 +00003298
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003299
3300if test "$cross_compiling" = yes; then
3301 case "$host" in
3302 *-*-linux*)
3303 case "$host_cpu" in
3304 arm*)
3305 _host_cpu=arm
3306 ;;
3307 *)
3308 _host_cpu=$host_cpu
3309 esac
3310 ;;
3311 *-*-cygwin*)
3312 _host_cpu=
3313 ;;
3314 *)
3315 # for now, limit cross builds to known configurations
3316 MACHDEP="unknown"
3317 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3318 esac
3319 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3320fi
3321
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003322# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3323# disable features if it is defined, without any means to access these
3324# features as extensions. For these systems, we skip the definition of
3325# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3326# some feature, make sure there is no alternative way to access this
3327# feature. Also, when using wildcards, make sure you have verified the
3328# need for not defining _XOPEN_SOURCE on all systems matching the
3329# wildcard, and that the wildcard does not include future systems
3330# (which may remove their limitations).
3331case $ac_sys_system/$ac_sys_release in
3332 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3333 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003334 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003335 # In addition, Stefan Krah confirms that issue #1244610 exists through
3336 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003337 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003338 define_xopen_source=no
3339 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3340 # also defined. This can be overridden by defining _BSD_SOURCE
3341 # As this has a different meaning on Linux, only define it on OpenBSD
3342
Matthias Kloseb9621712010-04-24 17:59:49 +00003343$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003344
3345 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003346 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003347 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3348 # also defined. This can be overridden by defining _BSD_SOURCE
3349 # As this has a different meaning on Linux, only define it on OpenBSD
3350
Matthias Kloseb9621712010-04-24 17:59:49 +00003351$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003352
3353 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003354 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3355 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3356 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003357 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003358 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003359 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3360 # request to enable features supported by the standard as a request
3361 # to disable features not supported by the standard. The best way
3362 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3363 # entirely and define __EXTENSIONS__ instead.
3364 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003365 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003366 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3367 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003368 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003369 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003370 define_xopen_source=no;;
3371 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003372 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003373 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003374 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003375 # On FreeBSD 4, the math functions C89 does not cover are never defined
3376 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3377 FreeBSD/4.*)
3378 define_xopen_source=no;;
3379 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3380 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3381 # identifies itself as Darwin/7.*
3382 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3383 # disables platform specific features beyond repair.
3384 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3385 # has no effect, don't bother defining them
3386 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003387 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003388 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003389 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003390 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3391 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3392 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003393 AIX/4)
3394 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003395 AIX/5)
3396 if test `uname -r` -eq 1; then
3397 define_xopen_source=no
3398 fi
3399 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003400 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3401 # defining NI_NUMERICHOST.
3402 QNX/6.3.2)
3403 define_xopen_source=no
3404 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003405
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003406esac
3407
3408if test $define_xopen_source = yes
3409then
Victor Stinner14d098d2011-09-07 22:29:43 +02003410 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
Victor Stinner14d098d2011-09-07 22:29:43 +02003412$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003413
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003414
3415 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3416 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3417 # several APIs are not declared. Since this is also needed in some
3418 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003419
Matthias Kloseb9621712010-04-24 17:59:49 +00003420$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003421
3422
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003423
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003424$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003425
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003426fi
3427
Christian Heimes647cd872013-12-07 23:39:33 +01003428# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3429case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003430 hp*|HP*)
3431 define_stdc_a1=yes;;
3432 *)
3433 define_stdc_a1=no;;
3434esac
3435
3436if test $define_stdc_a1 = yes
3437then
Christian Heimes647cd872013-12-07 23:39:33 +01003438
3439$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3440
Christian Heimesb02bcae2013-12-08 15:21:08 +01003441fi
Christian Heimes647cd872013-12-07 23:39:33 +01003442
Jack Jansen6b08a402004-06-03 12:41:45 +00003443# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3444# it may influence the way we can build extensions, so distutils
3445# needs to check it
3446
Thomas Wouters477c8d52006-05-27 19:21:47 +00003447
Jack Jansen6b08a402004-06-03 12:41:45 +00003448CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003449EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003450
Guido van Rossum627b2d71993-12-24 10:39:16 +00003451# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003452
3453# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3454# for debug/optimization stuff. BASECFLAGS is for flags that are required
3455# just to get things to compile and link. Users are free to override OPT
3456# when running configure or make. The build should not break if they do.
3457# BASECFLAGS should generally not be messed with, however.
3458
3459# XXX shouldn't some/most/all of this code be merged with the stuff later
3460# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3462$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003463
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003464# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003465if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003466 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003467 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003468 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003469 without_gcc=yes;;
3470 yes) CC=gcc
3471 without_gcc=no;;
3472 *) CC=$withval
3473 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003474 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003475else
Martin v. Löwis11437992002-04-12 09:54:03 +00003476
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003477 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003478 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003479 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003480 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003481 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003482fi
3483
Matthias Kloseb9621712010-04-24 17:59:49 +00003484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3485$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003486
Zachary Ware5af85642015-12-21 12:09:17 -06003487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3488$as_echo_n "checking for --with-icc... " >&6; }
3489
3490# Check whether --with-icc was given.
3491if test "${with_icc+set}" = set; then :
3492 withval=$with_icc;
3493 case $withval in
3494 no) CC=${CC:-cc}
3495 with_icc=no;;
3496 yes) CC=icc
3497 CXX=icpc
3498 with_icc=yes;;
3499 *) CC=$withval
3500 with_icc=$withval;;
3501 esac
3502else
3503
3504 with_icc=no
3505fi
3506
3507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3508$as_echo "$with_icc" >&6; }
3509
Guido van Rossum8b131c51995-03-09 14:10:13 +00003510# If the user switches compilers, we can't believe the cache
3511if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3512then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003513 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003514(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003515fi
3516
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003517# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3518# when the compiler supports them, but we don't always want -O2, and
3519# we set -g later.
3520if test -z "$CFLAGS"; then
3521 CFLAGS=
3522fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003523
3524if test "$ac_sys_system" = "Darwin"
3525then
3526 # Compiler selection on MacOSX is more complicated than
3527 # AC_PROG_CC can handle, see Mac/README.txt for more
3528 # information
3529 if test -z "${CC}"
3530 then
3531 found_gcc=
3532 found_clang=
3533 as_save_IFS=$IFS; IFS=:
3534 for as_dir in $PATH
3535 do
3536 IFS=$as_save_IFS
3537 if test -x $as_dir/gcc; then
3538 if test -z "${found_gcc}"; then
3539 found_gcc=$as_dir/gcc
3540 fi
3541 fi
3542 if test -x $as_dir/clang; then
3543 if test -z "${found_clang}"; then
3544 found_clang=$as_dir/clang
3545 fi
3546 fi
3547 done
3548 IFS=$as_save_IFS
3549
3550 if test -n "$found_gcc" -a -n "$found_clang"
3551 then
3552 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3553 then
3554 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3555$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3556 CC="$found_clang"
3557 CXX="$found_clang++"
3558 fi
3559
3560
3561 elif test -z "$found_gcc" -a -n "$found_clang"
3562 then
3563 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3564$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3565 CC="$found_clang"
3566 CXX="$found_clang++"
3567
3568 elif test -z "$found_gcc" -a -z "$found_clang"
3569 then
3570 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3571 if test -n "${found_clang}"
3572 then
3573 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3574$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3575 CC="${found_clang}"
3576 CXX="`/usr/bin/xcrun -find clang++`"
3577
3578 # else: use default behaviour
3579 fi
3580 fi
3581 fi
3582fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003583ac_ext=c
3584ac_cpp='$CPP $CPPFLAGS'
3585ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3586ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3587ac_compiler_gnu=$ac_cv_c_compiler_gnu
3588if test -n "$ac_tool_prefix"; then
3589 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3590set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3592$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003593if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003595else
3596 if test -n "$CC"; then
3597 ac_cv_prog_CC="$CC" # Let the user override the test.
3598else
Martin v. Löwis11437992002-04-12 09:54:03 +00003599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3600for as_dir in $PATH
3601do
3602 IFS=$as_save_IFS
3603 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003604 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003605 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 $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 +00003608 break 2
3609 fi
3610done
Matthias Kloseb9621712010-04-24 17:59:49 +00003611 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003612IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003613
Jack Jansendd19cf82001-12-06 22:36:17 +00003614fi
3615fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003616CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003617if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3619$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003620else
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3622$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003623fi
3624
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003625
Martin v. Löwis11437992002-04-12 09:54:03 +00003626fi
3627if test -z "$ac_cv_prog_CC"; then
3628 ac_ct_CC=$CC
3629 # Extract the first word of "gcc", so it can be a program name with args.
3630set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3632$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003633if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003635else
3636 if test -n "$ac_ct_CC"; then
3637 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3638else
3639as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3640for as_dir in $PATH
3641do
3642 IFS=$as_save_IFS
3643 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003644 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003646 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 $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 +00003648 break 2
3649 fi
3650done
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003653
3654fi
3655fi
3656ac_ct_CC=$ac_cv_prog_ac_ct_CC
3657if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3659$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003660else
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3662$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003663fi
3664
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003665 if test "x$ac_ct_CC" = x; then
3666 CC=""
3667 else
3668 case $cross_compiling:$ac_tool_warned in
3669yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003670{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3671$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672ac_tool_warned=yes ;;
3673esac
3674 CC=$ac_ct_CC
3675 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003676else
3677 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003678fi
3679
Jack Jansendd19cf82001-12-06 22:36:17 +00003680if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681 if test -n "$ac_tool_prefix"; then
3682 # 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 +00003683set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3685$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003686if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003688else
3689 if test -n "$CC"; then
3690 ac_cv_prog_CC="$CC" # Let the user override the test.
3691else
Martin v. Löwis11437992002-04-12 09:54:03 +00003692as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3693for as_dir in $PATH
3694do
3695 IFS=$as_save_IFS
3696 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003698 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003699 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 $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 +00003701 break 2
3702 fi
3703done
Matthias Kloseb9621712010-04-24 17:59:49 +00003704 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003705IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003706
3707fi
3708fi
3709CC=$ac_cv_prog_CC
3710if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3712$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003713else
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3715$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003716fi
3717
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003718
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003720fi
3721if test -z "$CC"; then
3722 # Extract the first word of "cc", so it can be a program name with args.
3723set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3725$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003726if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003728else
3729 if test -n "$CC"; then
3730 ac_cv_prog_CC="$CC" # Let the user override the test.
3731else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003732 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3734for as_dir in $PATH
3735do
3736 IFS=$as_save_IFS
3737 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003739 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3741 ac_prog_rejected=yes
3742 continue
3743 fi
3744 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 $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 +00003746 break 2
3747 fi
3748done
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003751
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752if test $ac_prog_rejected = yes; then
3753 # We found a bogon in the path, so make sure we never use it.
3754 set dummy $ac_cv_prog_CC
3755 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003756 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003757 # We chose a different compiler from the bogus one.
3758 # However, it has the same basename, so the bogon will be chosen
3759 # first if we set CC to just the basename; use the full file name.
3760 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003761 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003762 fi
3763fi
3764fi
3765fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003766CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003767if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3769$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003770else
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3772$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003773fi
3774
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003775
Martin v. Löwis11437992002-04-12 09:54:03 +00003776fi
3777if test -z "$CC"; then
3778 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003779 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003780 do
3781 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3782set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3784$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003785if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003787else
3788 if test -n "$CC"; then
3789 ac_cv_prog_CC="$CC" # Let the user override the test.
3790else
Martin v. Löwis11437992002-04-12 09:54:03 +00003791as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3792for as_dir in $PATH
3793do
3794 IFS=$as_save_IFS
3795 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003797 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003798 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 $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 +00003800 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003801 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003802done
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003804IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003805
3806fi
3807fi
3808CC=$ac_cv_prog_CC
3809if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3811$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003812else
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3814$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003815fi
3816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 test -n "$CC" && break
3819 done
3820fi
3821if test -z "$CC"; then
3822 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003823 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003824do
3825 # Extract the first word of "$ac_prog", so it can be a program name with args.
3826set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3828$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003829if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003831else
3832 if test -n "$ac_ct_CC"; then
3833 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3834else
3835as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3836for as_dir in $PATH
3837do
3838 IFS=$as_save_IFS
3839 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003841 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003842 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003843 $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 +00003844 break 2
3845 fi
3846done
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003848IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003849
Martin v. Löwis11437992002-04-12 09:54:03 +00003850fi
3851fi
3852ac_ct_CC=$ac_cv_prog_ac_ct_CC
3853if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3855$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003856else
Matthias Kloseb9621712010-04-24 17:59:49 +00003857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3858$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003859fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003860
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 test -n "$ac_ct_CC" && break
3863done
Michael W. Hudson54241132001-12-07 15:38:26 +00003864
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865 if test "x$ac_ct_CC" = x; then
3866 CC=""
3867 else
3868 case $cross_compiling:$ac_tool_warned in
3869yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003870{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3871$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003872ac_tool_warned=yes ;;
3873esac
3874 CC=$ac_ct_CC
3875 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003876fi
3877
3878fi
3879
3880
Matthias Kloseb9621712010-04-24 17:59:49 +00003881test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3882$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003883as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003884See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003885
3886# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003887$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3888set X $ac_compile
3889ac_compiler=$2
3890for ac_option in --version -v -V -qversion; do
3891 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003892case "(($ac_try" in
3893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3894 *) ac_try_echo=$ac_try;;
3895esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003896eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3897$as_echo "$ac_try_echo"; } >&5
3898 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003899 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003900 if test -s conftest.err; then
3901 sed '10a\
3902... rest of stderr output deleted ...
3903 10q' conftest.err >conftest.er1
3904 cat conftest.er1 >&5
3905 fi
3906 rm -f conftest.er1 conftest.err
3907 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3908 test $ac_status = 0; }
3909done
Martin v. Löwis11437992002-04-12 09:54:03 +00003910
Matthias Kloseb9621712010-04-24 17:59:49 +00003911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003912/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003913
Martin v. Löwis11437992002-04-12 09:54:03 +00003914int
3915main ()
3916{
3917
3918 ;
3919 return 0;
3920}
3921_ACEOF
3922ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003923ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003924# Try to create an executable without -o first, disregard a.out.
3925# It will help us diagnose broken compilers, and finding out an intuition
3926# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3928$as_echo_n "checking whether the C compiler works... " >&6; }
3929ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3930
3931# The possible output files:
3932ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3933
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934ac_rmfiles=
3935for ac_file in $ac_files
3936do
3937 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003938 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3940 esac
3941done
3942rm -f $ac_rmfiles
3943
Matthias Kloseb9621712010-04-24 17:59:49 +00003944if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945case "(($ac_try" in
3946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3947 *) ac_try_echo=$ac_try;;
3948esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003949eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3950$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003952 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003953 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3954 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3956# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3957# in a Makefile. We should not override ac_cv_exeext if it was cached,
3958# so that the user can short-circuit this test for compilers unknown to
3959# Autoconf.
3960for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003961do
3962 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003963 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003964 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003965 ;;
3966 [ab].out )
3967 # We found the default executable, but exeext='' is most
3968 # certainly right.
3969 break;;
3970 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003971 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972 then :; else
3973 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3974 fi
3975 # We set ac_cv_exeext here because the later test for it is not
3976 # safe: cross compilers may not add the suffix if given an `-o'
3977 # argument, so we may need to know it at that point already.
3978 # Even if this section looks crufty: it has the advantage of
3979 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003980 break;;
3981 * )
3982 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003983 esac
3984done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985test "$ac_cv_exeext" = no && ac_cv_exeext=
3986
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003987else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003988 ac_file=''
3989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003990if test -z "$ac_file"; then :
3991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3992$as_echo "no" >&6; }
3993$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003994sed 's/^/| /' conftest.$ac_ext >&5
3995
Matthias Kloseb9621712010-04-24 17:59:49 +00003996{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3997$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003998as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003999See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004000else
4001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4002$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4005$as_echo_n "checking for C compiler default output file name... " >&6; }
4006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4007$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004008ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004009
Matthias Kloseb9621712010-04-24 17:59:49 +00004010rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004011ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4013$as_echo_n "checking for suffix of executables... " >&6; }
4014if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004015case "(($ac_try" in
4016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4017 *) ac_try_echo=$ac_try;;
4018esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004019eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4020$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004021 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004022 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004023 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4024 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004025 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4026# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4027# work properly (i.e., refer to `conftest.exe'), while it won't with
4028# `rm'.
4029for ac_file in conftest.exe conftest conftest.*; do
4030 test -f "$ac_file" || continue
4031 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004032 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004033 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4034 break;;
4035 * ) break;;
4036 esac
4037done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004038else
Matthias Kloseb9621712010-04-24 17:59:49 +00004039 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4040$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004041as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004042See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004044rm -f conftest conftest$ac_cv_exeext
4045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4046$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004047
4048rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004049EXEEXT=$ac_cv_exeext
4050ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4052/* end confdefs.h. */
4053#include <stdio.h>
4054int
4055main ()
4056{
4057FILE *f = fopen ("conftest.out", "w");
4058 return ferror (f) || fclose (f) != 0;
4059
4060 ;
4061 return 0;
4062}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004064ac_clean_files="$ac_clean_files conftest.out"
4065# Check that the compiler produces executables we can run. If not, either
4066# the compiler is broken, or we cross compile.
4067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4068$as_echo_n "checking whether we are cross compiling... " >&6; }
4069if test "$cross_compiling" != yes; then
4070 { { ac_try="$ac_link"
4071case "(($ac_try" in
4072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4073 *) ac_try_echo=$ac_try;;
4074esac
4075eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4076$as_echo "$ac_try_echo"; } >&5
4077 (eval "$ac_link") 2>&5
4078 ac_status=$?
4079 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4080 test $ac_status = 0; }
4081 if { ac_try='./conftest$ac_cv_exeext'
4082 { { case "(($ac_try" in
4083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4084 *) ac_try_echo=$ac_try;;
4085esac
4086eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4087$as_echo "$ac_try_echo"; } >&5
4088 (eval "$ac_try") 2>&5
4089 ac_status=$?
4090 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4091 test $ac_status = 0; }; }; then
4092 cross_compiling=no
4093 else
4094 if test "$cross_compiling" = maybe; then
4095 cross_compiling=yes
4096 else
4097 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4098$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004099as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004100If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004101See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004102 fi
4103 fi
4104fi
4105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4106$as_echo "$cross_compiling" >&6; }
4107
4108rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4109ac_clean_files=$ac_clean_files_save
4110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4111$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004112if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004113 $as_echo_n "(cached) " >&6
4114else
4115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004116/* end confdefs.h. */
4117
4118int
4119main ()
4120{
4121
4122 ;
4123 return 0;
4124}
4125_ACEOF
4126rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004127if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004128case "(($ac_try" in
4129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4130 *) ac_try_echo=$ac_try;;
4131esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004132eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4133$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004134 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004135 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4137 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004138 for ac_file in conftest.o conftest.obj conftest.*; do
4139 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004140 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004141 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004142 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4143 break;;
4144 esac
4145done
4146else
Matthias Kloseb9621712010-04-24 17:59:49 +00004147 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004148sed 's/^/| /' conftest.$ac_ext >&5
4149
Matthias Kloseb9621712010-04-24 17:59:49 +00004150{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4151$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004152as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004153See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004154fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004155rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004156fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4158$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004159OBJEXT=$ac_cv_objext
4160ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4162$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004163if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004164 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004165else
Matthias Kloseb9621712010-04-24 17:59:49 +00004166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004167/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004168
Martin v. Löwis11437992002-04-12 09:54:03 +00004169int
4170main ()
4171{
4172#ifndef __GNUC__
4173 choke me
4174#endif
4175
4176 ;
4177 return 0;
4178}
4179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004180if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004181 ac_compiler_gnu=yes
4182else
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004184fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004186ac_cv_c_compiler_gnu=$ac_compiler_gnu
4187
4188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4190$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4191if test $ac_compiler_gnu = yes; then
4192 GCC=yes
4193else
4194 GCC=
4195fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004196ac_test_CFLAGS=${CFLAGS+set}
4197ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4199$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004200if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004201 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004202else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004203 ac_save_c_werror_flag=$ac_c_werror_flag
4204 ac_c_werror_flag=yes
4205 ac_cv_prog_cc_g=no
4206 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004208/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004209
Martin v. Löwis11437992002-04-12 09:54:03 +00004210int
4211main ()
4212{
4213
4214 ;
4215 return 0;
4216}
4217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004218if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004219 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004220else
Matthias Kloseb9621712010-04-24 17:59:49 +00004221 CFLAGS=""
4222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223/* end confdefs.h. */
4224
4225int
4226main ()
4227{
4228
4229 ;
4230 return 0;
4231}
4232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004233if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004234
Matthias Kloseb9621712010-04-24 17:59:49 +00004235else
4236 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239/* end confdefs.h. */
4240
4241int
4242main ()
4243{
4244
4245 ;
4246 return 0;
4247}
4248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004249if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004250 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4257 ac_c_werror_flag=$ac_save_c_werror_flag
4258fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4260$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004261if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004262 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004263elif test $ac_cv_prog_cc_g = yes; then
4264 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004265 CFLAGS="-g -O2"
4266 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004267 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004268 fi
4269else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004270 if test "$GCC" = yes; then
4271 CFLAGS="-O2"
4272 else
4273 CFLAGS=
4274 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004275fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4277$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004278if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004279 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004280else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004281 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004282ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004284/* end confdefs.h. */
4285#include <stdarg.h>
4286#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004287struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004288/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4289struct buf { int x; };
4290FILE * (*rcsopen) (struct buf *, struct stat *, int);
4291static char *e (p, i)
4292 char **p;
4293 int i;
4294{
4295 return p[i];
4296}
4297static char *f (char * (*g) (char **, int), char **p, ...)
4298{
4299 char *s;
4300 va_list v;
4301 va_start (v,p);
4302 s = g (p, va_arg (v,int));
4303 va_end (v);
4304 return s;
4305}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004306
4307/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4308 function prototypes and stuff, but not '\xHH' hex character constants.
4309 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004310 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004311 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4312 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004314int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4315
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004316/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4317 inside strings and character constants. */
4318#define FOO(x) 'x'
4319int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4320
Skip Montanaro6dead952003-09-25 14:50:04 +00004321int test (int i, double x);
4322struct s1 {int (*f) (int a);};
4323struct s2 {int (*f) (double a);};
4324int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4325int argc;
4326char **argv;
4327int
4328main ()
4329{
4330return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4331 ;
4332 return 0;
4333}
4334_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4336 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004337do
4338 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342rm -f core conftest.err conftest.$ac_objext
4343 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004344done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004346CC=$ac_save_CC
4347
4348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349# AC_CACHE_VAL
4350case "x$ac_cv_prog_cc_c89" in
4351 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4353$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4356$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004357 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4360$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004361esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004362if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004363
Matthias Kloseb9621712010-04-24 17:59:49 +00004364fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004365
Martin v. Löwis11437992002-04-12 09:54:03 +00004366ac_ext=c
4367ac_cpp='$CPP $CPPFLAGS'
4368ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4369ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4370ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004371
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004372ac_ext=c
4373ac_cpp='$CPP $CPPFLAGS'
4374ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4375ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4376ac_compiler_gnu=$ac_cv_c_compiler_gnu
4377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4378$as_echo_n "checking how to run the C preprocessor... " >&6; }
4379# On Suns, sometimes $CPP names a directory.
4380if test -n "$CPP" && test -d "$CPP"; then
4381 CPP=
4382fi
4383if test -z "$CPP"; then
4384 if ${ac_cv_prog_CPP+:} false; then :
4385 $as_echo_n "(cached) " >&6
4386else
4387 # Double quotes because CPP needs to be expanded
4388 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4389 do
4390 ac_preproc_ok=false
4391for ac_c_preproc_warn_flag in '' yes
4392do
4393 # Use a header file that comes with gcc, so configuring glibc
4394 # with a fresh cross-compiler works.
4395 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4396 # <limits.h> exists even on freestanding compilers.
4397 # On the NeXT, cc -E runs the code through the compiler's parser,
4398 # not just through cpp. "Syntax error" is here to catch this case.
4399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4400/* end confdefs.h. */
4401#ifdef __STDC__
4402# include <limits.h>
4403#else
4404# include <assert.h>
4405#endif
4406 Syntax error
4407_ACEOF
4408if ac_fn_c_try_cpp "$LINENO"; then :
4409
4410else
4411 # Broken: fails on valid input.
4412continue
4413fi
4414rm -f conftest.err conftest.i conftest.$ac_ext
4415
4416 # OK, works on sane cases. Now check whether nonexistent headers
4417 # can be detected and how.
4418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4419/* end confdefs.h. */
4420#include <ac_nonexistent.h>
4421_ACEOF
4422if ac_fn_c_try_cpp "$LINENO"; then :
4423 # Broken: success on invalid input.
4424continue
4425else
4426 # Passes both tests.
4427ac_preproc_ok=:
4428break
4429fi
4430rm -f conftest.err conftest.i conftest.$ac_ext
4431
4432done
4433# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4434rm -f conftest.i conftest.err conftest.$ac_ext
4435if $ac_preproc_ok; then :
4436 break
4437fi
4438
4439 done
4440 ac_cv_prog_CPP=$CPP
4441
4442fi
4443 CPP=$ac_cv_prog_CPP
4444else
4445 ac_cv_prog_CPP=$CPP
4446fi
4447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4448$as_echo "$CPP" >&6; }
4449ac_preproc_ok=false
4450for ac_c_preproc_warn_flag in '' yes
4451do
4452 # Use a header file that comes with gcc, so configuring glibc
4453 # with a fresh cross-compiler works.
4454 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4455 # <limits.h> exists even on freestanding compilers.
4456 # On the NeXT, cc -E runs the code through the compiler's parser,
4457 # not just through cpp. "Syntax error" is here to catch this case.
4458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4459/* end confdefs.h. */
4460#ifdef __STDC__
4461# include <limits.h>
4462#else
4463# include <assert.h>
4464#endif
4465 Syntax error
4466_ACEOF
4467if ac_fn_c_try_cpp "$LINENO"; then :
4468
4469else
4470 # Broken: fails on valid input.
4471continue
4472fi
4473rm -f conftest.err conftest.i conftest.$ac_ext
4474
4475 # OK, works on sane cases. Now check whether nonexistent headers
4476 # can be detected and how.
4477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4478/* end confdefs.h. */
4479#include <ac_nonexistent.h>
4480_ACEOF
4481if ac_fn_c_try_cpp "$LINENO"; then :
4482 # Broken: success on invalid input.
4483continue
4484else
4485 # Passes both tests.
4486ac_preproc_ok=:
4487break
4488fi
4489rm -f conftest.err conftest.i conftest.$ac_ext
4490
4491done
4492# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4493rm -f conftest.i conftest.err conftest.$ac_ext
4494if $ac_preproc_ok; then :
4495
4496else
4497 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4498$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4499as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4500See \`config.log' for more details" "$LINENO" 5; }
4501fi
4502
4503ac_ext=c
4504ac_cpp='$CPP $CPPFLAGS'
4505ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4506ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4507ac_compiler_gnu=$ac_cv_c_compiler_gnu
4508
4509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4510$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4511if ${ac_cv_path_GREP+:} false; then :
4512 $as_echo_n "(cached) " >&6
4513else
4514 if test -z "$GREP"; then
4515 ac_path_GREP_found=false
4516 # Loop through the user's path and test for each of PROGNAME-LIST
4517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4518for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4519do
4520 IFS=$as_save_IFS
4521 test -z "$as_dir" && as_dir=.
4522 for ac_prog in grep ggrep; do
4523 for ac_exec_ext in '' $ac_executable_extensions; do
4524 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4525 as_fn_executable_p "$ac_path_GREP" || continue
4526# Check for GNU ac_path_GREP and select it if it is found.
4527 # Check for GNU $ac_path_GREP
4528case `"$ac_path_GREP" --version 2>&1` in
4529*GNU*)
4530 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4531*)
4532 ac_count=0
4533 $as_echo_n 0123456789 >"conftest.in"
4534 while :
4535 do
4536 cat "conftest.in" "conftest.in" >"conftest.tmp"
4537 mv "conftest.tmp" "conftest.in"
4538 cp "conftest.in" "conftest.nl"
4539 $as_echo 'GREP' >> "conftest.nl"
4540 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4541 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4542 as_fn_arith $ac_count + 1 && ac_count=$as_val
4543 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4544 # Best one so far, save it but keep looking for a better one
4545 ac_cv_path_GREP="$ac_path_GREP"
4546 ac_path_GREP_max=$ac_count
4547 fi
4548 # 10*(2^10) chars as input seems more than enough
4549 test $ac_count -gt 10 && break
4550 done
4551 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4552esac
4553
4554 $ac_path_GREP_found && break 3
4555 done
4556 done
4557 done
4558IFS=$as_save_IFS
4559 if test -z "$ac_cv_path_GREP"; then
4560 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4561 fi
4562else
4563 ac_cv_path_GREP=$GREP
4564fi
4565
4566fi
4567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4568$as_echo "$ac_cv_path_GREP" >&6; }
4569 GREP="$ac_cv_path_GREP"
4570
4571
Łukasz Langaa785c872016-09-09 17:37:37 -07004572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4573$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4574if ${ac_cv_path_SED+:} false; then :
4575 $as_echo_n "(cached) " >&6
4576else
4577 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4578 for ac_i in 1 2 3 4 5 6 7; do
4579 ac_script="$ac_script$as_nl$ac_script"
4580 done
4581 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4582 { ac_script=; unset ac_script;}
4583 if test -z "$SED"; then
4584 ac_path_SED_found=false
4585 # Loop through the user's path and test for each of PROGNAME-LIST
4586 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4587for as_dir in $PATH
4588do
4589 IFS=$as_save_IFS
4590 test -z "$as_dir" && as_dir=.
4591 for ac_prog in sed gsed; do
4592 for ac_exec_ext in '' $ac_executable_extensions; do
4593 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4594 as_fn_executable_p "$ac_path_SED" || continue
4595# Check for GNU ac_path_SED and select it if it is found.
4596 # Check for GNU $ac_path_SED
4597case `"$ac_path_SED" --version 2>&1` in
4598*GNU*)
4599 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4600*)
4601 ac_count=0
4602 $as_echo_n 0123456789 >"conftest.in"
4603 while :
4604 do
4605 cat "conftest.in" "conftest.in" >"conftest.tmp"
4606 mv "conftest.tmp" "conftest.in"
4607 cp "conftest.in" "conftest.nl"
4608 $as_echo '' >> "conftest.nl"
4609 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4610 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4611 as_fn_arith $ac_count + 1 && ac_count=$as_val
4612 if test $ac_count -gt ${ac_path_SED_max-0}; then
4613 # Best one so far, save it but keep looking for a better one
4614 ac_cv_path_SED="$ac_path_SED"
4615 ac_path_SED_max=$ac_count
4616 fi
4617 # 10*(2^10) chars as input seems more than enough
4618 test $ac_count -gt 10 && break
4619 done
4620 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4621esac
4622
4623 $ac_path_SED_found && break 3
4624 done
4625 done
4626 done
4627IFS=$as_save_IFS
4628 if test -z "$ac_cv_path_SED"; then
4629 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4630 fi
4631else
4632 ac_cv_path_SED=$SED
4633fi
4634
4635fi
4636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4637$as_echo "$ac_cv_path_SED" >&6; }
4638 SED="$ac_cv_path_SED"
4639 rm -f conftest.sed
4640
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004641
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004642
4643
Matthias Kloseb9621712010-04-24 17:59:49 +00004644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4645$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004646
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004647# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004648if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004649 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004650
4651 case $withval in
4652 no) with_cxx_main=no
4653 MAINCC='$(CC)';;
4654 yes) with_cxx_main=yes
4655 MAINCC='$(CXX)';;
4656 *) with_cxx_main=yes
4657 MAINCC=$withval
4658 if test -z "$CXX"
4659 then
4660 CXX=$withval
4661 fi;;
4662 esac
4663else
4664
4665 with_cxx_main=no
4666 MAINCC='$(CC)'
4667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004668fi
4669
Matthias Kloseb9621712010-04-24 17:59:49 +00004670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4671$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004672
4673preset_cxx="$CXX"
4674if test -z "$CXX"
4675then
4676 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004677 gcc) if test -n "$ac_tool_prefix"; then
4678 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4679set dummy ${ac_tool_prefix}g++; ac_word=$2
4680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4681$as_echo_n "checking for $ac_word... " >&6; }
4682if ${ac_cv_path_CXX+:} false; then :
4683 $as_echo_n "(cached) " >&6
4684else
4685 case $CXX in
4686 [\\/]* | ?:[\\/]*)
4687 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4688 ;;
4689 *)
4690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4691for as_dir in notfound
4692do
4693 IFS=$as_save_IFS
4694 test -z "$as_dir" && as_dir=.
4695 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004696 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004697 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4698 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4699 break 2
4700 fi
4701done
4702 done
4703IFS=$as_save_IFS
4704
4705 ;;
4706esac
4707fi
4708CXX=$ac_cv_path_CXX
4709if test -n "$CXX"; then
4710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4711$as_echo "$CXX" >&6; }
4712else
4713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4714$as_echo "no" >&6; }
4715fi
4716
4717
4718fi
4719if test -z "$ac_cv_path_CXX"; then
4720 ac_pt_CXX=$CXX
4721 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004722set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4724$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004725if ${ac_cv_path_ac_pt_CXX+:} false; then :
4726 $as_echo_n "(cached) " >&6
4727else
4728 case $ac_pt_CXX in
4729 [\\/]* | ?:[\\/]*)
4730 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4731 ;;
4732 *)
4733 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4734for as_dir in notfound
4735do
4736 IFS=$as_save_IFS
4737 test -z "$as_dir" && as_dir=.
4738 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004739 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004740 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4741 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4742 break 2
4743 fi
4744done
4745 done
4746IFS=$as_save_IFS
4747
4748 ;;
4749esac
4750fi
4751ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4752if test -n "$ac_pt_CXX"; then
4753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4754$as_echo "$ac_pt_CXX" >&6; }
4755else
4756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4757$as_echo "no" >&6; }
4758fi
4759
4760 if test "x$ac_pt_CXX" = x; then
4761 CXX="g++"
4762 else
4763 case $cross_compiling:$ac_tool_warned in
4764yes:)
4765{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4766$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4767ac_tool_warned=yes ;;
4768esac
4769 CXX=$ac_pt_CXX
4770 fi
4771else
4772 CXX="$ac_cv_path_CXX"
4773fi
4774 ;;
4775 cc) if test -n "$ac_tool_prefix"; then
4776 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4777set dummy ${ac_tool_prefix}c++; ac_word=$2
4778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4779$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004780if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004781 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004782else
4783 case $CXX in
4784 [\\/]* | ?:[\\/]*)
4785 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4786 ;;
4787 *)
4788 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4789for as_dir in notfound
4790do
4791 IFS=$as_save_IFS
4792 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004793 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004794 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004795 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004796 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004797 break 2
4798 fi
4799done
Matthias Kloseb9621712010-04-24 17:59:49 +00004800 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004801IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004802
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803 ;;
4804esac
4805fi
4806CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004807if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4809$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004810else
Matthias Kloseb9621712010-04-24 17:59:49 +00004811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4812$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004814
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004815
4816fi
4817if test -z "$ac_cv_path_CXX"; then
4818 ac_pt_CXX=$CXX
4819 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004820set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4822$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004823if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004824 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004825else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004826 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004827 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004828 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 +00004829 ;;
4830 *)
4831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4832for as_dir in notfound
4833do
4834 IFS=$as_save_IFS
4835 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004836 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004837 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004838 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004839 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004840 break 2
4841 fi
4842done
Matthias Kloseb9621712010-04-24 17:59:49 +00004843 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004844IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004845
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004846 ;;
4847esac
4848fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004849ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4850if test -n "$ac_pt_CXX"; then
4851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4852$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004853else
Matthias Kloseb9621712010-04-24 17:59:49 +00004854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4855$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004857
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004858 if test "x$ac_pt_CXX" = x; then
4859 CXX="c++"
4860 else
4861 case $cross_compiling:$ac_tool_warned in
4862yes:)
4863{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4864$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4865ac_tool_warned=yes ;;
4866esac
4867 CXX=$ac_pt_CXX
4868 fi
4869else
4870 CXX="$ac_cv_path_CXX"
4871fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004872 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004873 clang|*/clang) if test -n "$ac_tool_prefix"; then
4874 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4875set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4877$as_echo_n "checking for $ac_word... " >&6; }
4878if ${ac_cv_path_CXX+:} false; then :
4879 $as_echo_n "(cached) " >&6
4880else
4881 case $CXX in
4882 [\\/]* | ?:[\\/]*)
4883 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4884 ;;
4885 *)
4886 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4887for as_dir in notfound
4888do
4889 IFS=$as_save_IFS
4890 test -z "$as_dir" && as_dir=.
4891 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004892 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004893 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4894 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4895 break 2
4896 fi
4897done
4898 done
4899IFS=$as_save_IFS
4900
Ned Deilycbfb9a52012-06-23 16:02:19 -07004901 ;;
4902esac
4903fi
4904CXX=$ac_cv_path_CXX
4905if test -n "$CXX"; then
4906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4907$as_echo "$CXX" >&6; }
4908else
4909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4910$as_echo "no" >&6; }
4911fi
4912
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004913
4914fi
4915if test -z "$ac_cv_path_CXX"; then
4916 ac_pt_CXX=$CXX
4917 # Extract the first word of "clang++", so it can be a program name with args.
4918set dummy clang++; ac_word=$2
4919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4920$as_echo_n "checking for $ac_word... " >&6; }
4921if ${ac_cv_path_ac_pt_CXX+:} false; then :
4922 $as_echo_n "(cached) " >&6
4923else
4924 case $ac_pt_CXX in
4925 [\\/]* | ?:[\\/]*)
4926 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4927 ;;
4928 *)
4929 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4930for as_dir in notfound
4931do
4932 IFS=$as_save_IFS
4933 test -z "$as_dir" && as_dir=.
4934 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004935 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004936 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4937 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4938 break 2
4939 fi
4940done
4941 done
4942IFS=$as_save_IFS
4943
4944 ;;
4945esac
4946fi
4947ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4948if test -n "$ac_pt_CXX"; then
4949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4950$as_echo "$ac_pt_CXX" >&6; }
4951else
4952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4953$as_echo "no" >&6; }
4954fi
4955
4956 if test "x$ac_pt_CXX" = x; then
4957 CXX="clang++"
4958 else
4959 case $cross_compiling:$ac_tool_warned in
4960yes:)
4961{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4962$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4963ac_tool_warned=yes ;;
4964esac
4965 CXX=$ac_pt_CXX
4966 fi
4967else
4968 CXX="$ac_cv_path_CXX"
4969fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004970 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004971 icc|*/icc) if test -n "$ac_tool_prefix"; then
4972 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4973set dummy ${ac_tool_prefix}icpc; ac_word=$2
4974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4975$as_echo_n "checking for $ac_word... " >&6; }
4976if ${ac_cv_path_CXX+:} false; then :
4977 $as_echo_n "(cached) " >&6
4978else
4979 case $CXX in
4980 [\\/]* | ?:[\\/]*)
4981 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4982 ;;
4983 *)
4984 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4985for as_dir in notfound
4986do
4987 IFS=$as_save_IFS
4988 test -z "$as_dir" && as_dir=.
4989 for ac_exec_ext in '' $ac_executable_extensions; do
4990 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4991 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4992 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4993 break 2
4994 fi
4995done
4996 done
4997IFS=$as_save_IFS
4998
4999 ;;
5000esac
5001fi
5002CXX=$ac_cv_path_CXX
5003if test -n "$CXX"; then
5004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5005$as_echo "$CXX" >&6; }
5006else
5007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5008$as_echo "no" >&6; }
5009fi
5010
5011
5012fi
5013if test -z "$ac_cv_path_CXX"; then
5014 ac_pt_CXX=$CXX
5015 # Extract the first word of "icpc", so it can be a program name with args.
5016set dummy icpc; ac_word=$2
5017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5018$as_echo_n "checking for $ac_word... " >&6; }
5019if ${ac_cv_path_ac_pt_CXX+:} false; then :
5020 $as_echo_n "(cached) " >&6
5021else
5022 case $ac_pt_CXX in
5023 [\\/]* | ?:[\\/]*)
5024 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5025 ;;
5026 *)
5027 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5028for as_dir in notfound
5029do
5030 IFS=$as_save_IFS
5031 test -z "$as_dir" && as_dir=.
5032 for ac_exec_ext in '' $ac_executable_extensions; do
5033 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5034 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5035 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5036 break 2
5037 fi
5038done
5039 done
5040IFS=$as_save_IFS
5041
5042 ;;
5043esac
5044fi
5045ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5046if test -n "$ac_pt_CXX"; then
5047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5048$as_echo "$ac_pt_CXX" >&6; }
5049else
5050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5051$as_echo "no" >&6; }
5052fi
5053
5054 if test "x$ac_pt_CXX" = x; then
5055 CXX="icpc"
5056 else
5057 case $cross_compiling:$ac_tool_warned in
5058yes:)
5059{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5060$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5061ac_tool_warned=yes ;;
5062esac
5063 CXX=$ac_pt_CXX
5064 fi
5065else
5066 CXX="$ac_cv_path_CXX"
5067fi
5068 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005069 esac
5070 if test "$CXX" = "notfound"
5071 then
5072 CXX=""
5073 fi
5074fi
5075if test -z "$CXX"
5076then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005077 if test -n "$ac_tool_prefix"; then
5078 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5079 do
5080 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5081set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5083$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005084if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005086else
5087 if test -n "$CXX"; then
5088 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5089else
5090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5091for as_dir in $PATH
5092do
5093 IFS=$as_save_IFS
5094 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005095 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005096 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005097 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005099 break 2
5100 fi
5101done
Matthias Kloseb9621712010-04-24 17:59:49 +00005102 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005103IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005104
5105fi
5106fi
5107CXX=$ac_cv_prog_CXX
5108if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5110$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005111else
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5113$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005114fi
5115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005116
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005117 test -n "$CXX" && break
5118 done
5119fi
5120if test -z "$CXX"; then
5121 ac_ct_CXX=$CXX
5122 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5123do
5124 # Extract the first word of "$ac_prog", so it can be a program name with args.
5125set dummy $ac_prog; ac_word=$2
5126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5127$as_echo_n "checking for $ac_word... " >&6; }
5128if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5129 $as_echo_n "(cached) " >&6
5130else
5131 if test -n "$ac_ct_CXX"; then
5132 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5133else
5134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5135for as_dir in $PATH
5136do
5137 IFS=$as_save_IFS
5138 test -z "$as_dir" && as_dir=.
5139 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005140 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005141 ac_cv_prog_ac_ct_CXX="$ac_prog"
5142 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5143 break 2
5144 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005145done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005146 done
5147IFS=$as_save_IFS
5148
5149fi
5150fi
5151ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5152if test -n "$ac_ct_CXX"; then
5153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5154$as_echo "$ac_ct_CXX" >&6; }
5155else
5156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5157$as_echo "no" >&6; }
5158fi
5159
5160
5161 test -n "$ac_ct_CXX" && break
5162done
5163
5164 if test "x$ac_ct_CXX" = x; then
5165 CXX="notfound"
5166 else
5167 case $cross_compiling:$ac_tool_warned in
5168yes:)
5169{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5170$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5171ac_tool_warned=yes ;;
5172esac
5173 CXX=$ac_ct_CXX
5174 fi
5175fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005176
5177 if test "$CXX" = "notfound"
5178 then
5179 CXX=""
5180 fi
5181fi
5182if test "$preset_cxx" != "$CXX"
5183then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005184 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005185
5186 By default, distutils will build C++ extension modules with \"$CXX\".
5187 If this is not intended, then set CXX on the configure command line.
5188 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005189$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005190
5191 By default, distutils will build C++ extension modules with \"$CXX\".
5192 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005193 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005194fi
5195
5196
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005197MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5198
5199
5200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5201$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5202cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005203#undef bfin
5204#undef cris
5205#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005206#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005207#undef hppa
5208#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005209#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005210#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005211#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005212#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005213#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005214#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005215 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005216#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005217# if defined(__x86_64__) && defined(__LP64__)
5218 x86_64-linux-gnu
5219# elif defined(__x86_64__) && defined(__ILP32__)
5220 x86_64-linux-gnux32
5221# elif defined(__i386__)
5222 i386-linux-gnu
5223# elif defined(__aarch64__) && defined(__AARCH64EL__)
5224# if defined(__ILP32__)
5225 aarch64_ilp32-linux-gnu
5226# else
5227 aarch64-linux-gnu
5228# endif
5229# elif defined(__aarch64__) && defined(__AARCH64EB__)
5230# if defined(__ILP32__)
5231 aarch64_be_ilp32-linux-gnu
5232# else
5233 aarch64_be-linux-gnu
5234# endif
5235# elif defined(__alpha__)
5236 alpha-linux-gnu
5237# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5238# if defined(__ARMEL__)
5239 arm-linux-gnueabihf
5240# else
5241 armeb-linux-gnueabihf
5242# endif
5243# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5244# if defined(__ARMEL__)
5245 arm-linux-gnueabi
5246# else
5247 armeb-linux-gnueabi
5248# endif
5249# elif defined(__hppa__)
5250 hppa-linux-gnu
5251# elif defined(__ia64__)
5252 ia64-linux-gnu
5253# elif defined(__m68k__) && !defined(__mcoldfire__)
5254 m68k-linux-gnu
5255# elif defined(__mips_hard_float) && defined(_MIPSEL)
5256# if _MIPS_SIM == _ABIO32
5257 mipsel-linux-gnu
5258# elif _MIPS_SIM == _ABIN32
5259 mips64el-linux-gnuabin32
5260# elif _MIPS_SIM == _ABI64
5261 mips64el-linux-gnuabi64
5262# else
5263# error unknown platform triplet
5264# endif
5265# elif defined(__mips_hard_float)
5266# if _MIPS_SIM == _ABIO32
5267 mips-linux-gnu
5268# elif _MIPS_SIM == _ABIN32
5269 mips64-linux-gnuabin32
5270# elif _MIPS_SIM == _ABI64
5271 mips64-linux-gnuabi64
5272# else
5273# error unknown platform triplet
5274# endif
5275# elif defined(__or1k__)
5276 or1k-linux-gnu
5277# elif defined(__powerpc__) && defined(__SPE__)
5278 powerpc-linux-gnuspe
5279# elif defined(__powerpc64__)
5280# if defined(__LITTLE_ENDIAN__)
5281 powerpc64le-linux-gnu
5282# else
5283 powerpc64-linux-gnu
5284# endif
5285# elif defined(__powerpc__)
5286 powerpc-linux-gnu
5287# elif defined(__s390x__)
5288 s390x-linux-gnu
5289# elif defined(__s390__)
5290 s390-linux-gnu
5291# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5292 sh4-linux-gnu
5293# elif defined(__sparc__) && defined(__arch64__)
5294 sparc64-linux-gnu
5295# elif defined(__sparc__)
5296 sparc-linux-gnu
5297# else
5298# error unknown platform triplet
5299# endif
5300#elif defined(__FreeBSD_kernel__)
5301# if defined(__LP64__)
5302 x86_64-kfreebsd-gnu
5303# elif defined(__i386__)
5304 i386-kfreebsd-gnu
5305# else
5306# error unknown platform triplet
5307# endif
5308#elif defined(__gnu_hurd__)
5309 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005310#elif defined(__APPLE__)
5311 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005312#else
5313# error unknown platform triplet
5314#endif
5315
5316EOF
5317
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005318if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005319 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5321$as_echo "$PLATFORM_TRIPLET" >&6; }
5322else
5323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5324$as_echo "none" >&6; }
5325fi
5326rm -f conftest.c conftest.out
5327
5328if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5329 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5330 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5331 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005332elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5333 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005334fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005335
doko@ubuntu.com55532312016-06-14 08:55:19 +02005336if test x$MULTIARCH != x; then
5337 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5338fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005339
5340
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5342$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5343save_LDFLAGS="$LDFLAGS"
5344LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005345
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5347/* end confdefs.h. */
5348
5349int
5350main ()
5351{
5352
5353 ;
5354 return 0;
5355}
5356_ACEOF
5357if ac_fn_c_try_link "$LINENO"; then :
5358 NO_AS_NEEDED="-Wl,--no-as-needed"
5359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5360$as_echo "yes" >&6; }
5361else
5362 NO_AS_NEEDED=""
5363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5364$as_echo "no" >&6; }
5365fi
5366rm -f core conftest.err conftest.$ac_objext \
5367 conftest$ac_exeext conftest.$ac_ext
5368LDFLAGS="$save_LDFLAGS"
5369
5370
5371
5372# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005373
Matthias Kloseb9621712010-04-24 17:59:49 +00005374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5375$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005376if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005378else
5379 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5380 then ac_cv_path_EGREP="$GREP -E"
5381 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005382 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005383 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005384 # Loop through the user's path and test for each of PROGNAME-LIST
5385 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005386for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5387do
5388 IFS=$as_save_IFS
5389 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005390 for ac_prog in egrep; do
5391 for ac_exec_ext in '' $ac_executable_extensions; do
5392 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005393 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005394# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005395 # Check for GNU $ac_path_EGREP
5396case `"$ac_path_EGREP" --version 2>&1` in
5397*GNU*)
5398 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5399*)
5400 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005401 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005402 while :
5403 do
5404 cat "conftest.in" "conftest.in" >"conftest.tmp"
5405 mv "conftest.tmp" "conftest.in"
5406 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005407 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005408 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5409 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005411 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5412 # Best one so far, save it but keep looking for a better one
5413 ac_cv_path_EGREP="$ac_path_EGREP"
5414 ac_path_EGREP_max=$ac_count
5415 fi
5416 # 10*(2^10) chars as input seems more than enough
5417 test $ac_count -gt 10 && break
5418 done
5419 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5420esac
5421
Matthias Kloseb9621712010-04-24 17:59:49 +00005422 $ac_path_EGREP_found && break 3
5423 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005424 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005425 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005426IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005427 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005428 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 +00005429 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005430else
5431 ac_cv_path_EGREP=$EGREP
5432fi
5433
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005434 fi
5435fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5437$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005438 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005439
5440
Matthias Kloseb9621712010-04-24 17:59:49 +00005441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5442$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005443if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005444 $as_echo_n "(cached) " >&6
5445else
5446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005447/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005448#include <stdlib.h>
5449#include <stdarg.h>
5450#include <string.h>
5451#include <float.h>
5452
5453int
5454main ()
5455{
5456
5457 ;
5458 return 0;
5459}
5460_ACEOF
5461if ac_fn_c_try_compile "$LINENO"; then :
5462 ac_cv_header_stdc=yes
5463else
5464 ac_cv_header_stdc=no
5465fi
5466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5467
5468if test $ac_cv_header_stdc = yes; then
5469 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5471/* end confdefs.h. */
5472#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005473
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005474_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005475if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005476 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005477
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005478else
Matthias Kloseb9621712010-04-24 17:59:49 +00005479 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005480fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005481rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005482
Matthias Kloseb9621712010-04-24 17:59:49 +00005483fi
5484
5485if test $ac_cv_header_stdc = yes; then
5486 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5488/* end confdefs.h. */
5489#include <stdlib.h>
5490
5491_ACEOF
5492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5493 $EGREP "free" >/dev/null 2>&1; then :
5494
5495else
5496 ac_cv_header_stdc=no
5497fi
5498rm -f conftest*
5499
5500fi
5501
5502if test $ac_cv_header_stdc = yes; then
5503 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5504 if test "$cross_compiling" = yes; then :
5505 :
5506else
5507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5508/* end confdefs.h. */
5509#include <ctype.h>
5510#include <stdlib.h>
5511#if ((' ' & 0x0FF) == 0x020)
5512# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5513# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5514#else
5515# define ISLOWER(c) \
5516 (('a' <= (c) && (c) <= 'i') \
5517 || ('j' <= (c) && (c) <= 'r') \
5518 || ('s' <= (c) && (c) <= 'z'))
5519# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5520#endif
5521
5522#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5523int
5524main ()
5525{
5526 int i;
5527 for (i = 0; i < 256; i++)
5528 if (XOR (islower (i), ISLOWER (i))
5529 || toupper (i) != TOUPPER (i))
5530 return 2;
5531 return 0;
5532}
5533_ACEOF
5534if ac_fn_c_try_run "$LINENO"; then :
5535
5536else
5537 ac_cv_header_stdc=no
5538fi
5539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5540 conftest.$ac_objext conftest.beam conftest.$ac_ext
5541fi
5542
5543fi
5544fi
5545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5546$as_echo "$ac_cv_header_stdc" >&6; }
5547if test $ac_cv_header_stdc = yes; then
5548
5549$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5550
5551fi
5552
5553# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5554for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5555 inttypes.h stdint.h unistd.h
5556do :
5557 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5558ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5559"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005560if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005561 cat >>confdefs.h <<_ACEOF
5562#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5563_ACEOF
5564
5565fi
5566
5567done
5568
5569
5570
5571 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 +02005572if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005573 MINIX=yes
5574else
5575 MINIX=
5576fi
5577
5578
5579 if test "$MINIX" = yes; then
5580
5581$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5582
5583
5584$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5585
5586
5587$as_echo "#define _MINIX 1" >>confdefs.h
5588
5589 fi
5590
5591
5592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5593$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005594if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005595 $as_echo_n "(cached) " >&6
5596else
5597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5598/* end confdefs.h. */
5599
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005600# define __EXTENSIONS__ 1
5601 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005602int
5603main ()
5604{
5605
5606 ;
5607 return 0;
5608}
5609_ACEOF
5610if ac_fn_c_try_compile "$LINENO"; then :
5611 ac_cv_safe_to_define___extensions__=yes
5612else
5613 ac_cv_safe_to_define___extensions__=no
5614fi
5615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5616fi
5617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5618$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5619 test $ac_cv_safe_to_define___extensions__ = yes &&
5620 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5621
5622 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5623
5624 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5625
5626 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5627
5628 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5629
5630
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005631
Xavier de Gaye95750b12016-07-09 11:05:42 +02005632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5633$as_echo_n "checking for the Android API level... " >&6; }
5634cat >> conftest.c <<EOF
5635#ifdef __ANDROID__
5636#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005637android_api = __ANDROID_API__
5638arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005639#else
5640#error not Android
5641#endif
5642EOF
5643
5644if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005645 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5646 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5648$as_echo "$ANDROID_API_LEVEL" >&6; }
5649
5650cat >>confdefs.h <<_ACEOF
5651#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5652_ACEOF
5653
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005654
5655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5656$as_echo_n "checking for the Android arm ABI... " >&6; }
5657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5658$as_echo "$_arm_arch" >&6; }
5659 if test "$_arm_arch" = 7; then
5660 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5661 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5662 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005663else
5664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5665$as_echo "not Android" >&6; }
5666fi
5667rm -f conftest.c conftest.out
5668
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669# Check for unsupported systems
5670case $ac_sys_system/$ac_sys_release in
5671atheos*|Linux*/1*)
5672 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5673 echo See README for details.
5674 exit 1;;
5675esac
5676
5677
Matthias Kloseb9621712010-04-24 17:59:49 +00005678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5679$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680
5681# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005682if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683 withval=$with_suffix;
5684 case $withval in
5685 no) EXEEXT=;;
5686 yes) EXEEXT=.exe;;
5687 *) EXEEXT=$withval;;
5688 esac
5689fi
5690
Matthias Kloseb9621712010-04-24 17:59:49 +00005691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5692$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693
5694# Test whether we're running on a non-case-sensitive system, in which
5695# case we give a warning if no ext is given
5696
Matthias Kloseb9621712010-04-24 17:59:49 +00005697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5698$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699if test ! -d CaseSensitiveTestDir; then
5700mkdir CaseSensitiveTestDir
5701fi
5702
5703if test -d casesensitivetestdir
5704then
Matthias Kloseb9621712010-04-24 17:59:49 +00005705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5706$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707 BUILDEXEEXT=.exe
5708else
Matthias Kloseb9621712010-04-24 17:59:49 +00005709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5710$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711 BUILDEXEEXT=$EXEEXT
5712fi
5713rmdir CaseSensitiveTestDir
5714
5715case $MACHDEP in
5716bsdos*)
5717 case $CC in
5718 gcc) CC="$CC -D_HAVE_BSDI";;
5719 esac;;
5720esac
5721
5722case $ac_sys_system in
5723hp*|HP*)
5724 case $CC in
5725 cc|*/cc) CC="$CC -Ae";;
5726 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727esac
5728
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729
Matthias Kloseb9621712010-04-24 17:59:49 +00005730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5731$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732if test -z "$LIBRARY"
5733then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005734 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5737$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738
5739# LDLIBRARY is the name of the library to link against (as opposed to the
5740# name of the library into which to insert object files). BLDLIBRARY is also
5741# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5742# is blank as the main program is not linked directly against LDLIBRARY.
5743# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5744# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5745# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5746# DLLLIBRARY is the shared (i.e., DLL) library.
5747#
5748# RUNSHARED is used to run shared python without installed libraries
5749#
5750# INSTSONAME is the name of the shared library that will be use to install
5751# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005752#
5753# LDVERSION is the shared library version number, normally the Python version
5754# with the ABI build flags appended.
5755
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756
5757
5758
5759
5760
5761
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005762
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763LDLIBRARY="$LIBRARY"
5764BLDLIBRARY='$(LDLIBRARY)'
5765INSTSONAME='$(LDLIBRARY)'
5766DLLLIBRARY=''
5767LDLIBRARYDIR=''
5768RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005769LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770
5771# LINKCC is the command that links the python executable -- default is $(CC).
5772# If CXX is set, and if it is needed to link a main function that was
5773# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5774# python might then depend on the C++ runtime
5775# This is altered for AIX in order to build the export list before
5776# linking.
5777
Matthias Kloseb9621712010-04-24 17:59:49 +00005778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5779$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780if test -z "$LINKCC"
5781then
5782 LINKCC='$(PURIFY) $(MAINCC)'
5783 case $ac_sys_system in
5784 AIX*)
5785 exp_extra="\"\""
5786 if test $ac_sys_release -ge 5 -o \
5787 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5788 exp_extra="."
5789 fi
5790 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791 QNX*)
5792 # qcc must be used because the other compilers do not
5793 # support -N.
5794 LINKCC=qcc;;
5795 esac
5796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5798$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799
5800# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5801# make sure we default having it set to "no": this is used by
5802# distutils.unixccompiler to know if it should add --enable-new-dtags
5803# to linker command lines, and failing to detect GNU ld simply results
5804# in the same bahaviour as before.
5805
Matthias Kloseb9621712010-04-24 17:59:49 +00005806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5807$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808ac_prog=ld
5809if test "$GCC" = yes; then
5810 ac_prog=`$CC -print-prog-name=ld`
5811fi
5812case `"$ac_prog" -V 2>&1 < /dev/null` in
5813 *GNU*)
5814 GNULD=yes;;
5815 *)
5816 GNULD=no;;
5817esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5819$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820
Matthias Kloseb9621712010-04-24 17:59:49 +00005821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5822$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005824if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825 enableval=$enable_shared;
5826fi
5827
5828
5829if test -z "$enable_shared"
5830then
5831 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005832 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833 enable_shared="yes";;
5834 *)
5835 enable_shared="no";;
5836 esac
5837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5839$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840
Matthias Kloseb9621712010-04-24 17:59:49 +00005841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5842$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005844if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005845 enableval=$enable_profiling;
5846fi
5847
5848if test "x$enable_profiling" = xyes; then
5849 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005850 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852/* end confdefs.h. */
5853int main() { return 0; }
5854_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005855if ac_fn_c_try_link "$LINENO"; then :
5856
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005858 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005860rm -f core conftest.err conftest.$ac_objext \
5861 conftest$ac_exeext conftest.$ac_ext
5862 CC="$ac_save_cc"
5863else
5864 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5867$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868
doko@ubuntu.comba015832012-06-30 16:52:05 +02005869if test "x$enable_profiling" = xyes; then
5870 BASECFLAGS="-pg $BASECFLAGS"
5871 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872fi
5873
Matthias Kloseb9621712010-04-24 17:59:49 +00005874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5875$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876
5877# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5878# library that we build, but we do not want to link against it (we
5879# will find it with a -framework option). For this reason there is an
5880# extra variable BLDLIBRARY against which Python and the extension
5881# modules are linked, BLDLIBRARY. This is normally the same as
5882# LDLIBRARY, but empty for MacOSX framework builds.
5883if test "$enable_framework"
5884then
5885 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005886 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887 BLDLIBRARY=''
5888else
5889 BLDLIBRARY='$(LDLIBRARY)'
5890fi
5891
5892# Other platforms follow
5893if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005894 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895
Matthias Kloseb9621712010-04-24 17:59:49 +00005896$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897
5898 case $ac_sys_system in
5899 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005900 LDLIBRARY='libpython$(LDVERSION).dll.a'
5901 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902 ;;
5903 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005904 LDLIBRARY='libpython$(LDVERSION).so'
5905 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005906 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005908 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005909 then
5910 PY3LIBRARY=libpython3.so
5911 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005913 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005914 LDLIBRARY='libpython$(LDVERSION).so'
5915 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005916 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005918 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005919 then
5920 PY3LIBRARY=libpython3.so
5921 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 ;;
5923 hp*|HP*)
5924 case `uname -m` in
5925 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005926 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927 ;;
5928 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005929 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930 ;;
5931 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005932 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005933 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005936 LDLIBRARY='libpython$(LDVERSION).dylib'
5937 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005938 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005940 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005941 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005942 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005943 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944
5945 esac
5946else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005947 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948 case $ac_sys_system in
5949 CYGWIN*)
5950 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005951 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952 ;;
5953 esac
5954fi
5955
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005956if test "$cross_compiling" = yes; then
5957 RUNSHARED=
5958fi
5959
Matthias Kloseb9621712010-04-24 17:59:49 +00005960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5961$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962
5963if test -n "$ac_tool_prefix"; then
5964 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5965set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5967$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005968if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005969 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970else
5971 if test -n "$RANLIB"; then
5972 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5973else
5974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5975for as_dir in $PATH
5976do
5977 IFS=$as_save_IFS
5978 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005979 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005980 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005982 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983 break 2
5984 fi
5985done
Matthias Kloseb9621712010-04-24 17:59:49 +00005986 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987IFS=$as_save_IFS
5988
5989fi
5990fi
5991RANLIB=$ac_cv_prog_RANLIB
5992if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5994$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995else
Matthias Kloseb9621712010-04-24 17:59:49 +00005996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5997$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998fi
5999
6000
6001fi
6002if test -z "$ac_cv_prog_RANLIB"; then
6003 ac_ct_RANLIB=$RANLIB
6004 # Extract the first word of "ranlib", so it can be a program name with args.
6005set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6007$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006008if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006009 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006010else
6011 if test -n "$ac_ct_RANLIB"; then
6012 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6013else
6014as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6015for as_dir in $PATH
6016do
6017 IFS=$as_save_IFS
6018 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006019 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006020 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006022 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006023 break 2
6024 fi
6025done
Matthias Kloseb9621712010-04-24 17:59:49 +00006026 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027IFS=$as_save_IFS
6028
6029fi
6030fi
6031ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6032if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6034$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006035else
Matthias Kloseb9621712010-04-24 17:59:49 +00006036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6037$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006038fi
6039
6040 if test "x$ac_ct_RANLIB" = x; then
6041 RANLIB=":"
6042 else
6043 case $cross_compiling:$ac_tool_warned in
6044yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006045{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6046$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047ac_tool_warned=yes ;;
6048esac
6049 RANLIB=$ac_ct_RANLIB
6050 fi
6051else
6052 RANLIB="$ac_cv_prog_RANLIB"
6053fi
6054
6055
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006056if test -n "$ac_tool_prefix"; then
6057 for ac_prog in ar aal
6058 do
6059 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6060set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6062$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006063if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006064 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006065else
6066 if test -n "$AR"; then
6067 ac_cv_prog_AR="$AR" # Let the user override the test.
6068else
6069as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6070for as_dir in $PATH
6071do
6072 IFS=$as_save_IFS
6073 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006074 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006075 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006076 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006077 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006078 break 2
6079 fi
6080done
Matthias Kloseb9621712010-04-24 17:59:49 +00006081 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006082IFS=$as_save_IFS
6083
6084fi
6085fi
6086AR=$ac_cv_prog_AR
6087if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6089$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006090else
Matthias Kloseb9621712010-04-24 17:59:49 +00006091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6092$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093fi
6094
6095
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006096 test -n "$AR" && break
6097 done
6098fi
6099if test -z "$AR"; then
6100 ac_ct_AR=$AR
6101 for ac_prog in ar aal
6102do
6103 # Extract the first word of "$ac_prog", so it can be a program name with args.
6104set dummy $ac_prog; ac_word=$2
6105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6106$as_echo_n "checking for $ac_word... " >&6; }
6107if ${ac_cv_prog_ac_ct_AR+:} false; then :
6108 $as_echo_n "(cached) " >&6
6109else
6110 if test -n "$ac_ct_AR"; then
6111 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6112else
6113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6114for as_dir in $PATH
6115do
6116 IFS=$as_save_IFS
6117 test -z "$as_dir" && as_dir=.
6118 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006119 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006120 ac_cv_prog_ac_ct_AR="$ac_prog"
6121 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6122 break 2
6123 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006124done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006125 done
6126IFS=$as_save_IFS
6127
6128fi
6129fi
6130ac_ct_AR=$ac_cv_prog_ac_ct_AR
6131if test -n "$ac_ct_AR"; then
6132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6133$as_echo "$ac_ct_AR" >&6; }
6134else
6135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6136$as_echo "no" >&6; }
6137fi
6138
6139
6140 test -n "$ac_ct_AR" && break
6141done
6142
6143 if test "x$ac_ct_AR" = x; then
6144 AR="ar"
6145 else
6146 case $cross_compiling:$ac_tool_warned in
6147yes:)
6148{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6149$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6150ac_tool_warned=yes ;;
6151esac
6152 AR=$ac_ct_AR
6153 fi
6154fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006155
6156
6157# tweak ARFLAGS only if the user didn't set it on the command line
6158
6159if test -z "$ARFLAGS"
6160then
6161 ARFLAGS="rc"
6162fi
6163
doko@ubuntu.com58844492012-06-30 18:25:32 +02006164if test -n "$ac_tool_prefix"; then
6165 for ac_prog in readelf
6166 do
6167 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6168set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6170$as_echo_n "checking for $ac_word... " >&6; }
6171if ${ac_cv_prog_READELF+:} false; then :
6172 $as_echo_n "(cached) " >&6
6173else
6174 if test -n "$READELF"; then
6175 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6176else
6177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6178for as_dir in $PATH
6179do
6180 IFS=$as_save_IFS
6181 test -z "$as_dir" && as_dir=.
6182 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006183 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006184 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6185 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6186 break 2
6187 fi
6188done
6189 done
6190IFS=$as_save_IFS
6191
6192fi
6193fi
6194READELF=$ac_cv_prog_READELF
6195if test -n "$READELF"; then
6196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6197$as_echo "$READELF" >&6; }
6198else
6199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6200$as_echo "no" >&6; }
6201fi
6202
6203
6204 test -n "$READELF" && break
6205 done
6206fi
6207if test -z "$READELF"; then
6208 ac_ct_READELF=$READELF
6209 for ac_prog in readelf
6210do
6211 # Extract the first word of "$ac_prog", so it can be a program name with args.
6212set dummy $ac_prog; ac_word=$2
6213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6214$as_echo_n "checking for $ac_word... " >&6; }
6215if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6216 $as_echo_n "(cached) " >&6
6217else
6218 if test -n "$ac_ct_READELF"; then
6219 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6220else
6221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6222for as_dir in $PATH
6223do
6224 IFS=$as_save_IFS
6225 test -z "$as_dir" && as_dir=.
6226 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006227 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006228 ac_cv_prog_ac_ct_READELF="$ac_prog"
6229 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6230 break 2
6231 fi
6232done
6233 done
6234IFS=$as_save_IFS
6235
6236fi
6237fi
6238ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6239if test -n "$ac_ct_READELF"; then
6240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6241$as_echo "$ac_ct_READELF" >&6; }
6242else
6243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6244$as_echo "no" >&6; }
6245fi
6246
6247
6248 test -n "$ac_ct_READELF" && break
6249done
6250
6251 if test "x$ac_ct_READELF" = x; then
6252 READELF=":"
6253 else
6254 case $cross_compiling:$ac_tool_warned in
6255yes:)
6256{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6257$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6258ac_tool_warned=yes ;;
6259esac
6260 READELF=$ac_ct_READELF
6261 fi
6262fi
6263
6264if test "$cross_compiling" = yes; then
6265 case "$READELF" in
6266 readelf|:)
6267 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6268 ;;
6269 esac
6270fi
6271
6272
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006273
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006274case $MACHDEP in
6275bsdos*|hp*|HP*)
6276 # install -d does not work on BSDI or HP-UX
6277 if test -z "$INSTALL"
6278 then
6279 INSTALL="${srcdir}/install-sh -c"
6280 fi
6281esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006282# Find a good install program. We prefer a C program (faster),
6283# so one script is as good as another. But avoid the broken or
6284# incompatible versions:
6285# SysV /etc/install, /usr/sbin/install
6286# SunOS /usr/etc/install
6287# IRIX /sbin/install
6288# AIX /bin/install
6289# AmigaOS /C/install, which installs bootblocks on floppy discs
6290# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6291# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6292# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6293# OS/2's system install, which has a completely different semantic
6294# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006295# Reject install programs that cannot install multiple files.
6296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6297$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006298if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006299if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006300 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006301else
6302 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6303for as_dir in $PATH
6304do
6305 IFS=$as_save_IFS
6306 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006307 # Account for people who put trailing slashes in PATH elements.
6308case $as_dir/ in #((
6309 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006310 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006311 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006312 /usr/ucb/* ) ;;
6313 *)
6314 # OSF1 and SCO ODT 3.0 have their own names for install.
6315 # Don't use installbsd from OSF since it installs stuff as root
6316 # by default.
6317 for ac_prog in ginstall scoinst install; do
6318 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006319 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320 if test $ac_prog = install &&
6321 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6322 # AIX install. It has an incompatible calling convention.
6323 :
6324 elif test $ac_prog = install &&
6325 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6326 # program-specific install script used by HP pwplus--don't use.
6327 :
6328 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006329 rm -rf conftest.one conftest.two conftest.dir
6330 echo one > conftest.one
6331 echo two > conftest.two
6332 mkdir conftest.dir
6333 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6334 test -s conftest.one && test -s conftest.two &&
6335 test -s conftest.dir/conftest.one &&
6336 test -s conftest.dir/conftest.two
6337 then
6338 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6339 break 3
6340 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006341 fi
6342 fi
6343 done
6344 done
6345 ;;
6346esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006347
6348 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006349IFS=$as_save_IFS
6350
Matthias Kloseb9621712010-04-24 17:59:49 +00006351rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006352
6353fi
6354 if test "${ac_cv_path_install+set}" = set; then
6355 INSTALL=$ac_cv_path_install
6356 else
6357 # As a last resort, use the slow shell script. Don't cache a
6358 # value for INSTALL within a source directory, because that will
6359 # break other packages using the cache if that directory is
6360 # removed, or if the value is a relative name.
6361 INSTALL=$ac_install_sh
6362 fi
6363fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6365$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006366
6367# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6368# It thinks the first close brace ends the variable substitution.
6369test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6370
6371test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6372
6373test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6374
Matthias Klose93a0ef12012-03-15 18:08:34 +01006375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6376$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6377if test -z "$MKDIR_P"; then
6378 if ${ac_cv_path_mkdir+:} false; then :
6379 $as_echo_n "(cached) " >&6
6380else
6381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6382for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6383do
6384 IFS=$as_save_IFS
6385 test -z "$as_dir" && as_dir=.
6386 for ac_prog in mkdir gmkdir; do
6387 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006388 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006389 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6390 'mkdir (GNU coreutils) '* | \
6391 'mkdir (coreutils) '* | \
6392 'mkdir (fileutils) '4.1*)
6393 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6394 break 3;;
6395 esac
6396 done
6397 done
6398 done
6399IFS=$as_save_IFS
6400
6401fi
6402
6403 test -d ./--version && rmdir ./--version
6404 if test "${ac_cv_path_mkdir+set}" = set; then
6405 MKDIR_P="$ac_cv_path_mkdir -p"
6406 else
6407 # As a last resort, use the slow shell script. Don't cache a
6408 # value for MKDIR_P within a source directory, because that will
6409 # break other packages using the cache if that directory is
6410 # removed, or if the value is a relative name.
6411 MKDIR_P="$ac_install_sh -d"
6412 fi
6413fi
6414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6415$as_echo "$MKDIR_P" >&6; }
6416
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006417
6418# Not every filesystem supports hard links
6419
6420if test -z "$LN" ; then
6421 case $ac_sys_system in
6422 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006423 *) LN=ln;;
6424 esac
6425fi
6426
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006427# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006428
6429ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006430
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006431# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6433$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006434
6435# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006436if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006437 withval=$with_pydebug;
6438if test "$withval" != no
6439then
6440
Matthias Kloseb9621712010-04-24 17:59:49 +00006441$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006442
Matthias Kloseb9621712010-04-24 17:59:49 +00006443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6444$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006445 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006446 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006447else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6448$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006449fi
6450else
Matthias Kloseb9621712010-04-24 17:59:49 +00006451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6452$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006453fi
6454
6455
T. Woutersddbfa2c2017-05-23 01:30:49 +02006456# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6457# the ABI. This allows enabling assertions without changing the ABI.
6458assertions='false'
6459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6460$as_echo_n "checking for --with-assertions... " >&6; }
6461
6462# Check whether --with-assertions was given.
6463if test "${with_assertions+set}" = set; then :
6464 withval=$with_assertions;
6465if test "$withval" != no
6466then
6467 assertions='true'
6468fi
6469fi
6470
6471if test "$assertions" = 'true'; then
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6473$as_echo "yes" >&6; }
6474elif test "$Py_DEBUG" = 'true'; then
6475 assertions='true'
6476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6477$as_echo "implied by --with-pydebug" >&6; }
6478else
6479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6480$as_echo "no" >&6; }
6481fi
6482
Brett Cannon63d98bc2016-09-06 17:12:40 -07006483# Enable optimization flags
6484
6485
6486Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6488$as_echo_n "checking for --enable-optimizations... " >&6; }
6489# Check whether --enable-optimizations was given.
6490if test "${enable_optimizations+set}" = set; then :
6491 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006492if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006493then
6494 Py_OPT='true'
6495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6496$as_echo "yes" >&6; };
6497else
6498 Py_OPT='false'
6499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6500$as_echo "no" >&6; };
6501fi
6502else
6503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6504$as_echo "no" >&6; }
6505fi
6506
6507if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006508 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6509 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006510 # 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 +00006511 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006512 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006513 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006514 DEF_MAKE_RULE="build_all"
6515else
6516 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006517 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006518 DEF_MAKE_RULE="all"
6519fi
6520
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006521# Enable LTO flags
6522
6523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6524$as_echo_n "checking for --with-lto... " >&6; }
6525
6526# Check whether --with-lto was given.
6527if test "${with_lto+set}" = set; then :
6528 withval=$with_lto;
6529if test "$withval" != no
6530then
6531 Py_LTO='true'
6532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6533$as_echo "yes" >&6; };
6534else
6535 Py_LTO='false'
6536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6537$as_echo "no" >&6; };
6538fi
6539else
6540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6541$as_echo "no" >&6; }
6542fi
6543
6544if test "$Py_LTO" = 'true' ; then
6545 case $CC in
6546 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006547 case $ac_sys_system in
6548 Darwin*)
6549 # Any changes made here should be reflected in the GCC+Darwin case below
6550 LTOFLAGS="-flto -Wl,-export_dynamic"
6551 ;;
6552 *)
6553 LTOFLAGS="-flto"
6554 ;;
6555 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006556 ;;
6557 *gcc*)
6558 case $ac_sys_system in
6559 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006560 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006561 ;;
6562 *)
6563 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6564 ;;
6565 esac
6566 ;;
6567 esac
6568fi
6569
Brett Cannon7188a3e2015-09-18 15:13:44 -07006570# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006571
6572
6573
6574
6575
Gregory P. Smith799520c2016-09-07 16:10:00 -07006576# Make this work on systems where llvm tools are not installed with their
6577# normal names in the default $PATH (ie: Ubuntu). They exist under the
6578# non-suffixed name in their versioned llvm directory.
6579llvm_bin_dir=''
6580llvm_path="${PATH}"
6581if test "${CC}" = "clang"
6582then
6583 clang_bin=`which clang`
6584 # Some systems install clang elsewhere as a symlink to the real path
6585 # which is where the related llvm tools are located.
6586 if test -L "${clang_bin}"
6587 then
6588 clang_dir=`dirname "${clang_bin}"`
6589 clang_bin=`readlink "${clang_bin}"`
6590 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6591 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6592 fi
6593fi
Zachary Ware5af85642015-12-21 12:09:17 -06006594
Gregory P. Smith799520c2016-09-07 16:10:00 -07006595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6596$as_echo_n "checking target system type... " >&6; }
6597if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006598 $as_echo_n "(cached) " >&6
6599else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006600 if test "x$target_alias" = x; then
6601 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006602else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006603 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6604 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6605fi
6606
6607fi
6608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6609$as_echo "$ac_cv_target" >&6; }
6610case $ac_cv_target in
6611*-*-*) ;;
6612*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6613esac
6614target=$ac_cv_target
6615ac_save_IFS=$IFS; IFS='-'
6616set x $ac_cv_target
6617shift
6618target_cpu=$1
6619target_vendor=$2
6620shift; shift
6621# Remember, the first character of IFS is used to create $*,
6622# except with old shells:
6623target_os=$*
6624IFS=$ac_save_IFS
6625case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6626
6627
6628# The aliases save the names the user supplied, while $host etc.
6629# will get canonicalized.
6630test -n "$target_alias" &&
6631 test "$program_prefix$program_suffix$program_transform_name" = \
6632 NONENONEs,x,x, &&
6633 program_prefix=${target_alias}-
6634# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6635set dummy $target_alias-llvm-profdata; ac_word=$2
6636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6637$as_echo_n "checking for $ac_word... " >&6; }
6638if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6639 $as_echo_n "(cached) " >&6
6640else
6641 case $LLVM_PROFDATA in
6642 [\\/]* | ?:[\\/]*)
6643 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6644 ;;
6645 *)
6646 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6647for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006648do
6649 IFS=$as_save_IFS
6650 test -z "$as_dir" && as_dir=.
6651 for ac_exec_ext in '' $ac_executable_extensions; do
6652 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006653 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006654 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6655 break 2
6656 fi
6657done
6658 done
6659IFS=$as_save_IFS
6660
Gregory P. Smith799520c2016-09-07 16:10:00 -07006661 ;;
6662esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006663fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006664LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6665if test -n "$LLVM_PROFDATA"; then
6666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6667$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006668else
6669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6670$as_echo "no" >&6; }
6671fi
6672
6673
Gregory P. Smith799520c2016-09-07 16:10:00 -07006674if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6675 if test "$build" = "$target"; then
6676 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6677 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6678set dummy llvm-profdata; ac_word=$2
6679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6680$as_echo_n "checking for $ac_word... " >&6; }
6681if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6682 $as_echo_n "(cached) " >&6
6683else
6684 case $ac_pt_LLVM_PROFDATA in
6685 [\\/]* | ?:[\\/]*)
6686 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6687 ;;
6688 *)
6689 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6690for as_dir in ${llvm_path}
6691do
6692 IFS=$as_save_IFS
6693 test -z "$as_dir" && as_dir=.
6694 for ac_exec_ext in '' $ac_executable_extensions; do
6695 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6696 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6697 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6698 break 2
6699 fi
6700done
6701 done
6702IFS=$as_save_IFS
6703
6704 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6705 ;;
6706esac
6707fi
6708ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6709if test -n "$ac_pt_LLVM_PROFDATA"; then
6710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6711$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6712else
6713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6714$as_echo "no" >&6; }
6715fi
6716
6717 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6718 else
6719 LLVM_PROFDATA="''"
6720 fi
6721else
6722 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6723fi
6724
6725
6726if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6727then
6728 LLVM_PROF_FOUND="found"
6729else
6730 LLVM_PROF_FOUND="not-found"
6731fi
6732if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6733then
6734 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6735 if test -n "${found_llvm_profdata}"
6736 then
6737 # llvm-profdata isn't directly in $PATH in some cases.
6738 # https://apple.stackexchange.com/questions/197053/
6739 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6740 LLVM_PROF_FOUND=found
6741 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6742$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6743 fi
6744fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006745LLVM_PROF_ERR=no
6746case $CC in
6747 *clang*)
6748 # Any changes made here should be reflected in the GCC+Darwin case below
6749 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6750 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006751 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006752 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6753 if test $LLVM_PROF_FOUND = not-found
6754 then
6755 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006756 if test "${REQUIRE_PGO}" = "yes"
6757 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006758 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 -07006759 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006760 fi
6761 ;;
6762 *gcc*)
6763 case $ac_sys_system in
6764 Darwin*)
6765 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6766 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006767 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006768 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006769 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006770 then
6771 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006772 if test "${REQUIRE_PGO}" = "yes"
6773 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006774 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 -07006775 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006776 fi
6777 ;;
6778 *)
6779 PGO_PROF_GEN_FLAG="-fprofile-generate"
6780 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6781 LLVM_PROF_MERGER="true"
6782 LLVM_PROF_FILE=""
6783 ;;
6784 esac
6785 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006786 *icc*)
6787 PGO_PROF_GEN_FLAG="-prof-gen"
6788 PGO_PROF_USE_FLAG="-prof-use"
6789 LLVM_PROF_MERGER="true"
6790 LLVM_PROF_FILE=""
6791 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006792esac
6793
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006794# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6795# merged with this chunk of code?
6796
6797# Optimizer/debugger flags
6798# ------------------------
6799# (The following bit of code is complicated enough - please keep things
6800# indented properly. Just pretend you're editing Python code. ;-)
6801
6802# There are two parallel sets of case statements below, one that checks to
6803# see if OPT was set and one that does BASECFLAGS setting based upon
6804# compiler and platform. BASECFLAGS tweaks need to be made even if the
6805# user set OPT.
6806
6807# tweak OPT based on compiler and platform, only if the user didn't set
6808# it on the command line
6809
Victor Stinner9ed34a82017-05-02 22:35:58 +02006810
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006811if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006812then
6813 case $GCC in
6814 yes)
6815 if test "$CC" != 'g++' ; then
6816 STRICT_PROTO="-Wstrict-prototypes"
6817 fi
6818 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6819 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6820 WRAP="-fwrapv"
6821 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006822
Stefan Krahaf04ff22011-12-08 22:20:31 +01006823 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006824 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006825 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006826 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006827 *)
6828 if $CC --version 2>&1 | grep -q clang
6829 then
6830 cc_is_clang=1
6831 else
6832 cc_is_clang=
6833 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006834 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006835
Victor Stinner35f3d242017-04-21 12:35:24 +02006836 if test -n "${cc_is_clang}"
6837 then
6838 # Clang also needs -fwrapv
6839 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006840 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6841 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006842 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006843 fi
6844
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845 case $ac_cv_prog_cc_g in
6846 yes)
6847 if test "$Py_DEBUG" = 'true' ; then
6848 # Optimization messes up debuggers, so turn it off for
6849 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006850 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006851 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006852 else
Victor Stinner28205b22017-04-21 11:24:34 +02006853 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006854 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006855 else
Victor Stinner28205b22017-04-21 11:24:34 +02006856 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006857 fi
6858 ;;
6859 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006860 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006861 ;;
6862 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006863
Victor Stinner826f83f2017-04-28 15:07:10 +02006864 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006865
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006866 case $ac_sys_system in
6867 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6868 ;;
6869 esac
6870 ;;
6871
6872 *)
6873 OPT="-O"
6874 ;;
6875 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006876fi
6877
6878
6879
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006880
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006881# The -arch flags for universal builds on OSX
6882UNIVERSAL_ARCH_FLAGS=
6883
6884
6885# tweak BASECFLAGS based on compiler and platform
6886case $GCC in
6887yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006888 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006889
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6891$as_echo_n "checking for -Wextra... " >&6; }
6892 ac_save_cc="$CC"
6893 CC="$CC -Wextra -Werror"
6894 if ${ac_cv_extra_warnings+:} false; then :
6895 $as_echo_n "(cached) " >&6
6896else
6897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6898/* end confdefs.h. */
6899
6900
6901int
6902main ()
6903{
6904
6905 ;
6906 return 0;
6907}
6908
6909_ACEOF
6910if ac_fn_c_try_compile "$LINENO"; then :
6911
6912 ac_cv_extra_warnings=yes
6913
6914else
6915
6916 ac_cv_extra_warnings=no
6917
6918fi
6919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6920fi
6921
6922 CC="$ac_save_cc"
6923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6924$as_echo "$ac_cv_extra_warnings" >&6; }
6925
6926 if test $ac_cv_extra_warnings = yes
6927 then
6928 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6929 fi
6930
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006931 # Python doesn't violate C99 aliasing rules, but older versions of
6932 # GCC produce warnings for legal Python code. Enable
6933 # -fno-strict-aliasing on versions of GCC that support but produce
6934 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6936$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006937 ac_save_cc="$CC"
6938 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006939 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006940 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006941 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006942else
Matthias Kloseb9621712010-04-24 17:59:49 +00006943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006944/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006945
Matthias Kloseb159a552010-04-25 21:00:44 +00006946
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006947int
6948main ()
6949{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006950
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006951 ;
6952 return 0;
6953}
Matthias Kloseb159a552010-04-25 21:00:44 +00006954
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006956if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006957
6958 CC="$ac_save_cc -fstrict-aliasing"
6959 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006961/* end confdefs.h. */
6962
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006963 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006964int
6965main ()
6966{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006967double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006968 ;
6969 return 0;
6970}
Matthias Kloseb159a552010-04-25 21:00:44 +00006971
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006973if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006974
6975 ac_cv_no_strict_aliasing=no
6976
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006977else
Matthias Kloseb159a552010-04-25 21:00:44 +00006978
6979 ac_cv_no_strict_aliasing=yes
6980
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006981fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006983
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006984else
Matthias Kloseb159a552010-04-25 21:00:44 +00006985
6986 ac_cv_no_strict_aliasing=no
6987
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006988fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006990fi
6991
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006992 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006993 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6995$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006996 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006997 then
6998 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6999 fi
7000
Zachary Ware5af85642015-12-21 12:09:17 -06007001 # ICC doesn't recognize the option, but only emits a warning
7002 ## XXX does it emit an unused result warning and can it be disabled?
7003 case "$CC" in
7004 *icc*)
7005 ac_cv_disable_unused_result_warning=no
7006 ;;
7007 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7009$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7010 ac_save_cc="$CC"
7011 CC="$CC -Wunused-result -Werror"
7012 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007013 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007014 $as_echo_n "(cached) " >&6
7015else
7016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7017/* end confdefs.h. */
7018
7019
7020int
7021main ()
7022{
7023
7024 ;
7025 return 0;
7026}
7027
7028_ACEOF
7029if ac_fn_c_try_compile "$LINENO"; then :
7030
7031 ac_cv_disable_unused_result_warning=yes
7032
7033else
7034
7035 ac_cv_disable_unused_result_warning=no
7036
7037fi
7038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7039fi
7040
7041 CFLAGS="$save_CFLAGS"
7042 CC="$ac_save_cc"
7043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7044$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007045 ;;
7046 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007047
7048 if test $ac_cv_disable_unused_result_warning = yes
7049 then
7050 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007051 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7052 fi
7053
7054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7055$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7056 ac_save_cc="$CC"
7057 CC="$CC -Wunused-parameter -Werror"
7058 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7059 $as_echo_n "(cached) " >&6
7060else
7061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7062/* end confdefs.h. */
7063
7064
7065int
7066main ()
7067{
7068
7069 ;
7070 return 0;
7071}
7072
7073_ACEOF
7074if ac_fn_c_try_compile "$LINENO"; then :
7075
7076 ac_cv_disable_unused_parameter_warning=yes
7077
7078else
7079
7080 ac_cv_disable_unused_parameter_warning=no
7081
7082fi
7083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7084fi
7085
7086 CC="$ac_save_cc"
7087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7088$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7089
7090 if test $ac_cv_disable_unused_parameter_warning = yes
7091 then
7092 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7093 fi
7094
7095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7096$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7097 ac_save_cc="$CC"
7098 CC="$CC -Wmissing-field-initializers -Werror"
7099 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7100 $as_echo_n "(cached) " >&6
7101else
7102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7103/* end confdefs.h. */
7104
7105
7106int
7107main ()
7108{
7109
7110 ;
7111 return 0;
7112}
7113
7114_ACEOF
7115if ac_fn_c_try_compile "$LINENO"; then :
7116
7117 ac_cv_disable_missing_field_initializers=yes
7118
7119else
7120
7121 ac_cv_disable_missing_field_initializers=no
7122
7123fi
7124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7125fi
7126
7127 CC="$ac_save_cc"
7128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7129$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7130
7131 if test $ac_cv_disable_missing_field_initializers = yes
7132 then
7133 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007134 fi
7135
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7137$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7138 ac_save_cc="$CC"
7139 CC="$CC -Wsign-compare"
7140 save_CFLAGS="$CFLAGS"
7141 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7142 $as_echo_n "(cached) " >&6
7143else
7144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7145/* end confdefs.h. */
7146
7147
7148int
7149main ()
7150{
7151
7152 ;
7153 return 0;
7154}
7155
7156_ACEOF
7157if ac_fn_c_try_compile "$LINENO"; then :
7158
7159 ac_cv_enable_sign_compare_warning=yes
7160
7161else
7162
7163 ac_cv_enable_sign_compare_warning=no
7164
7165fi
7166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7167fi
7168
7169 CFLAGS="$save_CFLAGS"
7170 CC="$ac_save_cc"
7171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7172$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7173
7174 if test $ac_cv_enable_sign_compare_warning = yes
7175 then
7176 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7177 fi
7178
7179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7180$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7181 ac_save_cc="$CC"
7182 CC="$CC -Wunreachable-code"
7183 save_CFLAGS="$CFLAGS"
7184 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7185 $as_echo_n "(cached) " >&6
7186else
7187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7188/* end confdefs.h. */
7189
7190
7191int
7192main ()
7193{
7194
7195 ;
7196 return 0;
7197}
7198
7199_ACEOF
7200if ac_fn_c_try_compile "$LINENO"; then :
7201
7202 ac_cv_enable_unreachable_code_warning=yes
7203
7204else
7205
7206 ac_cv_enable_unreachable_code_warning=no
7207
7208fi
7209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7210fi
7211
7212 CFLAGS="$save_CFLAGS"
7213 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007214
7215 # Don't enable unreachable code warning in debug mode, since it usually
7216 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007217 # Issue #24324: Unfortunately, the unreachable code warning does not work
7218 # correctly on gcc and has been silently removed from the compiler.
7219 # It is supported on clang but on OS X systems gcc may be an alias
7220 # for clang. Try to determine if the compiler is not really gcc and,
7221 # if so, only then enable the warning.
7222 if test $ac_cv_enable_unreachable_code_warning = yes && \
7223 test "$Py_DEBUG" != "true" && \
7224 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007225 then
7226 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007227 else
7228 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007229 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7231$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007232
Victor Stinner193ee0a2017-02-06 14:24:00 +01007233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7234$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7235 ac_save_cc="$CC"
7236 CC="$CC -Werror=implicit-function-declaration"
7237 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7238 $as_echo_n "(cached) " >&6
7239else
7240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7241/* end confdefs.h. */
7242
7243
7244int
7245main ()
7246{
7247
7248 ;
7249 return 0;
7250}
7251
7252_ACEOF
7253if ac_fn_c_try_compile "$LINENO"; then :
7254
7255 ac_cv_enable_implicit_function_declaration_error=yes
7256
7257else
7258
7259 ac_cv_enable_implicit_function_declaration_error=no
7260
7261fi
7262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7263fi
7264
7265 CC="$ac_save_cc"
7266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7267$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7268
7269 if test $ac_cv_enable_implicit_function_declaration_error = yes
7270 then
7271 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7272 fi
7273
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007274 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7275 # support. Without this, treatment of subnormals doesn't follow
7276 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007277 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007278 alpha*)
7279 BASECFLAGS="$BASECFLAGS -mieee"
7280 ;;
7281 esac
7282
7283 case $ac_sys_system in
7284 SCO_SV*)
7285 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7286 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007287
7288 # is there any other compiler on Darwin besides gcc?
7289 Darwin*)
7290 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7291 # used to be here, but non-Apple gcc doesn't accept them.
7292 if test "${CC}" = gcc
7293 then
7294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007295$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007296 case "${UNIVERSALSDK}" in
7297 */MacOSX10.4u.sdk)
7298 # Build using 10.4 SDK, force usage of gcc when the
7299 # compiler is gcc, otherwise the user will get very
7300 # confusing error messages when building on OSX 10.6
7301 CC=gcc-4.0
7302 CPP=cpp-4.0
7303 ;;
7304 esac
7305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007306$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007307 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007308
Ned Deily87adb6e2013-10-18 21:09:56 -07007309 if test "${enable_universalsdk}"
7310 then
7311 case "$UNIVERSAL_ARCHS" in
7312 32-bit)
7313 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7314 LIPO_32BIT_FLAGS=""
7315 ARCH_RUN_32BIT=""
7316 ;;
7317 64-bit)
7318 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7319 LIPO_32BIT_FLAGS=""
7320 ARCH_RUN_32BIT="true"
7321 ;;
7322 all)
7323 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7324 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7325 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7326 ;;
7327 intel)
7328 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7329 LIPO_32BIT_FLAGS="-extract i386"
7330 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7331 ;;
7332 intel-32)
7333 UNIVERSAL_ARCH_FLAGS="-arch i386"
7334 LIPO_32BIT_FLAGS=""
7335 ARCH_RUN_32BIT=""
7336 ;;
7337 3-way)
7338 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7339 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7340 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7341 ;;
7342 *)
7343 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7344 ;;
7345 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007346
Ned Deily87adb6e2013-10-18 21:09:56 -07007347 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7348 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7349 if test "${UNIVERSALSDK}" != "/"
7350 then
7351 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7352 fi
7353 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007354
Ned Deily87adb6e2013-10-18 21:09:56 -07007355 # Calculate an appropriate deployment target for this build:
7356 # The deployment target value is used explicitly to enable certain
7357 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007358 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007359 # component of the string returned by distutils.get_platform().
7360 #
7361 # Use the value from:
7362 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7363 # 2. the operating system version of the build machine if >= 10.6
7364 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7365 # below to pick either 10.3, 10.4, or 10.5 as the target.
7366 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007367
Ned Deily87adb6e2013-10-18 21:09:56 -07007368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7369$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007370 cur_target_major=`sw_vers -productVersion | \
7371 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7372 cur_target_minor=`sw_vers -productVersion | \
7373 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7374 cur_target="${cur_target_major}.${cur_target_minor}"
7375 if test ${cur_target_major} -eq 10 && \
7376 test ${cur_target_minor} -ge 3 && \
7377 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007378 then
Ned Deily36820b62014-06-25 13:44:22 -07007379 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007380 cur_target=10.3
7381 if test ${enable_universalsdk}
7382 then
7383 case "$UNIVERSAL_ARCHS" in
7384 all|3-way|intel|64-bit)
7385 # These configurations were first supported in 10.5
7386 cur_target='10.5'
7387 ;;
7388 esac
7389 else
7390 if test `/usr/bin/arch` = "i386"
7391 then
7392 # 10.4 was the first release to support Intel archs
7393 cur_target="10.4"
7394 fi
7395 fi
7396 fi
7397 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007398
Ned Deily87adb6e2013-10-18 21:09:56 -07007399 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7400 # environment with a value that is the same as what we'll use
7401 # in the Makefile to ensure that we'll get the same compiler
7402 # environment during configure and build time.
7403 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7404 export MACOSX_DEPLOYMENT_TARGET
7405 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7407$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007408
Ned Deily87adb6e2013-10-18 21:09:56 -07007409 # end of Darwin* tests
7410 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007411 esac
7412 ;;
7413
7414*)
7415 case $ac_sys_system in
7416 OpenUNIX*|UnixWare*)
7417 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7418 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007419 SCO_SV*)
7420 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7421 ;;
7422 esac
7423 ;;
7424esac
7425
Zachary Ware5af85642015-12-21 12:09:17 -06007426# ICC needs -fp-model strict or floats behave badly
7427case "$CC" in
7428*icc*)
7429 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7430 ;;
7431esac
7432
T. Woutersddbfa2c2017-05-23 01:30:49 +02007433if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007434 :
7435else
7436 OPT="-DNDEBUG $OPT"
7437fi
7438
7439if test "$ac_arch_flags"
7440then
7441 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7442fi
7443
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007444# On some compilers, pthreads are available without further options
7445# (e.g. MacOS X). On some of these systems, the compiler will not
7446# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7447# So we have to see first whether pthreads are available without
7448# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7450$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007451if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007452 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007453else
Matthias Kloseb9621712010-04-24 17:59:49 +00007454 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007455 ac_cv_pthread_is_default=no
7456else
Matthias Kloseb9621712010-04-24 17:59:49 +00007457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007458/* end confdefs.h. */
7459
Stefan Krah7dba5942012-11-22 22:49:11 +01007460#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007461#include <pthread.h>
7462
7463void* routine(void* p){return NULL;}
7464
7465int main(){
7466 pthread_t p;
7467 if(pthread_create(&p,NULL,routine,NULL)!=0)
7468 return 1;
7469 (void)pthread_detach(p);
7470 return 0;
7471}
7472
7473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007474if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007475
7476 ac_cv_pthread_is_default=yes
7477 ac_cv_kthread=no
7478 ac_cv_pthread=no
7479
7480else
Matthias Kloseb9621712010-04-24 17:59:49 +00007481 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007483rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7484 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007485fi
7486
7487
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007488fi
7489
Matthias Kloseb9621712010-04-24 17:59:49 +00007490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7491$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007492
7493
7494if test $ac_cv_pthread_is_default = yes
7495then
7496 ac_cv_kpthread=no
7497else
7498# -Kpthread, if available, provides the right #defines
7499# and linker options to make pthread_create available
7500# Some compilers won't report that they do not support -Kpthread,
7501# so we need to run a program to see whether it really made the
7502# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7504$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007505if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007506 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007507else
7508 ac_save_cc="$CC"
7509CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007510if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007511 ac_cv_kpthread=no
7512else
Matthias Kloseb9621712010-04-24 17:59:49 +00007513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007514/* end confdefs.h. */
7515
Stefan Krah7dba5942012-11-22 22:49:11 +01007516#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007517#include <pthread.h>
7518
7519void* routine(void* p){return NULL;}
7520
7521int main(){
7522 pthread_t p;
7523 if(pthread_create(&p,NULL,routine,NULL)!=0)
7524 return 1;
7525 (void)pthread_detach(p);
7526 return 0;
7527}
7528
7529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007530if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007531 ac_cv_kpthread=yes
7532else
Matthias Kloseb9621712010-04-24 17:59:49 +00007533 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7536 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007537fi
7538
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007539CC="$ac_save_cc"
7540fi
7541
Matthias Kloseb9621712010-04-24 17:59:49 +00007542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7543$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007544fi
7545
7546if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7547then
7548# -Kthread, if available, provides the right #defines
7549# and linker options to make pthread_create available
7550# Some compilers won't report that they do not support -Kthread,
7551# so we need to run a program to see whether it really made the
7552# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7554$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007555if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007556 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007557else
7558 ac_save_cc="$CC"
7559CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007560if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007561 ac_cv_kthread=no
7562else
Matthias Kloseb9621712010-04-24 17:59:49 +00007563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007564/* end confdefs.h. */
7565
Stefan Krah7dba5942012-11-22 22:49:11 +01007566#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007567#include <pthread.h>
7568
7569void* routine(void* p){return NULL;}
7570
7571int main(){
7572 pthread_t p;
7573 if(pthread_create(&p,NULL,routine,NULL)!=0)
7574 return 1;
7575 (void)pthread_detach(p);
7576 return 0;
7577}
7578
7579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007580if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007581 ac_cv_kthread=yes
7582else
Matthias Kloseb9621712010-04-24 17:59:49 +00007583 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007584fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007585rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7586 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007587fi
7588
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007589CC="$ac_save_cc"
7590fi
7591
Matthias Kloseb9621712010-04-24 17:59:49 +00007592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7593$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007594fi
7595
7596if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7597then
7598# -pthread, if available, provides the right #defines
7599# and linker options to make pthread_create available
7600# Some compilers won't report that they do not support -pthread,
7601# so we need to run a program to see whether it really made the
7602# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7604$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007605if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007606 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007607else
7608 ac_save_cc="$CC"
7609CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007610if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007611 ac_cv_pthread=no
7612else
Matthias Kloseb9621712010-04-24 17:59:49 +00007613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007614/* end confdefs.h. */
7615
Stefan Krah7dba5942012-11-22 22:49:11 +01007616#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007617#include <pthread.h>
7618
7619void* routine(void* p){return NULL;}
7620
7621int main(){
7622 pthread_t p;
7623 if(pthread_create(&p,NULL,routine,NULL)!=0)
7624 return 1;
7625 (void)pthread_detach(p);
7626 return 0;
7627}
7628
7629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007630if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007631 ac_cv_pthread=yes
7632else
Matthias Kloseb9621712010-04-24 17:59:49 +00007633 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7636 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007637fi
7638
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007639CC="$ac_save_cc"
7640fi
7641
Matthias Kloseb9621712010-04-24 17:59:49 +00007642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7643$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007644fi
7645
7646# If we have set a CC compiler flag for thread support then
7647# check if it works for CXX, too.
7648ac_cv_cxx_thread=no
7649if test ! -z "$CXX"
7650then
Matthias Kloseb9621712010-04-24 17:59:49 +00007651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7652$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007653ac_save_cxx="$CXX"
7654
7655if test "$ac_cv_kpthread" = "yes"
7656then
7657 CXX="$CXX -Kpthread"
7658 ac_cv_cxx_thread=yes
7659elif test "$ac_cv_kthread" = "yes"
7660then
7661 CXX="$CXX -Kthread"
7662 ac_cv_cxx_thread=yes
7663elif test "$ac_cv_pthread" = "yes"
7664then
7665 CXX="$CXX -pthread"
7666 ac_cv_cxx_thread=yes
7667fi
7668
7669if test $ac_cv_cxx_thread = yes
7670then
7671 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7672 $CXX -c conftest.$ac_ext 2>&5
7673 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7674 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7675 then
7676 ac_cv_cxx_thread=yes
7677 else
7678 ac_cv_cxx_thread=no
7679 fi
7680 rm -fr conftest*
7681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7683$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007684fi
7685CXX="$ac_save_cxx"
7686
7687
7688# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7690$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007691if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007692 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007693else
Matthias Kloseb9621712010-04-24 17:59:49 +00007694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007695/* end confdefs.h. */
7696#include <stdlib.h>
7697#include <stdarg.h>
7698#include <string.h>
7699#include <float.h>
7700
7701int
7702main ()
7703{
7704
7705 ;
7706 return 0;
7707}
7708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007709if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007710 ac_cv_header_stdc=yes
7711else
Matthias Kloseb9621712010-04-24 17:59:49 +00007712 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007713fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7715
7716if test $ac_cv_header_stdc = yes; then
7717 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007719/* end confdefs.h. */
7720#include <string.h>
7721
7722_ACEOF
7723if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007724 $EGREP "memchr" >/dev/null 2>&1; then :
7725
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007726else
7727 ac_cv_header_stdc=no
7728fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007729rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007730
7731fi
7732
7733if test $ac_cv_header_stdc = yes; then
7734 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007736/* end confdefs.h. */
7737#include <stdlib.h>
7738
7739_ACEOF
7740if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007741 $EGREP "free" >/dev/null 2>&1; then :
7742
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007743else
7744 ac_cv_header_stdc=no
7745fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007746rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007747
7748fi
7749
7750if test $ac_cv_header_stdc = yes; then
7751 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007752 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007753 :
7754else
Matthias Kloseb9621712010-04-24 17:59:49 +00007755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007756/* end confdefs.h. */
7757#include <ctype.h>
7758#include <stdlib.h>
7759#if ((' ' & 0x0FF) == 0x020)
7760# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7761# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7762#else
7763# define ISLOWER(c) \
7764 (('a' <= (c) && (c) <= 'i') \
7765 || ('j' <= (c) && (c) <= 'r') \
7766 || ('s' <= (c) && (c) <= 'z'))
7767# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7768#endif
7769
7770#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7771int
7772main ()
7773{
7774 int i;
7775 for (i = 0; i < 256; i++)
7776 if (XOR (islower (i), ISLOWER (i))
7777 || toupper (i) != TOUPPER (i))
7778 return 2;
7779 return 0;
7780}
7781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007782if ac_fn_c_try_run "$LINENO"; then :
7783
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007784else
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007787rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7788 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007789fi
7790
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007791fi
7792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7794$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007795if test $ac_cv_header_stdc = yes; then
7796
Matthias Kloseb9621712010-04-24 17:59:49 +00007797$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007798
7799fi
7800
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007801for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007802fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007803ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007804sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007805unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007806poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007807sys/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 +01007808sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007809sys/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 +01007810sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007811sys/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 -07007812libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007813linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007814sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007815do :
7816 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7817ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007818if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007819 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007820#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007821_ACEOF
7822
7823fi
7824
Guido van Rossum627b2d71993-12-24 10:39:16 +00007825done
7826
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007827ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007828for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007829 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7831$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007832if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007833 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007834else
Matthias Kloseb9621712010-04-24 17:59:49 +00007835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007836/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007837#include <sys/types.h>
7838#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007839
Martin v. Löwis11437992002-04-12 09:54:03 +00007840int
7841main ()
7842{
7843if ((DIR *) 0)
7844return 0;
7845 ;
7846 return 0;
7847}
7848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007849if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007850 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007851else
Matthias Kloseb9621712010-04-24 17:59:49 +00007852 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007856eval ac_res=\$$as_ac_Header
7857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7858$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007859if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007860 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007861#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007862_ACEOF
7863
7864ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007865fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007866
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007867done
7868# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7869if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7871$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007872if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007873 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007874else
Martin v. Löwis11437992002-04-12 09:54:03 +00007875 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007879/* Override any GCC internal prototype to avoid an error.
7880 Use char because int might match the return type of a GCC
7881 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007882#ifdef __cplusplus
7883extern "C"
7884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007885char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007886int
7887main ()
7888{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007889return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007890 ;
7891 return 0;
7892}
7893_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894for ac_lib in '' dir; do
7895 if test -z "$ac_lib"; then
7896 ac_res="none required"
7897 else
7898 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007899 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007900 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007901 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007902 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007904rm -f core conftest.err conftest.$ac_objext \
7905 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007906 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007907 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007908fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007909done
Victor Stinnere0be4232011-10-25 13:06:09 +02007910if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007912else
7913 ac_cv_search_opendir=no
7914fi
7915rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007916LIBS=$ac_func_search_save_LIBS
7917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7919$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007920ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007921if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007922 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007923
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007924fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007925
Michael W. Hudson54241132001-12-07 15:38:26 +00007926else
Matthias Kloseb9621712010-04-24 17:59:49 +00007927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7928$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007929if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007930 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007931else
7932 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007936/* Override any GCC internal prototype to avoid an error.
7937 Use char because int might match the return type of a GCC
7938 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007939#ifdef __cplusplus
7940extern "C"
7941#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007942char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007943int
7944main ()
7945{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007946return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007947 ;
7948 return 0;
7949}
7950_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951for ac_lib in '' x; do
7952 if test -z "$ac_lib"; then
7953 ac_res="none required"
7954 else
7955 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007956 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007957 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007958 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007959 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007961rm -f core conftest.err conftest.$ac_objext \
7962 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007963 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007966done
Victor Stinnere0be4232011-10-25 13:06:09 +02007967if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007968
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007969else
7970 ac_cv_search_opendir=no
7971fi
7972rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007973LIBS=$ac_func_search_save_LIBS
7974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7976$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007977ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007978if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007979 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007980
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007981fi
7982
7983fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007984
Matthias Kloseb9621712010-04-24 17:59:49 +00007985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7986$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007987if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007988 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007989else
Matthias Kloseb9621712010-04-24 17:59:49 +00007990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007991/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007992#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007993int
7994main ()
7995{
7996return makedev(0, 0);
7997 ;
7998 return 0;
7999}
8000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008001if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008002 ac_cv_header_sys_types_h_makedev=yes
8003else
Matthias Kloseb9621712010-04-24 17:59:49 +00008004 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008006rm -f core conftest.err conftest.$ac_objext \
8007 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008008
8009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8011$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008012
8013if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008014ac_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 +02008015if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008016
Matthias Kloseb9621712010-04-24 17:59:49 +00008017$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008018
8019fi
8020
8021
8022
8023 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008024 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 +02008025if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008026
Matthias Kloseb9621712010-04-24 17:59:49 +00008027$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008028
8029fi
8030
8031
8032 fi
8033fi
8034
Michael W. Hudson54241132001-12-07 15:38:26 +00008035
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008036# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8037# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8038SAVE_CFLAGS=$CFLAGS
8039CFLAGS="-std=c99 $CFLAGS"
8040for ac_header in bluetooth/bluetooth.h
8041do :
8042 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8043if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8044 cat >>confdefs.h <<_ACEOF
8045#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8046_ACEOF
8047
8048fi
8049
8050done
8051
8052CFLAGS=$SAVE_CFLAGS
8053
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008054# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8055for ac_header in net/if.h
8056do :
8057 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8058#ifdef STDC_HEADERS
8059# include <stdlib.h>
8060# include <stddef.h>
8061#else
8062# ifdef HAVE_STDLIB_H
8063# include <stdlib.h>
8064# endif
8065#endif
8066#ifdef HAVE_SYS_SOCKET_H
8067# include <sys/socket.h>
8068#endif
8069
8070"
Victor Stinnere0be4232011-10-25 13:06:09 +02008071if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008072 cat >>confdefs.h <<_ACEOF
8073#define HAVE_NET_IF_H 1
8074_ACEOF
8075
8076fi
8077
8078done
8079
8080
Martin v. Löwis11017b12006-01-14 18:12:57 +00008081# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008082for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008083do :
8084 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 +00008085#ifdef HAVE_ASM_TYPES_H
8086#include <asm/types.h>
8087#endif
8088#ifdef HAVE_SYS_SOCKET_H
8089#include <sys/socket.h>
8090#endif
8091
Matthias Kloseb9621712010-04-24 17:59:49 +00008092"
Victor Stinnere0be4232011-10-25 13:06:09 +02008093if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008094 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008095#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008096_ACEOF
8097
8098fi
8099
8100done
8101
8102
Charles-François Natali47413c12011-10-06 19:47:44 +02008103# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008104for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008105do :
8106 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8107ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8108#ifdef HAVE_SYS_SOCKET_H
8109#include <sys/socket.h>
8110#endif
8111
8112"
8113if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8114 cat >>confdefs.h <<_ACEOF
8115#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8116_ACEOF
8117
8118fi
8119
8120done
8121
8122
Guido van Rossum627b2d71993-12-24 10:39:16 +00008123# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008124was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8126$as_echo_n "checking for clock_t in time.h... " >&6; }
8127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008128/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008129#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008130
8131_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008132if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008133 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008134 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008135else
Martin v. Löwis11437992002-04-12 09:54:03 +00008136
8137
Matthias Kloseb9621712010-04-24 17:59:49 +00008138$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008139
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008140
Guido van Rossum627b2d71993-12-24 10:39:16 +00008141fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008142rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008143
Matthias Kloseb9621712010-04-24 17:59:49 +00008144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8145$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008146
Matthias Kloseb9621712010-04-24 17:59:49 +00008147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8148$as_echo_n "checking for makedev... " >&6; }
8149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008150/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008151
Jesus Cea740f53a2010-04-28 11:35:30 +00008152#if defined(MAJOR_IN_MKDEV)
8153#include <sys/mkdev.h>
8154#elif defined(MAJOR_IN_SYSMACROS)
8155#include <sys/sysmacros.h>
8156#else
8157#include <sys/types.h>
8158#endif
8159
Neal Norwitz11690112002-07-30 01:08:28 +00008160int
8161main ()
8162{
Jesus Cea740f53a2010-04-28 11:35:30 +00008163
8164 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008165 ;
8166 return 0;
8167}
Matthias Kloseb159a552010-04-25 21:00:44 +00008168
Neal Norwitz11690112002-07-30 01:08:28 +00008169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008170if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008171 ac_cv_has_makedev=yes
8172else
Matthias Kloseb9621712010-04-24 17:59:49 +00008173 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008175rm -f core conftest.err conftest.$ac_objext \
8176 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8178$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008179if test "$ac_cv_has_makedev" = "yes"; then
8180
Matthias Kloseb9621712010-04-24 17:59:49 +00008181$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008182
8183fi
8184
Christian Heimes985ecdc2013-11-20 11:46:18 +01008185# byte swapping
8186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8187$as_echo_n "checking for le64toh... " >&6; }
8188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8189/* end confdefs.h. */
8190
8191#ifdef HAVE_ENDIAN_H
8192#include <endian.h>
8193#elif defined(HAVE_SYS_ENDIAN_H)
8194#include <sys/endian.h>
8195#endif
8196
8197int
8198main ()
8199{
8200
8201 le64toh(1)
8202 ;
8203 return 0;
8204}
8205
8206_ACEOF
8207if ac_fn_c_try_link "$LINENO"; then :
8208 ac_cv_has_le64toh=yes
8209else
8210 ac_cv_has_le64toh=no
8211fi
8212rm -f core conftest.err conftest.$ac_objext \
8213 conftest$ac_exeext conftest.$ac_ext
8214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8215$as_echo "$ac_cv_has_le64toh" >&6; }
8216if test "$ac_cv_has_le64toh" = "yes"; then
8217
8218$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8219
8220fi
8221
Martin v. Löwis399a6892002-10-04 10:22:02 +00008222use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008223# Don't use largefile support for GNU/Hurd
8224case $ac_sys_system in GNU*)
8225 use_lfs=no
8226esac
8227
Martin v. Löwis399a6892002-10-04 10:22:02 +00008228if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008229# Two defines needed to enable largefile support on various platforms
8230# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008231case $ac_sys_system/$ac_sys_release in
8232AIX*)
8233
8234$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8235
8236 ;;
8237esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008238
Matthias Kloseb9621712010-04-24 17:59:49 +00008239$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008240
8241
Matthias Kloseb9621712010-04-24 17:59:49 +00008242$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008243
Martin v. Löwis399a6892002-10-04 10:22:02 +00008244fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008245
Guido van Rossum84e7b241996-08-19 21:59:00 +00008246# Add some code to confdefs.h so that the test for off_t works on SCO
8247cat >> confdefs.h <<\EOF
8248#if defined(SCO_DS)
8249#undef _OFF_T
8250#endif
8251EOF
8252
Guido van Rossumef2255b2000-03-10 22:30:29 +00008253# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008254ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008255if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008256
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008257else
Martin v. Löwis11437992002-04-12 09:54:03 +00008258
8259cat >>confdefs.h <<_ACEOF
8260#define mode_t int
8261_ACEOF
8262
8263fi
8264
Matthias Kloseb9621712010-04-24 17:59:49 +00008265ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008266if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008267
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008268else
Martin v. Löwis11437992002-04-12 09:54:03 +00008269
8270cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008271#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008272_ACEOF
8273
8274fi
8275
Matthias Kloseb9621712010-04-24 17:59:49 +00008276ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008277if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008278
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008279else
Martin v. Löwis11437992002-04-12 09:54:03 +00008280
8281cat >>confdefs.h <<_ACEOF
8282#define pid_t int
8283_ACEOF
8284
8285fi
8286
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008287
Martin v. Löwis11437992002-04-12 09:54:03 +00008288cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008289#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008290_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008291
Matthias Kloseb9621712010-04-24 17:59:49 +00008292ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008293if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008294
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008295else
Martin v. Löwis11437992002-04-12 09:54:03 +00008296
8297cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008298#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008299_ACEOF
8300
8301fi
8302
Matthias Kloseb9621712010-04-24 17:59:49 +00008303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8304$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008305if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008306 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008307else
Matthias Kloseb9621712010-04-24 17:59:49 +00008308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008309/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008310#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008311
8312_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008313if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008314 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008315 ac_cv_type_uid_t=yes
8316else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008317 ac_cv_type_uid_t=no
8318fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008319rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008320
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008321fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8323$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008324if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008325
Matthias Kloseb9621712010-04-24 17:59:49 +00008326$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008327
8328
Matthias Kloseb9621712010-04-24 17:59:49 +00008329$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008330
8331fi
8332
Mark Dickinson983bc162012-12-02 12:11:38 +00008333
Matthias Kloseb9621712010-04-24 17:59:49 +00008334ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008335if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008336
Matthias Kloseb9621712010-04-24 17:59:49 +00008337$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008338
8339fi
8340
Stefan Krah1919b7e2012-03-21 18:25:23 +01008341ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8342if test "x$ac_cv_type___uint128_t" = xyes; then :
8343
8344$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8345
8346fi
8347
Jack Jansendd19cf82001-12-06 22:36:17 +00008348
Michael W. Hudson54241132001-12-07 15:38:26 +00008349# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008350# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008351# The cast to long int works around a bug in the HP C Compiler
8352# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8353# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8354# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8356$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008357if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008358 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008359else
Matthias Kloseb9621712010-04-24 17:59:49 +00008360 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 +00008361
Martin v. Löwis11437992002-04-12 09:54:03 +00008362else
Matthias Kloseb9621712010-04-24 17:59:49 +00008363 if test "$ac_cv_type_int" = yes; then
8364 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8365$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008366as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008367See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008368 else
8369 ac_cv_sizeof_int=0
8370 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008371fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008372
Martin v. Löwis11437992002-04-12 09:54:03 +00008373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8375$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008376
8377
8378
Martin v. Löwis11437992002-04-12 09:54:03 +00008379cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008380#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008381_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008382
8383
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008384# The cast to long int works around a bug in the HP C Compiler
8385# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8386# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8387# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8389$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008390if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008391 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008392else
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 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 +00008394
Martin v. Löwis11437992002-04-12 09:54:03 +00008395else
Matthias Kloseb9621712010-04-24 17:59:49 +00008396 if test "$ac_cv_type_long" = yes; then
8397 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8398$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008399as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008400See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008401 else
8402 ac_cv_sizeof_long=0
8403 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008404fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008405
Martin v. Löwis11437992002-04-12 09:54:03 +00008406fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8408$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008409
8410
8411
Martin v. Löwis11437992002-04-12 09:54:03 +00008412cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008413#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008414_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008415
8416
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008417# The cast to long int works around a bug in the HP C Compiler
8418# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8419# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8420# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8422$as_echo_n "checking size of long long... " >&6; }
8423if ${ac_cv_sizeof_long_long+:} false; then :
8424 $as_echo_n "(cached) " >&6
8425else
8426 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8427
8428else
8429 if test "$ac_cv_type_long_long" = yes; then
8430 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8432as_fn_error 77 "cannot compute sizeof (long long)
8433See \`config.log' for more details" "$LINENO" 5; }
8434 else
8435 ac_cv_sizeof_long_long=0
8436 fi
8437fi
8438
8439fi
8440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8441$as_echo "$ac_cv_sizeof_long_long" >&6; }
8442
8443
8444
8445cat >>confdefs.h <<_ACEOF
8446#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8447_ACEOF
8448
8449
8450# The cast to long int works around a bug in the HP C Compiler
8451# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8452# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8453# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8455$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008456if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008457 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008458else
Matthias Kloseb9621712010-04-24 17:59:49 +00008459 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 +00008460
Martin v. Löwis11437992002-04-12 09:54:03 +00008461else
Matthias Kloseb9621712010-04-24 17:59:49 +00008462 if test "$ac_cv_type_void_p" = yes; then
8463 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8464$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008465as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008466See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008467 else
8468 ac_cv_sizeof_void_p=0
8469 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008471
Martin v. Löwis11437992002-04-12 09:54:03 +00008472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8474$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008475
8476
8477
Martin v. Löwis11437992002-04-12 09:54:03 +00008478cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008479#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008480_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008481
8482
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008483# The cast to long int works around a bug in the HP C Compiler
8484# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8485# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8486# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8488$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008489if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008490 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008491else
Matthias Kloseb9621712010-04-24 17:59:49 +00008492 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 +00008493
Martin v. Löwis11437992002-04-12 09:54:03 +00008494else
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 if test "$ac_cv_type_short" = yes; then
8496 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8497$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008498as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008499See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008500 else
8501 ac_cv_sizeof_short=0
8502 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008503fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008504
Martin v. Löwis11437992002-04-12 09:54:03 +00008505fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8507$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008508
8509
8510
Martin v. Löwis11437992002-04-12 09:54:03 +00008511cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008512#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008513_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008514
8515
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008516# The cast to long int works around a bug in the HP C Compiler
8517# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8518# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8519# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8521$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008522if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008523 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008524else
Matthias Kloseb9621712010-04-24 17:59:49 +00008525 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 +00008526
Martin v. Löwis11437992002-04-12 09:54:03 +00008527else
Matthias Kloseb9621712010-04-24 17:59:49 +00008528 if test "$ac_cv_type_float" = yes; then
8529 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8530$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008531as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008532See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008533 else
8534 ac_cv_sizeof_float=0
8535 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008536fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008537
Martin v. Löwis11437992002-04-12 09:54:03 +00008538fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8540$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008541
8542
8543
Martin v. Löwis11437992002-04-12 09:54:03 +00008544cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008545#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008546_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008547
8548
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008549# The cast to long int works around a bug in the HP C Compiler
8550# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8551# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8552# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8554$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008555if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008557else
Matthias Kloseb9621712010-04-24 17:59:49 +00008558 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 +00008559
Martin v. Löwis11437992002-04-12 09:54:03 +00008560else
Matthias Kloseb9621712010-04-24 17:59:49 +00008561 if test "$ac_cv_type_double" = yes; then
8562 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8563$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008564as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008565See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008566 else
8567 ac_cv_sizeof_double=0
8568 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008570
Martin v. Löwis11437992002-04-12 09:54:03 +00008571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8573$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008574
8575
8576
Martin v. Löwis11437992002-04-12 09:54:03 +00008577cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008578#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008579_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008580
8581
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008582# The cast to long int works around a bug in the HP C Compiler
8583# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8584# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8585# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8587$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008588if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008589 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008590else
Matthias Kloseb9621712010-04-24 17:59:49 +00008591 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 +00008592
Martin v. Löwis11437992002-04-12 09:54:03 +00008593else
Matthias Kloseb9621712010-04-24 17:59:49 +00008594 if test "$ac_cv_type_fpos_t" = yes; then
8595 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8596$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008597as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008598See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008599 else
8600 ac_cv_sizeof_fpos_t=0
8601 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008603
Martin v. Löwis11437992002-04-12 09:54:03 +00008604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8606$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008607
8608
8609
Martin v. Löwis11437992002-04-12 09:54:03 +00008610cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008611#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008612_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008613
Michael W. Hudson54241132001-12-07 15:38:26 +00008614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008615# The cast to long int works around a bug in the HP C Compiler
8616# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8617# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8618# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8620$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008621if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008622 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008623else
Matthias Kloseb9621712010-04-24 17:59:49 +00008624 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 +00008625
Martin v. Löwis18e16552006-02-15 17:27:45 +00008626else
Matthias Kloseb9621712010-04-24 17:59:49 +00008627 if test "$ac_cv_type_size_t" = yes; then
8628 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8629$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008630as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008631See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008632 else
8633 ac_cv_sizeof_size_t=0
8634 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008636
Martin v. Löwis18e16552006-02-15 17:27:45 +00008637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8639$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008640
8641
8642
Martin v. Löwis18e16552006-02-15 17:27:45 +00008643cat >>confdefs.h <<_ACEOF
8644#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8645_ACEOF
8646
8647
Christian Heimes400adb02008-02-01 08:12:03 +00008648# The cast to long int works around a bug in the HP C Compiler
8649# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8650# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8651# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8653$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008654if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008655 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008656else
Matthias Kloseb9621712010-04-24 17:59:49 +00008657 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 +00008658
Christian Heimes400adb02008-02-01 08:12:03 +00008659else
Matthias Kloseb9621712010-04-24 17:59:49 +00008660 if test "$ac_cv_type_pid_t" = yes; then
8661 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008663as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008664See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008665 else
8666 ac_cv_sizeof_pid_t=0
8667 fi
8668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008669
Christian Heimes400adb02008-02-01 08:12:03 +00008670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8672$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008673
8674
8675
8676cat >>confdefs.h <<_ACEOF
8677#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8678_ACEOF
8679
8680
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008681# The cast to long int works around a bug in the HP C Compiler
8682# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8683# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8684# This bug is HP SR number 8606223364.
8685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8686$as_echo_n "checking size of uintptr_t... " >&6; }
8687if ${ac_cv_sizeof_uintptr_t+:} false; then :
8688 $as_echo_n "(cached) " >&6
8689else
8690 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8691
8692else
8693 if test "$ac_cv_type_uintptr_t" = yes; then
8694 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8695$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8696as_fn_error 77 "cannot compute sizeof (uintptr_t)
8697See \`config.log' for more details" "$LINENO" 5; }
8698 else
8699 ac_cv_sizeof_uintptr_t=0
8700 fi
8701fi
8702
8703fi
8704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8705$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8706
8707
8708
8709cat >>confdefs.h <<_ACEOF
8710#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8711_ACEOF
8712
8713
Michael W. Hudson54241132001-12-07 15:38:26 +00008714
Matthias Kloseb9621712010-04-24 17:59:49 +00008715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8716$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008717have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008719/* end confdefs.h. */
8720
8721int
8722main ()
8723{
8724long double x; x = (long double)0;
8725 ;
8726 return 0;
8727}
8728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008729if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008730
8731
Matthias Kloseb9621712010-04-24 17:59:49 +00008732$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008733
8734 have_long_double=yes
8735
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008736fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8739$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008740if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008741# The cast to long int works around a bug in the HP C Compiler
8742# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8743# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8744# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8746$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008747if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008748 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008749else
Matthias Kloseb9621712010-04-24 17:59:49 +00008750 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 +00008751
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008752else
Matthias Kloseb9621712010-04-24 17:59:49 +00008753 if test "$ac_cv_type_long_double" = yes; then
8754 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8755$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008756as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008757See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008758 else
8759 ac_cv_sizeof_long_double=0
8760 fi
8761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008762
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8765$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008766
8767
8768
8769cat >>confdefs.h <<_ACEOF
8770#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8771_ACEOF
8772
8773
8774fi
8775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008776# The cast to long int works around a bug in the HP C Compiler
8777# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8778# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8779# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8781$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008782if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008783 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008784else
Matthias Kloseb9621712010-04-24 17:59:49 +00008785 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 +00008786
Thomas Woutersb2137042007-02-01 18:02:27 +00008787else
Matthias Kloseb9621712010-04-24 17:59:49 +00008788 if test "$ac_cv_type__Bool" = yes; then
8789 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8790$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008791as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008792See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008793 else
8794 ac_cv_sizeof__Bool=0
8795 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008797
Thomas Woutersb2137042007-02-01 18:02:27 +00008798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8800$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008801
8802
8803
Thomas Woutersb2137042007-02-01 18:02:27 +00008804cat >>confdefs.h <<_ACEOF
8805#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8806_ACEOF
8807
8808
Thomas Woutersb2137042007-02-01 18:02:27 +00008809
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008810# The cast to long int works around a bug in the HP C Compiler
8811# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8812# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8813# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8815$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008816if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008817 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008818else
Matthias Kloseb9621712010-04-24 17:59:49 +00008819 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008820#ifdef HAVE_SYS_TYPES_H
8821#include <sys/types.h>
8822#endif
8823
Matthias Kloseb9621712010-04-24 17:59:49 +00008824"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008825
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008826else
Matthias Kloseb9621712010-04-24 17:59:49 +00008827 if test "$ac_cv_type_off_t" = yes; then
8828 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8829$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008830as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008831See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008832 else
8833 ac_cv_sizeof_off_t=0
8834 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008836
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8839$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008840
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008841
8842
Martin v. Löwis11437992002-04-12 09:54:03 +00008843cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008844#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008845_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008846
Michael W. Hudson54241132001-12-07 15:38:26 +00008847
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008848
Matthias Kloseb9621712010-04-24 17:59:49 +00008849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8850$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008851if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008852 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008853
Matthias Kloseb9621712010-04-24 17:59:49 +00008854$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008855
Matthias Kloseb9621712010-04-24 17:59:49 +00008856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8857$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008858else
Matthias Kloseb9621712010-04-24 17:59:49 +00008859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8860$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008861fi
8862
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008863# The cast to long int works around a bug in the HP C Compiler
8864# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8865# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8866# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8868$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008869if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008870 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008871else
Matthias Kloseb9621712010-04-24 17:59:49 +00008872 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008873#ifdef HAVE_SYS_TYPES_H
8874#include <sys/types.h>
8875#endif
8876#ifdef HAVE_TIME_H
8877#include <time.h>
8878#endif
8879
Matthias Kloseb9621712010-04-24 17:59:49 +00008880"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008881
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008882else
Matthias Kloseb9621712010-04-24 17:59:49 +00008883 if test "$ac_cv_type_time_t" = yes; then
8884 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8885$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008886as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008887See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008888 else
8889 ac_cv_sizeof_time_t=0
8890 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008892
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8895$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008896
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008897
8898
Martin v. Löwis11437992002-04-12 09:54:03 +00008899cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008900#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008901_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008902
Michael W. Hudson54241132001-12-07 15:38:26 +00008903
8904
Trent Mick635f6fb2000-08-23 21:33:05 +00008905# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008906ac_save_cc="$CC"
8907if test "$ac_cv_kpthread" = "yes"
8908then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008909elif test "$ac_cv_kthread" = "yes"
8910then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008911elif test "$ac_cv_pthread" = "yes"
8912then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008913fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008914
Matthias Kloseb9621712010-04-24 17:59:49 +00008915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8916$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008917have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008919/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008920
8921 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008922int
8923main ()
8924{
Guido van Rossum12580492000-09-24 16:47:19 +00008925pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008926 ;
8927 return 0;
8928}
Matthias Kloseb159a552010-04-25 21:00:44 +00008929
Martin v. Löwis11437992002-04-12 09:54:03 +00008930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008931if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008932 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8936$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008937if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008938 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008939# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8940# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8941# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8943$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008944if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008945 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008946else
Matthias Kloseb9621712010-04-24 17:59:49 +00008947 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008948#ifdef HAVE_PTHREAD_H
8949#include <pthread.h>
8950#endif
8951
Matthias Kloseb9621712010-04-24 17:59:49 +00008952"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008953
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008954else
Matthias Kloseb9621712010-04-24 17:59:49 +00008955 if test "$ac_cv_type_pthread_t" = yes; then
8956 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8957$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008958as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008959See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008960 else
8961 ac_cv_sizeof_pthread_t=0
8962 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008964
Trent Mick635f6fb2000-08-23 21:33:05 +00008965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8967$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008968
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008969
8970
Martin v. Löwis11437992002-04-12 09:54:03 +00008971cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008972#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008973_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008974
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008975
Trent Mick635f6fb2000-08-23 21:33:05 +00008976fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008977CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008978
Michael W. Hudson54241132001-12-07 15:38:26 +00008979
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008980case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008981 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008982 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8983 ;;
8984 Darwin/*)
8985 OTHER_LIBTOOL_OPT=""
8986 ;;
8987esac
8988
8989
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008990
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008991case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008992 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008993 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8994 if test "${enable_universalsdk}"; then
8995 :
8996 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008997 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008998 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008999 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009000 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009001 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009002 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009003 if test ${gcc_version} '<' 4.0
9004 then
9005 LIBTOOL_CRUFT="-lcc_dynamic"
9006 else
9007 LIBTOOL_CRUFT=""
9008 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009009 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009010 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009011else
Matthias Kloseb9621712010-04-24 17:59:49 +00009012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009013/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009014
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009015 #include <unistd.h>
9016 int main(int argc, char*argv[])
9017 {
9018 if (sizeof(long) == 4) {
9019 return 0;
9020 } else {
9021 return 1;
9022 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009023 }
9024
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009026if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009027 ac_osx_32bit=yes
9028else
Matthias Kloseb9621712010-04-24 17:59:49 +00009029 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009031rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9032 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009033fi
9034
9035
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009036 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009037 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009038 i386)
9039 MACOSX_DEFAULT_ARCH="i386"
9040 ;;
9041 ppc)
9042 MACOSX_DEFAULT_ARCH="ppc"
9043 ;;
9044 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009045 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009046 ;;
9047 esac
9048 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009049 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009050 i386)
9051 MACOSX_DEFAULT_ARCH="x86_64"
9052 ;;
9053 ppc)
9054 MACOSX_DEFAULT_ARCH="ppc64"
9055 ;;
9056 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009057 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009058 ;;
9059 esac
9060
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009061 fi
9062
9063 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009064 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009065 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009066esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9068$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009069if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009070then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009071 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009072 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009073 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009074
Matthias Kloseb9621712010-04-24 17:59:49 +00009075$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009076
Matthias Kloseb9621712010-04-24 17:59:49 +00009077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9078$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009079 if test $enable_shared = "yes"
9080 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009081 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 +00009082 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009083else
Matthias Kloseb9621712010-04-24 17:59:49 +00009084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9085$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009086fi
9087
Matthias Kloseb9621712010-04-24 17:59:49 +00009088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9089$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009090case $ac_sys_system/$ac_sys_release in
9091 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009092
Matthias Kloseb9621712010-04-24 17:59:49 +00009093$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009094
Matthias Kloseb9621712010-04-24 17:59:49 +00009095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9096$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009097 ;;
9098 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9100$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009101 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009102esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009103
Guido van Rossum0a516c91994-09-12 10:58:40 +00009104# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009105
Michael W. Hudson54241132001-12-07 15:38:26 +00009106
9107
9108
9109
Benjamin Peterson99f03762010-04-11 22:15:28 +00009110
Thomas Wouters477c8d52006-05-27 19:21:47 +00009111
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009112# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9113# -- usually .so, .sl on HP-UX, .dll on Cygwin
9114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9115$as_echo_n "checking the extension of shared libraries... " >&6; }
9116if test -z "$SHLIB_SUFFIX"; then
9117 case $ac_sys_system in
9118 hp*|HP*)
9119 case `uname -m` in
9120 ia64) SHLIB_SUFFIX=.so;;
9121 *) SHLIB_SUFFIX=.sl;;
9122 esac
9123 ;;
9124 CYGWIN*) SHLIB_SUFFIX=.dll;;
9125 *) SHLIB_SUFFIX=.so;;
9126 esac
9127fi
9128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9129$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009130
Guido van Rossum0a516c91994-09-12 10:58:40 +00009131# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009132# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009133# (Shared libraries in this instance are shared modules to be loaded into
9134# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9136$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009137if test -z "$LDSHARED"
9138then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009139 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009140 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009141 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009142 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009143 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009144 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009145 if test "$GCC" = "yes" ; then
9146 LDSHARED='$(CC) -shared'
9147 LDCXXSHARED='$(CXX) -shared'
9148 else
9149 LDSHARED='$(CC) -G'
9150 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009151 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009152 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009153 if test "$GCC" = "yes" ; then
9154 LDSHARED='$(CC) -shared'
9155 LDCXXSHARED='$(CXX) -shared'
9156 else
9157 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009158 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009159 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009160 LDSHARED='$(CC) -bundle'
9161 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009162 if test "$enable_framework" ; then
9163 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009164 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9165 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009166 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009167 else
9168 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009169 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009170 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009171 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009172 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009173 LDSHARED='$(CC) -bundle'
9174 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009175 if test "$enable_framework" ; then
9176 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009177 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9178 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009179 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009180 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009181 # No framework, use the Python app as bundle-loader
9182 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009183 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009184 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009185 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009186 Darwin/*)
9187 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9188 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009189
Ned Deily36820b62014-06-25 13:44:22 -07009190 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9191 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9192 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9193 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9194 if test ${dep_target_major} -eq 10 && \
9195 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009196 then
Ned Deily36820b62014-06-25 13:44:22 -07009197 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009198 LDSHARED='$(CC) -bundle'
9199 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009200 if test "$enable_framework" ; then
9201 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009202 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9203 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009204 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009205 else
9206 # No framework, use the Python app as bundle-loader
9207 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9208 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009209 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009210 fi
Ned Deily36820b62014-06-25 13:44:22 -07009211 else
9212 # building for OS X 10.3 and later
9213 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9214 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9215 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009216 fi
9217 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009218 Linux*|GNU*|QNX*)
9219 LDSHARED='$(CC) -shared'
9220 LDCXXSHARED='$(CXX) -shared';;
9221 BSD/OS*/4*)
9222 LDSHARED="gcc -shared"
9223 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009224 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009225 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009226 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009227 LDSHARED='$(CC) -shared'
9228 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009229 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009230 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009231 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009232 OpenBSD*)
9233 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9234 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009235 LDSHARED='$(CC) -shared $(CCSHARED)'
9236 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009237 else
9238 case `uname -r` in
9239 [01].* | 2.[0-7] | 2.[0-7].*)
9240 LDSHARED="ld -Bshareable ${LDFLAGS}"
9241 ;;
9242 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009243 LDSHARED='$(CC) -shared $(CCSHARED)'
9244 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009245 ;;
9246 esac
9247 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009248 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009249 LDSHARED='$(CC) -shared'
9250 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009251 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009252 if test "$GCC" = "yes" ; then
9253 LDSHARED='$(CC) -shared'
9254 LDCXXSHARED='$(CXX) -shared'
9255 else
9256 LDSHARED='$(CC) -G'
9257 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009258 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009259 SCO_SV*)
9260 LDSHARED='$(CC) -Wl,-G,-Bexport'
9261 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9262 CYGWIN*)
9263 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9264 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009265 *) LDSHARED="ld";;
9266 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9269$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009270LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009271BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009272# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009273# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9275$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009276if test -z "$CCSHARED"
9277then
Guido van Rossum07397971997-04-29 21:49:50 +00009278 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009279 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009280 then CCSHARED="-fPIC";
9281 elif test `uname -p` = sparc;
9282 then CCSHARED="-xcode=pic32";
9283 else CCSHARED="-Kpic";
9284 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009285 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009286 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009287 else CCSHARED="+z";
9288 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009289 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009290 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009291 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009292 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009293 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009294 if test "$GCC" = "yes"
9295 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009296 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009297 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009298 SCO_SV*)
9299 if test "$GCC" = "yes"
9300 then CCSHARED="-fPIC"
9301 else CCSHARED="-Kpic -belf"
9302 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009303 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009304fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9306$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009307# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009308# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9310$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009311if test -z "$LINKFORSHARED"
9312then
Guido van Rossum07397971997-04-29 21:49:50 +00009313 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009314 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009315 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009316 LINKFORSHARED="-Wl,-E -Wl,+s";;
9317# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009318 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009319 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009320 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009321 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009322 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009323 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009324
9325 # Issue #18075: the default maximum stack size (8MBytes) is too
9326 # small for the default recursion limit. Increase the stack size
9327 # to ensure that tests don't crash
9328 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9329
Jack Jansene578a632001-08-15 01:27:14 +00009330 if test "$enable_framework"
9331 then
Jack Jansenda49e192005-01-07 13:08:22 +00009332 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009333 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009334 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009335 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009336 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009337 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009338 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009339 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9340 then
9341 LINKFORSHARED="-Wl,--export-dynamic"
9342 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009343 SunOS/5*) case $CC in
9344 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009345 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009346 then
9347 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009348 fi;;
9349 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009350 CYGWIN*)
9351 if test $enable_shared = "no"
9352 then
9353 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9354 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009355 QNX*)
9356 # -Wl,-E causes the symbols to be added to the dynamic
9357 # symbol table so that they can be found when a module
9358 # is loaded. -N 2048K causes the stack size to be set
9359 # to 2048 kilobytes so that the stack doesn't overflow
9360 # when running test_compile.py.
9361 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009362 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009363fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9365$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009366
Michael W. Hudson54241132001-12-07 15:38:26 +00009367
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009368
Matthias Kloseb9621712010-04-24 17:59:49 +00009369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9370$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009371if test ! "$LIBRARY" = "$LDLIBRARY"
9372then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009373 case $ac_sys_system in
9374 CYGWIN*)
9375 # Cygwin needs CCSHARED when building extension DLLs
9376 # but not when building the interpreter DLL.
9377 CFLAGSFORSHARED='';;
9378 *)
9379 CFLAGSFORSHARED='$(CCSHARED)'
9380 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009381fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9383$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009384
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009385# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9386# library (with --enable-shared).
9387# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009388# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9389# if it is not required, since it creates a dependency of the shared library
9390# to LIBS. This, in turn, means that applications linking the shared libpython
9391# don't need to link LIBS explicitly. The default should be only changed
9392# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009393
Matthias Kloseb9621712010-04-24 17:59:49 +00009394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9395$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009396case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009397 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009398 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009399esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9401$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009402
9403
Guido van Rossum627b2d71993-12-24 10:39:16 +00009404# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9406$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009407if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009408 $as_echo_n "(cached) " >&6
9409else
9410 ac_check_lib_save_LIBS=$LIBS
9411LIBS="-lsendfile $LIBS"
9412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9413/* end confdefs.h. */
9414
9415/* Override any GCC internal prototype to avoid an error.
9416 Use char because int might match the return type of a GCC
9417 builtin and then its argument prototype would still apply. */
9418#ifdef __cplusplus
9419extern "C"
9420#endif
9421char sendfile ();
9422int
9423main ()
9424{
9425return sendfile ();
9426 ;
9427 return 0;
9428}
9429_ACEOF
9430if ac_fn_c_try_link "$LINENO"; then :
9431 ac_cv_lib_sendfile_sendfile=yes
9432else
9433 ac_cv_lib_sendfile_sendfile=no
9434fi
9435rm -f core conftest.err conftest.$ac_objext \
9436 conftest$ac_exeext conftest.$ac_ext
9437LIBS=$ac_check_lib_save_LIBS
9438fi
9439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9440$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009441if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009442 cat >>confdefs.h <<_ACEOF
9443#define HAVE_LIBSENDFILE 1
9444_ACEOF
9445
9446 LIBS="-lsendfile $LIBS"
9447
9448fi
9449
Matthias Kloseb9621712010-04-24 17:59:49 +00009450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9451$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009452if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009453 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009454else
Martin v. Löwis11437992002-04-12 09:54:03 +00009455 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009456LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009458/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009460/* Override any GCC internal prototype to avoid an error.
9461 Use char because int might match the return type of a GCC
9462 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009463#ifdef __cplusplus
9464extern "C"
9465#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009466char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009467int
9468main ()
9469{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009470return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009471 ;
9472 return 0;
9473}
9474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009475if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009477else
Matthias Kloseb9621712010-04-24 17:59:49 +00009478 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009480rm -f core conftest.err conftest.$ac_objext \
9481 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009482LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9485$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009486if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009487 cat >>confdefs.h <<_ACEOF
9488#define HAVE_LIBDL 1
9489_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009490
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009491 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009492
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009493fi
9494 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9496$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009497if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009498 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009499else
Martin v. Löwis11437992002-04-12 09:54:03 +00009500 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009501LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009504
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009505/* Override any GCC internal prototype to avoid an error.
9506 Use char because int might match the return type of a GCC
9507 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009508#ifdef __cplusplus
9509extern "C"
9510#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009511char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009512int
9513main ()
9514{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009515return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009516 ;
9517 return 0;
9518}
9519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009520if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009522else
Matthias Kloseb9621712010-04-24 17:59:49 +00009523 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009524fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009525rm -f core conftest.err conftest.$ac_objext \
9526 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009527LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009528fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9530$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009531if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009532 cat >>confdefs.h <<_ACEOF
9533#define HAVE_LIBDLD 1
9534_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009535
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009536 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009537
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009538fi
9539 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009540
Georg Brandlb1441c72009-01-03 22:33:39 +00009541# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009542if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9544$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009545if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009546 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009547else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009548 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009550/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009551
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009552/* Override any GCC internal prototype to avoid an error.
9553 Use char because int might match the return type of a GCC
9554 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009555#ifdef __cplusplus
9556extern "C"
9557#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009558char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009559int
9560main ()
9561{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009562return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009563 ;
9564 return 0;
9565}
9566_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009567for ac_lib in '' pthread rt posix4; do
9568 if test -z "$ac_lib"; then
9569 ac_res="none required"
9570 else
9571 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009572 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009573 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009574 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009575 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009577rm -f core conftest.err conftest.$ac_objext \
9578 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009579 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009580 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009582done
Victor Stinnere0be4232011-10-25 13:06:09 +02009583if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009585else
9586 ac_cv_search_sem_init=no
9587fi
9588rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009589LIBS=$ac_func_search_save_LIBS
9590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9592$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009593ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009594if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009595 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009596
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009597fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009598 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009599 # posix4 on Solaris 2.6
9600 # pthread (first!) on Linux
9601fi
9602
Martin v. Löwis19d17342003-06-14 21:03:05 +00009603# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9605$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009606if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009607 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009608else
9609 ac_check_lib_save_LIBS=$LIBS
9610LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009612/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009613
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009614/* Override any GCC internal prototype to avoid an error.
9615 Use char because int might match the return type of a GCC
9616 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009617#ifdef __cplusplus
9618extern "C"
9619#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009620char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009621int
9622main ()
9623{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009624return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009625 ;
9626 return 0;
9627}
9628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009629if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009630 ac_cv_lib_intl_textdomain=yes
9631else
Matthias Kloseb9621712010-04-24 17:59:49 +00009632 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009634rm -f core conftest.err conftest.$ac_objext \
9635 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009636LIBS=$ac_check_lib_save_LIBS
9637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9639$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009640if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009641
Matthias Kloseb9621712010-04-24 17:59:49 +00009642$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009643
Brett Cannonc6d936e2009-06-07 20:09:53 +00009644 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009645fi
9646
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009647
9648# checks for system dependent C++ extensions support
9649case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009650 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9651$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009653/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009654
Georg Brandl59e87bd2011-02-15 19:48:59 +00009655 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009656int
9657main ()
9658{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009659loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009660 ;
9661 return 0;
9662}
Matthias Kloseb159a552010-04-25 21:00:44 +00009663
Martin v. Löwis11437992002-04-12 09:54:03 +00009664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009665if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009666
Matthias Kloseb159a552010-04-25 21:00:44 +00009667
Matthias Kloseb9621712010-04-24 17:59:49 +00009668$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009669
Matthias Kloseb159a552010-04-25 21:00:44 +00009670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009671$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009672
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009673else
Matthias Kloseb159a552010-04-25 21:00:44 +00009674
9675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009676$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009677
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009679rm -f core conftest.err conftest.$ac_objext \
9680 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009681 *) ;;
9682esac
9683
Christian Heimes985ecdc2013-11-20 11:46:18 +01009684# check for systems that require aligned memory access
9685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9686$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009687if ${ac_cv_aligned_required+:} false; then :
9688 $as_echo_n "(cached) " >&6
9689else
9690 if test "$cross_compiling" = yes; then :
9691 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009692else
9693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9694/* end confdefs.h. */
9695
9696int main()
9697{
9698 char s[16];
9699 int i, *p1, *p2;
9700 for (i=0; i < 16; i++)
9701 s[i] = i;
9702 p1 = (int*)(s+1);
9703 p2 = (int*)(s+2);
9704 if (*p1 == *p2)
9705 return 1;
9706 return 0;
9707}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009708_ACEOF
9709if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009710 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009711else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009712 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009713fi
9714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9715 conftest.$ac_objext conftest.beam conftest.$ac_ext
9716fi
9717
9718
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009719fi
9720
9721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9722$as_echo "$ac_cv_aligned_required" >&6; }
9723if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009724
9725$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9726
9727fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009728
9729# str, bytes and memoryview hash algorithm
9730
9731
9732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9733$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9734
9735# Check whether --with-hash_algorithm was given.
9736if test "${with_hash_algorithm+set}" = set; then :
9737 withval=$with_hash_algorithm;
9738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9739$as_echo "$withval" >&6; }
9740case "$withval" in
9741 siphash24)
9742 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9743
9744 ;;
9745 fnv)
9746 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9747
9748 ;;
9749 *)
9750 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9751 ;;
9752esac
9753
9754else
9755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9756$as_echo "default" >&6; }
9757fi
9758
9759
Charles-François Natalid30b0222014-05-08 23:08:51 +01009760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9761$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9762
9763# Check whether --with-address_sanitizer was given.
9764if test "${with_address_sanitizer+set}" = set; then :
9765 withval=$with_address_sanitizer;
9766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9767$as_echo "$withval" >&6; }
9768BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9769LDFLAGS="-fsanitize=address $LDFLAGS"
9770
9771else
9772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9773$as_echo "no" >&6; }
9774fi
9775
9776
Guido van Rossum70c7f481998-03-26 18:44:10 +00009777# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9779$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009780if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009781 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009782else
Martin v. Löwis11437992002-04-12 09:54:03 +00009783 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009784LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009787
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009788/* Override any GCC internal prototype to avoid an error.
9789 Use char because int might match the return type of a GCC
9790 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009791#ifdef __cplusplus
9792extern "C"
9793#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009794char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009795int
9796main ()
9797{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009798return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009799 ;
9800 return 0;
9801}
9802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009803if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009805else
Matthias Kloseb9621712010-04-24 17:59:49 +00009806 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009808rm -f core conftest.err conftest.$ac_objext \
9809 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009810LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9813$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009814if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009815 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009816fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009817 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9819$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009820if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009822else
Martin v. Löwis11437992002-04-12 09:54:03 +00009823 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009824LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009826/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009828/* Override any GCC internal prototype to avoid an error.
9829 Use char because int might match the return type of a GCC
9830 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009831#ifdef __cplusplus
9832extern "C"
9833#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009834char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009835int
9836main ()
9837{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009839 ;
9840 return 0;
9841}
9842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009843if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009844 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009845else
Matthias Kloseb9621712010-04-24 17:59:49 +00009846 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009848rm -f core conftest.err conftest.$ac_objext \
9849 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009850LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9853$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009854if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009855 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009856fi
9857 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009858
Matthias Kloseb9621712010-04-24 17:59:49 +00009859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9860$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009861
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009862# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009863if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009864 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9866$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009867LIBS="$withval $LIBS"
9868
9869else
Matthias Kloseb9621712010-04-24 17:59:49 +00009870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9871$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009872fi
9873
Guido van Rossum7f43da71994-08-01 12:15:30 +00009874
Victor Stinner8291b5e2015-03-20 16:03:14 +01009875
9876
9877
9878
9879
9880
9881
9882if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9883 if test -n "$ac_tool_prefix"; then
9884 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9885set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9887$as_echo_n "checking for $ac_word... " >&6; }
9888if ${ac_cv_path_PKG_CONFIG+:} false; then :
9889 $as_echo_n "(cached) " >&6
9890else
9891 case $PKG_CONFIG in
9892 [\\/]* | ?:[\\/]*)
9893 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9894 ;;
9895 *)
9896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9897for as_dir in $PATH
9898do
9899 IFS=$as_save_IFS
9900 test -z "$as_dir" && as_dir=.
9901 for ac_exec_ext in '' $ac_executable_extensions; do
9902 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9903 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9904 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9905 break 2
9906 fi
9907done
9908 done
9909IFS=$as_save_IFS
9910
9911 ;;
9912esac
9913fi
9914PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9915if test -n "$PKG_CONFIG"; then
9916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9917$as_echo "$PKG_CONFIG" >&6; }
9918else
9919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9920$as_echo "no" >&6; }
9921fi
9922
9923
9924fi
9925if test -z "$ac_cv_path_PKG_CONFIG"; then
9926 ac_pt_PKG_CONFIG=$PKG_CONFIG
9927 # Extract the first word of "pkg-config", so it can be a program name with args.
9928set dummy pkg-config; ac_word=$2
9929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9930$as_echo_n "checking for $ac_word... " >&6; }
9931if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9932 $as_echo_n "(cached) " >&6
9933else
9934 case $ac_pt_PKG_CONFIG in
9935 [\\/]* | ?:[\\/]*)
9936 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9937 ;;
9938 *)
9939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9940for as_dir in $PATH
9941do
9942 IFS=$as_save_IFS
9943 test -z "$as_dir" && as_dir=.
9944 for ac_exec_ext in '' $ac_executable_extensions; do
9945 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9946 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9947 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9948 break 2
9949 fi
9950done
9951 done
9952IFS=$as_save_IFS
9953
9954 ;;
9955esac
9956fi
9957ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9958if test -n "$ac_pt_PKG_CONFIG"; then
9959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9960$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9961else
9962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9963$as_echo "no" >&6; }
9964fi
9965
9966 if test "x$ac_pt_PKG_CONFIG" = x; then
9967 PKG_CONFIG=""
9968 else
9969 case $cross_compiling:$ac_tool_warned in
9970yes:)
9971{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9972$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9973ac_tool_warned=yes ;;
9974esac
9975 PKG_CONFIG=$ac_pt_PKG_CONFIG
9976 fi
9977else
9978 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9979fi
9980
9981fi
9982if test -n "$PKG_CONFIG"; then
9983 _pkg_min_version=0.9.0
9984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9985$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9986 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9988$as_echo "yes" >&6; }
9989 else
9990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9991$as_echo "no" >&6; }
9992 PKG_CONFIG=""
9993 fi
9994fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009995
9996# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9998$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009999
10000# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010001if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010002 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010003else
10004 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010005fi
10006
10007
Matthias Kloseb9621712010-04-24 17:59:49 +000010008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10009$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010010
10011# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10013$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010014
10015# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010016if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010017 withval=$with_system_ffi;
10018fi
10019
10020
Zachary Waref40d4dd2016-09-17 01:25:24 -050010021if test "$ac_sys_system" = "Darwin"
10022then
10023 case "$with_system_ffi" in
10024 "")
10025 with_system_ffi="no"
10026 ;;
10027 yes|no)
10028 ;;
10029 *)
10030 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10031 ;;
10032 esac
10033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10034$as_echo "$with_system_ffi" >&6; }
10035else
10036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10037$as_echo "yes" >&6; }
10038 if test "$with_system_ffi" != ""
10039 then
10040 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10041$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10042 fi
10043 with_system_ffi="yes"
10044fi
Zachary Ware935043d2016-09-09 17:01:21 -070010045
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010046if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010047 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10048else
10049 LIBFFI_INCLUDEDIR=""
10050fi
10051
10052
Stefan Krah60187b52012-03-23 19:06:27 +010010053# Check for use of the system libmpdec library
10054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10055$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10056
10057# Check whether --with-system_libmpdec was given.
10058if test "${with_system_libmpdec+set}" = set; then :
10059 withval=$with_system_libmpdec;
10060else
10061 with_system_libmpdec="no"
10062fi
10063
10064
10065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10066$as_echo "$with_system_libmpdec" >&6; }
10067
Benjamin Peterson076ed002010-10-31 17:11:02 +000010068# Check for support for loadable sqlite extensions
10069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10070$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10071# Check whether --enable-loadable-sqlite-extensions was given.
10072if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10073 enableval=$enable_loadable_sqlite_extensions;
10074else
10075 enable_loadable_sqlite_extensions="no"
10076fi
10077
10078
10079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10080$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10081
Ned Deilyd819b932013-09-06 01:07:05 -070010082# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10083
10084
10085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10086$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10087
10088# Check whether --with-tcltk-includes was given.
10089if test "${with_tcltk_includes+set}" = set; then :
10090 withval=$with_tcltk_includes;
10091else
10092 with_tcltk_includes="default"
10093fi
10094
10095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10096$as_echo "$with_tcltk_includes" >&6; }
10097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10098$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10099
10100# Check whether --with-tcltk-libs was given.
10101if test "${with_tcltk_libs+set}" = set; then :
10102 withval=$with_tcltk_libs;
10103else
10104 with_tcltk_libs="default"
10105fi
10106
10107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10108$as_echo "$with_tcltk_libs" >&6; }
10109if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10110then
10111 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10112 then
10113 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10114 fi
10115 TCLTK_INCLUDES=""
10116 TCLTK_LIBS=""
10117else
10118 TCLTK_INCLUDES="$with_tcltk_includes"
10119 TCLTK_LIBS="$with_tcltk_libs"
10120fi
10121
Matthias Klose55708cc2009-04-30 08:06:49 +000010122# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10124$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010125
10126# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010127if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010128 withval=$with_dbmliborder;
10129if test x$with_dbmliborder = xyes
10130then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010131as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010132else
10133 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10134 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10135 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010136 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010137 fi
10138 done
10139fi
10140fi
10141
Matthias Kloseb9621712010-04-24 17:59:49 +000010142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10143$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010144
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010145# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010146
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010147USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010148
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010149
Martin v. Löwis11437992002-04-12 09:54:03 +000010150
10151# Templates for things AC_DEFINEd more than once.
10152# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010153
10154
Martin v. Löwis11437992002-04-12 09:54:03 +000010155
Matthias Kloseb9621712010-04-24 17:59:49 +000010156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10157$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010158
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010159# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010160if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010161 withval=$with_threads;
10162fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010163
10164
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010165# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010167# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010168if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010169 withval=$with_thread; with_threads=$with_thread
10170fi
10171
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010172
10173if test -z "$with_threads"
10174then with_threads="yes"
10175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10177$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010178
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010179
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010180if test "$with_threads" = "no"
10181then
10182 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010183elif test "$ac_cv_pthread_is_default" = yes
10184then
Matthias Kloseb9621712010-04-24 17:59:49 +000010185 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010186
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010187 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010188 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010189
10190 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010191 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010192elif test "$ac_cv_kpthread" = "yes"
10193then
10194 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010195 if test "$ac_cv_cxx_thread" = "yes"; then
10196 CXX="$CXX -Kpthread"
10197 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010198 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010199
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010200 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010201 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010202elif test "$ac_cv_kthread" = "yes"
10203then
10204 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010205 if test "$ac_cv_cxx_thread" = "yes"; then
10206 CXX="$CXX -Kthread"
10207 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010209
10210 posix_threads=yes
10211 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010212elif test "$ac_cv_pthread" = "yes"
10213then
10214 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010215 if test "$ac_cv_cxx_thread" = "yes"; then
10216 CXX="$CXX -pthread"
10217 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010218 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010219
10220 posix_threads=yes
10221 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010222else
10223 if test ! -z "$with_threads" -a -d "$with_threads"
10224 then LDFLAGS="$LDFLAGS -L$with_threads"
10225 fi
10226 if test ! -z "$withval" -a -d "$withval"
10227 then LDFLAGS="$LDFLAGS -L$withval"
10228 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010229
10230 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010231 # define _POSIX_THREADS in unistd.h. Some apparently don't
10232 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10234$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010236/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010237
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010238#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010239#ifdef _POSIX_THREADS
10240yes
10241#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010242
10243_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010244if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010245 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010246 unistd_defines_pthreads=yes
10247else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010248 unistd_defines_pthreads=no
10249fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010250rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010251
Matthias Kloseb9621712010-04-24 17:59:49 +000010252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10253$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010254
Matthias Kloseb9621712010-04-24 17:59:49 +000010255 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010256
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010257 # Just looking for pthread_create in libpthread is not enough:
10258 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10259 # So we really have to include pthread.h, and then link.
10260 _libs=$LIBS
10261 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10263$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010265/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010266
10267#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010268#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010269
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010270void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010271int
10272main ()
10273{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010274
10275pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010276 ;
10277 return 0;
10278}
10279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010280if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010281
Matthias Kloseb9621712010-04-24 17:59:49 +000010282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10283$as_echo "yes" >&6; }
10284 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010285
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010286 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010287 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010288else
Martin v. Löwis11437992002-04-12 09:54:03 +000010289
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010290 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010291 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010292if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010293 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010294
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010295 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010296 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010297else
Guido van Rossumad678af1998-10-02 14:42:15 +000010298
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10300$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010301if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010302 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010303else
Martin v. Löwis11437992002-04-12 09:54:03 +000010304 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010305LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010309/* Override any GCC internal prototype to avoid an error.
10310 Use char because int might match the return type of a GCC
10311 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010312#ifdef __cplusplus
10313extern "C"
10314#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010315char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010316int
10317main ()
10318{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010319return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010320 ;
10321 return 0;
10322}
10323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010324if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010325 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010326else
Matthias Kloseb9621712010-04-24 17:59:49 +000010327 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010329rm -f core conftest.err conftest.$ac_objext \
10330 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010331LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010332fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10334$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010335if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010336 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010337
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010338 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010339 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010340 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010341else
Greg Steinadf63d62000-07-05 10:38:09 +000010342
Matthias Kloseb9621712010-04-24 17:59:49 +000010343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10344$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010345if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010346 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010347else
Martin v. Löwis11437992002-04-12 09:54:03 +000010348 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010349LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010351/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010353/* Override any GCC internal prototype to avoid an error.
10354 Use char because int might match the return type of a GCC
10355 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010356#ifdef __cplusplus
10357extern "C"
10358#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010359char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010360int
10361main ()
10362{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010363return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010364 ;
10365 return 0;
10366}
10367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010368if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010369 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010370else
Matthias Kloseb9621712010-04-24 17:59:49 +000010371 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010372fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010373rm -f core conftest.err conftest.$ac_objext \
10374 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010375LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010376fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10378$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010379if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010380 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010381
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010382 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010383 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010384 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010385else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010386
Matthias Kloseb9621712010-04-24 17:59:49 +000010387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10388$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010389if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010390 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010391else
Martin v. Löwis11437992002-04-12 09:54:03 +000010392 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010393LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010395/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010397/* Override any GCC internal prototype to avoid an error.
10398 Use char because int might match the return type of a GCC
10399 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010400#ifdef __cplusplus
10401extern "C"
10402#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010403char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010404int
10405main ()
10406{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010407return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010408 ;
10409 return 0;
10410}
10411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010412if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010413 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010414else
Matthias Kloseb9621712010-04-24 17:59:49 +000010415 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010417rm -f core conftest.err conftest.$ac_objext \
10418 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010419LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10422$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010423if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010424 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010425
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010426 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010427 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010428 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010429else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010430
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10432$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010433if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010434 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010435else
Martin v. Löwis11437992002-04-12 09:54:03 +000010436 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010437LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010440
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010441/* Override any GCC internal prototype to avoid an error.
10442 Use char because int might match the return type of a GCC
10443 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010444#ifdef __cplusplus
10445extern "C"
10446#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010447char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010448int
10449main ()
10450{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010451return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010452 ;
10453 return 0;
10454}
10455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010456if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010457 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010458else
Matthias Kloseb9621712010-04-24 17:59:49 +000010459 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010461rm -f core conftest.err conftest.$ac_objext \
10462 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010463LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10466$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010467if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010468 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010469
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010470 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010471 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010472 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010473else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010474
Martin v. Löwis130fb172001-07-19 11:00:41 +000010475 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010476fi
10477
Guido van Rossum627b2d71993-12-24 10:39:16 +000010478
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010479fi
10480
Guido van Rossum0be3e491997-05-22 20:33:33 +000010481fi
10482
Guido van Rossum49545951997-12-02 19:28:29 +000010483fi
10484
Guido van Rossumb93a8621998-05-07 13:27:32 +000010485fi
10486
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010487fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010488rm -f core conftest.err conftest.$ac_objext \
10489 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010490
Matthias Kloseb9621712010-04-24 17:59:49 +000010491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10492$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010493if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010494 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010495else
Martin v. Löwis11437992002-04-12 09:54:03 +000010496 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010497LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010501/* Override any GCC internal prototype to avoid an error.
10502 Use char because int might match the return type of a GCC
10503 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010504#ifdef __cplusplus
10505extern "C"
10506#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010507char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010508int
10509main ()
10510{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010511return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010512 ;
10513 return 0;
10514}
10515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010516if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010517 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010518else
Matthias Kloseb9621712010-04-24 17:59:49 +000010519 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010520fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010521rm -f core conftest.err conftest.$ac_objext \
10522 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010523LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010524fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10526$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010527if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010528 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010529
Martin v. Löwis130fb172001-07-19 11:00:41 +000010530 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010531 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010532 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010533fi
10534
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010535
Neal Norwitza978ab02002-11-02 16:58:05 +000010536 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10538$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010539if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010540 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010541else
Martin v. Löwis11437992002-04-12 09:54:03 +000010542 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010543LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010545/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010546
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010547/* Override any GCC internal prototype to avoid an error.
10548 Use char because int might match the return type of a GCC
10549 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010550#ifdef __cplusplus
10551extern "C"
10552#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010553char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010554int
10555main ()
10556{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010557return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010558 ;
10559 return 0;
10560}
10561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010562if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010563 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010564else
Matthias Kloseb9621712010-04-24 17:59:49 +000010565 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010566fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010567rm -f core conftest.err conftest.$ac_objext \
10568 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010569LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010570fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10572$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010573if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010574 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010575
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010576 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010577 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010578 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010579fi
10580
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010581 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010582fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010583
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010584if test "$posix_threads" = "yes"; then
10585 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010586
Matthias Kloseb9621712010-04-24 17:59:49 +000010587$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010588
10589 fi
10590
10591 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10592 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010593 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010594$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010595
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010596 ;;
10597 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010598$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010599
10600 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010601 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010602$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010603
10604 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010605 esac
10606
Matthias Kloseb9621712010-04-24 17:59:49 +000010607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10608$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010609 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010610 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010611else
Matthias Kloseb9621712010-04-24 17:59:49 +000010612 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010613 ac_cv_pthread_system_supported=no
10614else
Matthias Kloseb9621712010-04-24 17:59:49 +000010615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010616/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010617
10618 #include <stdio.h>
10619 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010620 void *foo(void *parm) {
10621 return NULL;
10622 }
10623 main() {
10624 pthread_attr_t attr;
10625 pthread_t id;
10626 if (pthread_attr_init(&attr)) exit(-1);
10627 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10628 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10629 exit(0);
10630 }
10631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010632if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010633 ac_cv_pthread_system_supported=yes
10634else
Matthias Kloseb9621712010-04-24 17:59:49 +000010635 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010636fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010637rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10638 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010639fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010640
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010641
Guido van Rossum627b2d71993-12-24 10:39:16 +000010642fi
10643
Matthias Kloseb9621712010-04-24 17:59:49 +000010644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10645$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010646 if test "$ac_cv_pthread_system_supported" = "yes"; then
10647
Matthias Kloseb9621712010-04-24 17:59:49 +000010648$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010649
10650 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010651 for ac_func in pthread_sigmask
10652do :
10653 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010654if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010655 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010656#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010657_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010658 case $ac_sys_system in
10659 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010660
Matthias Kloseb9621712010-04-24 17:59:49 +000010661$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010662
10663 ;;
10664 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010665fi
10666done
10667
Christian Heimesf77b4b22013-08-21 13:26:05 +020010668 for ac_func in pthread_atfork
10669do :
10670 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10671if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10672 cat >>confdefs.h <<_ACEOF
10673#define HAVE_PTHREAD_ATFORK 1
10674_ACEOF
10675
10676fi
10677done
10678
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010679fi
10680
10681
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010682# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010683
Matthias Kloseb9621712010-04-24 17:59:49 +000010684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10685$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010686# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010687if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010688 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010689 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10691$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010692 ipv6=no
10693 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010694 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10695$as_echo "yes" >&6; }
10696 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010697
10698 ipv6=yes
10699 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010700 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010701else
Martin v. Löwis11437992002-04-12 09:54:03 +000010702
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öwisa2ac6022001-08-09 11:40:14 +000010705 /* AF_INET6 available check */
10706#include <sys/types.h>
10707#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010708int
10709main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010710{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010711int domain = AF_INET6;
10712 ;
10713 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010714}
Martin v. Löwis11437992002-04-12 09:54:03 +000010715_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010716if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010717
Matthias Kloseb9621712010-04-24 17:59:49 +000010718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10719$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010720 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010721
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010722else
Matthias Kloseb159a552010-04-25 21:00:44 +000010723
Matthias Kloseb9621712010-04-24 17:59:49 +000010724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10725$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010726 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010727
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010728fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010730
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010731if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10733$as_echo_n "checking if RFC2553 API is available... " >&6; }
10734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010735/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010736
10737 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010738#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010739int
10740main ()
10741{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010742struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010743 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010744 ;
10745 return 0;
10746}
Matthias Kloseb159a552010-04-25 21:00:44 +000010747
Martin v. Löwis11437992002-04-12 09:54:03 +000010748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010749if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010750
10751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010752$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010753 ipv6=yes
10754
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010755else
Matthias Kloseb159a552010-04-25 21:00:44 +000010756
10757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010758$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010759 ipv6=no
10760
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010763fi
10764
10765if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010767
10768fi
10769
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010770fi
10771
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010772
10773ipv6type=unknown
10774ipv6lib=none
10775ipv6trylibc=no
10776
10777if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10779$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010780 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10781 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010782 case $i in
10783 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010785/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010786
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010787#include <netinet/in.h>
10788#ifdef IPV6_INRIA_VERSION
10789yes
10790#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010791_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010793 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010794 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010796rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010797
10798 ;;
10799 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010801/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010802
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010803#include <netinet/in.h>
10804#ifdef __KAME__
10805yes
10806#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010807_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010808if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010809 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010810 ipv6type=$i;
10811 ipv6lib=inet6
10812 ipv6libdir=/usr/local/v6/lib
10813 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010814fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010815rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010816
10817 ;;
10818 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010820/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010821
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010822#include <features.h>
10823#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10824yes
10825#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010826_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010827if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010829 ipv6type=$i;
10830 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010831fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010832rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833
10834 ;;
10835 linux-inet6)
10836 if test -d /usr/inet6; then
10837 ipv6type=$i
10838 ipv6lib=inet6
10839 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010840 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010841 fi
10842 ;;
10843 solaris)
10844 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010845 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846 ipv6type=$i
10847 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010848 fi
10849 fi
10850 ;;
10851 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010853/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010854
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010855#include <sys/param.h>
10856#ifdef _TOSHIBA_INET6
10857yes
10858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010859_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010860if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010861 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010862 ipv6type=$i;
10863 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010864 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010865fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010866rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010867
10868 ;;
10869 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010871/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010872
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010873#include </usr/local/v6/include/sys/v6config.h>
10874#ifdef __V6D__
10875yes
10876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010877_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010878if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010879 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010880 ipv6type=$i;
10881 ipv6lib=v6;
10882 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010883 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010884fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010885rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010886
10887 ;;
10888 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010890/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010891
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010892#include <sys/param.h>
10893#ifdef _ZETA_MINAMI_INET6
10894yes
10895#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010896_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010897if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010898 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010899 ipv6type=$i;
10900 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010901 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010902fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010903rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010904
10905 ;;
10906 esac
10907 if test "$ipv6type" != "unknown"; then
10908 break
10909 fi
10910 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10912$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010913fi
10914
10915if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10916 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10917 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10918 echo "using lib$ipv6lib"
10919 else
10920 if test $ipv6trylibc = "yes"; then
10921 echo "using libc"
10922 else
10923 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10924 echo "You need to fetch lib$ipv6lib.a from appropriate"
10925 echo 'ipv6 kit and compile beforehand.'
10926 exit 1
10927 fi
10928 fi
10929fi
10930
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10932$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10934/* end confdefs.h. */
10935 /* CAN_RAW_FD_FRAMES available check */
10936#include <linux/can/raw.h>
10937int
10938main ()
10939{
10940int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10941 ;
10942 return 0;
10943}
10944_ACEOF
10945if ac_fn_c_try_compile "$LINENO"; then :
10946
10947
10948$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10949
10950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10951$as_echo "yes" >&6; }
10952
10953else
10954
10955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10956$as_echo "no" >&6; }
10957
10958fi
10959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10960
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010961# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10963$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010964
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010965# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010966if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010967 withval=$with_doc_strings;
10968fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010969
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010970
10971if test -z "$with_doc_strings"
10972then with_doc_strings="yes"
10973fi
10974if test "$with_doc_strings" != "no"
10975then
10976
Matthias Kloseb9621712010-04-24 17:59:49 +000010977$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010978
10979fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10981$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010982
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010983# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10985$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010987# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010988if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010989 withval=$with_pymalloc;
10990fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010991
Neil Schemenauera35c6882001-02-27 04:45:05 +000010992
Neil Schemenauer16c22972002-03-22 15:34:49 +000010993if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010994then
10995 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010996fi
10997if test "$with_pymalloc" != "no"
10998then
Martin v. Löwis11437992002-04-12 09:54:03 +000010999
Matthias Kloseb9621712010-04-24 17:59:49 +000011000$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011001
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011002 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011003fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11005$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011006
Nick Coghlan6ea41862017-06-11 13:16:15 +100011007# Check for --with-c-locale-coercion
11008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11009$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11010
11011# Check whether --with-c-locale-coercion was given.
11012if test "${with_c_locale_coercion+set}" = set; then :
11013 withval=$with_c_locale_coercion;
11014fi
11015
11016
11017if test -z "$with_c_locale_coercion"
11018then
11019 with_c_locale_coercion="yes"
11020fi
11021if test "$with_c_locale_coercion" != "no"
11022then
11023
11024$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11025
11026fi
11027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11028$as_echo "$with_c_locale_coercion" >&6; }
11029
11030# Check for --with-c-locale-warning
11031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
11032$as_echo_n "checking for --with-c-locale-warning... " >&6; }
11033
11034# Check whether --with-c-locale-warning was given.
11035if test "${with_c_locale_warning+set}" = set; then :
11036 withval=$with_c_locale_warning;
11037fi
11038
11039
11040if test -z "$with_c_locale_warning"
11041then
11042 with_c_locale_warning="yes"
11043fi
11044if test "$with_c_locale_warning" != "no"
11045then
11046
11047$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
11048
11049fi
11050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
11051$as_echo "$with_c_locale_warning" >&6; }
11052
Benjamin Peterson05159c42009-12-03 03:01:27 +000011053# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11055$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011056
11057# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011058if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011059 withval=$with_valgrind;
11060else
11061 with_valgrind=no
11062fi
11063
Matthias Kloseb9621712010-04-24 17:59:49 +000011064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11065$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011066if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011067 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 +020011068if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011069
Matthias Kloseb9621712010-04-24 17:59:49 +000011070$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011071
11072else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011073 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011074
11075fi
11076
11077
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011078 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011079fi
11080
Łukasz Langaa785c872016-09-09 17:37:37 -070011081# Check for DTrace support
11082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11083$as_echo_n "checking for --with-dtrace... " >&6; }
11084
11085# Check whether --with-dtrace was given.
11086if test "${with_dtrace+set}" = set; then :
11087 withval=$with_dtrace;
11088else
11089 with_dtrace=no
11090fi
11091
11092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11093$as_echo "$with_dtrace" >&6; }
11094
11095
11096
11097
11098
11099DTRACE=
11100DFLAGS=
11101DTRACE_HEADERS=
11102DTRACE_OBJS=
11103
11104if test "$with_dtrace" = "yes"
11105then
11106 # Extract the first word of "dtrace", so it can be a program name with args.
11107set dummy dtrace; ac_word=$2
11108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11109$as_echo_n "checking for $ac_word... " >&6; }
11110if ${ac_cv_path_DTRACE+:} false; then :
11111 $as_echo_n "(cached) " >&6
11112else
11113 case $DTRACE in
11114 [\\/]* | ?:[\\/]*)
11115 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11116 ;;
11117 *)
11118 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11119for as_dir in $PATH
11120do
11121 IFS=$as_save_IFS
11122 test -z "$as_dir" && as_dir=.
11123 for ac_exec_ext in '' $ac_executable_extensions; do
11124 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11125 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11126 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11127 break 2
11128 fi
11129done
11130 done
11131IFS=$as_save_IFS
11132
11133 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11134 ;;
11135esac
11136fi
11137DTRACE=$ac_cv_path_DTRACE
11138if test -n "$DTRACE"; then
11139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11140$as_echo "$DTRACE" >&6; }
11141else
11142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11143$as_echo "no" >&6; }
11144fi
11145
11146
11147 if test "$DTRACE" = "not found"; then
11148 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11149 fi
11150
11151$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11152
11153 DTRACE_HEADERS="Include/pydtrace_probes.h"
11154
11155 # On OS X, DTrace providers do not need to be explicitly compiled and
11156 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11157 # generation flag '-G'. We check for presence of this flag, rather than
11158 # hardcoding support by OS, in the interest of robustness.
11159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11160$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11161if ${ac_cv_dtrace_link+:} false; then :
11162 $as_echo_n "(cached) " >&6
11163else
11164 ac_cv_dtrace_link=no
11165 echo 'BEGIN' > conftest.d
11166 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11167 ac_cv_dtrace_link=yes
11168
11169fi
11170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11171$as_echo "$ac_cv_dtrace_link" >&6; }
11172 if test "$ac_cv_dtrace_link" = "yes"; then
11173 DTRACE_OBJS="Python/pydtrace.o"
11174 fi
11175fi
11176
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011177# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011178
Guido van Rossum98935bf2001-09-05 19:13:16 +000011179DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011180
Guido van Rossume97ee181999-12-20 21:27:22 +000011181# the dlopen() function means we might want to use dynload_shlib.o. some
11182# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011183for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011184do :
11185 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011186if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011187 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011188#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011189_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011190
Guido van Rossume97ee181999-12-20 21:27:22 +000011191fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011192done
Guido van Rossume97ee181999-12-20 21:27:22 +000011193
Michael W. Hudson54241132001-12-07 15:38:26 +000011194
Guido van Rossume97ee181999-12-20 21:27:22 +000011195# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11196# loading of modules.
11197
Matthias Kloseb9621712010-04-24 17:59:49 +000011198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11199$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011200if test -z "$DYNLOADFILE"
11201then
11202 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011203 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11204 if test "$ac_cv_func_dlopen" = yes
11205 then DYNLOADFILE="dynload_shlib.o"
11206 else DYNLOADFILE="dynload_aix.o"
11207 fi
11208 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011209 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011210 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11211 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011212 *)
11213 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11214 # out any dynamic loading
11215 if test "$ac_cv_func_dlopen" = yes
11216 then DYNLOADFILE="dynload_shlib.o"
11217 else DYNLOADFILE="dynload_stub.o"
11218 fi
11219 ;;
11220 esac
11221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11223$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011224if test "$DYNLOADFILE" != "dynload_stub.o"
11225then
Martin v. Löwis11437992002-04-12 09:54:03 +000011226
Matthias Kloseb9621712010-04-24 17:59:49 +000011227$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011228
11229fi
11230
Neil Schemenauer4e425612001-06-19 15:44:15 +000011231# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11232
Michael W. Hudson54241132001-12-07 15:38:26 +000011233
Matthias Kloseb9621712010-04-24 17:59:49 +000011234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11235$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011236if test -z "$MACHDEP_OBJS"
11237then
Jack Jansene578a632001-08-15 01:27:14 +000011238 MACHDEP_OBJS=$extra_machdep_objs
11239else
11240 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011241fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011242if test -z "$MACHDEP_OBJS"; then
11243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11244$as_echo "none" >&6; }
11245else
11246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11247$as_echo "$MACHDEP_OBJS" >&6; }
11248fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011249
Guido van Rossum627b2d71993-12-24 10:39:16 +000011250# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011251for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011252 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011253 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011254 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011255 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011256 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011257 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011258 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011259 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011260 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011261 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011262 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011263 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011264 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011265 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11266 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011267 sigaction sigaltstack siginterrupt sigpending sigrelse \
11268 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011269 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011270 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011271 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011272do :
11273 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11274ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011275if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011276 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011277#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011278_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011279
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011280fi
11281done
11282
Michael W. Hudson54241132001-12-07 15:38:26 +000011283
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011284ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11285 #include <dirent.h>
11286"
11287if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11288
11289$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11290
11291fi
11292
11293
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011294# For some functions, having a definition is not sufficient, since
11295# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11297$as_echo_n "checking for chroot... " >&6; }
11298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011299/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011300#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011301int
11302main ()
11303{
11304void *x=chroot
11305 ;
11306 return 0;
11307}
11308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011309if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011310
Matthias Kloseb9621712010-04-24 17:59:49 +000011311$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011312
Matthias Kloseb159a552010-04-25 21:00:44 +000011313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011314$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011315else
Matthias Kloseb9621712010-04-24 17:59:49 +000011316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11317$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011318
11319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11322$as_echo_n "checking for link... " >&6; }
11323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011324/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011325#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011326int
11327main ()
11328{
11329void *x=link
11330 ;
11331 return 0;
11332}
11333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011334if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011335
Matthias Kloseb9621712010-04-24 17:59:49 +000011336$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011337
Matthias Kloseb159a552010-04-25 21:00:44 +000011338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011339$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011340else
Matthias Kloseb9621712010-04-24 17:59:49 +000011341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11342$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011343
11344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11347$as_echo_n "checking for symlink... " >&6; }
11348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011349/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011350#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011351int
11352main ()
11353{
11354void *x=symlink
11355 ;
11356 return 0;
11357}
11358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011359if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011360
Matthias Kloseb9621712010-04-24 17:59:49 +000011361$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011362
Matthias Kloseb159a552010-04-25 21:00:44 +000011363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011364$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011365else
Matthias Kloseb9621712010-04-24 17:59:49 +000011366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11367$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011368
11369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11372$as_echo_n "checking for fchdir... " >&6; }
11373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011374/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011375#include <unistd.h>
11376int
11377main ()
11378{
11379void *x=fchdir
11380 ;
11381 return 0;
11382}
11383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011384if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011385
Matthias Kloseb9621712010-04-24 17:59:49 +000011386$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011387
Matthias Kloseb159a552010-04-25 21:00:44 +000011388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011389$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011390else
Matthias Kloseb9621712010-04-24 17:59:49 +000011391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11392$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011393
11394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11397$as_echo_n "checking for fsync... " >&6; }
11398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011399/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011400#include <unistd.h>
11401int
11402main ()
11403{
11404void *x=fsync
11405 ;
11406 return 0;
11407}
11408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011409if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011410
Matthias Kloseb9621712010-04-24 17:59:49 +000011411$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011412
Matthias Kloseb159a552010-04-25 21:00:44 +000011413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011414$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011415else
Matthias Kloseb9621712010-04-24 17:59:49 +000011416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11417$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011418
11419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11422$as_echo_n "checking for fdatasync... " >&6; }
11423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011424/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011425#include <unistd.h>
11426int
11427main ()
11428{
11429void *x=fdatasync
11430 ;
11431 return 0;
11432}
11433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011434if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011435
Matthias Kloseb9621712010-04-24 17:59:49 +000011436$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011437
Matthias Kloseb159a552010-04-25 21:00:44 +000011438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011439$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011440else
Matthias Kloseb9621712010-04-24 17:59:49 +000011441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11442$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011443
11444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11447$as_echo_n "checking for epoll... " >&6; }
11448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011449/* end confdefs.h. */
11450#include <sys/epoll.h>
11451int
11452main ()
11453{
11454void *x=epoll_create
11455 ;
11456 return 0;
11457}
11458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011459if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011460
Matthias Kloseb9621712010-04-24 17:59:49 +000011461$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011462
Matthias Kloseb159a552010-04-25 21:00:44 +000011463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011464$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011465else
Matthias Kloseb9621712010-04-24 17:59:49 +000011466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11467$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011468
11469fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11472$as_echo_n "checking for epoll_create1... " >&6; }
11473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11474/* end confdefs.h. */
11475#include <sys/epoll.h>
11476int
11477main ()
11478{
11479void *x=epoll_create1
11480 ;
11481 return 0;
11482}
11483_ACEOF
11484if ac_fn_c_try_compile "$LINENO"; then :
11485
11486$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11487
11488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11489$as_echo "yes" >&6; }
11490else
11491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11492$as_echo "no" >&6; }
11493
11494fi
11495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11497$as_echo_n "checking for kqueue... " >&6; }
11498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011499/* end confdefs.h. */
11500
11501#include <sys/types.h>
11502#include <sys/event.h>
11503
11504int
11505main ()
11506{
11507int x=kqueue()
11508 ;
11509 return 0;
11510}
11511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011512if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011513
Matthias Kloseb9621712010-04-24 17:59:49 +000011514$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011515
Matthias Kloseb159a552010-04-25 21:00:44 +000011516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011517$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011518else
Matthias Kloseb9621712010-04-24 17:59:49 +000011519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11520$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011521
11522fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11525$as_echo_n "checking for prlimit... " >&6; }
11526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11527/* end confdefs.h. */
11528
11529#include <sys/time.h>
11530#include <sys/resource.h>
11531
11532int
11533main ()
11534{
11535void *x=prlimit
11536 ;
11537 return 0;
11538}
11539_ACEOF
11540if ac_fn_c_try_compile "$LINENO"; then :
11541
11542$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11543
11544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11545$as_echo "yes" >&6; }
11546else
11547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11548$as_echo "no" >&6; }
11549
11550fi
11551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11552
Martin v. Löwisd5843682002-11-21 20:41:28 +000011553# On some systems (eg. FreeBSD 5), we would find a definition of the
11554# functions ctermid_r, setgroups in the library, but no prototype
11555# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11556# address to avoid compiler warnings and potential miscompilations
11557# because of the missing prototypes.
11558
Matthias Kloseb9621712010-04-24 17:59:49 +000011559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11560$as_echo_n "checking for ctermid_r... " >&6; }
11561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011562/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011563
Martin v. Löwisd5843682002-11-21 20:41:28 +000011564#include <stdio.h>
11565
Martin v. Löwisd5843682002-11-21 20:41:28 +000011566int
11567main ()
11568{
11569void* p = ctermid_r
11570 ;
11571 return 0;
11572}
11573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011574if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011575
Matthias Kloseb9621712010-04-24 17:59:49 +000011576$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011577
Matthias Kloseb159a552010-04-25 21:00:44 +000011578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011579$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011580else
Matthias Kloseb9621712010-04-24 17:59:49 +000011581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11582$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011583
11584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11586
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11588$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011589if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011590 $as_echo_n "(cached) " >&6
11591else
11592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011593/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011594#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011595int
11596main ()
11597{
11598void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011599
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011600 ;
11601 return 0;
11602}
11603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011604if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011605 ac_cv_flock_decl=yes
11606else
11607 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011608
11609fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011611
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011612fi
11613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11614$as_echo "$ac_cv_flock_decl" >&6; }
11615if test "x${ac_cv_flock_decl}" = xyes; then
11616 for ac_func in flock
11617do :
11618 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011619if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011620 cat >>confdefs.h <<_ACEOF
11621#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011622_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011623
Antoine Pitroua3000072010-09-07 14:52:42 +000011624else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011626$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011627if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011628 $as_echo_n "(cached) " >&6
11629else
11630 ac_check_lib_save_LIBS=$LIBS
11631LIBS="-lbsd $LIBS"
11632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11633/* end confdefs.h. */
11634
11635/* Override any GCC internal prototype to avoid an error.
11636 Use char because int might match the return type of a GCC
11637 builtin and then its argument prototype would still apply. */
11638#ifdef __cplusplus
11639extern "C"
11640#endif
11641char flock ();
11642int
11643main ()
11644{
11645return flock ();
11646 ;
11647 return 0;
11648}
11649_ACEOF
11650if ac_fn_c_try_link "$LINENO"; then :
11651 ac_cv_lib_bsd_flock=yes
11652else
11653 ac_cv_lib_bsd_flock=no
11654fi
11655rm -f core conftest.err conftest.$ac_objext \
11656 conftest$ac_exeext conftest.$ac_ext
11657LIBS=$ac_check_lib_save_LIBS
11658fi
11659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11660$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011661if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011662 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011663
11664
11665$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11666
11667
11668fi
11669
11670
11671fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011672done
11673
Antoine Pitroua3000072010-09-07 14:52:42 +000011674fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011675
Matthias Kloseb9621712010-04-24 17:59:49 +000011676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11677$as_echo_n "checking for getpagesize... " >&6; }
11678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011679/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011680
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011681#include <unistd.h>
11682
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011683int
11684main ()
11685{
11686void* p = getpagesize
11687 ;
11688 return 0;
11689}
11690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011691if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011692
Matthias Kloseb9621712010-04-24 17:59:49 +000011693$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011694
Matthias Kloseb159a552010-04-25 21:00:44 +000011695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011696$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011697else
Matthias Kloseb9621712010-04-24 17:59:49 +000011698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11699$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011700
11701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011703
Victor Stinner984890f2011-11-24 13:53:38 +010011704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11705$as_echo_n "checking for broken unsetenv... " >&6; }
11706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11707/* end confdefs.h. */
11708
11709#include <stdlib.h>
11710
11711int
11712main ()
11713{
11714int res = unsetenv("DUMMY")
11715 ;
11716 return 0;
11717}
11718_ACEOF
11719if ac_fn_c_try_compile "$LINENO"; then :
11720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11721$as_echo "no" >&6; }
11722else
11723
11724$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11725
11726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11727$as_echo "yes" >&6; }
11728
11729fi
11730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11731
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011732for ac_prog in true
11733do
11734 # Extract the first word of "$ac_prog", so it can be a program name with args.
11735set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11737$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011738if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011739 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011740else
11741 if test -n "$TRUE"; then
11742 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11743else
11744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11745for as_dir in $PATH
11746do
11747 IFS=$as_save_IFS
11748 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011749 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011750 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011751 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011752 $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 +000011753 break 2
11754 fi
11755done
Matthias Kloseb9621712010-04-24 17:59:49 +000011756 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011757IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011758
11759fi
11760fi
11761TRUE=$ac_cv_prog_TRUE
11762if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11764$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011765else
Matthias Kloseb9621712010-04-24 17:59:49 +000011766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11767$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011768fi
11769
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011770
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011771 test -n "$TRUE" && break
11772done
11773test -n "$TRUE" || TRUE="/bin/true"
11774
11775
Matthias Kloseb9621712010-04-24 17:59:49 +000011776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11777$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011778if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011779 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011780else
11781 ac_check_lib_save_LIBS=$LIBS
11782LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011784/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011785
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011786/* Override any GCC internal prototype to avoid an error.
11787 Use char because int might match the return type of a GCC
11788 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011789#ifdef __cplusplus
11790extern "C"
11791#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011792char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011793int
11794main ()
11795{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011796return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011797 ;
11798 return 0;
11799}
11800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011801if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011802 ac_cv_lib_c_inet_aton=yes
11803else
Matthias Kloseb9621712010-04-24 17:59:49 +000011804 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011805fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011806rm -f core conftest.err conftest.$ac_objext \
11807 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011808LIBS=$ac_check_lib_save_LIBS
11809fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11811$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011812if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011813 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011814else
Matthias Kloseb9621712010-04-24 17:59:49 +000011815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11816$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011817if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011819else
11820 ac_check_lib_save_LIBS=$LIBS
11821LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011823/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011825/* Override any GCC internal prototype to avoid an error.
11826 Use char because int might match the return type of a GCC
11827 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011828#ifdef __cplusplus
11829extern "C"
11830#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011831char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011832int
11833main ()
11834{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011835return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011836 ;
11837 return 0;
11838}
11839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011840if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011841 ac_cv_lib_resolv_inet_aton=yes
11842else
Matthias Kloseb9621712010-04-24 17:59:49 +000011843 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011845rm -f core conftest.err conftest.$ac_objext \
11846 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011847LIBS=$ac_check_lib_save_LIBS
11848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11850$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011851if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011852 cat >>confdefs.h <<_ACEOF
11853#define HAVE_LIBRESOLV 1
11854_ACEOF
11855
11856 LIBS="-lresolv $LIBS"
11857
11858fi
11859
11860
11861fi
11862
11863
Christian Heimesd0764e22007-12-04 15:00:33 +000011864# On Tru64, chflags seems to be present, but calling it will
11865# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11867$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011868if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011869 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011870else
Matthias Kloseb9621712010-04-24 17:59:49 +000011871 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011872 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011873else
Matthias Kloseb9621712010-04-24 17:59:49 +000011874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011875/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011876
Christian Heimesd0764e22007-12-04 15:00:33 +000011877#include <sys/stat.h>
11878#include <unistd.h>
11879int main(int argc, char*argv[])
11880{
11881 if(chflags(argv[0], 0) != 0)
11882 return 1;
11883 return 0;
11884}
Ned Deily3eb67d52011-06-28 00:00:28 -070011885
Christian Heimesd0764e22007-12-04 15:00:33 +000011886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011887if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011888 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011889else
Matthias Kloseb9621712010-04-24 17:59:49 +000011890 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11893 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011894fi
11895
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011896
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011897fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11899$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011900if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011901 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011902if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011903 ac_cv_have_chflags="yes"
11904else
11905 ac_cv_have_chflags="no"
11906fi
11907
11908fi
11909if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011910
Matthias Kloseb9621712010-04-24 17:59:49 +000011911$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011912
11913fi
11914
Matthias Kloseb9621712010-04-24 17:59:49 +000011915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11916$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011917if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011918 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011919else
Matthias Kloseb9621712010-04-24 17:59:49 +000011920 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011921 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011922else
Matthias Kloseb9621712010-04-24 17:59:49 +000011923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011924/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011925
Christian Heimesd0764e22007-12-04 15:00:33 +000011926#include <sys/stat.h>
11927#include <unistd.h>
11928int main(int argc, char*argv[])
11929{
11930 if(lchflags(argv[0], 0) != 0)
11931 return 1;
11932 return 0;
11933}
Ned Deily3eb67d52011-06-28 00:00:28 -070011934
Christian Heimesd0764e22007-12-04 15:00:33 +000011935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011936if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011937 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011938else
Matthias Kloseb9621712010-04-24 17:59:49 +000011939 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011940fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011941rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11942 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011943fi
11944
11945
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011946fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11948$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011949if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011950 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011951if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011952 ac_cv_have_lchflags="yes"
11953else
11954 ac_cv_have_lchflags="no"
11955fi
11956
11957fi
11958if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011959
Matthias Kloseb9621712010-04-24 17:59:49 +000011960$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011961
11962fi
11963
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011964case $ac_sys_system/$ac_sys_release in
11965Darwin/*)
11966 _CUR_CFLAGS="${CFLAGS}"
11967 _CUR_LDFLAGS="${LDFLAGS}"
11968 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11969 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11970 ;;
11971esac
11972
Matthias Kloseb9621712010-04-24 17:59:49 +000011973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11974$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011975if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011976 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011977else
11978 ac_check_lib_save_LIBS=$LIBS
11979LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011981/* end confdefs.h. */
11982
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011983/* Override any GCC internal prototype to avoid an error.
11984 Use char because int might match the return type of a GCC
11985 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011986#ifdef __cplusplus
11987extern "C"
11988#endif
11989char inflateCopy ();
11990int
11991main ()
11992{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011993return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011994 ;
11995 return 0;
11996}
11997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011998if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011999 ac_cv_lib_z_inflateCopy=yes
12000else
Matthias Kloseb9621712010-04-24 17:59:49 +000012001 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012002fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012003rm -f core conftest.err conftest.$ac_objext \
12004 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012005LIBS=$ac_check_lib_save_LIBS
12006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12008$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012009if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012010
Matthias Kloseb9621712010-04-24 17:59:49 +000012011$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012012
12013fi
12014
12015
12016case $ac_sys_system/$ac_sys_release in
12017Darwin/*)
12018 CFLAGS="${_CUR_CFLAGS}"
12019 LDFLAGS="${_CUR_LDFLAGS}"
12020 ;;
12021esac
12022
Matthias Kloseb9621712010-04-24 17:59:49 +000012023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12024$as_echo_n "checking for hstrerror... " >&6; }
12025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012026/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012027
Martin v. Löwise9416172003-05-03 10:12:45 +000012028#include <netdb.h>
12029
Martin v. Löwise9416172003-05-03 10:12:45 +000012030int
12031main ()
12032{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012033void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012034 ;
12035 return 0;
12036}
12037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012038if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012039
Matthias Kloseb9621712010-04-24 17:59:49 +000012040$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012041
Matthias Kloseb159a552010-04-25 21:00:44 +000012042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012043$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012044else
Matthias Kloseb9621712010-04-24 17:59:49 +000012045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12046$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012047
12048fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012049rm -f core conftest.err conftest.$ac_objext \
12050 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012051
Matthias Kloseb9621712010-04-24 17:59:49 +000012052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12053$as_echo_n "checking for inet_aton... " >&6; }
12054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012055/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012056
Martin v. Löwis86d66262006-02-17 08:40:11 +000012057#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012058#include <sys/socket.h>
12059#include <netinet/in.h>
12060#include <arpa/inet.h>
12061
Martin v. Löwise9416172003-05-03 10:12:45 +000012062int
12063main ()
12064{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012065void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012066 ;
12067 return 0;
12068}
12069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012070if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012071
Matthias Kloseb9621712010-04-24 17:59:49 +000012072$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012073
Matthias Kloseb159a552010-04-25 21:00:44 +000012074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012075$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012076else
Matthias Kloseb9621712010-04-24 17:59:49 +000012077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12078$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012079
12080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012081rm -f core conftest.err conftest.$ac_objext \
12082 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012083
Matthias Kloseb9621712010-04-24 17:59:49 +000012084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12085$as_echo_n "checking for inet_pton... " >&6; }
12086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012087/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012088
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012089#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012090#include <sys/socket.h>
12091#include <netinet/in.h>
12092#include <arpa/inet.h>
12093
Martin v. Löwise9416172003-05-03 10:12:45 +000012094int
12095main ()
12096{
12097void* p = inet_pton
12098 ;
12099 return 0;
12100}
12101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012102if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012103
Matthias Kloseb9621712010-04-24 17:59:49 +000012104$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012105
Matthias Kloseb159a552010-04-25 21:00:44 +000012106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012107$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012108else
Matthias Kloseb9621712010-04-24 17:59:49 +000012109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12110$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012111
12112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012114
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012115# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12117$as_echo_n "checking for setgroups... " >&6; }
12118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012119/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012120
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012121#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012122#ifdef HAVE_GRP_H
12123#include <grp.h>
12124#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012125
Martin v. Löwisd5843682002-11-21 20:41:28 +000012126int
12127main ()
12128{
12129void* p = setgroups
12130 ;
12131 return 0;
12132}
12133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012134if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012135
Matthias Kloseb9621712010-04-24 17:59:49 +000012136$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012137
Matthias Kloseb159a552010-04-25 21:00:44 +000012138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012139$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012140else
Matthias Kloseb9621712010-04-24 17:59:49 +000012141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12142$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012143
12144fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012146
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012147# check for openpty and forkpty
12148
12149for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012150do :
12151 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012152if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012153 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012154#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012155_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012156
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012157else
Matthias Kloseb9621712010-04-24 17:59:49 +000012158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12159$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012160if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012161 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012162else
Martin v. Löwis11437992002-04-12 09:54:03 +000012163 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012164LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012167
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012168/* Override any GCC internal prototype to avoid an error.
12169 Use char because int might match the return type of a GCC
12170 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012171#ifdef __cplusplus
12172extern "C"
12173#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012174char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012175int
12176main ()
12177{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012178return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012179 ;
12180 return 0;
12181}
12182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012183if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012184 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012185else
Matthias Kloseb9621712010-04-24 17:59:49 +000012186 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012187fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012188rm -f core conftest.err conftest.$ac_objext \
12189 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012190LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12193$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012194if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012196 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012197else
Matthias Kloseb9621712010-04-24 17:59:49 +000012198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12199$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012200if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012202else
12203 ac_check_lib_save_LIBS=$LIBS
12204LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012206/* end confdefs.h. */
12207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012208/* Override any GCC internal prototype to avoid an error.
12209 Use char because int might match the return type of a GCC
12210 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012211#ifdef __cplusplus
12212extern "C"
12213#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012214char openpty ();
12215int
12216main ()
12217{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012219 ;
12220 return 0;
12221}
12222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012223if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012224 ac_cv_lib_bsd_openpty=yes
12225else
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012227fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012228rm -f core conftest.err conftest.$ac_objext \
12229 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012230LIBS=$ac_check_lib_save_LIBS
12231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12233$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012234if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012235 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012236 LIBS="$LIBS -lbsd"
12237fi
12238
12239
12240fi
12241
Fred Drake8cef4cf2000-06-28 16:40:38 +000012242
12243fi
12244done
12245
12246for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012247do :
12248 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012249if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012250 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012251#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012252_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012253
Fred Drake8cef4cf2000-06-28 16:40:38 +000012254else
Matthias Kloseb9621712010-04-24 17:59:49 +000012255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12256$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012257if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012258 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012259else
Martin v. Löwis11437992002-04-12 09:54:03 +000012260 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012261LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012263/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012265/* Override any GCC internal prototype to avoid an error.
12266 Use char because int might match the return type of a GCC
12267 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012268#ifdef __cplusplus
12269extern "C"
12270#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012271char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012272int
12273main ()
12274{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012275return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012276 ;
12277 return 0;
12278}
12279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012280if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012281 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012282else
Matthias Kloseb9621712010-04-24 17:59:49 +000012283 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012284fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012285rm -f core conftest.err conftest.$ac_objext \
12286 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012287LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12290$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012291if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012292 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012293 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012294else
Matthias Kloseb9621712010-04-24 17:59:49 +000012295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12296$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012297if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012298 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012299else
12300 ac_check_lib_save_LIBS=$LIBS
12301LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012303/* end confdefs.h. */
12304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012305/* Override any GCC internal prototype to avoid an error.
12306 Use char because int might match the return type of a GCC
12307 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012308#ifdef __cplusplus
12309extern "C"
12310#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012311char forkpty ();
12312int
12313main ()
12314{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012315return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012316 ;
12317 return 0;
12318}
12319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012320if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012321 ac_cv_lib_bsd_forkpty=yes
12322else
Matthias Kloseb9621712010-04-24 17:59:49 +000012323 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012324fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012325rm -f core conftest.err conftest.$ac_objext \
12326 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012327LIBS=$ac_check_lib_save_LIBS
12328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12330$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012331if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012332 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012333 LIBS="$LIBS -lbsd"
12334fi
12335
12336
12337fi
12338
Fred Drake8cef4cf2000-06-28 16:40:38 +000012339
12340fi
12341done
12342
Jack Jansendd19cf82001-12-06 22:36:17 +000012343
Christian Heimesb186d002008-03-18 15:15:01 +000012344# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012345for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012346do :
12347 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012348if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012349 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012350#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012351_ACEOF
12352
12353fi
12354done
12355
12356
Michael W. Hudson54241132001-12-07 15:38:26 +000012357# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012358for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012359do :
12360 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12361ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012362if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012363 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012364#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012365_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012366
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012367fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012368done
12369
Michael W. Hudson54241132001-12-07 15:38:26 +000012370
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012371ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012372if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012373 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012374
Martin v. Löwis1142de32002-03-29 16:28:31 +000012375else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012376 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012377 *" dup2.$ac_objext "* ) ;;
12378 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012379 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012380esac
12381
Martin v. Löwis1142de32002-03-29 16:28:31 +000012382fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012383
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012384ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012385if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012386 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12387
12388else
12389 case " $LIBOBJS " in
12390 *" strdup.$ac_objext "* ) ;;
12391 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12392 ;;
12393esac
12394
12395fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012396
12397
12398for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012399do :
12400 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012401if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012402 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012403#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012406/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012407#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012408int
12409main ()
12410{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012411getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012412 ;
12413 return 0;
12414}
12415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012416if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012417
Matthias Kloseb9621712010-04-24 17:59:49 +000012418$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012419
Guido van Rossum627b2d71993-12-24 10:39:16 +000012420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012422
Guido van Rossum627b2d71993-12-24 10:39:16 +000012423fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012424done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012425
Jack Jansen150753c2003-03-29 22:07:47 +000012426for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012427do :
12428 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012429if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012430 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012431#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012434/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012435#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012436int
12437main ()
12438{
12439setpgrp(0,0);
12440 ;
12441 return 0;
12442}
12443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012444if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012445
Matthias Kloseb9621712010-04-24 17:59:49 +000012446$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012447
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012450
12451fi
12452done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012453
Thomas Wouters3a584202000-08-05 23:28:51 +000012454for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012455do :
12456 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012457if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012458 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012459#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012462/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012463#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012464int
12465main ()
12466{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012467gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012468 ;
12469 return 0;
12470}
12471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012472if ac_fn_c_try_compile "$LINENO"; then :
12473
Guido van Rossum627b2d71993-12-24 10:39:16 +000012474else
Skip Montanaro6dead952003-09-25 14:50:04 +000012475
Matthias Kloseb9621712010-04-24 17:59:49 +000012476$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012477
Martin v. Löwis11437992002-04-12 09:54:03 +000012478
Guido van Rossum627b2d71993-12-24 10:39:16 +000012479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012481
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012482fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012483done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012484
Michael W. Hudson54241132001-12-07 15:38:26 +000012485
Victor Stinnere0be4232011-10-25 13:06:09 +020012486for ac_func in clock_gettime
12487do :
12488 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12489if test "x$ac_cv_func_clock_gettime" = xyes; then :
12490 cat >>confdefs.h <<_ACEOF
12491#define HAVE_CLOCK_GETTIME 1
12492_ACEOF
12493
12494else
12495
12496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12497$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12498if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12499 $as_echo_n "(cached) " >&6
12500else
12501 ac_check_lib_save_LIBS=$LIBS
12502LIBS="-lrt $LIBS"
12503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12504/* end confdefs.h. */
12505
12506/* Override any GCC internal prototype to avoid an error.
12507 Use char because int might match the return type of a GCC
12508 builtin and then its argument prototype would still apply. */
12509#ifdef __cplusplus
12510extern "C"
12511#endif
12512char clock_gettime ();
12513int
12514main ()
12515{
12516return clock_gettime ();
12517 ;
12518 return 0;
12519}
12520_ACEOF
12521if ac_fn_c_try_link "$LINENO"; then :
12522 ac_cv_lib_rt_clock_gettime=yes
12523else
12524 ac_cv_lib_rt_clock_gettime=no
12525fi
12526rm -f core conftest.err conftest.$ac_objext \
12527 conftest$ac_exeext conftest.$ac_ext
12528LIBS=$ac_check_lib_save_LIBS
12529fi
12530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12531$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12532if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12533
Victor Stinner7efb8332014-08-29 15:41:08 +020012534 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012535 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12536
12537
12538$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12539
12540
12541fi
12542
12543
12544fi
12545done
12546
12547
12548for ac_func in clock_getres
12549do :
12550 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12551if test "x$ac_cv_func_clock_getres" = xyes; then :
12552 cat >>confdefs.h <<_ACEOF
12553#define HAVE_CLOCK_GETRES 1
12554_ACEOF
12555
12556else
12557
12558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12559$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12560if ${ac_cv_lib_rt_clock_getres+:} false; then :
12561 $as_echo_n "(cached) " >&6
12562else
12563 ac_check_lib_save_LIBS=$LIBS
12564LIBS="-lrt $LIBS"
12565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12566/* end confdefs.h. */
12567
12568/* Override any GCC internal prototype to avoid an error.
12569 Use char because int might match the return type of a GCC
12570 builtin and then its argument prototype would still apply. */
12571#ifdef __cplusplus
12572extern "C"
12573#endif
12574char clock_getres ();
12575int
12576main ()
12577{
12578return clock_getres ();
12579 ;
12580 return 0;
12581}
12582_ACEOF
12583if ac_fn_c_try_link "$LINENO"; then :
12584 ac_cv_lib_rt_clock_getres=yes
12585else
12586 ac_cv_lib_rt_clock_getres=no
12587fi
12588rm -f core conftest.err conftest.$ac_objext \
12589 conftest$ac_exeext conftest.$ac_ext
12590LIBS=$ac_check_lib_save_LIBS
12591fi
12592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12593$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12594if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12595
12596 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12597
12598
12599fi
12600
12601
12602fi
12603done
12604
12605
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012606for ac_func in clock_settime
12607do :
12608 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12609if test "x$ac_cv_func_clock_settime" = xyes; then :
12610 cat >>confdefs.h <<_ACEOF
12611#define HAVE_CLOCK_SETTIME 1
12612_ACEOF
12613
12614else
12615
12616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12617$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12618if ${ac_cv_lib_rt_clock_settime+:} false; then :
12619 $as_echo_n "(cached) " >&6
12620else
12621 ac_check_lib_save_LIBS=$LIBS
12622LIBS="-lrt $LIBS"
12623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12624/* end confdefs.h. */
12625
12626/* Override any GCC internal prototype to avoid an error.
12627 Use char because int might match the return type of a GCC
12628 builtin and then its argument prototype would still apply. */
12629#ifdef __cplusplus
12630extern "C"
12631#endif
12632char clock_settime ();
12633int
12634main ()
12635{
12636return clock_settime ();
12637 ;
12638 return 0;
12639}
12640_ACEOF
12641if ac_fn_c_try_link "$LINENO"; then :
12642 ac_cv_lib_rt_clock_settime=yes
12643else
12644 ac_cv_lib_rt_clock_settime=no
12645fi
12646rm -f core conftest.err conftest.$ac_objext \
12647 conftest$ac_exeext conftest.$ac_ext
12648LIBS=$ac_check_lib_save_LIBS
12649fi
12650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12651$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12652if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12653
12654 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12655
12656
12657fi
12658
12659
12660fi
12661done
12662
12663
Matthias Kloseb9621712010-04-24 17:59:49 +000012664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12665$as_echo_n "checking for major... " >&6; }
12666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012667/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012668
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012669#if defined(MAJOR_IN_MKDEV)
12670#include <sys/mkdev.h>
12671#elif defined(MAJOR_IN_SYSMACROS)
12672#include <sys/sysmacros.h>
12673#else
12674#include <sys/types.h>
12675#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012676
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012677int
12678main ()
12679{
12680
12681 makedev(major(0),minor(0));
12682
12683 ;
12684 return 0;
12685}
12686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012687if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012688
12689
Matthias Kloseb9621712010-04-24 17:59:49 +000012690$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012691
Matthias Kloseb9621712010-04-24 17:59:49 +000012692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12693$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012694
12695else
Skip Montanaro6dead952003-09-25 14:50:04 +000012696
Matthias Kloseb9621712010-04-24 17:59:49 +000012697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12698$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012699
12700fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012701rm -f core conftest.err conftest.$ac_objext \
12702 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012703
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012704# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12705# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12707$as_echo_n "checking for if_nameindex... " >&6; }
12708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12709/* end confdefs.h. */
12710
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012711#include <stdio.h>
12712#ifdef STDC_HEADERS
12713# include <stdlib.h>
12714# include <stddef.h>
12715#else
12716# ifdef HAVE_STDLIB_H
12717# include <stdlib.h>
12718# endif
12719#endif
12720#ifdef HAVE_SYS_SOCKET_H
12721# include <sys/socket.h>
12722#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012723#ifdef HAVE_NET_IF_H
12724# include <net/if.h>
12725#endif
12726
12727int
12728main ()
12729{
12730struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12731 ;
12732 return 0;
12733}
12734_ACEOF
12735if ac_fn_c_try_link "$LINENO"; then :
12736
12737$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12738
12739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12740$as_echo "yes" >&6; }
12741else
12742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12743$as_echo "no" >&6; }
12744
12745fi
12746rm -f core conftest.err conftest.$ac_objext \
12747 conftest$ac_exeext conftest.$ac_ext
12748
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012749# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12750# macro is not defined in android-ndk-r13.
12751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12752$as_echo_n "checking for lockf... " >&6; }
12753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12754/* end confdefs.h. */
12755#include <unistd.h>
12756int
12757main ()
12758{
12759lockf(0, F_LOCK, 0);
12760 ;
12761 return 0;
12762}
12763_ACEOF
12764if ac_fn_c_try_link "$LINENO"; then :
12765
12766$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12767
12768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12769$as_echo "yes" >&6; }
12770else
12771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12772$as_echo "no" >&6; }
12773
12774fi
12775rm -f core conftest.err conftest.$ac_objext \
12776 conftest$ac_exeext conftest.$ac_ext
12777
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012778# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012779# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12781$as_echo_n "checking for getaddrinfo... " >&6; }
12782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012783/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012784
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012785#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012786#include <sys/socket.h>
12787#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012788#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012789
Martin v. Löwis11437992002-04-12 09:54:03 +000012790int
12791main ()
12792{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012793getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012794 ;
12795 return 0;
12796}
12797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012798if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012799 have_getaddrinfo=yes
12800else
Matthias Kloseb9621712010-04-24 17:59:49 +000012801 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012802fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012803rm -f core conftest.err conftest.$ac_objext \
12804 conftest$ac_exeext conftest.$ac_ext
12805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12806$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012807if test $have_getaddrinfo = yes
12808then
Matthias Kloseb9621712010-04-24 17:59:49 +000012809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12810$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012811 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012812 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012813else
Matthias Kloseb9621712010-04-24 17:59:49 +000012814 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012815
12816if test "${enable_ipv6+set}" = set; then
12817 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12818else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012819 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012820fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012821else
Matthias Kloseb9621712010-04-24 17:59:49 +000012822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012823/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012824
Stefan Krah19c21392012-11-22 23:47:32 +010012825#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012826#include <sys/types.h>
12827#include <netdb.h>
12828#include <string.h>
12829#include <sys/socket.h>
12830#include <netinet/in.h>
12831
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012832int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012833{
12834 int passive, gaierr, inet4 = 0, inet6 = 0;
12835 struct addrinfo hints, *ai, *aitop;
12836 char straddr[INET6_ADDRSTRLEN], strport[16];
12837
12838 for (passive = 0; passive <= 1; passive++) {
12839 memset(&hints, 0, sizeof(hints));
12840 hints.ai_family = AF_UNSPEC;
12841 hints.ai_flags = passive ? AI_PASSIVE : 0;
12842 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012843 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012844 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12845 (void)gai_strerror(gaierr);
12846 goto bad;
12847 }
12848 for (ai = aitop; ai; ai = ai->ai_next) {
12849 if (ai->ai_addr == NULL ||
12850 ai->ai_addrlen == 0 ||
12851 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12852 straddr, sizeof(straddr), strport, sizeof(strport),
12853 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12854 goto bad;
12855 }
12856 switch (ai->ai_family) {
12857 case AF_INET:
12858 if (strcmp(strport, "54321") != 0) {
12859 goto bad;
12860 }
12861 if (passive) {
12862 if (strcmp(straddr, "0.0.0.0") != 0) {
12863 goto bad;
12864 }
12865 } else {
12866 if (strcmp(straddr, "127.0.0.1") != 0) {
12867 goto bad;
12868 }
12869 }
12870 inet4++;
12871 break;
12872 case AF_INET6:
12873 if (strcmp(strport, "54321") != 0) {
12874 goto bad;
12875 }
12876 if (passive) {
12877 if (strcmp(straddr, "::") != 0) {
12878 goto bad;
12879 }
12880 } else {
12881 if (strcmp(straddr, "::1") != 0) {
12882 goto bad;
12883 }
12884 }
12885 inet6++;
12886 break;
12887 case AF_UNSPEC:
12888 goto bad;
12889 break;
12890 default:
12891 /* another family support? */
12892 break;
12893 }
12894 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012895 freeaddrinfo(aitop);
12896 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012897 }
12898
12899 if (!(inet4 == 0 || inet4 == 2))
12900 goto bad;
12901 if (!(inet6 == 0 || inet6 == 2))
12902 goto bad;
12903
12904 if (aitop)
12905 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012906 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012907
12908 bad:
12909 if (aitop)
12910 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012911 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012912}
12913
Martin v. Löwis11437992002-04-12 09:54:03 +000012914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012915if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012916 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012917else
Matthias Kloseb9621712010-04-24 17:59:49 +000012918 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012919fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12921 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012923
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012924fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012925
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012927
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12929$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12930
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012931if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012932then
12933 if test $ipv6 = yes
12934 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012935 echo 'Fatal: You must get working getaddrinfo() function.'
12936 echo ' or you can specify "--disable-ipv6"'.
12937 exit 1
12938 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012939else
Martin v. Löwis11437992002-04-12 09:54:03 +000012940
Matthias Kloseb9621712010-04-24 17:59:49 +000012941$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012942
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012943fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012944
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012945for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012946do :
12947 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012948if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012949 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012950#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012951_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012952
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012953fi
12954done
12955
Michael W. Hudson54241132001-12-07 15:38:26 +000012956
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012957# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12959$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012960if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012961 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012962else
Matthias Kloseb9621712010-04-24 17:59:49 +000012963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012964/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012965#include <sys/types.h>
12966#include <sys/time.h>
12967#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012968
Martin v. Löwis11437992002-04-12 09:54:03 +000012969int
12970main ()
12971{
12972if ((struct tm *) 0)
12973return 0;
12974 ;
12975 return 0;
12976}
12977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012978if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012979 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012980else
Matthias Kloseb9621712010-04-24 17:59:49 +000012981 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012984fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12986$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012987if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012988
Matthias Kloseb9621712010-04-24 17:59:49 +000012989$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012990
12991fi
12992
Matthias Kloseb9621712010-04-24 17:59:49 +000012993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12994$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012995if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012996 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012997else
Matthias Kloseb9621712010-04-24 17:59:49 +000012998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012999/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013000#include <sys/types.h>
13001#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013002
Martin v. Löwis11437992002-04-12 09:54:03 +000013003int
13004main ()
13005{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013006struct tm tm;
13007 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013008 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013009 ;
13010 return 0;
13011}
13012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013013if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013014 ac_cv_struct_tm=time.h
13015else
Matthias Kloseb9621712010-04-24 17:59:49 +000013016 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13021$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013022if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013023
Matthias Kloseb9621712010-04-24 17:59:49 +000013024$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013025
13026fi
13027
Matthias Kloseb9621712010-04-24 17:59:49 +000013028ac_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 +000013029#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013030
Matthias Kloseb9621712010-04-24 17:59:49 +000013031"
Victor Stinnere0be4232011-10-25 13:06:09 +020013032if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013033
13034cat >>confdefs.h <<_ACEOF
13035#define HAVE_STRUCT_TM_TM_ZONE 1
13036_ACEOF
13037
13038
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013039fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013040
Martin v. Löwis11437992002-04-12 09:54:03 +000013041if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13042
Matthias Kloseb9621712010-04-24 17:59:49 +000013043$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013044
13045else
Matthias Kloseb9621712010-04-24 17:59:49 +000013046 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13047"
Victor Stinnere0be4232011-10-25 13:06:09 +020013048if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013049 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013050else
Matthias Kloseb9621712010-04-24 17:59:49 +000013051 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013052fi
13053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013054cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013055#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013056_ACEOF
13057
Matthias Kloseb9621712010-04-24 17:59:49 +000013058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13059$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013060if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013061 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013062else
Matthias Kloseb9621712010-04-24 17:59:49 +000013063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013064/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013065#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013066#if !HAVE_DECL_TZNAME
13067extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013068#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013069
Martin v. Löwis11437992002-04-12 09:54:03 +000013070int
13071main ()
13072{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013073return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013074 ;
13075 return 0;
13076}
13077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013078if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013079 ac_cv_var_tzname=yes
13080else
Matthias Kloseb9621712010-04-24 17:59:49 +000013081 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013083rm -f core conftest.err conftest.$ac_objext \
13084 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13087$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013088 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013089
Matthias Kloseb9621712010-04-24 17:59:49 +000013090$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013091
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013092 fi
13093fi
13094
Matthias Kloseb9621712010-04-24 17:59:49 +000013095ac_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 +020013096if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013097
13098cat >>confdefs.h <<_ACEOF
13099#define HAVE_STRUCT_STAT_ST_RDEV 1
13100_ACEOF
13101
13102
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013103fi
13104
Matthias Kloseb9621712010-04-24 17:59:49 +000013105ac_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 +020013106if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013107
Martin v. Löwis11437992002-04-12 09:54:03 +000013108cat >>confdefs.h <<_ACEOF
13109#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13110_ACEOF
13111
13112
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013113fi
13114
Matthias Kloseb9621712010-04-24 17:59:49 +000013115ac_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 +020013116if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013117
13118cat >>confdefs.h <<_ACEOF
13119#define HAVE_STRUCT_STAT_ST_FLAGS 1
13120_ACEOF
13121
13122
13123fi
13124
Matthias Kloseb9621712010-04-24 17:59:49 +000013125ac_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 +020013126if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013127
13128cat >>confdefs.h <<_ACEOF
13129#define HAVE_STRUCT_STAT_ST_GEN 1
13130_ACEOF
13131
13132
13133fi
13134
Matthias Kloseb9621712010-04-24 17:59:49 +000013135ac_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 +020013136if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013137
13138cat >>confdefs.h <<_ACEOF
13139#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13140_ACEOF
13141
13142
13143fi
13144
Matthias Kloseb9621712010-04-24 17:59:49 +000013145ac_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 +020013146if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013147
Martin v. Löwis11437992002-04-12 09:54:03 +000013148cat >>confdefs.h <<_ACEOF
13149#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13150_ACEOF
13151
13152
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013153fi
13154
Stefan Krah267b6392016-04-26 01:09:18 +020013155ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13156 #include <sys/types.h>
13157 #include <pwd.h>
13158
13159"
13160if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13161
13162cat >>confdefs.h <<_ACEOF
13163#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13164_ACEOF
13165
13166
13167fi
13168ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13169 #include <sys/types.h>
13170 #include <pwd.h>
13171
13172"
13173if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13174
13175cat >>confdefs.h <<_ACEOF
13176#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13177_ACEOF
13178
13179
13180fi
13181
Zachary Ware6a6967e2016-10-01 00:47:27 -050013182# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13183ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13184"
13185if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13186
13187cat >>confdefs.h <<_ACEOF
13188#define HAVE_SIGINFO_T_SI_BAND 1
13189_ACEOF
13190
13191
13192fi
13193
Michael W. Hudson54241132001-12-07 15:38:26 +000013194
Matthias Kloseb9621712010-04-24 17:59:49 +000013195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13196$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013197if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013198 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013199else
Matthias Kloseb159a552010-04-25 21:00:44 +000013200
Matthias Kloseb9621712010-04-24 17:59:49 +000013201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013202/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013203#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013204int
13205main ()
13206{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013207return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013208 ;
13209 return 0;
13210}
13211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013212if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013213 ac_cv_header_time_altzone=yes
13214else
Matthias Kloseb9621712010-04-24 17:59:49 +000013215 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013219fi
13220
Matthias Kloseb9621712010-04-24 17:59:49 +000013221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13222$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013223if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013224
Matthias Kloseb9621712010-04-24 17:59:49 +000013225$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013226
13227fi
13228
Guido van Rossumda88dad1995-01-26 00:46:29 +000013229was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13231$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&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 +000013234
13235#include <sys/types.h>
13236#include <sys/select.h>
13237#include <sys/time.h>
13238
Martin v. Löwis11437992002-04-12 09:54:03 +000013239int
13240main ()
13241{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013242;
Martin v. Löwis11437992002-04-12 09:54:03 +000013243 ;
13244 return 0;
13245}
13246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013247if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013248
13249
Matthias Kloseb9621712010-04-24 17:59:49 +000013250$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013251
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013252 was_it_defined=yes
13253
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13257$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013258
Matthias Kloseb9621712010-04-24 17:59:49 +000013259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13260$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013261if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013262 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013263else
Matthias Kloseb9621712010-04-24 17:59:49 +000013264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013265/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013266#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013267int
13268main ()
13269{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013270struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013271 ;
13272 return 0;
13273}
13274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013275if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013276 ac_cv_struct_addrinfo=yes
13277else
Matthias Kloseb9621712010-04-24 17:59:49 +000013278 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13281fi
13282
Matthias Kloseb9621712010-04-24 17:59:49 +000013283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13284$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013285if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013286
Matthias Kloseb9621712010-04-24 17:59:49 +000013287$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013288
13289fi
13290
Matthias Kloseb9621712010-04-24 17:59:49 +000013291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13292$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013293if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013294 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013295else
Matthias Kloseb9621712010-04-24 17:59:49 +000013296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013297/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013298
13299# include <sys/types.h>
13300# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013301int
13302main ()
13303{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013304struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013305 ;
13306 return 0;
13307}
13308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013309if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013310 ac_cv_struct_sockaddr_storage=yes
13311else
Matthias Kloseb9621712010-04-24 17:59:49 +000013312 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13315fi
13316
Matthias Kloseb9621712010-04-24 17:59:49 +000013317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13318$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013319if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013320
Matthias Kloseb9621712010-04-24 17:59:49 +000013321$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013322
13323fi
13324
Christian Heimesdffa3942016-09-05 23:54:41 +020013325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13326$as_echo_n "checking for sockaddr_alg... " >&6; }
13327if ${ac_cv_struct_sockaddr_alg+:} false; then :
13328 $as_echo_n "(cached) " >&6
13329else
13330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13331/* end confdefs.h. */
13332
13333# include <sys/types.h>
13334# include <sys/socket.h>
13335# include <linux/if_alg.h>
13336int
13337main ()
13338{
13339struct sockaddr_alg s
13340 ;
13341 return 0;
13342}
13343_ACEOF
13344if ac_fn_c_try_compile "$LINENO"; then :
13345 ac_cv_struct_sockaddr_alg=yes
13346else
13347 ac_cv_struct_sockaddr_alg=no
13348fi
13349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13350fi
13351
13352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13353$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13354if test $ac_cv_struct_sockaddr_alg = yes; then
13355
13356$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13357
13358fi
13359
Guido van Rossum627b2d71993-12-24 10:39:16 +000013360# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013361
Matthias Kloseb9621712010-04-24 17:59:49 +000013362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13363$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013364if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013365 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013366else
Matthias Kloseb9621712010-04-24 17:59:49 +000013367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013369$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013370int
13371main ()
13372{
13373static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013374test_array [0] = 0;
13375return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013376
13377 ;
13378 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013379}
Martin v. Löwis11437992002-04-12 09:54:03 +000013380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013381if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013382 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013383else
Matthias Kloseb9621712010-04-24 17:59:49 +000013384 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013387fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13389$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013390if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013391 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013392
13393fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013394
Matthias Kloseb9621712010-04-24 17:59:49 +000013395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13396$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013397if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013398 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013399else
Matthias Kloseb9621712010-04-24 17:59:49 +000013400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013401/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013402
Martin v. Löwis11437992002-04-12 09:54:03 +000013403int
13404main ()
13405{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013406
Martin v. Löwis11437992002-04-12 09:54:03 +000013407#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013408 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013409 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013410 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013411 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013412 char const *const *pcpcc;
13413 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013414 /* NEC SVR4.0.2 mips cc rejects this. */
13415 struct point {int x, y;};
13416 static struct point const zero = {0,0};
13417 /* AIX XL C 1.02.0.0 rejects this.
13418 It does not let you subtract one const X* pointer from another in
13419 an arm of an if-expression whose if-part is not a constant
13420 expression */
13421 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013422 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013423 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013424 ++pcpcc;
13425 ppc = (char**) pcpcc;
13426 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013427 { /* SCO 3.2v4 cc rejects this sort of thing. */
13428 char tx;
13429 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013430 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013431
Martin v. Löwis11437992002-04-12 09:54:03 +000013432 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013433 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013434 }
13435 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13436 int x[] = {25, 17};
13437 const int *foo = &x[0];
13438 ++foo;
13439 }
13440 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13441 typedef const int *iptr;
13442 iptr p = 0;
13443 ++p;
13444 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013445 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013446 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013447 struct s { int j; const int *ap[3]; } bx;
13448 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013449 }
13450 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13451 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013452 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013453 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013454 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013455#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013456
Martin v. Löwis11437992002-04-12 09:54:03 +000013457 ;
13458 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013459}
Martin v. Löwis11437992002-04-12 09:54:03 +000013460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013461if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013462 ac_cv_c_const=yes
13463else
Matthias Kloseb9621712010-04-24 17:59:49 +000013464 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13469$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013470if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013471
Matthias Kloseb9621712010-04-24 17:59:49 +000013472$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013473
13474fi
13475
Michael W. Hudson54241132001-12-07 15:38:26 +000013476
Guido van Rossumda88dad1995-01-26 00:46:29 +000013477works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13479$as_echo_n "checking for working signed char... " >&6; }
13480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013481/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013482
Martin v. Löwis11437992002-04-12 09:54:03 +000013483int
13484main ()
13485{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013486signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013487 ;
13488 return 0;
13489}
13490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013491if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013492 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013493else
Skip Montanaro6dead952003-09-25 14:50:04 +000013494
Matthias Kloseb9621712010-04-24 17:59:49 +000013495$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013496
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013497
Guido van Rossum7f43da71994-08-01 12:15:30 +000013498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13501$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013502
Guido van Rossumda88dad1995-01-26 00:46:29 +000013503have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13505$as_echo_n "checking for prototypes... " >&6; }
13506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013507/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013508int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013509int
13510main ()
13511{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013512return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013513 ;
13514 return 0;
13515}
13516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013517if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013518
Matthias Kloseb9621712010-04-24 17:59:49 +000013519$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013520
Matthias Kloseb159a552010-04-25 21:00:44 +000013521 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13525$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013526
Guido van Rossumda88dad1995-01-26 00:46:29 +000013527works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13529$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013531/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013532
13533#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013534int foo(int x, ...) {
13535 va_list va;
13536 va_start(va, x);
13537 va_arg(va, int);
13538 va_arg(va, char *);
13539 va_arg(va, double);
13540 return 0;
13541}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013542
Martin v. Löwis11437992002-04-12 09:54:03 +000013543int
13544main ()
13545{
Guido van Rossum90eea071996-08-30 20:58:57 +000013546return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013547 ;
13548 return 0;
13549}
13550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013551if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013552
13553
Matthias Kloseb9621712010-04-24 17:59:49 +000013554$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013555
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013556 works=yes
13557
Guido van Rossum627b2d71993-12-24 10:39:16 +000013558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13561$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013562
Martin v. Löwisd6320502004-08-12 13:45:08 +000013563# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13565$as_echo_n "checking for socketpair... " >&6; }
13566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013567/* end confdefs.h. */
13568
13569#include <sys/types.h>
13570#include <sys/socket.h>
13571
13572int
13573main ()
13574{
13575void *x=socketpair
13576 ;
13577 return 0;
13578}
13579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013580if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013581
Matthias Kloseb9621712010-04-24 17:59:49 +000013582$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013583
Matthias Kloseb159a552010-04-25 21:00:44 +000013584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013585$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013586else
Matthias Kloseb9621712010-04-24 17:59:49 +000013587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13588$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013589
13590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013592
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013593# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13595$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013597/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013598#include <sys/types.h>
13599#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013600int
13601main ()
13602{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013603struct sockaddr x;
13604x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013605 ;
13606 return 0;
13607}
13608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013609if ac_fn_c_try_compile "$LINENO"; then :
13610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13611$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013612
Matthias Kloseb9621712010-04-24 17:59:49 +000013613$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013614
13615else
Matthias Kloseb9621712010-04-24 17:59:49 +000013616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13617$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013618
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013621
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013622# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013623
13624
Matthias Kloseb9621712010-04-24 17:59:49 +000013625ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013626if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013627
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013629
Matthias Kloseb9621712010-04-24 17:59:49 +000013630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13631$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013632 OLD_CFLAGS=$CFLAGS
13633 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013635/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013636
13637# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013638
Martin v. Löwis11437992002-04-12 09:54:03 +000013639int
13640main ()
13641{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013642
13643 char *name;
13644 struct hostent *he, *res;
13645 char buffer[2048];
13646 int buflen = 2048;
13647 int h_errnop;
13648
13649 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013650
13651 ;
13652 return 0;
13653}
13654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013655if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013656
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013658
Martin v. Löwis11437992002-04-12 09:54:03 +000013659
Matthias Kloseb9621712010-04-24 17:59:49 +000013660$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013661
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13663$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013664
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013665else
Skip Montanaro6dead952003-09-25 14:50:04 +000013666
Matthias Kloseb9621712010-04-24 17:59:49 +000013667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13668$as_echo "no" >&6; }
13669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13670$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013672/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013673
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013674# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013675
Martin v. Löwis11437992002-04-12 09:54:03 +000013676int
13677main ()
13678{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013679
13680 char *name;
13681 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013682 char buffer[2048];
13683 int buflen = 2048;
13684 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013685
Matthias Kloseb159a552010-04-25 21:00:44 +000013686 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013687
13688 ;
13689 return 0;
13690}
13691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013692if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013693
Matthias Kloseb9621712010-04-24 17:59:49 +000013694 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013695
Martin v. Löwis11437992002-04-12 09:54:03 +000013696
Matthias Kloseb159a552010-04-25 21:00:44 +000013697$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013698
Matthias Kloseb9621712010-04-24 17:59:49 +000013699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13700$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013701
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013702else
Skip Montanaro6dead952003-09-25 14:50:04 +000013703
Matthias Kloseb9621712010-04-24 17:59:49 +000013704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13705$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13707$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13709/* end confdefs.h. */
13710
13711# include <netdb.h>
13712
13713int
13714main ()
13715{
13716
13717 char *name;
13718 struct hostent *he;
13719 struct hostent_data data;
13720
13721 (void) gethostbyname_r(name, he, &data);
13722
13723 ;
13724 return 0;
13725}
13726_ACEOF
13727if ac_fn_c_try_compile "$LINENO"; then :
13728
13729 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13730
13731
13732$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13733
13734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13735$as_echo "yes" >&6; }
13736
13737else
13738
13739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13740$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013741
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013742fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013744
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013747
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013750 CFLAGS=$OLD_CFLAGS
13751
13752else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013753
Matthias Kloseb9621712010-04-24 17:59:49 +000013754 for ac_func in gethostbyname
13755do :
13756 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013757if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013758 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013759#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013760_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013761
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013762fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013763done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013764
Michael W. Hudson54241132001-12-07 15:38:26 +000013765
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013766fi
13767
Michael W. Hudson54241132001-12-07 15:38:26 +000013768
13769
13770
13771
13772
13773
Guido van Rossum627b2d71993-12-24 10:39:16 +000013774# checks for system services
13775# (none yet)
13776
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013777# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013778ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013779if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013780
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013781else
Matthias Kloseb9621712010-04-24 17:59:49 +000013782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13783$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013784if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013785 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013786else
Martin v. Löwis11437992002-04-12 09:54:03 +000013787 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013788LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013792/* Override any GCC internal prototype to avoid an error.
13793 Use char because int might match the return type of a GCC
13794 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013795#ifdef __cplusplus
13796extern "C"
13797#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013798char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013799int
13800main ()
13801{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013802return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013803 ;
13804 return 0;
13805}
13806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013807if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013808 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013809else
Matthias Kloseb9621712010-04-24 17:59:49 +000013810 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013812rm -f core conftest.err conftest.$ac_objext \
13813 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013814LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13817$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013818if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013819 cat >>confdefs.h <<_ACEOF
13820#define HAVE_LIBIEEE 1
13821_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013822
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013823 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013824
Guido van Rossum627b2d71993-12-24 10:39:16 +000013825fi
13826
Michael W. Hudson54241132001-12-07 15:38:26 +000013827
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013828fi
13829
Michael W. Hudson54241132001-12-07 15:38:26 +000013830
Guido van Rossum7f253911997-05-09 02:42:48 +000013831# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13833$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013834
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013835# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013836if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013838if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013839then
13840
Matthias Kloseb9621712010-04-24 17:59:49 +000013841$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013842
Matthias Kloseb9621712010-04-24 17:59:49 +000013843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13844$as_echo "yes" >&6; }
13845else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13846$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013847fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013848else
Matthias Kloseb9621712010-04-24 17:59:49 +000013849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13850$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013851fi
13852
Guido van Rossum7f253911997-05-09 02:42:48 +000013853
Guido van Rossum7f43da71994-08-01 12:15:30 +000013854# check for --with-libm=...
13855
Guido van Rossum563e7081996-09-10 18:20:48 +000013856case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013857Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013858*) LIBM=-lm
13859esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13861$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013863# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013864if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013865 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013866if test "$withval" = no
13867then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13869$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013870elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013871then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13873$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013874else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013875fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013876else
Matthias Kloseb9621712010-04-24 17:59:49 +000013877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13878$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013879fi
13880
Guido van Rossum7f43da71994-08-01 12:15:30 +000013881
13882# check for --with-libc=...
13883
Matthias Kloseb9621712010-04-24 17:59:49 +000013884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13885$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013886
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013887# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013888if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013889 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013890if test "$withval" = no
13891then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13893$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013894elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013895then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13897$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013898else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013899fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013900else
Matthias Kloseb9621712010-04-24 17:59:49 +000013901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13902$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013903fi
13904
Guido van Rossum7f43da71994-08-01 12:15:30 +000013905
Stefan Krah1919b7e2012-03-21 18:25:23 +010013906# **************************************
13907# * Check for gcc x64 inline assembler *
13908# **************************************
13909
13910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13911$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13913/* end confdefs.h. */
13914
13915int
13916main ()
13917{
13918
13919 __asm__ __volatile__ ("movq %rcx, %rax");
13920
13921 ;
13922 return 0;
13923}
13924_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013925if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013926 have_gcc_asm_for_x64=yes
13927else
13928 have_gcc_asm_for_x64=no
13929fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013930rm -f core conftest.err conftest.$ac_objext \
13931 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13933$as_echo "$have_gcc_asm_for_x64" >&6; }
13934if test "$have_gcc_asm_for_x64" = yes
13935then
13936
13937$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13938
13939fi
13940
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013941# **************************************************
13942# * Check for various properties of floating point *
13943# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013944
Matthias Kloseb9621712010-04-24 17:59:49 +000013945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13946$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013947if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013948 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013949else
13950
Matthias Kloseb9621712010-04-24 17:59:49 +000013951if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013952 ac_cv_little_endian_double=no
13953else
Matthias Kloseb9621712010-04-24 17:59:49 +000013954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013955/* end confdefs.h. */
13956
13957#include <string.h>
13958int main() {
13959 double x = 9006104071832581.0;
13960 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13961 return 0;
13962 else
13963 return 1;
13964}
13965
13966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013967if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013968 ac_cv_little_endian_double=yes
13969else
Matthias Kloseb9621712010-04-24 17:59:49 +000013970 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013972rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13973 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013974fi
13975
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013976fi
13977
Matthias Kloseb9621712010-04-24 17:59:49 +000013978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13979$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013980if test "$ac_cv_little_endian_double" = yes
13981then
13982
Matthias Kloseb9621712010-04-24 17:59:49 +000013983$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013984
13985fi
13986
Matthias Kloseb9621712010-04-24 17:59:49 +000013987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13988$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013989if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013990 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013991else
13992
Matthias Kloseb9621712010-04-24 17:59:49 +000013993if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013994 ac_cv_big_endian_double=no
13995else
Matthias Kloseb9621712010-04-24 17:59:49 +000013996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013997/* end confdefs.h. */
13998
13999#include <string.h>
14000int main() {
14001 double x = 9006104071832581.0;
14002 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
14003 return 0;
14004 else
14005 return 1;
14006}
14007
14008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014009if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014010 ac_cv_big_endian_double=yes
14011else
Matthias Kloseb9621712010-04-24 17:59:49 +000014012 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014014rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14015 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014016fi
14017
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014018fi
14019
Matthias Kloseb9621712010-04-24 17:59:49 +000014020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
14021$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014022if test "$ac_cv_big_endian_double" = yes
14023then
14024
Matthias Kloseb9621712010-04-24 17:59:49 +000014025$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014026
14027fi
14028
14029# Some ARM platforms use a mixed-endian representation for doubles.
14030# While Python doesn't currently have full support for these platforms
14031# (see e.g., issue 1762561), we can at least make sure that float <-> string
14032# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14034$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014035if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014036 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014037else
14038
Matthias Kloseb9621712010-04-24 17:59:49 +000014039if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014040 ac_cv_mixed_endian_double=no
14041else
Matthias Kloseb9621712010-04-24 17:59:49 +000014042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014043/* end confdefs.h. */
14044
14045#include <string.h>
14046int main() {
14047 double x = 9006104071832581.0;
14048 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14049 return 0;
14050 else
14051 return 1;
14052}
14053
14054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014055if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014056 ac_cv_mixed_endian_double=yes
14057else
Matthias Kloseb9621712010-04-24 17:59:49 +000014058 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014059fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014060rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14061 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014062fi
14063
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014064fi
14065
Matthias Kloseb9621712010-04-24 17:59:49 +000014066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14067$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014068if test "$ac_cv_mixed_endian_double" = yes
14069then
14070
Matthias Kloseb9621712010-04-24 17:59:49 +000014071$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014072
14073fi
14074
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014075# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014076# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014077# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014078# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014079# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014080# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014081
14082# This inline assembler syntax may also work for suncc and icc,
14083# so we try it on all platforms.
14084
Matthias Kloseb9621712010-04-24 17:59:49 +000014085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14086$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014088/* end confdefs.h. */
14089
14090int
14091main ()
14092{
14093
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014094 unsigned short cw;
14095 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14096 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014097
14098 ;
14099 return 0;
14100}
14101_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014102if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014103 have_gcc_asm_for_x87=yes
14104else
Matthias Kloseb9621712010-04-24 17:59:49 +000014105 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014106fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014107rm -f core conftest.err conftest.$ac_objext \
14108 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14110$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014111if test "$have_gcc_asm_for_x87" = yes
14112then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014113
Matthias Kloseb9621712010-04-24 17:59:49 +000014114$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014115
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014116fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014117
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14119$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14121/* end confdefs.h. */
14122
14123int
14124main ()
14125{
14126
14127 unsigned int fpcr;
14128 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14129 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14130
14131 ;
14132 return 0;
14133}
14134_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014135if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014136 have_gcc_asm_for_mc68881=yes
14137else
14138 have_gcc_asm_for_mc68881=no
14139fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014140rm -f core conftest.err conftest.$ac_objext \
14141 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14143$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14144if test "$have_gcc_asm_for_mc68881" = yes
14145then
14146
14147$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14148
14149fi
14150
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014151# Detect whether system arithmetic is subject to x87-style double
14152# rounding issues. The result of this test has little meaning on non
14153# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14154# mode is round-to-nearest and double rounding issues are present, and
14155# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14157$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014158# $BASECFLAGS may affect the result
14159ac_save_cc="$CC"
14160CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014161if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014162 ac_cv_x87_double_rounding=no
14163else
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014165/* end confdefs.h. */
14166
14167#include <stdlib.h>
14168#include <math.h>
14169int main() {
14170 volatile double x, y, z;
14171 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14172 x = 0.99999999999999989; /* 1-2**-53 */
14173 y = 1./x;
14174 if (y != 1.)
14175 exit(0);
14176 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14177 x = 1e16;
14178 y = 2.99999;
14179 z = x + y;
14180 if (z != 1e16+4.)
14181 exit(0);
14182 /* both tests show evidence of double rounding */
14183 exit(1);
14184}
14185
14186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014187if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014188 ac_cv_x87_double_rounding=no
14189else
Matthias Kloseb9621712010-04-24 17:59:49 +000014190 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014192rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14193 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014194fi
14195
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014196CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14198$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014199if test "$ac_cv_x87_double_rounding" = yes
14200then
14201
Matthias Kloseb9621712010-04-24 17:59:49 +000014202$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014203
14204fi
14205
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014206# ************************************
14207# * Check for mathematical functions *
14208# ************************************
14209
14210LIBS_SAVE=$LIBS
14211LIBS="$LIBS $LIBM"
14212
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014213for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14214do :
14215 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14216ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014217if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014218 cat >>confdefs.h <<_ACEOF
14219#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14220_ACEOF
14221
14222fi
14223done
14224
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014225for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014226do :
14227 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14228ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014229if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014230 cat >>confdefs.h <<_ACEOF
14231#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14232_ACEOF
14233
14234fi
14235done
14236
14237ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14238"
Victor Stinnere0be4232011-10-25 13:06:09 +020014239if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014240 ac_have_decl=1
14241else
14242 ac_have_decl=0
14243fi
14244
14245cat >>confdefs.h <<_ACEOF
14246#define HAVE_DECL_ISINF $ac_have_decl
14247_ACEOF
14248ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14249"
Victor Stinnere0be4232011-10-25 13:06:09 +020014250if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014251 ac_have_decl=1
14252else
14253 ac_have_decl=0
14254fi
14255
14256cat >>confdefs.h <<_ACEOF
14257#define HAVE_DECL_ISNAN $ac_have_decl
14258_ACEOF
14259ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14260"
Victor Stinnere0be4232011-10-25 13:06:09 +020014261if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014262 ac_have_decl=1
14263else
14264 ac_have_decl=0
14265fi
14266
14267cat >>confdefs.h <<_ACEOF
14268#define HAVE_DECL_ISFINITE $ac_have_decl
14269_ACEOF
14270
14271
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014272# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14273# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14275$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014276if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014277 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014278else
14279
Matthias Kloseb9621712010-04-24 17:59:49 +000014280if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014281 ac_cv_tanh_preserves_zero_sign=no
14282else
Matthias Kloseb9621712010-04-24 17:59:49 +000014283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014284/* end confdefs.h. */
14285
14286#include <math.h>
14287#include <stdlib.h>
14288int main() {
14289 /* return 0 if either negative zeros don't exist
14290 on this platform or if negative zeros exist
14291 and tanh(-0.) == -0. */
14292 if (atan2(0., -1.) == atan2(-0., -1.) ||
14293 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14294 else exit(1);
14295}
14296
14297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014298if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014299 ac_cv_tanh_preserves_zero_sign=yes
14300else
Matthias Kloseb9621712010-04-24 17:59:49 +000014301 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014302fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014303rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14304 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014305fi
14306
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014307fi
14308
Matthias Kloseb9621712010-04-24 17:59:49 +000014309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14310$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014311if test "$ac_cv_tanh_preserves_zero_sign" = yes
14312then
14313
Matthias Kloseb9621712010-04-24 17:59:49 +000014314$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014315
14316fi
14317
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014318if test "$ac_cv_func_log1p" = yes
14319then
14320 # On some versions of AIX, log1p(-0.) returns 0. instead of
14321 # -0. See issue #9920.
14322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14323$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014324 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014325 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014326else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014327
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014328 if test "$cross_compiling" = yes; then :
14329 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014330else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14332/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014333
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014334 #include <math.h>
14335 #include <stdlib.h>
14336 int main() {
14337 /* Fail if the signs of log1p(-0.) and -0. can be
14338 distinguished. */
14339 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14340 return 0;
14341 else
14342 return 1;
14343 }
14344
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014345_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014346if ac_fn_c_try_run "$LINENO"; then :
14347 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014348else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014349 ac_cv_log1p_drops_zero_sign=yes
14350fi
14351rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14352 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014353fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014354
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014355fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014356
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14358$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14359fi
14360if test "$ac_cv_log1p_drops_zero_sign" = yes
14361then
14362
14363$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14364
14365fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014366
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014367LIBS=$LIBS_SAVE
14368
Mark Dickinsona614f042009-11-28 12:48:43 +000014369# For multiprocessing module, check that sem_open
14370# actually works. For FreeBSD versions <= 7.2,
14371# the kernel module that provides POSIX semaphores
14372# isn't loaded by default, so an attempt to call
14373# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14375$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014376if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014377 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014378else
Matthias Kloseb9621712010-04-24 17:59:49 +000014379 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014380 ac_cv_posix_semaphores_enabled=yes
14381else
Matthias Kloseb9621712010-04-24 17:59:49 +000014382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014383/* end confdefs.h. */
14384
14385#include <unistd.h>
14386#include <fcntl.h>
14387#include <stdio.h>
14388#include <semaphore.h>
14389#include <sys/stat.h>
14390
14391int main(void) {
14392 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14393 if (a == SEM_FAILED) {
14394 perror("sem_open");
14395 return 1;
14396 }
14397 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014398 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014399 return 0;
14400}
14401
14402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014403if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014404 ac_cv_posix_semaphores_enabled=yes
14405else
Matthias Kloseb9621712010-04-24 17:59:49 +000014406 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014407fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014408rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14409 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014410fi
14411
14412
Mark Dickinsona614f042009-11-28 12:48:43 +000014413fi
14414
Matthias Kloseb9621712010-04-24 17:59:49 +000014415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14416$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014417if test $ac_cv_posix_semaphores_enabled = no
14418then
14419
Matthias Kloseb9621712010-04-24 17:59:49 +000014420$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014421
14422fi
14423
Mark Dickinson10683072009-04-18 21:18:19 +000014424# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14426$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014427if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014428 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014429else
Matthias Kloseb9621712010-04-24 17:59:49 +000014430 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014431 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014432else
Matthias Kloseb9621712010-04-24 17:59:49 +000014433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014434/* end confdefs.h. */
14435
14436#include <unistd.h>
14437#include <fcntl.h>
14438#include <stdio.h>
14439#include <semaphore.h>
14440#include <sys/stat.h>
14441
14442int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014443 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014444 int count;
14445 int res;
14446 if(a==SEM_FAILED){
14447 perror("sem_open");
14448 return 1;
14449
14450 }
14451 res = sem_getvalue(a, &count);
14452 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014453 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014454 return res==-1 ? 1 : 0;
14455}
14456
Mark Dickinson10683072009-04-18 21:18:19 +000014457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014458if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014459 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014460else
Matthias Kloseb9621712010-04-24 17:59:49 +000014461 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014463rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14464 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014465fi
14466
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014467
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014468fi
14469
Matthias Kloseb9621712010-04-24 17:59:49 +000014470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14471$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014472if test $ac_cv_broken_sem_getvalue = yes
14473then
14474
Matthias Kloseb9621712010-04-24 17:59:49 +000014475$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014476
14477fi
14478
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014479ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14480"
14481if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14482 ac_have_decl=1
14483else
14484 ac_have_decl=0
14485fi
14486
14487cat >>confdefs.h <<_ACEOF
14488#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14489_ACEOF
14490ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14491"
14492if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14493 ac_have_decl=1
14494else
14495 ac_have_decl=0
14496fi
14497
14498cat >>confdefs.h <<_ACEOF
14499#define HAVE_DECL_RTLD_NOW $ac_have_decl
14500_ACEOF
14501ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14502"
14503if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14504 ac_have_decl=1
14505else
14506 ac_have_decl=0
14507fi
14508
14509cat >>confdefs.h <<_ACEOF
14510#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14511_ACEOF
14512ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14513"
14514if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14515 ac_have_decl=1
14516else
14517 ac_have_decl=0
14518fi
14519
14520cat >>confdefs.h <<_ACEOF
14521#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14522_ACEOF
14523ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14524"
14525if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14526 ac_have_decl=1
14527else
14528 ac_have_decl=0
14529fi
14530
14531cat >>confdefs.h <<_ACEOF
14532#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14533_ACEOF
14534ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14535"
14536if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14537 ac_have_decl=1
14538else
14539 ac_have_decl=0
14540fi
14541
14542cat >>confdefs.h <<_ACEOF
14543#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14544_ACEOF
14545ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14546"
14547if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14548 ac_have_decl=1
14549else
14550 ac_have_decl=0
14551fi
14552
14553cat >>confdefs.h <<_ACEOF
14554#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14555_ACEOF
14556
14557
Mark Dickinsonbd792642009-03-18 20:06:12 +000014558# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14560$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014561# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014562if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014563 enableval=$enable_big_digits; case $enable_big_digits in
14564yes)
14565 enable_big_digits=30 ;;
14566no)
14567 enable_big_digits=15 ;;
1456815|30)
14569 ;;
14570*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014571 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 +000014572esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14574$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014575
14576cat >>confdefs.h <<_ACEOF
14577#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14578_ACEOF
14579
14580
14581else
Matthias Kloseb9621712010-04-24 17:59:49 +000014582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14583$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014584fi
14585
14586
Guido van Rossumef2255b2000-03-10 22:30:29 +000014587# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014588ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014589if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014590
14591
Matthias Kloseb9621712010-04-24 17:59:49 +000014592$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014593
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014594 wchar_h="yes"
14595
Guido van Rossumef2255b2000-03-10 22:30:29 +000014596else
Martin v. Löwis11437992002-04-12 09:54:03 +000014597 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014598
14599fi
14600
Michael W. Hudson54241132001-12-07 15:38:26 +000014601
Martin v. Löwis11437992002-04-12 09:54:03 +000014602
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014603# determine wchar_t size
14604if test "$wchar_h" = yes
14605then
Matthias Kloseb9621712010-04-24 17:59:49 +000014606 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014607# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14608# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14609# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14611$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014612if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014613 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014614else
Matthias Kloseb9621712010-04-24 17:59:49 +000014615 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14616"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014617
Martin v. Löwis11437992002-04-12 09:54:03 +000014618else
Matthias Kloseb9621712010-04-24 17:59:49 +000014619 if test "$ac_cv_type_wchar_t" = yes; then
14620 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14621$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014622as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014623See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014624 else
14625 ac_cv_sizeof_wchar_t=0
14626 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014627fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014628
Martin v. Löwis11437992002-04-12 09:54:03 +000014629fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14631$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014632
14633
14634
Martin v. Löwis11437992002-04-12 09:54:03 +000014635cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014636#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014637_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014638
Michael W. Hudson54241132001-12-07 15:38:26 +000014639
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014640fi
14641
Matthias Kloseb9621712010-04-24 17:59:49 +000014642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14643$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014644have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014646/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014647
14648#include <tcl.h>
14649#if TCL_UTF_MAX != 6
14650# error "NOT UCS4_TCL"
14651#endif
14652int
14653main ()
14654{
14655
14656 ;
14657 return 0;
14658}
14659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014660if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014661
14662
Matthias Kloseb9621712010-04-24 17:59:49 +000014663$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014664
14665 have_ucs4_tcl=yes
14666
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14670$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014671
Skip Montanaro6dead952003-09-25 14:50:04 +000014672# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014673if test "$wchar_h" = yes
14674then
14675 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14677$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014678 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014679 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014680else
14681
Matthias Kloseb9621712010-04-24 17:59:49 +000014682 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014683 ac_cv_wchar_t_signed=yes
14684else
Matthias Kloseb9621712010-04-24 17:59:49 +000014685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014686/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014687
14688 #include <wchar.h>
14689 int main()
14690 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014691 /* Success: exit code 0 */
14692 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014693 }
14694
14695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014696if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014697 ac_cv_wchar_t_signed=yes
14698else
Matthias Kloseb9621712010-04-24 17:59:49 +000014699 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014700fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014701rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14702 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014703fi
14704
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014705fi
14706
Matthias Kloseb9621712010-04-24 17:59:49 +000014707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14708$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014709fi
14710
Georg Brandl52d168a2008-01-07 18:10:24 +000014711# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014712if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014713 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014714then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014715 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014716
Matthias Kloseb9621712010-04-24 17:59:49 +000014717$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014718
Georg Brandl52d168a2008-01-07 18:10:24 +000014719else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014720 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014721fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14723$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014724
14725# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14727$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014728if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014729 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014730else
Matthias Kloseb9621712010-04-24 17:59:49 +000014731 ac_cv_c_bigendian=unknown
14732 # See if we're dealing with a universal compiler.
14733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14734/* end confdefs.h. */
14735#ifndef __APPLE_CC__
14736 not a universal capable compiler
14737 #endif
14738 typedef int dummy;
14739
Skip Montanaro6dead952003-09-25 14:50:04 +000014740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014741if ac_fn_c_try_compile "$LINENO"; then :
14742
14743 # Check for potential -arch flags. It is not universal unless
14744 # there are at least two -arch flags with different values.
14745 ac_arch=
14746 ac_prev=
14747 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14748 if test -n "$ac_prev"; then
14749 case $ac_word in
14750 i?86 | x86_64 | ppc | ppc64)
14751 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14752 ac_arch=$ac_word
14753 else
14754 ac_cv_c_bigendian=universal
14755 break
14756 fi
14757 ;;
14758 esac
14759 ac_prev=
14760 elif test "x$ac_word" = "x-arch"; then
14761 ac_prev=arch
14762 fi
14763 done
14764fi
14765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14766 if test $ac_cv_c_bigendian = unknown; then
14767 # See if sys/param.h defines the BYTE_ORDER macro.
14768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014769/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014770#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014771 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014772
Martin v. Löwis11437992002-04-12 09:54:03 +000014773int
14774main ()
14775{
Matthias Kloseb9621712010-04-24 17:59:49 +000014776#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14777 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14778 && LITTLE_ENDIAN)
14779 bogus endian macros
14780 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014781
14782 ;
14783 return 0;
14784}
14785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014786if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014787 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014789/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014790#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014791 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014792
Martin v. Löwis11437992002-04-12 09:54:03 +000014793int
14794main ()
14795{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014796#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014797 not big endian
14798 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014799
14800 ;
14801 return 0;
14802}
14803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014804if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014805 ac_cv_c_bigendian=yes
14806else
Matthias Kloseb9621712010-04-24 17:59:49 +000014807 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014808fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014810fi
14811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14812 fi
14813 if test $ac_cv_c_bigendian = unknown; then
14814 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014816/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014817#include <limits.h>
14818
Martin v. Löwis11437992002-04-12 09:54:03 +000014819int
14820main ()
14821{
Matthias Kloseb9621712010-04-24 17:59:49 +000014822#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14823 bogus endian macros
14824 #endif
14825
Martin v. Löwis11437992002-04-12 09:54:03 +000014826 ;
14827 return 0;
14828}
14829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014830if ac_fn_c_try_compile "$LINENO"; then :
14831 # It does; now see whether it defined to _BIG_ENDIAN or not.
14832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14833/* end confdefs.h. */
14834#include <limits.h>
14835
14836int
14837main ()
14838{
14839#ifndef _BIG_ENDIAN
14840 not big endian
14841 #endif
14842
14843 ;
14844 return 0;
14845}
14846_ACEOF
14847if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014848 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014849else
Matthias Kloseb9621712010-04-24 17:59:49 +000014850 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14853fi
14854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14855 fi
14856 if test $ac_cv_c_bigendian = unknown; then
14857 # Compile a test program.
14858 if test "$cross_compiling" = yes; then :
14859 # Try to guess by grepping values from an object file.
14860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14861/* end confdefs.h. */
14862short int ascii_mm[] =
14863 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14864 short int ascii_ii[] =
14865 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14866 int use_ascii (int i) {
14867 return ascii_mm[i] + ascii_ii[i];
14868 }
14869 short int ebcdic_ii[] =
14870 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14871 short int ebcdic_mm[] =
14872 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14873 int use_ebcdic (int i) {
14874 return ebcdic_mm[i] + ebcdic_ii[i];
14875 }
14876 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014877
Matthias Kloseb9621712010-04-24 17:59:49 +000014878int
14879main ()
14880{
14881return use_ascii (foo) == use_ebcdic (foo);
14882 ;
14883 return 0;
14884}
14885_ACEOF
14886if ac_fn_c_try_compile "$LINENO"; then :
14887 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14888 ac_cv_c_bigendian=yes
14889 fi
14890 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14891 if test "$ac_cv_c_bigendian" = unknown; then
14892 ac_cv_c_bigendian=no
14893 else
14894 # finding both strings is unlikely to happen, but who knows?
14895 ac_cv_c_bigendian=unknown
14896 fi
14897 fi
14898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014900else
Matthias Kloseb9621712010-04-24 17:59:49 +000014901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014902/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014903$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014904int
14905main ()
14906{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014907
Matthias Kloseb9621712010-04-24 17:59:49 +000014908 /* Are we little or big endian? From Harbison&Steele. */
14909 union
14910 {
14911 long int l;
14912 char c[sizeof (long int)];
14913 } u;
14914 u.l = 1;
14915 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014916
14917 ;
14918 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014919}
Martin v. Löwis11437992002-04-12 09:54:03 +000014920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014921if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014922 ac_cv_c_bigendian=no
14923else
Matthias Kloseb9621712010-04-24 17:59:49 +000014924 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014925fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14927 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929
Matthias Kloseb9621712010-04-24 17:59:49 +000014930 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014931fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14933$as_echo "$ac_cv_c_bigendian" >&6; }
14934 case $ac_cv_c_bigendian in #(
14935 yes)
14936 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14937;; #(
14938 no)
14939 ;; #(
14940 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014941
Matthias Kloseb9621712010-04-24 17:59:49 +000014942$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014943
Matthias Kloseb9621712010-04-24 17:59:49 +000014944 ;; #(
14945 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014946 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014947 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014948 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014949
Michael W. Hudson54241132001-12-07 15:38:26 +000014950
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014951# ABI version string for Python extension modules. This appears between the
14952# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14953# from the following attributes which affect the ABI of this Python build (in
14954# this order):
14955#
14956# * The Python implementation (always 'cpython-' for us)
14957# * The major and minor version numbers
14958# * --with-pydebug (adds a 'd')
14959# * --with-pymalloc (adds a 'm')
14960# * --with-wide-unicode (adds a 'u')
14961#
14962# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014963# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14964# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014965
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14967$as_echo_n "checking ABIFLAGS... " >&6; }
14968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14969$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14971$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014972SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14974$as_echo "$SOABI" >&6; }
14975
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014976
14977case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014978 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014979 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14980 *)
14981 EXT_SUFFIX=${SHLIB_SUFFIX};;
14982esac
14983
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14985$as_echo_n "checking LDVERSION... " >&6; }
14986LDVERSION='$(VERSION)$(ABIFLAGS)'
14987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14988$as_echo "$LDVERSION" >&6; }
14989
doko@python.org87421192013-01-26 11:39:31 +010014990
doko@ubuntu.com55532312016-06-14 08:55:19 +020014991if test x$PLATFORM_TRIPLET = x; then
14992 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14993else
14994 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14995fi
doko@python.org87421192013-01-26 11:39:31 +010014996
14997
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014998# Check whether right shifting a negative integer extends the sign bit
14999# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15001$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015002if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015003 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015004else
Martin v. Löwis11437992002-04-12 09:54:03 +000015005
Matthias Kloseb9621712010-04-24 17:59:49 +000015006if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015007 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015008else
Matthias Kloseb9621712010-04-24 17:59:49 +000015009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015010/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015011
15012int main()
15013{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015014 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015015}
15016
Martin v. Löwis11437992002-04-12 09:54:03 +000015017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015018if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015019 ac_cv_rshift_extends_sign=yes
15020else
Matthias Kloseb9621712010-04-24 17:59:49 +000015021 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015022fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15024 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015025fi
15026
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015027fi
15028
Matthias Kloseb9621712010-04-24 17:59:49 +000015029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15030$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015031if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015032then
Martin v. Löwis11437992002-04-12 09:54:03 +000015033
Matthias Kloseb9621712010-04-24 17:59:49 +000015034$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015035
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015036fi
15037
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015038# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15040$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015041if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015042 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015043else
Martin v. Löwis11437992002-04-12 09:54:03 +000015044
Matthias Kloseb9621712010-04-24 17:59:49 +000015045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015046/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015047#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015048int
15049main ()
15050{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015051
15052 FILE *f = fopen("/dev/null", "r");
15053 flockfile(f);
15054 getc_unlocked(f);
15055 funlockfile(f);
15056
Martin v. Löwis11437992002-04-12 09:54:03 +000015057 ;
15058 return 0;
15059}
15060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015061if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015062 ac_cv_have_getc_unlocked=yes
15063else
Matthias Kloseb9621712010-04-24 17:59:49 +000015064 ac_cv_have_getc_unlocked=no
15065fi
15066rm -f core conftest.err conftest.$ac_objext \
15067 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015069
Matthias Kloseb9621712010-04-24 17:59:49 +000015070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15071$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015072if test "$ac_cv_have_getc_unlocked" = yes
15073then
Martin v. Löwis11437992002-04-12 09:54:03 +000015074
Matthias Kloseb9621712010-04-24 17:59:49 +000015075$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015076
15077fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015078
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015079# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015080# save the value of LIBS so we don't actually link Python with readline
15081LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015082
Gregory P. Smith18820942008-09-07 06:24:49 +000015083# On some systems we need to link readline to a termcap compatible
15084# library. NOTE: Keep the precedence of listed libraries synchronised
15085# with setup.py.
15086py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15088$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015089for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015090 if test -z "$py_libtermcap"; then
15091 READLINE_LIBS="-lreadline"
15092 else
15093 READLINE_LIBS="-lreadline -l$py_libtermcap"
15094 fi
15095 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015097/* end confdefs.h. */
15098
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015099/* Override any GCC internal prototype to avoid an error.
15100 Use char because int might match the return type of a GCC
15101 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015102#ifdef __cplusplus
15103extern "C"
15104#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015105char readline ();
15106int
15107main ()
15108{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015109return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015110 ;
15111 return 0;
15112}
15113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015114if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015115 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015117rm -f core conftest.err conftest.$ac_objext \
15118 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015119 if test $py_cv_lib_readline = yes; then
15120 break
15121 fi
15122done
15123# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15124#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015125if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15127$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015128else
Matthias Kloseb9621712010-04-24 17:59:49 +000015129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15130$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015131
Matthias Kloseb9621712010-04-24 17:59:49 +000015132$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015133
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015134fi
15135
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015136# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015138/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015139#include <readline/readline.h>
15140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015141if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015142 have_readline=yes
15143else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015144 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015145
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015146fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015147rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015148if test $have_readline = yes
15149then
Matthias Kloseb9621712010-04-24 17:59:49 +000015150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015151/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015152#include <readline/readline.h>
15153
15154_ACEOF
15155if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015156 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015157
Matthias Kloseb9621712010-04-24 17:59:49 +000015158$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015159
15160fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015161rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015162
Matthias Kloseb9621712010-04-24 17:59:49 +000015163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015164/* end confdefs.h. */
15165#include <readline/readline.h>
15166
15167_ACEOF
15168if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015169 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015170
Matthias Kloseb9621712010-04-24 17:59:49 +000015171$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015172
15173fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015174rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015175
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015176fi
15177
Martin v. Löwis0daad592001-09-30 21:09:59 +000015178# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15180$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015181if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015182 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015183else
Martin v. Löwis11437992002-04-12 09:54:03 +000015184 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015185LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015188
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015189/* Override any GCC internal prototype to avoid an error.
15190 Use char because int might match the return type of a GCC
15191 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015192#ifdef __cplusplus
15193extern "C"
15194#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015195char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015196int
15197main ()
15198{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015199return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015200 ;
15201 return 0;
15202}
15203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015204if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015205 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015206else
Matthias Kloseb9621712010-04-24 17:59:49 +000015207 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015209rm -f core conftest.err conftest.$ac_objext \
15210 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015211LIBS=$ac_check_lib_save_LIBS
15212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15214$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015215if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015216
Matthias Kloseb9621712010-04-24 17:59:49 +000015217$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015218
Martin v. Löwis0daad592001-09-30 21:09:59 +000015219fi
15220
Michael W. Hudson54241132001-12-07 15:38:26 +000015221
Thomas Wouters89d996e2007-09-08 17:39:28 +000015222# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15224$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015225if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015226 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015227else
15228 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015229LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015231/* end confdefs.h. */
15232
15233/* Override any GCC internal prototype to avoid an error.
15234 Use char because int might match the return type of a GCC
15235 builtin and then its argument prototype would still apply. */
15236#ifdef __cplusplus
15237extern "C"
15238#endif
15239char rl_completion_display_matches_hook ();
15240int
15241main ()
15242{
15243return rl_completion_display_matches_hook ();
15244 ;
15245 return 0;
15246}
15247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015248if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015249 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15250else
Matthias Kloseb9621712010-04-24 17:59:49 +000015251 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015252fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015253rm -f core conftest.err conftest.$ac_objext \
15254 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015255LIBS=$ac_check_lib_save_LIBS
15256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15258$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015259if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015260
Matthias Kloseb9621712010-04-24 17:59:49 +000015261$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015262
15263fi
15264
15265
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015266# also in 4.0, but not in editline
15267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15268$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15269if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15270 $as_echo_n "(cached) " >&6
15271else
15272 ac_check_lib_save_LIBS=$LIBS
15273LIBS="-lreadline $READLINE_LIBS $LIBS"
15274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15275/* end confdefs.h. */
15276
15277/* Override any GCC internal prototype to avoid an error.
15278 Use char because int might match the return type of a GCC
15279 builtin and then its argument prototype would still apply. */
15280#ifdef __cplusplus
15281extern "C"
15282#endif
15283char rl_resize_terminal ();
15284int
15285main ()
15286{
15287return rl_resize_terminal ();
15288 ;
15289 return 0;
15290}
15291_ACEOF
15292if ac_fn_c_try_link "$LINENO"; then :
15293 ac_cv_lib_readline_rl_resize_terminal=yes
15294else
15295 ac_cv_lib_readline_rl_resize_terminal=no
15296fi
15297rm -f core conftest.err conftest.$ac_objext \
15298 conftest$ac_exeext conftest.$ac_ext
15299LIBS=$ac_check_lib_save_LIBS
15300fi
15301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15302$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15303if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15304
15305$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15306
15307fi
15308
15309
Martin v. Löwis0daad592001-09-30 21:09:59 +000015310# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15312$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015313if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015314 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015315else
Martin v. Löwis11437992002-04-12 09:54:03 +000015316 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015317LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015319/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015320
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015321/* Override any GCC internal prototype to avoid an error.
15322 Use char because int might match the return type of a GCC
15323 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015324#ifdef __cplusplus
15325extern "C"
15326#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015327char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015328int
15329main ()
15330{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015331return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015332 ;
15333 return 0;
15334}
15335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015336if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015337 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015338else
Matthias Kloseb9621712010-04-24 17:59:49 +000015339 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015340fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015341rm -f core conftest.err conftest.$ac_objext \
15342 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015343LIBS=$ac_check_lib_save_LIBS
15344fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15346$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015347if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015348
Matthias Kloseb9621712010-04-24 17:59:49 +000015349$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015350
Guido van Rossum353ae582001-07-10 16:45:32 +000015351fi
15352
Jack Jansendd19cf82001-12-06 22:36:17 +000015353
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015354# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015356/* end confdefs.h. */
15357#include <readline/readline.h>
15358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015359if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015360 have_readline=yes
15361else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015362 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015363
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015364fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015365rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015366if test $have_readline = yes
15367then
Matthias Kloseb9621712010-04-24 17:59:49 +000015368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015369/* end confdefs.h. */
15370#include <readline/readline.h>
15371
15372_ACEOF
15373if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015374 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015375
Matthias Kloseb9621712010-04-24 17:59:49 +000015376$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015377
15378fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015379rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015380
15381fi
15382
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15384$as_echo_n "checking for append_history in -lreadline... " >&6; }
15385if ${ac_cv_lib_readline_append_history+:} false; then :
15386 $as_echo_n "(cached) " >&6
15387else
15388 ac_check_lib_save_LIBS=$LIBS
15389LIBS="-lreadline $READLINE_LIBS $LIBS"
15390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15391/* end confdefs.h. */
15392
15393/* Override any GCC internal prototype to avoid an error.
15394 Use char because int might match the return type of a GCC
15395 builtin and then its argument prototype would still apply. */
15396#ifdef __cplusplus
15397extern "C"
15398#endif
15399char append_history ();
15400int
15401main ()
15402{
15403return append_history ();
15404 ;
15405 return 0;
15406}
15407_ACEOF
15408if ac_fn_c_try_link "$LINENO"; then :
15409 ac_cv_lib_readline_append_history=yes
15410else
15411 ac_cv_lib_readline_append_history=no
15412fi
15413rm -f core conftest.err conftest.$ac_objext \
15414 conftest$ac_exeext conftest.$ac_ext
15415LIBS=$ac_check_lib_save_LIBS
15416fi
15417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15418$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15419if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15420
15421$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15422
15423fi
15424
15425
Martin v. Löwis82bca632006-02-10 20:49:30 +000015426# End of readline checks: restore LIBS
15427LIBS=$LIBS_no_readline
15428
Matthias Kloseb9621712010-04-24 17:59:49 +000015429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15430$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015431if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015432 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015433else
Martin v. Löwis11437992002-04-12 09:54:03 +000015434
Matthias Kloseb9621712010-04-24 17:59:49 +000015435if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015436 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015437else
Matthias Kloseb9621712010-04-24 17:59:49 +000015438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015439/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015440
15441int main()
15442{
15443 int val1 = nice(1);
15444 if (val1 != -1 && val1 == nice(2))
15445 exit(0);
15446 exit(1);
15447}
15448
Martin v. Löwis11437992002-04-12 09:54:03 +000015449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015450if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015451 ac_cv_broken_nice=yes
15452else
Matthias Kloseb9621712010-04-24 17:59:49 +000015453 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015454fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015455rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15456 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015457fi
15458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015459fi
15460
Matthias Kloseb9621712010-04-24 17:59:49 +000015461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15462$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015463if test "$ac_cv_broken_nice" = yes
15464then
Martin v. Löwis11437992002-04-12 09:54:03 +000015465
Matthias Kloseb9621712010-04-24 17:59:49 +000015466$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015467
15468fi
15469
Matthias Kloseb9621712010-04-24 17:59:49 +000015470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15471$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015472if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015473 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015474else
Matthias Kloseb9621712010-04-24 17:59:49 +000015475 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015476 ac_cv_broken_poll=no
15477else
Matthias Kloseb9621712010-04-24 17:59:49 +000015478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015479/* end confdefs.h. */
15480
15481#include <poll.h>
15482
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015483int main()
15484{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015485 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015486 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015487
15488 close (42);
15489
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015490 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015491 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015492 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015493 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015494 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015495 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015496 return 1;
15497}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015498
15499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015500if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015501 ac_cv_broken_poll=yes
15502else
Matthias Kloseb9621712010-04-24 17:59:49 +000015503 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015504fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15506 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015508
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015509fi
15510
Matthias Kloseb9621712010-04-24 17:59:49 +000015511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15512$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015513if test "$ac_cv_broken_poll" = yes
15514then
15515
Matthias Kloseb9621712010-04-24 17:59:49 +000015516$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015517
15518fi
15519
Brett Cannon43802422005-02-10 20:48:03 +000015520# 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 +000015521# (which is not required by ISO C or UNIX spec) and/or if we support
15522# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015523ac_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 +000015524#include <$ac_cv_struct_tm>
15525
Matthias Kloseb9621712010-04-24 17:59:49 +000015526"
Victor Stinnere0be4232011-10-25 13:06:09 +020015527if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015528
15529cat >>confdefs.h <<_ACEOF
15530#define HAVE_STRUCT_TM_TM_ZONE 1
15531_ACEOF
15532
15533
15534fi
15535
15536if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15537
Matthias Kloseb9621712010-04-24 17:59:49 +000015538$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015539
15540else
Matthias Kloseb9621712010-04-24 17:59:49 +000015541 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15542"
Victor Stinnere0be4232011-10-25 13:06:09 +020015543if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015544 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015545else
Matthias Kloseb9621712010-04-24 17:59:49 +000015546 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015547fi
15548
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015549cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015550#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015551_ACEOF
15552
Matthias Kloseb9621712010-04-24 17:59:49 +000015553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15554$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015555if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015556 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015557else
Matthias Kloseb9621712010-04-24 17:59:49 +000015558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015559/* end confdefs.h. */
15560#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015561#if !HAVE_DECL_TZNAME
15562extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015563#endif
15564
15565int
15566main ()
15567{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015568return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015569 ;
15570 return 0;
15571}
15572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015573if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015574 ac_cv_var_tzname=yes
15575else
Matthias Kloseb9621712010-04-24 17:59:49 +000015576 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015578rm -f core conftest.err conftest.$ac_objext \
15579 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015580fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15582$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015583 if test $ac_cv_var_tzname = yes; then
15584
Matthias Kloseb9621712010-04-24 17:59:49 +000015585$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015586
15587 fi
15588fi
15589
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015590
Martin v. Löwis1d459062005-03-14 21:23:33 +000015591# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15593$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015594if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015595 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015596else
15597
Matthias Kloseb9621712010-04-24 17:59:49 +000015598if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015599 ac_cv_working_tzset=no
15600else
Matthias Kloseb9621712010-04-24 17:59:49 +000015601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015602/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015603
15604#include <stdlib.h>
15605#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015606#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015607
15608#if HAVE_TZNAME
15609extern char *tzname[];
15610#endif
15611
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015612int main()
15613{
Brett Cannon18367812003-09-19 00:59:16 +000015614 /* Note that we need to ensure that not only does tzset(3)
15615 do 'something' with localtime, but it works as documented
15616 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015617 This includes making sure that tzname is set properly if
15618 tm->tm_zone does not exist since it is the alternative way
15619 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015620
15621 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015622 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015623 */
15624
Martin v. Löwis1d459062005-03-14 21:23:33 +000015625 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015626 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15627
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015628 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015629 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015630 if (localtime(&groundhogday)->tm_hour != 0)
15631 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015632#if HAVE_TZNAME
15633 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15634 if (strcmp(tzname[0], "UTC") ||
15635 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15636 exit(1);
15637#endif
Brett Cannon18367812003-09-19 00:59:16 +000015638
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015639 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015640 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015641 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015642 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015643#if HAVE_TZNAME
15644 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15645 exit(1);
15646#endif
Brett Cannon18367812003-09-19 00:59:16 +000015647
15648 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15649 tzset();
15650 if (localtime(&groundhogday)->tm_hour != 11)
15651 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015652#if HAVE_TZNAME
15653 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15654 exit(1);
15655#endif
15656
15657#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015658 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15659 exit(1);
15660 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15661 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015662#endif
Brett Cannon18367812003-09-19 00:59:16 +000015663
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015664 exit(0);
15665}
15666
15667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015668if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015669 ac_cv_working_tzset=yes
15670else
Matthias Kloseb9621712010-04-24 17:59:49 +000015671 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015672fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015673rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15674 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015675fi
15676
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015677fi
15678
Matthias Kloseb9621712010-04-24 17:59:49 +000015679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15680$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015681if test "$ac_cv_working_tzset" = yes
15682then
15683
Matthias Kloseb9621712010-04-24 17:59:49 +000015684$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015685
15686fi
15687
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015688# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15690$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015691if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015692 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015693else
Matthias Kloseb9621712010-04-24 17:59:49 +000015694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015695/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015696#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015697int
15698main ()
15699{
15700
15701struct stat st;
15702st.st_mtim.tv_nsec = 1;
15703
15704 ;
15705 return 0;
15706}
15707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015708if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015709 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015710else
Matthias Kloseb9621712010-04-24 17:59:49 +000015711 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15714fi
15715
Matthias Kloseb9621712010-04-24 17:59:49 +000015716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15717$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015718if test "$ac_cv_stat_tv_nsec" = yes
15719then
15720
Matthias Kloseb9621712010-04-24 17:59:49 +000015721$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015722
15723fi
15724
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015725# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15727$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015728if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015729 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015730else
Matthias Kloseb9621712010-04-24 17:59:49 +000015731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015732/* end confdefs.h. */
15733#include <sys/stat.h>
15734int
15735main ()
15736{
15737
15738struct stat st;
15739st.st_mtimespec.tv_nsec = 1;
15740
15741 ;
15742 return 0;
15743}
15744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015745if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015746 ac_cv_stat_tv_nsec2=yes
15747else
Matthias Kloseb9621712010-04-24 17:59:49 +000015748 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15751fi
15752
Matthias Kloseb9621712010-04-24 17:59:49 +000015753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15754$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015755if test "$ac_cv_stat_tv_nsec2" = yes
15756then
15757
Matthias Kloseb9621712010-04-24 17:59:49 +000015758$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015759
15760fi
15761
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015762# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015763ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015764if test "$cross_compiling" = no; then
15765 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15766fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015767
15768for ac_header in curses.h ncurses.h
15769do :
15770 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15771ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15772if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15773 cat >>confdefs.h <<_ACEOF
15774#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15775_ACEOF
15776
15777fi
15778
15779done
15780
15781
15782# On Solaris, term.h requires curses.h
15783for ac_header in term.h
15784do :
15785 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15786#ifdef HAVE_CURSES_H
15787#include <curses.h>
15788#endif
15789
15790"
15791if test "x$ac_cv_header_term_h" = xyes; then :
15792 cat >>confdefs.h <<_ACEOF
15793#define HAVE_TERM_H 1
15794_ACEOF
15795
15796fi
15797
15798done
15799
15800
Jack Jansen666b1e72001-10-31 12:11:48 +000015801# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15803$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015804if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015805 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015806else
Matthias Kloseb9621712010-04-24 17:59:49 +000015807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015808/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015809#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015810int
15811main ()
15812{
Jack Jansen666b1e72001-10-31 12:11:48 +000015813
15814 int rtn;
15815 rtn = mvwdelch(0,0,0);
15816
Martin v. Löwis11437992002-04-12 09:54:03 +000015817 ;
15818 return 0;
15819}
15820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015821if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015822 ac_cv_mvwdelch_is_expression=yes
15823else
Matthias Kloseb9621712010-04-24 17:59:49 +000015824 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15827fi
15828
Matthias Kloseb9621712010-04-24 17:59:49 +000015829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15830$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015831
15832if test "$ac_cv_mvwdelch_is_expression" = yes
15833then
Martin v. Löwis11437992002-04-12 09:54:03 +000015834
Matthias Kloseb9621712010-04-24 17:59:49 +000015835$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015836
15837fi
15838
Matthias Kloseb9621712010-04-24 17:59:49 +000015839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15840$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015841if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015842 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015843else
Matthias Kloseb9621712010-04-24 17:59:49 +000015844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015845/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015846#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015847int
15848main ()
15849{
Jack Jansen666b1e72001-10-31 12:11:48 +000015850
15851 WINDOW *w;
15852 w->_flags = 0;
15853
Martin v. Löwis11437992002-04-12 09:54:03 +000015854 ;
15855 return 0;
15856}
15857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015858if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015859 ac_cv_window_has_flags=yes
15860else
Matthias Kloseb9621712010-04-24 17:59:49 +000015861 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15864fi
15865
Matthias Kloseb9621712010-04-24 17:59:49 +000015866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15867$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015868
Jack Jansen666b1e72001-10-31 12:11:48 +000015869
15870if test "$ac_cv_window_has_flags" = yes
15871then
Martin v. Löwis11437992002-04-12 09:54:03 +000015872
Matthias Kloseb9621712010-04-24 17:59:49 +000015873$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015874
15875fi
15876
Matthias Kloseb9621712010-04-24 17:59:49 +000015877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15878$as_echo_n "checking for is_term_resized... " >&6; }
15879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015880/* end confdefs.h. */
15881#include <curses.h>
15882int
15883main ()
15884{
15885void *x=is_term_resized
15886 ;
15887 return 0;
15888}
15889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015890if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015891
Matthias Kloseb9621712010-04-24 17:59:49 +000015892$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015893
Matthias Kloseb159a552010-04-25 21:00:44 +000015894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015895$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015896else
Matthias Kloseb9621712010-04-24 17:59:49 +000015897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15898$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015899
15900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15902
Matthias Kloseb9621712010-04-24 17:59:49 +000015903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15904$as_echo_n "checking for resize_term... " >&6; }
15905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015906/* end confdefs.h. */
15907#include <curses.h>
15908int
15909main ()
15910{
15911void *x=resize_term
15912 ;
15913 return 0;
15914}
15915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015916if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015917
Matthias Kloseb9621712010-04-24 17:59:49 +000015918$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015919
Matthias Kloseb159a552010-04-25 21:00:44 +000015920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015921$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015922else
Matthias Kloseb9621712010-04-24 17:59:49 +000015923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15924$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015925
15926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15928
Matthias Kloseb9621712010-04-24 17:59:49 +000015929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15930$as_echo_n "checking for resizeterm... " >&6; }
15931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015932/* end confdefs.h. */
15933#include <curses.h>
15934int
15935main ()
15936{
15937void *x=resizeterm
15938 ;
15939 return 0;
15940}
15941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015942if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015943
Matthias Kloseb9621712010-04-24 17:59:49 +000015944$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015945
Matthias Kloseb159a552010-04-25 21:00:44 +000015946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015947$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015948else
Matthias Kloseb9621712010-04-24 17:59:49 +000015949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15950$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015951
15952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015954# last curses configure check
15955CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015956
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15958$as_echo "$as_me: checking for device files" >&6;}
15959
15960if test "x$cross_compiling" = xyes; then
15961 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15963$as_echo_n "checking for /dev/ptmx... " >&6; }
15964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15965$as_echo "not set" >&6; }
15966 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15967 fi
15968 if test "${ac_cv_file__dev_ptc+set}" != set; then
15969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15970$as_echo_n "checking for /dev/ptc... " >&6; }
15971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15972$as_echo "not set" >&6; }
15973 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15974 fi
15975fi
15976
Matthias Kloseb9621712010-04-24 17:59:49 +000015977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15978$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015979if ${ac_cv_file__dev_ptmx+:} false; then :
15980 $as_echo_n "(cached) " >&6
15981else
15982 test "$cross_compiling" = yes &&
15983 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15984if test -r "/dev/ptmx"; then
15985 ac_cv_file__dev_ptmx=yes
15986else
15987 ac_cv_file__dev_ptmx=no
15988fi
15989fi
15990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15991$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15992if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015993
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015994fi
15995
15996if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015997
Matthias Kloseb9621712010-04-24 17:59:49 +000015998$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015999
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16002$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016003if ${ac_cv_file__dev_ptc+:} false; then :
16004 $as_echo_n "(cached) " >&6
16005else
16006 test "$cross_compiling" = yes &&
16007 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16008if test -r "/dev/ptc"; then
16009 ac_cv_file__dev_ptc=yes
16010else
16011 ac_cv_file__dev_ptc=no
16012fi
16013fi
16014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16015$as_echo "$ac_cv_file__dev_ptc" >&6; }
16016if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016017
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016018fi
16019
16020if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016021
Matthias Kloseb9621712010-04-24 17:59:49 +000016022$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016023
Neal Norwitz865400f2003-03-21 01:42:58 +000016024fi
16025
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016026if test $ac_sys_system = Darwin
16027then
16028 LIBS="$LIBS -framework CoreFoundation"
16029fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016030
Matthias Kloseb9621712010-04-24 17:59:49 +000016031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16032$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016033if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016034 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016035else
Matthias Kloseb9621712010-04-24 17:59:49 +000016036 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016037 ac_cv_have_size_t_format="cross -- assuming yes"
16038
Thomas Wouters477c8d52006-05-27 19:21:47 +000016039else
Matthias Kloseb9621712010-04-24 17:59:49 +000016040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016041/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016042
Thomas Wouters477c8d52006-05-27 19:21:47 +000016043#include <stdio.h>
16044#include <stddef.h>
16045#include <string.h>
16046
Christian Heimes2c181612007-12-17 20:04:13 +000016047#ifdef HAVE_SYS_TYPES_H
16048#include <sys/types.h>
16049#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016050
16051#ifdef HAVE_SSIZE_T
16052typedef ssize_t Py_ssize_t;
16053#elif SIZEOF_VOID_P == SIZEOF_LONG
16054typedef long Py_ssize_t;
16055#else
16056typedef int Py_ssize_t;
16057#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016058
Christian Heimes2c181612007-12-17 20:04:13 +000016059int main()
16060{
16061 char buffer[256];
16062
Thomas Wouters477c8d52006-05-27 19:21:47 +000016063 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16064 return 1;
16065
Thomas Wouters89f507f2006-12-13 04:49:30 +000016066 if (strcmp(buffer, "123"))
16067 return 1;
16068
16069 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16070 return 1;
16071
16072 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016073 return 1;
16074
16075 return 0;
16076}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016077
Thomas Wouters477c8d52006-05-27 19:21:47 +000016078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016079if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016080 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016081else
Matthias Kloseb9621712010-04-24 17:59:49 +000016082 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016084rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16085 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016086fi
16087
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16090$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016091if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016092
Matthias Kloseb9621712010-04-24 17:59:49 +000016093$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016094
16095fi
16096
Matthias Kloseb9621712010-04-24 17:59:49 +000016097ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016098#ifdef HAVE_SYS_TYPES_H
16099#include <sys/types.h>
16100#endif
16101#ifdef HAVE_SYS_SOCKET_H
16102#include <sys/socket.h>
16103#endif
16104
Matthias Kloseb9621712010-04-24 17:59:49 +000016105"
Victor Stinnere0be4232011-10-25 13:06:09 +020016106if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016107
Martin v. Löwis11437992002-04-12 09:54:03 +000016108else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016109
Matthias Kloseb9621712010-04-24 17:59:49 +000016110$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016111
16112fi
16113
Michael W. Hudson54241132001-12-07 15:38:26 +000016114
Matthias Kloseb9621712010-04-24 17:59:49 +000016115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16116$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016117if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016118 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016119else
Matthias Kloseb9621712010-04-24 17:59:49 +000016120 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016121 ac_cv_broken_mbstowcs=no
16122else
Matthias Kloseb9621712010-04-24 17:59:49 +000016123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016124/* end confdefs.h. */
16125
Stefan Krah19c21392012-11-22 23:47:32 +010016126#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016127#include<stdlib.h>
16128int main() {
16129 size_t len = -1;
16130 const char *str = "text";
16131 len = mbstowcs(NULL, str, 0);
16132 return (len != 4);
16133}
16134
16135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016136if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016137 ac_cv_broken_mbstowcs=no
16138else
Matthias Kloseb9621712010-04-24 17:59:49 +000016139 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016140fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16142 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016143fi
16144
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016145fi
16146
Matthias Kloseb9621712010-04-24 17:59:49 +000016147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16148$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016149if test "$ac_cv_broken_mbstowcs" = yes
16150then
16151
Matthias Kloseb9621712010-04-24 17:59:49 +000016152$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016153
16154fi
16155
Antoine Pitroub52ec782009-01-25 16:34:23 +000016156# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16158$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016159
16160# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016161if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016162 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016163if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016164then
16165
Matthias Kloseb9621712010-04-24 17:59:49 +000016166$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016167
Matthias Kloseb9621712010-04-24 17:59:49 +000016168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16169$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016170fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016171if test "$withval" = no
16172then
16173
16174$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16175
Matthias Kloseb9621712010-04-24 17:59:49 +000016176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16177$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016178fi
16179
Antoine Pitrou042b1282010-08-13 21:15:58 +000016180else
16181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16182$as_echo "no value specified" >&6; }
16183fi
16184
Antoine Pitroub52ec782009-01-25 16:34:23 +000016185
Matthias Kloseb17289e2012-03-15 19:51:34 +010016186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16187$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16188if ${ac_cv_computed_gotos+:} false; then :
16189 $as_echo_n "(cached) " >&6
16190else
16191 if test "$cross_compiling" = yes; then :
16192 if test "${with_computed_gotos+set}" = set; then
16193 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16194 else
16195 ac_cv_computed_gotos=no
16196 fi
16197else
16198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16199/* end confdefs.h. */
16200
16201int main(int argc, char **argv)
16202{
16203 static void *targets[1] = { &&LABEL1 };
16204 goto LABEL2;
16205LABEL1:
16206 return 0;
16207LABEL2:
16208 goto *targets[0];
16209 return 1;
16210}
16211
16212_ACEOF
16213if ac_fn_c_try_run "$LINENO"; then :
16214 ac_cv_computed_gotos=yes
16215else
16216 ac_cv_computed_gotos=no
16217fi
16218rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16219 conftest.$ac_objext conftest.beam conftest.$ac_ext
16220fi
16221
16222fi
16223
16224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16225$as_echo "$ac_cv_computed_gotos" >&6; }
16226case "$ac_cv_computed_gotos" in yes*)
16227
16228$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16229
16230esac
16231
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016232case $ac_sys_system in
16233AIX*)
16234
16235$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16236 ;;
16237esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016238
Michael W. Hudson54241132001-12-07 15:38:26 +000016239
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016240
16241
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016242for h in `(cd $srcdir;echo Python/thread_*.h)`
16243do
16244 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16245done
16246
Michael W. Hudson54241132001-12-07 15:38:26 +000016247
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016248SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16250$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016251for dir in $SRCDIRS; do
16252 if test ! -d $dir; then
16253 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016254 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016255done
Matthias Kloseb9621712010-04-24 17:59:49 +000016256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16257$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016258
Stefan Krah1919b7e2012-03-21 18:25:23 +010016259# Availability of -O2:
16260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16261$as_echo_n "checking for -O2... " >&6; }
16262saved_cflags="$CFLAGS"
16263CFLAGS="-O2"
16264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16265/* end confdefs.h. */
16266
16267int
16268main ()
16269{
16270
16271
16272 ;
16273 return 0;
16274}
16275_ACEOF
16276if ac_fn_c_try_compile "$LINENO"; then :
16277 have_O2=yes
16278else
16279 have_O2=no
16280fi
16281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16283$as_echo "$have_O2" >&6; }
16284CFLAGS="$saved_cflags"
16285
16286# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16287# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16289$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16290saved_cflags="$CFLAGS"
16291CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16292if test "$have_O2" = no; then
16293 CFLAGS=""
16294fi
16295if test "$cross_compiling" = yes; then :
16296 have_glibc_memmove_bug=undefined
16297else
16298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16299/* end confdefs.h. */
16300
16301#include <stdio.h>
16302#include <stdlib.h>
16303#include <string.h>
16304void foo(void *p, void *q) { memmove(p, q, 19); }
16305int main() {
16306 char a[32] = "123456789000000000";
16307 foo(&a[9], a);
16308 if (strcmp(a, "123456789123456789000000000") != 0)
16309 return 1;
16310 foo(a, &a[9]);
16311 if (strcmp(a, "123456789000000000") != 0)
16312 return 1;
16313 return 0;
16314}
16315
16316_ACEOF
16317if ac_fn_c_try_run "$LINENO"; then :
16318 have_glibc_memmove_bug=no
16319else
16320 have_glibc_memmove_bug=yes
16321fi
16322rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16323 conftest.$ac_objext conftest.beam conftest.$ac_ext
16324fi
16325
16326CFLAGS="$saved_cflags"
16327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16328$as_echo "$have_glibc_memmove_bug" >&6; }
16329if test "$have_glibc_memmove_bug" = yes; then
16330
16331$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16332
16333fi
16334
16335if test "$have_gcc_asm_for_x87" = yes; then
16336 # Some versions of gcc miscompile inline asm:
16337 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16338 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16339 case $CC in
16340 *gcc*)
16341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16342$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16343 saved_cflags="$CFLAGS"
16344 CFLAGS="-O2"
16345 if test "$cross_compiling" = yes; then :
16346 have_ipa_pure_const_bug=undefined
16347else
16348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16349/* end confdefs.h. */
16350
16351 __attribute__((noinline)) int
16352 foo(int *p) {
16353 int r;
16354 asm ( "movl \$6, (%1)\n\t"
16355 "xorl %0, %0\n\t"
16356 : "=r" (r) : "r" (p) : "memory"
16357 );
16358 return r;
16359 }
16360 int main() {
16361 int p = 8;
16362 if ((foo(&p) ? : p) != 6)
16363 return 1;
16364 return 0;
16365 }
16366
16367_ACEOF
16368if ac_fn_c_try_run "$LINENO"; then :
16369 have_ipa_pure_const_bug=no
16370else
16371 have_ipa_pure_const_bug=yes
16372fi
16373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16374 conftest.$ac_objext conftest.beam conftest.$ac_ext
16375fi
16376
16377 CFLAGS="$saved_cflags"
16378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16379$as_echo "$have_ipa_pure_const_bug" >&6; }
16380 if test "$have_ipa_pure_const_bug" = yes; then
16381
16382$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16383
16384 fi
16385 ;;
16386 esac
16387fi
16388
Victor Stinner4f5366e2015-01-09 02:13:19 +010016389# Check for stdatomic.h
16390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16391$as_echo_n "checking for stdatomic.h... " >&6; }
16392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16393/* end confdefs.h. */
16394
16395
16396 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016397 atomic_int value = ATOMIC_VAR_INIT(1);
16398 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016399 int main() {
16400 int loaded_value = atomic_load(&value);
16401 return 0;
16402 }
16403
16404
16405_ACEOF
16406if ac_fn_c_try_link "$LINENO"; then :
16407 have_stdatomic_h=yes
16408else
16409 have_stdatomic_h=no
16410fi
16411rm -f core conftest.err conftest.$ac_objext \
16412 conftest$ac_exeext conftest.$ac_ext
16413
16414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16415$as_echo "$have_stdatomic_h" >&6; }
16416
16417if test "$have_stdatomic_h" = yes; then
16418
16419$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16420
16421fi
16422
16423# Check for GCC >= 4.7 __atomic builtins
16424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16425$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16427/* end confdefs.h. */
16428
16429
16430 volatile int val = 1;
16431 int main() {
16432 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16433 return 0;
16434 }
16435
16436
16437_ACEOF
16438if ac_fn_c_try_link "$LINENO"; then :
16439 have_builtin_atomic=yes
16440else
16441 have_builtin_atomic=no
16442fi
16443rm -f core conftest.err conftest.$ac_objext \
16444 conftest$ac_exeext conftest.$ac_ext
16445
16446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16447$as_echo "$have_builtin_atomic" >&6; }
16448
16449if test "$have_builtin_atomic" = yes; then
16450
16451$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16452
16453fi
16454
Ned Deily322f5ba2013-11-21 23:01:59 -080016455# ensurepip option
16456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16457$as_echo_n "checking for ensurepip... " >&6; }
16458
16459# Check whether --with-ensurepip was given.
16460if test "${with_ensurepip+set}" = set; then :
16461 withval=$with_ensurepip;
16462else
16463 with_ensurepip=upgrade
16464fi
16465
16466case $with_ensurepip in #(
16467 yes|upgrade) :
16468 ENSUREPIP=upgrade ;; #(
16469 install) :
16470 ENSUREPIP=install ;; #(
16471 no) :
16472 ENSUREPIP=no ;; #(
16473 *) :
16474 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16475esac
16476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16477$as_echo "$ENSUREPIP" >&6; }
16478
16479
Victor Stinner35a97c02015-03-08 02:59:09 +010016480# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16482$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16484/* end confdefs.h. */
16485
16486
16487 #include <dirent.h>
16488
16489 int main() {
16490 struct dirent entry;
16491 return entry.d_type == DT_UNKNOWN;
16492 }
16493
16494
16495_ACEOF
16496if ac_fn_c_try_link "$LINENO"; then :
16497 have_dirent_d_type=yes
16498else
16499 have_dirent_d_type=no
16500fi
16501rm -f core conftest.err conftest.$ac_objext \
16502 conftest$ac_exeext conftest.$ac_ext
16503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16504$as_echo "$have_dirent_d_type" >&6; }
16505
16506if test "$have_dirent_d_type" = yes; then
16507
16508$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16509
16510fi
16511
Victor Stinner9eb57c52015-03-19 22:21:49 +010016512# check if the Linux getrandom() syscall is available
16513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16514$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16516/* end confdefs.h. */
16517
16518
Victor Stinner1b80b242016-04-12 22:34:58 +020016519 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016520 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016521 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016522
16523 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016524 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016525 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016526 const int flags = GRND_NONBLOCK;
16527 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016528 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016529 return 0;
16530 }
16531
16532
16533_ACEOF
16534if ac_fn_c_try_link "$LINENO"; then :
16535 have_getrandom_syscall=yes
16536else
16537 have_getrandom_syscall=no
16538fi
16539rm -f core conftest.err conftest.$ac_objext \
16540 conftest$ac_exeext conftest.$ac_ext
16541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16542$as_echo "$have_getrandom_syscall" >&6; }
16543
16544if test "$have_getrandom_syscall" = yes; then
16545
16546$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16547
16548fi
16549
Victor Stinner3abf44e2015-09-18 15:38:37 +020016550# check if the getrandom() function is available
16551# the test was written for the Solaris function of <sys/random.h>
16552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16553$as_echo_n "checking for the getrandom() function... " >&6; }
16554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16555/* end confdefs.h. */
16556
16557
16558 #include <sys/random.h>
16559
16560 int main() {
16561 char buffer[1];
16562 const size_t buflen = sizeof(buffer);
16563 const int flags = 0;
16564 /* ignore the result, Python checks for ENOSYS at runtime */
16565 (void)getrandom(buffer, buflen, flags);
16566 return 0;
16567 }
16568
16569
16570_ACEOF
16571if ac_fn_c_try_link "$LINENO"; then :
16572 have_getrandom=yes
16573else
16574 have_getrandom=no
16575fi
16576rm -f core conftest.err conftest.$ac_objext \
16577 conftest$ac_exeext conftest.$ac_ext
16578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16579$as_echo "$have_getrandom" >&6; }
16580
16581if test "$have_getrandom" = yes; then
16582
16583$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16584
16585fi
16586
Guido van Rossum627b2d71993-12-24 10:39:16 +000016587# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016588ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016589
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016590ac_config_files="$ac_config_files Modules/ld_so_aix"
16591
Martin v. Löwis11437992002-04-12 09:54:03 +000016592cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016593# This file is a shell script that caches the results of configure
16594# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016595# scripts and configure runs, see configure's option --config-cache.
16596# It is not useful on other systems. If it contains results you don't
16597# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016598#
Martin v. Löwis11437992002-04-12 09:54:03 +000016599# config.status only pays attention to the cache file if you give it
16600# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016601#
Skip Montanaro6dead952003-09-25 14:50:04 +000016602# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016603# loading this file, other *unset* `ac_cv_foo' will be assigned the
16604# following values.
16605
16606_ACEOF
16607
Guido van Rossumf78abae1997-01-21 22:02:36 +000016608# The following way of writing the cache mishandles newlines in values,
16609# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016610# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016611# Ultrix sh set writes to stderr and can't be redirected directly,
16612# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016613(
16614 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16615 eval ac_val=\$$ac_var
16616 case $ac_val in #(
16617 *${as_nl}*)
16618 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016619 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16620$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016621 esac
16622 case $ac_var in #(
16623 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016624 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16625 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016626 esac ;;
16627 esac
16628 done
16629
Martin v. Löwis11437992002-04-12 09:54:03 +000016630 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016631 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16632 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016633 # `set' does not quote correctly, so add quotes: double-quote
16634 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016635 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016636 "s/'/'\\\\''/g;
16637 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016638 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016639 *)
16640 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016641 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016642 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016643 esac |
16644 sort
16645) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016646 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016647 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016648 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016649 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016650 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16651 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016652 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16653 :end' >>confcache
16654if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16655 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016656 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016657 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16658$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016659 if test ! -f "$cache_file" || test -h "$cache_file"; then
16660 cat confcache >"$cache_file"
16661 else
16662 case $cache_file in #(
16663 */* | ?:*)
16664 mv -f confcache "$cache_file"$$ &&
16665 mv -f "$cache_file"$$ "$cache_file" ;; #(
16666 *)
16667 mv -f confcache "$cache_file" ;;
16668 esac
16669 fi
16670 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016671 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016672 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16673$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016674 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016675fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016676rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016677
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016678test "x$prefix" = xNONE && prefix=$ac_default_prefix
16679# Let make expand exec_prefix.
16680test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016681
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016682DEFS=-DHAVE_CONFIG_H
16683
Skip Montanaro6dead952003-09-25 14:50:04 +000016684ac_libobjs=
16685ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016686U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016687for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16688 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016689 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016690 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016691 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16692 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016693 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16694 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016695done
16696LIBOBJS=$ac_libobjs
16697
16698LTLIBOBJS=$ac_ltlibobjs
16699
16700
Martin v. Löwis11437992002-04-12 09:54:03 +000016701
Matthias Kloseb9621712010-04-24 17:59:49 +000016702
Victor Stinnere0be4232011-10-25 13:06:09 +020016703: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016704ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016705ac_clean_files_save=$ac_clean_files
16706ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016707{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16708$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16709as_write_fail=0
16710cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016711#! $SHELL
16712# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016713# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016714# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016715# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016716
Martin v. Löwis11437992002-04-12 09:54:03 +000016717debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016718ac_cs_recheck=false
16719ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016720
Matthias Kloseb9621712010-04-24 17:59:49 +000016721SHELL=\${CONFIG_SHELL-$SHELL}
16722export SHELL
16723_ASEOF
16724cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16725## -------------------- ##
16726## M4sh Initialization. ##
16727## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016729# Be more Bourne compatible
16730DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016731if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016732 emulate sh
16733 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016734 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016735 # is contrary to our usage. Disable this feature.
16736 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016737 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016738else
Matthias Kloseb9621712010-04-24 17:59:49 +000016739 case `(set -o) 2>/dev/null` in #(
16740 *posix*) :
16741 set -o posix ;; #(
16742 *) :
16743 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016744esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016745fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016746
16747
Matthias Kloseb9621712010-04-24 17:59:49 +000016748as_nl='
16749'
16750export as_nl
16751# Printing a long string crashes Solaris 7 /usr/bin/printf.
16752as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16753as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16754as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16755# Prefer a ksh shell builtin over an external printf program on Solaris,
16756# but without wasting forks for bash or zsh.
16757if test -z "$BASH_VERSION$ZSH_VERSION" \
16758 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16759 as_echo='print -r --'
16760 as_echo_n='print -rn --'
16761elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16762 as_echo='printf %s\n'
16763 as_echo_n='printf %s'
16764else
16765 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16766 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16767 as_echo_n='/usr/ucb/echo -n'
16768 else
16769 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16770 as_echo_n_body='eval
16771 arg=$1;
16772 case $arg in #(
16773 *"$as_nl"*)
16774 expr "X$arg" : "X\\(.*\\)$as_nl";
16775 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16776 esac;
16777 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16778 '
16779 export as_echo_n_body
16780 as_echo_n='sh -c $as_echo_n_body as_echo'
16781 fi
16782 export as_echo_body
16783 as_echo='sh -c $as_echo_body as_echo'
16784fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016785
16786# The user is always right.
16787if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016788 PATH_SEPARATOR=:
16789 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16790 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16791 PATH_SEPARATOR=';'
16792 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016793fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016794
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016795
16796# IFS
16797# We need space, tab and new line, in precisely that order. Quoting is
16798# there to prevent editors from complaining about space-tab.
16799# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16800# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016801IFS=" "" $as_nl"
16802
16803# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016804as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016805case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016806 *[\\/]* ) as_myself=$0 ;;
16807 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016808for as_dir in $PATH
16809do
16810 IFS=$as_save_IFS
16811 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016812 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16813 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016814IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016816 ;;
16817esac
16818# We did not find ourselves, most probably we were run as `sh COMMAND'
16819# in which case we are not to be found in the path.
16820if test "x$as_myself" = x; then
16821 as_myself=$0
16822fi
16823if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016824 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16825 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016826fi
16827
Matthias Kloseb9621712010-04-24 17:59:49 +000016828# Unset variables that we do not need and which cause bugs (e.g. in
16829# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16830# suppresses any "Segmentation fault" message there. '((' could
16831# trigger a bug in pdksh 5.2.14.
16832for as_var in BASH_ENV ENV MAIL MAILPATH
16833do eval test x\${$as_var+set} = xset \
16834 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016835done
16836PS1='$ '
16837PS2='> '
16838PS4='+ '
16839
16840# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016841LC_ALL=C
16842export LC_ALL
16843LANGUAGE=C
16844export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016845
Matthias Kloseb9621712010-04-24 17:59:49 +000016846# CDPATH.
16847(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16848
16849
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016850# as_fn_error STATUS ERROR [LINENO LOG_FD]
16851# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016852# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16853# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016854# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016855as_fn_error ()
16856{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016857 as_status=$1; test $as_status -eq 0 && as_status=1
16858 if test "$4"; then
16859 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16860 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016861 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016862 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016863 as_fn_exit $as_status
16864} # as_fn_error
16865
16866
16867# as_fn_set_status STATUS
16868# -----------------------
16869# Set $? to STATUS, without forking.
16870as_fn_set_status ()
16871{
16872 return $1
16873} # as_fn_set_status
16874
16875# as_fn_exit STATUS
16876# -----------------
16877# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16878as_fn_exit ()
16879{
16880 set +e
16881 as_fn_set_status $1
16882 exit $1
16883} # as_fn_exit
16884
16885# as_fn_unset VAR
16886# ---------------
16887# Portably unset VAR.
16888as_fn_unset ()
16889{
16890 { eval $1=; unset $1;}
16891}
16892as_unset=as_fn_unset
16893# as_fn_append VAR VALUE
16894# ----------------------
16895# Append the text in VALUE to the end of the definition contained in VAR. Take
16896# advantage of any shell optimizations that allow amortized linear growth over
16897# repeated appends, instead of the typical quadratic growth present in naive
16898# implementations.
16899if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16900 eval 'as_fn_append ()
16901 {
16902 eval $1+=\$2
16903 }'
16904else
16905 as_fn_append ()
16906 {
16907 eval $1=\$$1\$2
16908 }
16909fi # as_fn_append
16910
16911# as_fn_arith ARG...
16912# ------------------
16913# Perform arithmetic evaluation on the ARGs, and store the result in the
16914# global $as_val. Take advantage of shells that can avoid forks. The arguments
16915# must be portable across $(()) and expr.
16916if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16917 eval 'as_fn_arith ()
16918 {
16919 as_val=$(( $* ))
16920 }'
16921else
16922 as_fn_arith ()
16923 {
16924 as_val=`expr "$@" || test $? -eq 1`
16925 }
16926fi # as_fn_arith
16927
16928
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016929if expr a : '\(a\)' >/dev/null 2>&1 &&
16930 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16931 as_expr=expr
16932else
16933 as_expr=false
16934fi
16935
16936if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16937 as_basename=basename
16938else
16939 as_basename=false
16940fi
16941
Matthias Kloseb9621712010-04-24 17:59:49 +000016942if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16943 as_dirname=dirname
16944else
16945 as_dirname=false
16946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016947
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016948as_me=`$as_basename -- "$0" ||
16949$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16950 X"$0" : 'X\(//\)$' \| \
16951 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016952$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016953 sed '/^.*\/\([^/][^/]*\)\/*$/{
16954 s//\1/
16955 q
16956 }
16957 /^X\/\(\/\/\)$/{
16958 s//\1/
16959 q
16960 }
16961 /^X\/\(\/\).*/{
16962 s//\1/
16963 q
16964 }
16965 s/.*/./; q'`
16966
Matthias Kloseb9621712010-04-24 17:59:49 +000016967# Avoid depending upon Character Ranges.
16968as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16969as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16970as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16971as_cr_digits='0123456789'
16972as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016973
16974ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016975case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016976-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016977 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016978 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016979 xy) ECHO_C='\c';;
16980 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16981 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016982 esac;;
16983*)
16984 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016985esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016986
Martin v. Löwis11437992002-04-12 09:54:03 +000016987rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016988if test -d conf$$.dir; then
16989 rm -f conf$$.dir/conf$$.file
16990else
16991 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016992 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016994if (echo >conf$$.file) 2>/dev/null; then
16995 if ln -s conf$$.file conf$$ 2>/dev/null; then
16996 as_ln_s='ln -s'
16997 # ... but there are two gotchas:
16998 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16999 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017000 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017001 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017002 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017003 elif ln conf$$.file conf$$ 2>/dev/null; then
17004 as_ln_s=ln
17005 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017006 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017007 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017008else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017009 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017011rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17012rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017013
Matthias Kloseb9621712010-04-24 17:59:49 +000017014
17015# as_fn_mkdir_p
17016# -------------
17017# Create "$as_dir" as a directory, including parents if necessary.
17018as_fn_mkdir_p ()
17019{
17020
17021 case $as_dir in #(
17022 -*) as_dir=./$as_dir;;
17023 esac
17024 test -d "$as_dir" || eval $as_mkdir_p || {
17025 as_dirs=
17026 while :; do
17027 case $as_dir in #(
17028 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17029 *) as_qdir=$as_dir;;
17030 esac
17031 as_dirs="'$as_qdir' $as_dirs"
17032 as_dir=`$as_dirname -- "$as_dir" ||
17033$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17034 X"$as_dir" : 'X\(//\)[^/]' \| \
17035 X"$as_dir" : 'X\(//\)$' \| \
17036 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17037$as_echo X"$as_dir" |
17038 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17039 s//\1/
17040 q
17041 }
17042 /^X\(\/\/\)[^/].*/{
17043 s//\1/
17044 q
17045 }
17046 /^X\(\/\/\)$/{
17047 s//\1/
17048 q
17049 }
17050 /^X\(\/\).*/{
17051 s//\1/
17052 q
17053 }
17054 s/.*/./; q'`
17055 test -d "$as_dir" && break
17056 done
17057 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017058 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017059
17060
17061} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017062if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017063 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017064else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017065 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017066 as_mkdir_p=false
17067fi
17068
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017069
17070# as_fn_executable_p FILE
17071# -----------------------
17072# Test if FILE is an executable regular file.
17073as_fn_executable_p ()
17074{
17075 test -f "$1" && test -x "$1"
17076} # as_fn_executable_p
17077as_test_x='test -x'
17078as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017079
17080# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017081as_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 +000017082
17083# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017084as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017085
17086
Martin v. Löwis11437992002-04-12 09:54:03 +000017087exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017088## ----------------------------------- ##
17089## Main body of $CONFIG_STATUS script. ##
17090## ----------------------------------- ##
17091_ASEOF
17092test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017093
Matthias Kloseb9621712010-04-24 17:59:49 +000017094cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17095# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017096# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017097# values after options handling.
17098ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017099This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017100generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017101
17102 CONFIG_FILES = $CONFIG_FILES
17103 CONFIG_HEADERS = $CONFIG_HEADERS
17104 CONFIG_LINKS = $CONFIG_LINKS
17105 CONFIG_COMMANDS = $CONFIG_COMMANDS
17106 $ $0 $@
17107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017108on `(hostname || uname -n) 2>/dev/null | sed 1q`
17109"
17110
Martin v. Löwis11437992002-04-12 09:54:03 +000017111_ACEOF
17112
Matthias Kloseb9621712010-04-24 17:59:49 +000017113case $ac_config_files in *"
17114"*) set x $ac_config_files; shift; ac_config_files=$*;;
17115esac
17116
17117case $ac_config_headers in *"
17118"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17119esac
17120
17121
17122cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017123# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017124config_files="$ac_config_files"
17125config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017127_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017128
Matthias Kloseb9621712010-04-24 17:59:49 +000017129cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017130ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017131\`$as_me' instantiates files and other configuration actions
17132from templates according to the current configuration. Unless the files
17133and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017134
Matthias Kloseb9621712010-04-24 17:59:49 +000017135Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017136
17137 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017138 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017139 --config print configuration, then exit
17140 -q, --quiet, --silent
17141 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017142 -d, --debug don't remove temporary files
17143 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017144 --file=FILE[:TEMPLATE]
17145 instantiate the configuration file FILE
17146 --header=FILE[:TEMPLATE]
17147 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017148
17149Configuration files:
17150$config_files
17151
17152Configuration headers:
17153$config_headers
17154
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017155Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017158cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17159ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017160ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017161python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017162configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017163 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017164
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017165Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017166This config.status script is free software; the Free Software Foundation
17167gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017168
17169ac_pwd='$ac_pwd'
17170srcdir='$srcdir'
17171INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017172MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017173test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017174_ACEOF
17175
Matthias Kloseb9621712010-04-24 17:59:49 +000017176cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17177# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017178ac_need_defaults=:
17179while test $# != 0
17180do
17181 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017182 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017183 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17184 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017185 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017186 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017187 --*=)
17188 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17189 ac_optarg=
17190 ac_shift=:
17191 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017192 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017193 ac_option=$1
17194 ac_optarg=$2
17195 ac_shift=shift
17196 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017197 esac
17198
Skip Montanaro6dead952003-09-25 14:50:04 +000017199 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017200 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017201 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17202 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017203 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017204 $as_echo "$ac_cs_version"; exit ;;
17205 --config | --confi | --conf | --con | --co | --c )
17206 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017207 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017208 debug=: ;;
17209 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017210 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017211 case $ac_optarg in
17212 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017213 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017214 esac
17215 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017216 ac_need_defaults=false;;
17217 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017218 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017219 case $ac_optarg in
17220 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17221 esac
17222 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017223 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017224 --he | --h)
17225 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017226 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017227Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017228 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017229 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017230 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17231 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17232 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017233
17234 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017235 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017236Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017237
Matthias Kloseb9621712010-04-24 17:59:49 +000017238 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017239 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017240
17241 esac
17242 shift
17243done
17244
Skip Montanaro6dead952003-09-25 14:50:04 +000017245ac_configure_extra_args=
17246
17247if $ac_cs_silent; then
17248 exec 6>/dev/null
17249 ac_configure_extra_args="$ac_configure_extra_args --silent"
17250fi
17251
17252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017253cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017254if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017255 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017256 shift
17257 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17258 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017259 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017260 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017261fi
17262
Martin v. Löwis11437992002-04-12 09:54:03 +000017263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017264cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017265exec 5>>config.log
17266{
17267 echo
17268 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17269## Running $as_me. ##
17270_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017271 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017272} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017275cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017276_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017277
Matthias Kloseb9621712010-04-24 17:59:49 +000017278cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017279
17280# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017281for ac_config_target in $ac_config_targets
17282do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017283 case $ac_config_target in
17284 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17285 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17286 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017287 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17288 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017289 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17290 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017291 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017292 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017293 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017294
Victor Stinnere0be4232011-10-25 13:06:09 +020017295 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017296 esac
17297done
17298
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017299
Martin v. Löwis11437992002-04-12 09:54:03 +000017300# If the user did not use the arguments to specify the items to instantiate,
17301# then the envvar interface is used. Set only those that are not.
17302# We use the long form for the default assignment because of an extremely
17303# bizarre bug on SunOS 4.1.3.
17304if $ac_need_defaults; then
17305 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17306 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17307fi
17308
Skip Montanaro6dead952003-09-25 14:50:04 +000017309# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017310# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017311# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017312# Hook for its removal unless debugging.
17313# Note that there is a small window in which the directory will not be cleaned:
17314# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017315$debug ||
17316{
Victor Stinnere0be4232011-10-25 13:06:09 +020017317 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017318 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017319 : "${ac_tmp:=$tmp}"
17320 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017321' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017322 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017323}
Martin v. Löwis11437992002-04-12 09:54:03 +000017324# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017325
Martin v. Löwis11437992002-04-12 09:54:03 +000017326{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017327 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017328 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017329} ||
17330{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017331 tmp=./conf$$-$RANDOM
17332 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017333} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017334ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017335
Matthias Kloseb9621712010-04-24 17:59:49 +000017336# Set up the scripts for CONFIG_FILES section.
17337# No need to generate them if there are no CONFIG_FILES.
17338# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017339if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017340
Matthias Kloseb9621712010-04-24 17:59:49 +000017341
17342ac_cr=`echo X | tr X '\015'`
17343# On cygwin, bash can eat \r inside `` if the user requested igncr.
17344# But we know of no other shell where ac_cr would be empty at this
17345# point, so we can use a bashism as a fallback.
17346if test "x$ac_cr" = x; then
17347 eval ac_cr=\$\'\\r\'
17348fi
17349ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17350if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017351 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017352else
17353 ac_cs_awk_cr=$ac_cr
17354fi
17355
Victor Stinnere0be4232011-10-25 13:06:09 +020017356echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017357_ACEOF
17358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017359
Matthias Kloseb9621712010-04-24 17:59:49 +000017360{
17361 echo "cat >conf$$subs.awk <<_ACEOF" &&
17362 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17363 echo "_ACEOF"
17364} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017365 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17366ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017367ac_delim='%!_!# '
17368for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017369 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017370 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017371
Matthias Kloseb9621712010-04-24 17:59:49 +000017372 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17373 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017374 break
17375 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017376 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017377 else
17378 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017379 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380done
Matthias Kloseb9621712010-04-24 17:59:49 +000017381rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017382
Matthias Kloseb9621712010-04-24 17:59:49 +000017383cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017384cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017386sed -n '
17387h
17388s/^/S["/; s/!.*/"]=/
17389p
17390g
17391s/^[^!]*!//
17392:repl
17393t repl
17394s/'"$ac_delim"'$//
17395t delim
17396:nl
17397h
17398s/\(.\{148\}\)..*/\1/
17399t more1
17400s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17401p
17402n
17403b repl
17404:more1
17405s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17406p
17407g
17408s/.\{148\}//
17409t nl
17410:delim
17411h
17412s/\(.\{148\}\)..*/\1/
17413t more2
17414s/["\\]/\\&/g; s/^/"/; s/$/"/
17415p
17416b
17417:more2
17418s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17419p
17420g
17421s/.\{148\}//
17422t delim
17423' <conf$$subs.awk | sed '
17424/^[^""]/{
17425 N
17426 s/\n//
17427}
17428' >>$CONFIG_STATUS || ac_write_fail=1
17429rm -f conf$$subs.awk
17430cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17431_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017432cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017433 for (key in S) S_is_set[key] = 1
17434 FS = ""
17435
17436}
17437{
17438 line = $ 0
17439 nfields = split(line, field, "@")
17440 substed = 0
17441 len = length(field[1])
17442 for (i = 2; i < nfields; i++) {
17443 key = field[i]
17444 keylen = length(key)
17445 if (S_is_set[key]) {
17446 value = S[key]
17447 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17448 len += length(value) + length(field[++i])
17449 substed = 1
17450 } else
17451 len += 1 + keylen
17452 }
17453
17454 print line
17455}
17456
17457_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017459cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17460if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17461 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17462else
17463 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017464fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017465 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017466_ACEOF
17467
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017468# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17469# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017470# trailing colons and then remove the whole line if VPATH becomes empty
17471# (actually we leave an empty line to preserve line numbers).
17472if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017473 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17474h
17475s///
17476s/^/:/
17477s/[ ]*$/:/
17478s/:\$(srcdir):/:/g
17479s/:\${srcdir}:/:/g
17480s/:@srcdir@:/:/g
17481s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017482s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017483x
17484s/\(=[ ]*\).*/\1/
17485G
17486s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017487s/^[^=]*=[ ]*$//
17488}'
17489fi
17490
Matthias Kloseb9621712010-04-24 17:59:49 +000017491cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017492fi # test -n "$CONFIG_FILES"
17493
Matthias Kloseb9621712010-04-24 17:59:49 +000017494# Set up the scripts for CONFIG_HEADERS section.
17495# No need to generate them if there are no CONFIG_HEADERS.
17496# This happens for instance with `./config.status Makefile'.
17497if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017498cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017499BEGIN {
17500_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017501
Matthias Kloseb9621712010-04-24 17:59:49 +000017502# Transform confdefs.h into an awk script `defines.awk', embedded as
17503# here-document in config.status, that substitutes the proper values into
17504# config.h.in to produce config.h.
17505
17506# Create a delimiter string that does not exist in confdefs.h, to ease
17507# handling of long lines.
17508ac_delim='%!_!# '
17509for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017510 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17511 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017512 break
17513 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017514 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017515 else
17516 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17517 fi
17518done
17519
17520# For the awk script, D is an array of macro values keyed by name,
17521# likewise P contains macro parameters if any. Preserve backslash
17522# newline sequences.
17523
17524ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17525sed -n '
17526s/.\{148\}/&'"$ac_delim"'/g
17527t rset
17528:rset
17529s/^[ ]*#[ ]*define[ ][ ]*/ /
17530t def
17531d
17532:def
17533s/\\$//
17534t bsnl
17535s/["\\]/\\&/g
17536s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17537D["\1"]=" \3"/p
17538s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17539d
17540:bsnl
17541s/["\\]/\\&/g
17542s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17543D["\1"]=" \3\\\\\\n"\\/p
17544t cont
17545s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17546t cont
17547d
17548:cont
17549n
17550s/.\{148\}/&'"$ac_delim"'/g
17551t clear
17552:clear
17553s/\\$//
17554t bsnlc
17555s/["\\]/\\&/g; s/^/"/; s/$/"/p
17556d
17557:bsnlc
17558s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17559b cont
17560' <confdefs.h | sed '
17561s/'"$ac_delim"'/"\\\
17562"/g' >>$CONFIG_STATUS || ac_write_fail=1
17563
17564cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17565 for (key in D) D_is_set[key] = 1
17566 FS = ""
17567}
17568/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17569 line = \$ 0
17570 split(line, arg, " ")
17571 if (arg[1] == "#") {
17572 defundef = arg[2]
17573 mac1 = arg[3]
17574 } else {
17575 defundef = substr(arg[1], 2)
17576 mac1 = arg[2]
17577 }
17578 split(mac1, mac2, "(") #)
17579 macro = mac2[1]
17580 prefix = substr(line, 1, index(line, defundef) - 1)
17581 if (D_is_set[macro]) {
17582 # Preserve the white space surrounding the "#".
17583 print prefix "define", macro P[macro] D[macro]
17584 next
17585 } else {
17586 # Replace #undef with comments. This is necessary, for example,
17587 # in the case of _POSIX_SOURCE, which is predefined and required
17588 # on some systems where configure will not decide to define it.
17589 if (defundef == "undef") {
17590 print "/*", prefix defundef, macro, "*/"
17591 next
17592 }
17593 }
17594}
17595{ print }
17596_ACAWK
17597_ACEOF
17598cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017599 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017600fi # test -n "$CONFIG_HEADERS"
17601
17602
17603eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17604shift
17605for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017606do
17607 case $ac_tag in
17608 :[FHLC]) ac_mode=$ac_tag; continue;;
17609 esac
17610 case $ac_mode$ac_tag in
17611 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017612 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017613 :[FH]-) ac_tag=-:-;;
17614 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17615 esac
17616 ac_save_IFS=$IFS
17617 IFS=:
17618 set x $ac_tag
17619 IFS=$ac_save_IFS
17620 shift
17621 ac_file=$1
17622 shift
17623
17624 case $ac_mode in
17625 :L) ac_source=$1;;
17626 :[FH])
17627 ac_file_inputs=
17628 for ac_f
17629 do
17630 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017631 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017632 *) # Look for the file first in the build tree, then in the source tree
17633 # (if the path is not absolute). The absolute path cannot be DOS-style,
17634 # because $ac_f cannot contain `:'.
17635 test -f "$ac_f" ||
17636 case $ac_f in
17637 [\\/$]*) false;;
17638 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17639 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017640 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017641 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017642 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17643 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017644 done
17645
17646 # Let's still pretend it is `configure' which instantiates (i.e., don't
17647 # use $as_me), people would be surprised to read:
17648 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017649 configure_input='Generated from '`
17650 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17651 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017652 if test x"$ac_file" != x-; then
17653 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017654 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17655$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017656 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017657 # Neutralize special characters interpreted by sed in replacement strings.
17658 case $configure_input in #(
17659 *\&* | *\|* | *\\* )
17660 ac_sed_conf_input=`$as_echo "$configure_input" |
17661 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17662 *) ac_sed_conf_input=$configure_input;;
17663 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017664
17665 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017666 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17667 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017668 esac
17669 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017670 esac
17671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017672 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017673$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017674 X"$ac_file" : 'X\(//\)[^/]' \| \
17675 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017676 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017677$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017678 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17679 s//\1/
17680 q
17681 }
17682 /^X\(\/\/\)[^/].*/{
17683 s//\1/
17684 q
17685 }
17686 /^X\(\/\/\)$/{
17687 s//\1/
17688 q
17689 }
17690 /^X\(\/\).*/{
17691 s//\1/
17692 q
17693 }
17694 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017695 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017696 ac_builddir=.
17697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017698case "$ac_dir" in
17699.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17700*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017701 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017702 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017703 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017704 case $ac_top_builddir_sub in
17705 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17706 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17707 esac ;;
17708esac
17709ac_abs_top_builddir=$ac_pwd
17710ac_abs_builddir=$ac_pwd$ac_dir_suffix
17711# for backward compatibility:
17712ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017713
17714case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017715 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017716 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017717 ac_top_srcdir=$ac_top_builddir_sub
17718 ac_abs_top_srcdir=$ac_pwd ;;
17719 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017720 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017721 ac_top_srcdir=$srcdir
17722 ac_abs_top_srcdir=$srcdir ;;
17723 *) # Relative name.
17724 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17725 ac_top_srcdir=$ac_top_build_prefix$srcdir
17726 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017727esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017728ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017729
Martin v. Löwis11437992002-04-12 09:54:03 +000017730
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017731 case $ac_mode in
17732 :F)
17733 #
17734 # CONFIG_FILE
17735 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017736
17737 case $INSTALL in
17738 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017739 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017740 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017741 ac_MKDIR_P=$MKDIR_P
17742 case $MKDIR_P in
17743 [\\/$]* | ?:[\\/]* ) ;;
17744 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17745 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017746_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017747
Matthias Kloseb9621712010-04-24 17:59:49 +000017748cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017749# If the template does not know about datarootdir, expand it.
17750# FIXME: This hack should be removed a few years after 2.60.
17751ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017752ac_sed_dataroot='
17753/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017754 p
17755 q
17756}
17757/@datadir@/p
17758/@docdir@/p
17759/@infodir@/p
17760/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017761/@mandir@/p'
17762case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017763*datarootdir*) ac_datarootdir_seen=yes;;
17764*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17766$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017768cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017769 ac_datarootdir_hack='
17770 s&@datadir@&$datadir&g
17771 s&@docdir@&$docdir&g
17772 s&@infodir@&$infodir&g
17773 s&@localedir@&$localedir&g
17774 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017775 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017776esac
17777_ACEOF
17778
17779# Neutralize VPATH when `$srcdir' = `.'.
17780# Shell code in configure.ac might set extrasub.
17781# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017782cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17783ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017784$extrasub
17785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017786cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017787:t
17788/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017789s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017790s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017791s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017792s&@srcdir@&$ac_srcdir&;t t
17793s&@abs_srcdir@&$ac_abs_srcdir&;t t
17794s&@top_srcdir@&$ac_top_srcdir&;t t
17795s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17796s&@builddir@&$ac_builddir&;t t
17797s&@abs_builddir@&$ac_abs_builddir&;t t
17798s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17799s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017800s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017801$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017802"
Victor Stinnere0be4232011-10-25 13:06:09 +020017803eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17804 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017806test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017807 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17808 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17809 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017810 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017811which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017812$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017813which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017814
Victor Stinnere0be4232011-10-25 13:06:09 +020017815 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017816 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017817 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17818 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017819 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017820 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017821 ;;
17822 :H)
17823 #
17824 # CONFIG_HEADER
17825 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017826 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017827 {
17828 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017829 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17830 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017831 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017832 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017833 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17834$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017835 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017836 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017837 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017838 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017839 fi
17840 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017841 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017842 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017843 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017844 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017845 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017846
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017847
17848 esac
17849
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017850
17851 case $ac_file$ac_mode in
17852 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17853
17854 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017855done # for ac_tag
17856
Guido van Rossum627b2d71993-12-24 10:39:16 +000017857
Matthias Kloseb9621712010-04-24 17:59:49 +000017858as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017859_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017860ac_clean_files=$ac_clean_files_save
17861
Matthias Kloseb9621712010-04-24 17:59:49 +000017862test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017863 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017864
Martin v. Löwis11437992002-04-12 09:54:03 +000017865
17866# configure is writing to config.log, and then calls config.status.
17867# config.status does its own redirection, appending to config.log.
17868# Unfortunately, on DOS this fails, as config.log is still kept open
17869# by configure, so config.status won't be able to write to it; its
17870# output is simply discarded. So we exec the FD to /dev/null,
17871# effectively closing config.log, so it can be properly (re)opened and
17872# appended to by config.status. When coming back to configure, we
17873# need to make the FD available again.
17874if test "$no_create" != yes; then
17875 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017876 ac_config_status_args=
17877 test "$silent" = yes &&
17878 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017879 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017880 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017881 exec 5>>config.log
17882 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17883 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017884 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017885fi
17886if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17887 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17888$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017889fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017890
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017891
Christian Heimes75ed8902013-11-20 01:11:18 +010017892echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017893if test ! -f Modules/Setup
17894then
17895 cp $srcdir/Modules/Setup.dist Modules/Setup
17896fi
17897
Christian Heimes75ed8902013-11-20 01:11:18 +010017898echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017899if test ! -f Modules/Setup.local
17900then
17901 echo "# Edit this file for local setup changes" >Modules/Setup.local
17902fi
17903
Christian Heimes75ed8902013-11-20 01:11:18 +010017904echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017905$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17906 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017907 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017908mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017909
17910if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17911 echo "" >&6
17912 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070017913 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 +000017914 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017915 echo "" >&6
17916 echo "" >&6
17917fi
17918