blob: 75d64324e6ba03eddfd28e2e0d082d5081123725 [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
785localstatedir
786sharedstatedir
787sysconfdir
788datadir
789datarootdir
790libexecdir
791sbindir
792bindir
793program_transform_name
794prefix
795exec_prefix
796PACKAGE_URL
797PACKAGE_BUGREPORT
798PACKAGE_STRING
799PACKAGE_VERSION
800PACKAGE_TARNAME
801PACKAGE_NAME
802PATH_SEPARATOR
803SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000804ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000805ac_user_opts='
806enable_option_checking
807enable_universalsdk
808with_universal_archs
809with_framework_name
810enable_framework
811with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600812with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000813with_cxx_main
814with_suffix
815enable_shared
816enable_profiling
817with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200818with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000819enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700820with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100821with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100822with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000823with_libs
824with_system_expat
825with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100826with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000827enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700828with_tcltk_includes
829with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000830with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_threads
832with_thread
833enable_ipv6
834with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000836with_c_locale_coercion
837with_c_locale_warning
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700839with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_fpectl
841with_libm
842with_libc
843enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000844with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800845with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000846'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 ac_precious_vars='build_alias
848host_alias
849target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100850MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851CC
852CFLAGS
853LDFLAGS
854LIBS
855CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100856CPP
857PKG_CONFIG
858PKG_CONFIG_PATH
859PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860
Guido van Rossum627b2d71993-12-24 10:39:16 +0000861
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000863ac_init_help=
864ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000865ac_unrecognized_opts=
866ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867# The variables have the same names as the options, with
868# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000869cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872no_recursion=
873prefix=NONE
874program_prefix=NONE
875program_suffix=NONE
876program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881x_includes=NONE
882x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000883
884# Installation directory options.
885# These are left unexpanded so users can "make install exec_prefix=/foo"
886# and all the variables that are supposed to be based on exec_prefix
887# by default will actually change.
888# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890bindir='${exec_prefix}/bin'
891sbindir='${exec_prefix}/sbin'
892libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893datarootdir='${prefix}/share'
894datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895sysconfdir='${prefix}/etc'
896sharedstatedir='${prefix}/com'
897localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898includedir='${prefix}/include'
899oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000900docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
901infodir='${datarootdir}/info'
902htmldir='${docdir}'
903dvidir='${docdir}'
904pdfdir='${docdir}'
905psdir='${docdir}'
906libdir='${exec_prefix}/lib'
907localedir='${datarootdir}/locale'
908mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000909
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000913do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914 # If the previous option needs an argument, assign it.
915 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917 ac_prev=
918 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000919 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200922 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
923 *=) ac_optarg= ;;
924 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927 # Accept the important Cygnus configure options, so we can diagnose typos.
928
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929 case $ac_dashdash$ac_option in
930 --)
931 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933 -bindir | --bindir | --bindi | --bind | --bin | --bi)
934 ac_prev=bindir ;;
935 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937
938 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000943 -cache-file | --cache-file | --cache-fil | --cache-fi \
944 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
945 ac_prev=cache_file ;;
946 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
947 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 cache_file=$ac_optarg ;;
949
950 --config-cache | -C)
951 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000958 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
959 | --dataroo | --dataro | --datar)
960 ac_prev=datarootdir ;;
961 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
962 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
963 datarootdir=$ac_optarg ;;
964
Guido van Rossum7f43da71994-08-01 12:15:30 +0000965 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200969 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 ac_useropt_orig=$ac_useropt
971 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972 case $ac_user_opts in
973 *"
974"enable_$ac_useropt"
975"*) ;;
976 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
977 ac_unrecognized_sep=', ';;
978 esac
979 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000980
981 -docdir | --docdir | --docdi | --doc | --do)
982 ac_prev=docdir ;;
983 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
984 docdir=$ac_optarg ;;
985
986 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
987 ac_prev=dvidir ;;
988 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
989 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
991 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200995 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 ac_useropt_orig=$ac_useropt
997 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
998 case $ac_user_opts in
999 *"
1000"enable_$ac_useropt"
1001"*) ;;
1002 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1003 ac_unrecognized_sep=', ';;
1004 esac
1005 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1008 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1009 | --exec | --exe | --ex)
1010 ac_prev=exec_prefix ;;
1011 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1012 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1013 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
1016 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001017 # Obsolete; use --with-gas.
1018 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 -help | --help | --hel | --he | -h)
1021 ac_init_help=long ;;
1022 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1023 ac_init_help=recursive ;;
1024 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1025 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001032 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1033 ac_prev=htmldir ;;
1034 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1035 | --ht=*)
1036 htmldir=$ac_optarg ;;
1037
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038 -includedir | --includedir | --includedi | --included | --include \
1039 | --includ | --inclu | --incl | --inc)
1040 ac_prev=includedir ;;
1041 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1042 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
1045 -infodir | --infodir | --infodi | --infod | --info | --inf)
1046 ac_prev=infodir ;;
1047 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
1050 -libdir | --libdir | --libdi | --libd)
1051 ac_prev=libdir ;;
1052 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
1055 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1056 | --libexe | --libex | --libe)
1057 ac_prev=libexecdir ;;
1058 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1059 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001062 -localedir | --localedir | --localedi | --localed | --locale)
1063 ac_prev=localedir ;;
1064 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1065 localedir=$ac_optarg ;;
1066
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001068 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 ac_prev=localstatedir ;;
1070 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001071 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
1074 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1075 ac_prev=mandir ;;
1076 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 # Obsolete; use --without-fp.
1081 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
1083 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 no_create=yes ;;
1086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001087 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1088 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1089 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1092 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1093 | --oldin | --oldi | --old | --ol | --o)
1094 ac_prev=oldincludedir ;;
1095 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1096 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1097 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1101 ac_prev=prefix ;;
1102 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
1105 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1106 | --program-pre | --program-pr | --program-p)
1107 ac_prev=program_prefix ;;
1108 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1109 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
1112 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1113 | --program-suf | --program-su | --program-s)
1114 ac_prev=program_suffix ;;
1115 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1116 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
1119 -program-transform-name | --program-transform-name \
1120 | --program-transform-nam | --program-transform-na \
1121 | --program-transform-n | --program-transform- \
1122 | --program-transform | --program-transfor \
1123 | --program-transfo | --program-transf \
1124 | --program-trans | --program-tran \
1125 | --progr-tra | --program-tr | --program-t)
1126 ac_prev=program_transform_name ;;
1127 -program-transform-name=* | --program-transform-name=* \
1128 | --program-transform-nam=* | --program-transform-na=* \
1129 | --program-transform-n=* | --program-transform-=* \
1130 | --program-transform=* | --program-transfor=* \
1131 | --program-transfo=* | --program-transf=* \
1132 | --program-trans=* | --program-tran=* \
1133 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001136 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1137 ac_prev=pdfdir ;;
1138 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1139 pdfdir=$ac_optarg ;;
1140
1141 -psdir | --psdir | --psdi | --psd | --ps)
1142 ac_prev=psdir ;;
1143 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1144 psdir=$ac_optarg ;;
1145
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1147 | -silent | --silent | --silen | --sile | --sil)
1148 silent=yes ;;
1149
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001150 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1151 ac_prev=sbindir ;;
1152 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1153 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001155
1156 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1157 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1158 | --sharedst | --shareds | --shared | --share | --shar \
1159 | --sha | --sh)
1160 ac_prev=sharedstatedir ;;
1161 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1162 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1163 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1164 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001166
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001167 -site | --site | --sit)
1168 ac_prev=site ;;
1169 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1173 ac_prev=srcdir ;;
1174 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001177 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1178 | --syscon | --sysco | --sysc | --sys | --sy)
1179 ac_prev=sysconfdir ;;
1180 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1181 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001183
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
1189 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1190 verbose=yes ;;
1191
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 -version | --version | --versio | --versi | --vers | -V)
1193 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194
1195 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001196 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001199 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 ac_useropt_orig=$ac_useropt
1201 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1202 case $ac_user_opts in
1203 *"
1204"with_$ac_useropt"
1205"*) ;;
1206 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1207 ac_unrecognized_sep=', ';;
1208 esac
1209 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210
1211 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001215 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 ac_useropt_orig=$ac_useropt
1217 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1218 case $ac_user_opts in
1219 *"
1220"with_$ac_useropt"
1221"*) ;;
1222 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1223 ac_unrecognized_sep=', ';;
1224 esac
1225 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001227 --x)
1228 # Obsolete; use --with-x.
1229 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230
1231 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1232 | --x-incl | --x-inc | --x-in | --x-i)
1233 ac_prev=x_includes ;;
1234 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1235 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001236 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237
1238 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1239 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1240 ac_prev=x_libraries ;;
1241 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1242 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1246Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247 ;;
1248
Martin v. Löwis11437992002-04-12 09:54:03 +00001249 *=*)
1250 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1251 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 case $ac_envvar in #(
1253 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001254 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001255 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 export $ac_envvar ;;
1258
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001259 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001264 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001265 ;;
1266
1267 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001268done
1269
Guido van Rossum7f43da71994-08-01 12:15:30 +00001270if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001272 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273fi
1274
Matthias Kloseb9621712010-04-24 17:59:49 +00001275if test -n "$ac_unrecognized_opts"; then
1276 case $enable_option_checking in
1277 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001278 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001279 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1280 esac
1281fi
1282
1283# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1285 datadir sysconfdir sharedstatedir localstatedir includedir \
1286 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Christian Heimes75b96182017-09-05 15:53:09 +02001287 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001288do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001290 # Remove trailing slashes.
1291 case $ac_val in
1292 */ )
1293 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1294 eval $ac_var=\$ac_val;;
1295 esac
1296 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001297 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 [\\/$]* | ?:[\\/]* ) continue;;
1299 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001300 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001301 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001302done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303
Martin v. Löwis11437992002-04-12 09:54:03 +00001304# There might be people who depend on the old broken behavior: `$host'
1305# used to hold the argument of --host etc.
1306# FIXME: To remove some day.
1307build=$build_alias
1308host=$host_alias
1309target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310
Martin v. Löwis11437992002-04-12 09:54:03 +00001311# FIXME: To remove some day.
1312if test "x$host_alias" != x; then
1313 if test "x$build_alias" = x; then
1314 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 elif test "x$build_alias" != "x$host_alias"; then
1316 cross_compiling=yes
1317 fi
1318fi
1319
1320ac_tool_prefix=
1321test -n "$host_alias" && ac_tool_prefix=$host_alias-
1322
1323test "$silent" = yes && exec 6>/dev/null
1324
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001326ac_pwd=`pwd` && test -n "$ac_pwd" &&
1327ac_ls_di=`ls -di .` &&
1328ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001329 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001331 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332
1333
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334# Find the source files, if location was not specified.
1335if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001336 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001338 ac_confdir=`$as_dirname -- "$as_myself" ||
1339$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1340 X"$as_myself" : 'X\(//\)[^/]' \| \
1341 X"$as_myself" : 'X\(//\)$' \| \
1342 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1343$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001344 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1345 s//\1/
1346 q
1347 }
1348 /^X\(\/\/\)[^/].*/{
1349 s//\1/
1350 q
1351 }
1352 /^X\(\/\/\)$/{
1353 s//\1/
1354 q
1355 }
1356 /^X\(\/\).*/{
1357 s//\1/
1358 q
1359 }
1360 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001361 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001362 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001363 srcdir=..
1364 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001365else
1366 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001368if test ! -r "$srcdir/$ac_unique_file"; then
1369 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001370 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1373ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001374 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001375 pwd)`
1376# When building in place, set srcdir=.
1377if test "$ac_abs_confdir" = "$ac_pwd"; then
1378 srcdir=.
1379fi
1380# Remove unnecessary trailing slashes from srcdir.
1381# Double slashes in file names in object file debugging info
1382# mess up M-x gdb in Emacs.
1383case $srcdir in
1384*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1385esac
1386for ac_var in $ac_precious_vars; do
1387 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1388 eval ac_env_${ac_var}_value=\$${ac_var}
1389 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1390 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1391done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001392
Martin v. Löwis11437992002-04-12 09:54:03 +00001393#
1394# Report the --help message.
1395#
1396if test "$ac_init_help" = "long"; then
1397 # Omit some internal or obsolete options to make the list less imposing.
1398 # This message is too long to be a string in the A/UX 3.1 sh.
1399 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001400\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001401
1402Usage: $0 [OPTION]... [VAR=VALUE]...
1403
1404To assign environment variables (e.g., CC, CFLAGS...), specify them as
1405VAR=VALUE. See below for descriptions of some of the useful variables.
1406
1407Defaults for the options are specified in brackets.
1408
1409Configuration:
1410 -h, --help display this help and exit
1411 --help=short display options specific to this package
1412 --help=recursive display the short help of all the included packages
1413 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001414 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001415 --cache-file=FILE cache test results in FILE [disabled]
1416 -C, --config-cache alias for \`--cache-file=config.cache'
1417 -n, --no-create do not create output files
1418 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1419
Martin v. Löwis11437992002-04-12 09:54:03 +00001420Installation directories:
1421 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001422 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001423 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001424 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001425
1426By default, \`make install' will install all the files in
1427\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1428an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1429for instance \`--prefix=\$HOME'.
1430
1431For better control, use the options below.
1432
1433Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 --bindir=DIR user executables [EPREFIX/bin]
1435 --sbindir=DIR system admin executables [EPREFIX/sbin]
1436 --libexecdir=DIR program executables [EPREFIX/libexec]
1437 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1438 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1439 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1440 --libdir=DIR object code libraries [EPREFIX/lib]
1441 --includedir=DIR C header files [PREFIX/include]
1442 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1443 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1444 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1445 --infodir=DIR info documentation [DATAROOTDIR/info]
1446 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1447 --mandir=DIR man documentation [DATAROOTDIR/man]
1448 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1449 --htmldir=DIR html documentation [DOCDIR]
1450 --dvidir=DIR dvi documentation [DOCDIR]
1451 --pdfdir=DIR pdf documentation [DOCDIR]
1452 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001453_ACEOF
1454
1455 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001456
1457System types:
1458 --build=BUILD configure for building on BUILD [guessed]
1459 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001460 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001461_ACEOF
1462fi
1463
1464if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001465 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001466 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001467 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001468 cat <<\_ACEOF
1469
1470Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001471 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1473 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001474 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001475 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001476 --enable-framework[=INSTALLDIR]
1477 Build (MacOSX|Darwin) framework
1478 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001479 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001480 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1481 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001482 --enable-loadable-sqlite-extensions
1483 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001484 --enable-ipv6 Enable ipv6 (with ipv4) support
1485 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001486 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001487 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001488
1489Optional Packages:
1490 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1491 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001492 --with-universal-archs=ARCH
1493 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001494 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001495 --with-framework-name=FRAMEWORK
1496 specify an alternate name of the framework built
1497 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001499 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001500 --with-cxx-main=<compiler>
1501 compile main() and link python executable with C++
1502 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001503 --with-suffix=.exe set executable suffix
1504 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001505 --with-assertions build with C assertions enabled
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001506 --with-lto Enable Link Time Optimization in PGO builds.
1507 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001508 --with-hash-algorithm=[fnv|siphash24]
1509 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001510 --with-address-sanitizer
1511 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001512 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001513 --with-system-expat build pyexpat module using an installed expat
1514 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001515 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001516 --with-system-libmpdec build _decimal module using an installed libmpdec
1517 library
Ned Deilyd819b932013-09-06 01:07:05 -07001518 --with-tcltk-includes='-I...'
1519 override search for Tcl and Tk include files
1520 --with-tcltk-libs='-L...'
1521 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001522 --with-dbmliborder=db1:db2:...
1523 order to check db backends for dbm. Valid value is a
1524 colon separated string with the backend names
1525 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001526 --with(out)-threads[=DIRECTORY]
1527 disable/enable thread support
1528 --with(out)-thread[=DIRECTORY]
1529 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001530 --with(out)-doc-strings disable/enable documentation strings
1531 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001532 --with(out)-c-locale-coercion
1533 disable/enable C locale coercion to a UTF-8 based
1534 locale
1535 --with(out)-c-locale-warning
1536 disable/enable locale compatibility warning in the C
1537 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001538 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001539 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001540 --with-fpectl enable SIGFPE catching
1541 --with-libm=STRING math library
1542 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001543 --with(out)-computed-gotos
1544 Use computed gotos in evaluation loop (enabled by
1545 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001546 --with(out)-ensurepip=[=upgrade]
1547 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001548
1549Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001550 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 CC C compiler command
1552 CFLAGS C compiler flags
1553 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1554 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001556 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001557 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001558 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001559 PKG_CONFIG path to pkg-config utility
1560 PKG_CONFIG_PATH
1561 directories to add to pkg-config's search path
1562 PKG_CONFIG_LIBDIR
1563 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001564
1565Use these variables to override the choices made by `configure' or to help
1566it to find libraries and programs with nonstandard names/locations.
1567
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001568Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001569_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001570ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001571fi
1572
1573if test "$ac_init_help" = "recursive"; then
1574 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001575 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001576 test -d "$ac_dir" ||
1577 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1578 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001579 ac_builddir=.
1580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581case "$ac_dir" in
1582.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1583*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001584 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001586 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001587 case $ac_top_builddir_sub in
1588 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1589 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1590 esac ;;
1591esac
1592ac_abs_top_builddir=$ac_pwd
1593ac_abs_builddir=$ac_pwd$ac_dir_suffix
1594# for backward compatibility:
1595ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001596
1597case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001599 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001600 ac_top_srcdir=$ac_top_builddir_sub
1601 ac_abs_top_srcdir=$ac_pwd ;;
1602 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604 ac_top_srcdir=$srcdir
1605 ac_abs_top_srcdir=$srcdir ;;
1606 *) # Relative name.
1607 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1608 ac_top_srcdir=$ac_top_build_prefix$srcdir
1609 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001610esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613 cd "$ac_dir" || { ac_status=$?; continue; }
1614 # Check for guested configure.
1615 if test -f "$ac_srcdir/configure.gnu"; then
1616 echo &&
1617 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1618 elif test -f "$ac_srcdir/configure"; then
1619 echo &&
1620 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001621 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001622 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001623 fi || ac_status=$?
1624 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001625 done
1626fi
1627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001628test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001629if $ac_init_version; then
1630 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001631python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001632generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001633
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001634Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001635This configure script is free software; the Free Software Foundation
1636gives unlimited permission to copy, distribute and modify it.
1637_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001638 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001640
1641## ------------------------ ##
1642## Autoconf initialization. ##
1643## ------------------------ ##
1644
1645# ac_fn_c_try_compile LINENO
1646# --------------------------
1647# Try to compile conftest.$ac_ext, and return whether this succeeded.
1648ac_fn_c_try_compile ()
1649{
1650 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1651 rm -f conftest.$ac_objext
1652 if { { ac_try="$ac_compile"
1653case "(($ac_try" in
1654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1655 *) ac_try_echo=$ac_try;;
1656esac
1657eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1658$as_echo "$ac_try_echo"; } >&5
1659 (eval "$ac_compile") 2>conftest.err
1660 ac_status=$?
1661 if test -s conftest.err; then
1662 grep -v '^ *+' conftest.err >conftest.er1
1663 cat conftest.er1 >&5
1664 mv -f conftest.er1 conftest.err
1665 fi
1666 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1667 test $ac_status = 0; } && {
1668 test -z "$ac_c_werror_flag" ||
1669 test ! -s conftest.err
1670 } && test -s conftest.$ac_objext; then :
1671 ac_retval=0
1672else
1673 $as_echo "$as_me: failed program was:" >&5
1674sed 's/^/| /' conftest.$ac_ext >&5
1675
1676 ac_retval=1
1677fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001678 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001679 as_fn_set_status $ac_retval
1680
1681} # ac_fn_c_try_compile
1682
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001683# ac_fn_c_try_cpp LINENO
1684# ----------------------
1685# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1686ac_fn_c_try_cpp ()
1687{
1688 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1689 if { { ac_try="$ac_cpp conftest.$ac_ext"
1690case "(($ac_try" in
1691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1692 *) ac_try_echo=$ac_try;;
1693esac
1694eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1695$as_echo "$ac_try_echo"; } >&5
1696 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1697 ac_status=$?
1698 if test -s conftest.err; then
1699 grep -v '^ *+' conftest.err >conftest.er1
1700 cat conftest.er1 >&5
1701 mv -f conftest.er1 conftest.err
1702 fi
1703 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1704 test $ac_status = 0; } > conftest.i && {
1705 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1706 test ! -s conftest.err
1707 }; then :
1708 ac_retval=0
1709else
1710 $as_echo "$as_me: failed program was:" >&5
1711sed 's/^/| /' conftest.$ac_ext >&5
1712
1713 ac_retval=1
1714fi
1715 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1716 as_fn_set_status $ac_retval
1717
1718} # ac_fn_c_try_cpp
1719
Matthias Kloseb9621712010-04-24 17:59:49 +00001720# ac_fn_c_try_link LINENO
1721# -----------------------
1722# Try to link conftest.$ac_ext, and return whether this succeeded.
1723ac_fn_c_try_link ()
1724{
1725 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1726 rm -f conftest.$ac_objext conftest$ac_exeext
1727 if { { ac_try="$ac_link"
1728case "(($ac_try" in
1729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1730 *) ac_try_echo=$ac_try;;
1731esac
1732eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1733$as_echo "$ac_try_echo"; } >&5
1734 (eval "$ac_link") 2>conftest.err
1735 ac_status=$?
1736 if test -s conftest.err; then
1737 grep -v '^ *+' conftest.err >conftest.er1
1738 cat conftest.er1 >&5
1739 mv -f conftest.er1 conftest.err
1740 fi
1741 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1742 test $ac_status = 0; } && {
1743 test -z "$ac_c_werror_flag" ||
1744 test ! -s conftest.err
1745 } && test -s conftest$ac_exeext && {
1746 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001747 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001748 }; then :
1749 ac_retval=0
1750else
1751 $as_echo "$as_me: failed program was:" >&5
1752sed 's/^/| /' conftest.$ac_ext >&5
1753
1754 ac_retval=1
1755fi
1756 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1757 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1758 # interfere with the next link command; also delete a directory that is
1759 # left behind by Apple's compiler. We do this before executing the actions.
1760 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001761 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001762 as_fn_set_status $ac_retval
1763
1764} # ac_fn_c_try_link
1765
Matthias Kloseb9621712010-04-24 17:59:49 +00001766# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1767# -------------------------------------------------------
1768# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1769# the include files in INCLUDES and setting the cache variable VAR
1770# accordingly.
1771ac_fn_c_check_header_mongrel ()
1772{
1773 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001774 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1776$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001777if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001778 $as_echo_n "(cached) " >&6
1779fi
1780eval ac_res=\$$3
1781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1782$as_echo "$ac_res" >&6; }
1783else
1784 # Is the header compilable?
1785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1786$as_echo_n "checking $2 usability... " >&6; }
1787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1788/* end confdefs.h. */
1789$4
1790#include <$2>
1791_ACEOF
1792if ac_fn_c_try_compile "$LINENO"; then :
1793 ac_header_compiler=yes
1794else
1795 ac_header_compiler=no
1796fi
1797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1799$as_echo "$ac_header_compiler" >&6; }
1800
1801# Is the header present?
1802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1803$as_echo_n "checking $2 presence... " >&6; }
1804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1805/* end confdefs.h. */
1806#include <$2>
1807_ACEOF
1808if ac_fn_c_try_cpp "$LINENO"; then :
1809 ac_header_preproc=yes
1810else
1811 ac_header_preproc=no
1812fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001813rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1815$as_echo "$ac_header_preproc" >&6; }
1816
1817# So? What about this header?
1818case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1819 yes:no: )
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1821$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1823$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1824 ;;
1825 no:yes:* )
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1827$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1829$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1831$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1833$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&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;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001836( $as_echo "## --------------------------------------- ##
1837## Report this to https://bugs.python.org/ ##
1838## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001839 ) | sed "s/^/$as_me: WARNING: /" >&2
1840 ;;
1841esac
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1843$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001844if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001845 $as_echo_n "(cached) " >&6
1846else
1847 eval "$3=\$ac_header_compiler"
1848fi
1849eval ac_res=\$$3
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1851$as_echo "$ac_res" >&6; }
1852fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001853 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001854
1855} # ac_fn_c_check_header_mongrel
1856
1857# ac_fn_c_try_run LINENO
1858# ----------------------
1859# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1860# that executables *can* be run.
1861ac_fn_c_try_run ()
1862{
1863 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1864 if { { ac_try="$ac_link"
1865case "(($ac_try" in
1866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1867 *) ac_try_echo=$ac_try;;
1868esac
1869eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1870$as_echo "$ac_try_echo"; } >&5
1871 (eval "$ac_link") 2>&5
1872 ac_status=$?
1873 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1874 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1875 { { case "(($ac_try" in
1876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1877 *) ac_try_echo=$ac_try;;
1878esac
1879eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1880$as_echo "$ac_try_echo"; } >&5
1881 (eval "$ac_try") 2>&5
1882 ac_status=$?
1883 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1884 test $ac_status = 0; }; }; then :
1885 ac_retval=0
1886else
1887 $as_echo "$as_me: program exited with status $ac_status" >&5
1888 $as_echo "$as_me: failed program was:" >&5
1889sed 's/^/| /' conftest.$ac_ext >&5
1890
1891 ac_retval=$ac_status
1892fi
1893 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001894 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001895 as_fn_set_status $ac_retval
1896
1897} # ac_fn_c_try_run
1898
1899# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1900# -------------------------------------------------------
1901# Tests whether HEADER exists and can be compiled using the include files in
1902# INCLUDES, setting the cache variable VAR accordingly.
1903ac_fn_c_check_header_compile ()
1904{
1905 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1907$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001908if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001909 $as_echo_n "(cached) " >&6
1910else
1911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1912/* end confdefs.h. */
1913$4
1914#include <$2>
1915_ACEOF
1916if ac_fn_c_try_compile "$LINENO"; then :
1917 eval "$3=yes"
1918else
1919 eval "$3=no"
1920fi
1921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1922fi
1923eval ac_res=\$$3
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1925$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001926 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001927
1928} # ac_fn_c_check_header_compile
1929
Matthias Kloseb9621712010-04-24 17:59:49 +00001930# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1931# -------------------------------------------
1932# Tests whether TYPE exists after having included INCLUDES, setting cache
1933# variable VAR accordingly.
1934ac_fn_c_check_type ()
1935{
1936 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1938$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001939if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001940 $as_echo_n "(cached) " >&6
1941else
1942 eval "$3=no"
1943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1944/* end confdefs.h. */
1945$4
1946int
1947main ()
1948{
1949if (sizeof ($2))
1950 return 0;
1951 ;
1952 return 0;
1953}
1954_ACEOF
1955if ac_fn_c_try_compile "$LINENO"; then :
1956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1957/* end confdefs.h. */
1958$4
1959int
1960main ()
1961{
1962if (sizeof (($2)))
1963 return 0;
1964 ;
1965 return 0;
1966}
1967_ACEOF
1968if ac_fn_c_try_compile "$LINENO"; then :
1969
1970else
1971 eval "$3=yes"
1972fi
1973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1974fi
1975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1976fi
1977eval ac_res=\$$3
1978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1979$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001980 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001981
1982} # ac_fn_c_check_type
1983
Matthias Kloseb9621712010-04-24 17:59:49 +00001984# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1985# --------------------------------------------
1986# Tries to find the compile-time value of EXPR in a program that includes
1987# INCLUDES, setting VAR accordingly. Returns whether the value could be
1988# computed
1989ac_fn_c_compute_int ()
1990{
1991 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1992 if test "$cross_compiling" = yes; then
1993 # Depending upon the size, compute the lo and hi bounds.
1994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995/* end confdefs.h. */
1996$4
1997int
1998main ()
1999{
2000static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002001test_array [0] = 0;
2002return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002003
2004 ;
2005 return 0;
2006}
2007_ACEOF
2008if ac_fn_c_try_compile "$LINENO"; then :
2009 ac_lo=0 ac_mid=0
2010 while :; do
2011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012/* end confdefs.h. */
2013$4
2014int
2015main ()
2016{
2017static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002018test_array [0] = 0;
2019return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002020
2021 ;
2022 return 0;
2023}
2024_ACEOF
2025if ac_fn_c_try_compile "$LINENO"; then :
2026 ac_hi=$ac_mid; break
2027else
2028 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2029 if test $ac_lo -le $ac_mid; then
2030 ac_lo= ac_hi=
2031 break
2032 fi
2033 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2034fi
2035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2036 done
2037else
2038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2039/* end confdefs.h. */
2040$4
2041int
2042main ()
2043{
2044static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002045test_array [0] = 0;
2046return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002047
2048 ;
2049 return 0;
2050}
2051_ACEOF
2052if ac_fn_c_try_compile "$LINENO"; then :
2053 ac_hi=-1 ac_mid=-1
2054 while :; do
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002062test_array [0] = 0;
2063return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002064
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070 ac_lo=$ac_mid; break
2071else
2072 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2073 if test $ac_mid -le $ac_hi; then
2074 ac_lo= ac_hi=
2075 break
2076 fi
2077 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080 done
2081else
2082 ac_lo= ac_hi=
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087# Binary search between lo and hi bounds.
2088while test "x$ac_lo" != "x$ac_hi"; do
2089 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2091/* end confdefs.h. */
2092$4
2093int
2094main ()
2095{
2096static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002097test_array [0] = 0;
2098return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002099
2100 ;
2101 return 0;
2102}
2103_ACEOF
2104if ac_fn_c_try_compile "$LINENO"; then :
2105 ac_hi=$ac_mid
2106else
2107 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2108fi
2109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2110done
2111case $ac_lo in #((
2112?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2113'') ac_retval=1 ;;
2114esac
2115 else
2116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2117/* end confdefs.h. */
2118$4
2119static long int longval () { return $2; }
2120static unsigned long int ulongval () { return $2; }
2121#include <stdio.h>
2122#include <stdlib.h>
2123int
2124main ()
2125{
2126
2127 FILE *f = fopen ("conftest.val", "w");
2128 if (! f)
2129 return 1;
2130 if (($2) < 0)
2131 {
2132 long int i = longval ();
2133 if (i != ($2))
2134 return 1;
2135 fprintf (f, "%ld", i);
2136 }
2137 else
2138 {
2139 unsigned long int i = ulongval ();
2140 if (i != ($2))
2141 return 1;
2142 fprintf (f, "%lu", i);
2143 }
2144 /* Do not output a trailing newline, as this causes \r\n confusion
2145 on some platforms. */
2146 return ferror (f) || fclose (f) != 0;
2147
2148 ;
2149 return 0;
2150}
2151_ACEOF
2152if ac_fn_c_try_run "$LINENO"; then :
2153 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2154else
2155 ac_retval=1
2156fi
2157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2158 conftest.$ac_objext conftest.beam conftest.$ac_ext
2159rm -f conftest.val
2160
2161 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002162 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002163 as_fn_set_status $ac_retval
2164
2165} # ac_fn_c_compute_int
2166
2167# ac_fn_c_check_func LINENO FUNC VAR
2168# ----------------------------------
2169# Tests whether FUNC exists, setting the cache variable VAR accordingly
2170ac_fn_c_check_func ()
2171{
2172 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2174$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002175if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002176 $as_echo_n "(cached) " >&6
2177else
2178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2179/* end confdefs.h. */
2180/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2181 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2182#define $2 innocuous_$2
2183
2184/* System header to define __stub macros and hopefully few prototypes,
2185 which can conflict with char $2 (); below.
2186 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2187 <limits.h> exists even on freestanding compilers. */
2188
2189#ifdef __STDC__
2190# include <limits.h>
2191#else
2192# include <assert.h>
2193#endif
2194
2195#undef $2
2196
2197/* Override any GCC internal prototype to avoid an error.
2198 Use char because int might match the return type of a GCC
2199 builtin and then its argument prototype would still apply. */
2200#ifdef __cplusplus
2201extern "C"
2202#endif
2203char $2 ();
2204/* The GNU C library defines this for functions which it implements
2205 to always fail with ENOSYS. Some functions are actually named
2206 something starting with __ and the normal name is an alias. */
2207#if defined __stub_$2 || defined __stub___$2
2208choke me
2209#endif
2210
2211int
2212main ()
2213{
2214return $2 ();
2215 ;
2216 return 0;
2217}
2218_ACEOF
2219if ac_fn_c_try_link "$LINENO"; then :
2220 eval "$3=yes"
2221else
2222 eval "$3=no"
2223fi
2224rm -f core conftest.err conftest.$ac_objext \
2225 conftest$ac_exeext conftest.$ac_ext
2226fi
2227eval ac_res=\$$3
2228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2229$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002230 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002231
2232} # ac_fn_c_check_func
2233
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002234# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2235# ---------------------------------------------
2236# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2237# accordingly.
2238ac_fn_c_check_decl ()
2239{
2240 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2241 as_decl_name=`echo $2|sed 's/ *(.*//'`
2242 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2244$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2245if eval \${$3+:} false; then :
2246 $as_echo_n "(cached) " >&6
2247else
2248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2249/* end confdefs.h. */
2250$4
2251int
2252main ()
2253{
2254#ifndef $as_decl_name
2255#ifdef __cplusplus
2256 (void) $as_decl_use;
2257#else
2258 (void) $as_decl_name;
2259#endif
2260#endif
2261
2262 ;
2263 return 0;
2264}
2265_ACEOF
2266if ac_fn_c_try_compile "$LINENO"; then :
2267 eval "$3=yes"
2268else
2269 eval "$3=no"
2270fi
2271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2272fi
2273eval ac_res=\$$3
2274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2275$as_echo "$ac_res" >&6; }
2276 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2277
2278} # ac_fn_c_check_decl
2279
Matthias Kloseb9621712010-04-24 17:59:49 +00002280# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2281# ----------------------------------------------------
2282# Tries to find if the field MEMBER exists in type AGGR, after including
2283# INCLUDES, setting cache variable VAR accordingly.
2284ac_fn_c_check_member ()
2285{
2286 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2288$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002289if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002290 $as_echo_n "(cached) " >&6
2291else
2292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2293/* end confdefs.h. */
2294$5
2295int
2296main ()
2297{
2298static $2 ac_aggr;
2299if (ac_aggr.$3)
2300return 0;
2301 ;
2302 return 0;
2303}
2304_ACEOF
2305if ac_fn_c_try_compile "$LINENO"; then :
2306 eval "$4=yes"
2307else
2308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2309/* end confdefs.h. */
2310$5
2311int
2312main ()
2313{
2314static $2 ac_aggr;
2315if (sizeof ac_aggr.$3)
2316return 0;
2317 ;
2318 return 0;
2319}
2320_ACEOF
2321if ac_fn_c_try_compile "$LINENO"; then :
2322 eval "$4=yes"
2323else
2324 eval "$4=no"
2325fi
2326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2327fi
2328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2329fi
2330eval ac_res=\$$4
2331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2332$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002333 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002334
2335} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002336cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002337This file contains any messages produced by compilers while
2338running configure, to aid debugging if configure makes a mistake.
2339
Ned Deily4829bc62016-09-12 17:29:04 -04002340It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002341generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002342
2343 $ $0 $@
2344
2345_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002346exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002347{
2348cat <<_ASUNAME
2349## --------- ##
2350## Platform. ##
2351## --------- ##
2352
2353hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2354uname -m = `(uname -m) 2>/dev/null || echo unknown`
2355uname -r = `(uname -r) 2>/dev/null || echo unknown`
2356uname -s = `(uname -s) 2>/dev/null || echo unknown`
2357uname -v = `(uname -v) 2>/dev/null || echo unknown`
2358
2359/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2360/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2361
2362/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2363/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2364/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002365/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002366/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2367/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2368/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2369
2370_ASUNAME
2371
2372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2373for as_dir in $PATH
2374do
2375 IFS=$as_save_IFS
2376 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002377 $as_echo "PATH: $as_dir"
2378 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002379IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002380
2381} >&5
2382
2383cat >&5 <<_ACEOF
2384
2385
2386## ----------- ##
2387## Core tests. ##
2388## ----------- ##
2389
2390_ACEOF
2391
2392
2393# Keep a trace of the command line.
2394# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002395# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002396# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002397# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002398ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002399ac_configure_args0=
2400ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002401ac_must_keep_next=false
2402for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002403do
Skip Montanaro6dead952003-09-25 14:50:04 +00002404 for ac_arg
2405 do
2406 case $ac_arg in
2407 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2408 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2409 | -silent | --silent | --silen | --sile | --sil)
2410 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002411 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002412 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002413 esac
2414 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002417 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002419 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002421 case $ac_arg in
2422 *=* | --config-cache | -C | -disable-* | --disable-* \
2423 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2424 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2425 | -with-* | --with-* | -without-* | --without-* | --x)
2426 case "$ac_configure_args0 " in
2427 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2428 esac
2429 ;;
2430 -* ) ac_must_keep_next=true ;;
2431 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002433 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 ;;
2435 esac
2436 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002437done
Matthias Kloseb9621712010-04-24 17:59:49 +00002438{ ac_configure_args0=; unset ac_configure_args0;}
2439{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002440
2441# When interrupted or exit'd, cleanup temporary files, and complete
2442# config.log. We remove comments because anyway the quotes in there
2443# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002444# WARNING: Use '\'' to represent an apostrophe within the trap.
2445# 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 +00002446trap 'exit_status=$?
2447 # Save into config.log some information that might help in debugging.
2448 {
2449 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002450
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002451 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002452## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002453## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002454 echo
2455 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456(
2457 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2458 eval ac_val=\$$ac_var
2459 case $ac_val in #(
2460 *${as_nl}*)
2461 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002462 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2463$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002464 esac
2465 case $ac_var in #(
2466 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002467 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2468 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 esac ;;
2470 esac
2471 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002472 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2474 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 "s/'\''/'\''\\\\'\'''\''/g;
2477 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2478 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002479 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002481 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 esac |
2483 sort
2484)
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002486
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002487 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002488## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002489## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 echo
2491 for ac_var in $ac_subst_vars
2492 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 eval ac_val=\$$ac_var
2494 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002497 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 done | sort
2499 echo
2500
2501 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002502 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002504## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 echo
2506 for ac_var in $ac_subst_files
2507 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 eval ac_val=\$$ac_var
2509 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 done | sort
2514 echo
2515 fi
2516
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002518 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002519## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002520## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 echo
2524 fi
2525 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 $as_echo "$as_me: caught signal $ac_signal"
2527 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 rm -f core *.core core.conftest.* &&
2530 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002533for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002534 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002535done
2536ac_signal=0
2537
2538# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002540
Matthias Kloseb9621712010-04-24 17:59:49 +00002541$as_echo "/* confdefs.h */" > confdefs.h
2542
Martin v. Löwis11437992002-04-12 09:54:03 +00002543# Predefined preprocessor variables.
2544
2545cat >>confdefs.h <<_ACEOF
2546#define PACKAGE_NAME "$PACKAGE_NAME"
2547_ACEOF
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_VERSION "$PACKAGE_VERSION"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_STRING "$PACKAGE_STRING"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2563_ACEOF
2564
Matthias Kloseb9621712010-04-24 17:59:49 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_URL "$PACKAGE_URL"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569
2570# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002571# Prefer an explicitly selected file to automatically selected ones.
2572ac_site_file1=NONE
2573ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002575 # We do not want a PATH search for config.site.
2576 case $CONFIG_SITE in #((
2577 -*) ac_site_file1=./$CONFIG_SITE;;
2578 */*) ac_site_file1=$CONFIG_SITE;;
2579 *) ac_site_file1=./$CONFIG_SITE;;
2580 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 ac_site_file1=$prefix/share/config.site
2583 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584else
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 ac_site_file1=$ac_default_prefix/share/config.site
2586 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002588for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589do
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 test "x$ac_site_file" = xNONE && continue
2591 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2592 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2593$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002594 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002595 . "$ac_site_file" \
2596 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2597$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2598as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002599See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002600 fi
2601done
2602
2603if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002604 # Some versions of bash will fail to source /dev/null (special files
2605 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2606 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2607 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2608$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002610 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2611 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 esac
2613 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002614else
Matthias Kloseb9621712010-04-24 17:59:49 +00002615 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2616$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 >$cache_file
2618fi
2619
2620# Check that the precious variables saved in the cache have kept the same
2621# value.
2622ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2625 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2627 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 case $ac_old_set,$ac_new_set in
2629 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2631$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 +00002632 ac_cache_corrupted=: ;;
2633 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2635$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 ac_cache_corrupted=: ;;
2637 ,);;
2638 *)
2639 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002640 # differences in whitespace do not lead to failure.
2641 ac_old_val_w=`echo x $ac_old_val`
2642 ac_new_val_w=`echo x $ac_new_val`
2643 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2645$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2646 ac_cache_corrupted=:
2647 else
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2649$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2650 eval $ac_var=\$ac_old_val
2651 fi
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2653$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2655$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 fi;;
2657 esac
2658 # Pass precious variables to config.status.
2659 if test "$ac_new_set" = set; then
2660 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002661 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002662 *) ac_arg=$ac_var=$ac_new_val ;;
2663 esac
2664 case " $ac_configure_args " in
2665 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002666 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 esac
2668 fi
2669done
2670if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002671 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2672$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2674$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002675 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002677## -------------------- ##
2678## Main body of script. ##
2679## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002680
Guido van Rossum7f43da71994-08-01 12:15:30 +00002681ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002682ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002683ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2684ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2685ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686
Guido van Rossum627b2d71993-12-24 10:39:16 +00002687
Michael W. Hudson54241132001-12-07 15:38:26 +00002688
Trent Nelson4d4ec652012-10-16 08:51:24 -04002689
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002690if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002691 # If we're building out-of-tree, we need to make sure the following
2692 # resources get picked up before their $srcdir counterparts.
2693 # Objects/ -> typeslots.inc
2694 # Include/ -> Python-ast.h, graminit.h
2695 # Python/ -> importlib.h
2696 # (A side effect of this is that these resources will automatically be
2697 # regenerated when building out-of-tree, regardless of whether or not
2698 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2699 # off.)
2700 BASECPPFLAGS="-IObjects -IInclude -IPython"
2701else
2702 BASECPPFLAGS=""
2703fi
2704
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002705
2706
2707
2708
Victor Stinner9ed34a82017-05-02 22:35:58 +02002709if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002710then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002711# Extract the first word of "git", so it can be a program name with args.
2712set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2714$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002715if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002716 $as_echo_n "(cached) " >&6
2717else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002718 if test -n "$HAS_GIT"; then
2719 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002720else
2721as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2722for as_dir in $PATH
2723do
2724 IFS=$as_save_IFS
2725 test -z "$as_dir" && as_dir=.
2726 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002727 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002728 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002729 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2730 break 2
2731 fi
2732done
2733 done
2734IFS=$as_save_IFS
2735
Ned Deily5c4b0d02017-03-04 00:19:55 -05002736 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002737fi
2738fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002739HAS_GIT=$ac_cv_prog_HAS_GIT
2740if test -n "$HAS_GIT"; then
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2742$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002743else
2744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2745$as_echo "no" >&6; }
2746fi
2747
2748
2749else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002750HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002751fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002752if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002753then
Ned Deily554626a2017-03-20 23:41:52 -04002754 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2755 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002756 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002757else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002758 GITVERSION=""
2759 GITTAG=""
2760 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002761fi
2762
2763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002764ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002765
2766
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002767ac_aux_dir=
2768for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2769 if test -f "$ac_dir/install-sh"; then
2770 ac_aux_dir=$ac_dir
2771 ac_install_sh="$ac_aux_dir/install-sh -c"
2772 break
2773 elif test -f "$ac_dir/install.sh"; then
2774 ac_aux_dir=$ac_dir
2775 ac_install_sh="$ac_aux_dir/install.sh -c"
2776 break
2777 elif test -f "$ac_dir/shtool"; then
2778 ac_aux_dir=$ac_dir
2779 ac_install_sh="$ac_aux_dir/shtool install -c"
2780 break
2781 fi
2782done
2783if test -z "$ac_aux_dir"; then
2784 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2785fi
2786
2787# These three variables are undocumented and unsupported,
2788# and are intended to be withdrawn in a future Autoconf release.
2789# They can cause serious problems if a builder's source tree is in a directory
2790# whose full name contains unusual characters.
2791ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2792ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2793ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2794
2795
2796# Make sure we can run config.sub.
2797$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2798 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2799
2800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2801$as_echo_n "checking build system type... " >&6; }
2802if ${ac_cv_build+:} false; then :
2803 $as_echo_n "(cached) " >&6
2804else
2805 ac_build_alias=$build_alias
2806test "x$ac_build_alias" = x &&
2807 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2808test "x$ac_build_alias" = x &&
2809 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2810ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2811 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2812
2813fi
2814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2815$as_echo "$ac_cv_build" >&6; }
2816case $ac_cv_build in
2817*-*-*) ;;
2818*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2819esac
2820build=$ac_cv_build
2821ac_save_IFS=$IFS; IFS='-'
2822set x $ac_cv_build
2823shift
2824build_cpu=$1
2825build_vendor=$2
2826shift; shift
2827# Remember, the first character of IFS is used to create $*,
2828# except with old shells:
2829build_os=$*
2830IFS=$ac_save_IFS
2831case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2832
2833
2834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2835$as_echo_n "checking host system type... " >&6; }
2836if ${ac_cv_host+:} false; then :
2837 $as_echo_n "(cached) " >&6
2838else
2839 if test "x$host_alias" = x; then
2840 ac_cv_host=$ac_cv_build
2841else
2842 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2843 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2844fi
2845
2846fi
2847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2848$as_echo "$ac_cv_host" >&6; }
2849case $ac_cv_host in
2850*-*-*) ;;
2851*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2852esac
2853host=$ac_cv_host
2854ac_save_IFS=$IFS; IFS='-'
2855set x $ac_cv_host
2856shift
2857host_cpu=$1
2858host_vendor=$2
2859shift; shift
2860# Remember, the first character of IFS is used to create $*,
2861# except with old shells:
2862host_os=$*
2863IFS=$ac_save_IFS
2864case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2865
2866
2867
doko@python.orga10e4a92013-01-25 18:45:12 +01002868
2869
Ned Deilyfcbc2462014-08-22 13:32:49 -07002870# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2871rm -f pybuilddir.txt
2872
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002873for ac_prog in python$PACKAGE_VERSION python3 python
2874do
2875 # Extract the first word of "$ac_prog", so it can be a program name with args.
2876set dummy $ac_prog; ac_word=$2
2877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2878$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002879if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002880 $as_echo_n "(cached) " >&6
2881else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002882 if test -n "$PYTHON_FOR_REGEN"; then
2883 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002884else
2885as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2886for as_dir in $PATH
2887do
2888 IFS=$as_save_IFS
2889 test -z "$as_dir" && as_dir=.
2890 for ac_exec_ext in '' $ac_executable_extensions; do
2891 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002892 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2894 break 2
2895 fi
2896done
2897 done
2898IFS=$as_save_IFS
2899
2900fi
2901fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002902PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2903if test -n "$PYTHON_FOR_REGEN"; then
2904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2905$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002906else
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2908$as_echo "no" >&6; }
2909fi
2910
2911
Victor Stinnera5c62a82017-05-03 18:21:48 +02002912 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002913done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002914test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002915
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002916
2917
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002918if test "$cross_compiling" = yes; then
2919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2920$as_echo_n "checking for python interpreter for cross build... " >&6; }
2921 if test -z "$PYTHON_FOR_BUILD"; then
2922 for interp in python$PACKAGE_VERSION python3 python; do
2923 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002924 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 +02002925 break
2926 fi
2927 interp=
2928 done
2929 if test x$interp = x; then
2930 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2931 fi
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2933$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002934 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 +02002935 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002936elif test "$cross_compiling" = maybe; then
2937 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002938else
2939 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2940fi
2941
2942
Martin v. Löwis11437992002-04-12 09:54:03 +00002943
Benjamin Petersond23f8222009-04-05 19:13:16 +00002944if test "$prefix" != "/"; then
2945 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2946fi
2947
2948
Martin v. Löwis11437992002-04-12 09:54:03 +00002949
2950
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002951# We don't use PACKAGE_ variables, and they cause conflicts
2952# with other autoconf-based packages that include Python.h
2953grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2954rm confdefs.h
2955mv confdefs.h.new confdefs.h
2956
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002957
Ned Deily4829bc62016-09-12 17:29:04 -04002958VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002959
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002960# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002961
2962SOVERSION=1.0
2963
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002964# The later defininition of _XOPEN_SOURCE disables certain features
2965# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2966
Matthias Kloseb9621712010-04-24 17:59:49 +00002967$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002968
2969
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002970# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2971# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2972# them.
2973
Matthias Kloseb9621712010-04-24 17:59:49 +00002974$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002975
2976
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002977# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2978# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2979# them.
2980
Matthias Kloseb9621712010-04-24 17:59:49 +00002981$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002982
2983
Martin v. Löwisd6320502004-08-12 13:45:08 +00002984# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002985# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2986# them.
2987
Matthias Kloseb9621712010-04-24 17:59:49 +00002988$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002989
2990
2991
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002992define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002993
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002994# Arguments passed to configure.
2995
2996CONFIG_ARGS="$ac_configure_args"
2997
Matthias Kloseb9621712010-04-24 17:59:49 +00002998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2999$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003000# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003001if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003002 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003003 case $enableval in
3004 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003005 # Locate the best usable SDK, see Mac/README.txt for more
3006 # information
3007 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003008 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003009 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003010 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3011 if test ! -d "${enableval}"
3012 then
3013 enableval=/
3014 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003015 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003016 ;;
3017 esac
3018 case $enableval in
3019 no)
3020 UNIVERSALSDK=
3021 enable_universalsdk=
3022 ;;
3023 *)
3024 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003025 if test ! -d "${UNIVERSALSDK}"
3026 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003027 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003029 ;;
3030 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003031
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003032
Thomas Wouters477c8d52006-05-27 19:21:47 +00003033else
3034
3035 UNIVERSALSDK=
3036 enable_universalsdk=
3037
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003038fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003039
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003040if test -n "${UNIVERSALSDK}"
3041then
Matthias Kloseb9621712010-04-24 17:59:49 +00003042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3043$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044else
Matthias Kloseb9621712010-04-24 17:59:49 +00003045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3046$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003049
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003050
Ned Deily87adb6e2013-10-18 21:09:56 -07003051ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003052
Ned Deilycbfb9a52012-06-23 16:02:19 -07003053# For backward compatibility reasons we prefer to select '32-bit' if available,
3054# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003055UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003056if test "`uname -s`" = "Darwin"
3057then
3058 if test -n "${UNIVERSALSDK}"
3059 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003060 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003061 then
3062 UNIVERSAL_ARCHS="intel"
3063 fi
3064 fi
3065fi
3066
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003067
Matthias Kloseb9621712010-04-24 17:59:49 +00003068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3069$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003070
3071# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003072if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003073 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074 UNIVERSAL_ARCHS="$withval"
3075
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076fi
3077
Ned Deily87adb6e2013-10-18 21:09:56 -07003078if test -n "${UNIVERSALSDK}"
3079then
3080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3081$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3082else
3083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3084$as_echo "no" >&6; }
3085fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003087
3088# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003089if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003090 withval=$with_framework_name;
3091 PYTHONFRAMEWORK=${withval}
3092 PYTHONFRAMEWORKDIR=${withval}.framework
3093 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3094
3095else
3096
3097 PYTHONFRAMEWORK=Python
3098 PYTHONFRAMEWORKDIR=Python.framework
3099 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3100
3101fi
3102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003103# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003104if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003105 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003106 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003107 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003108 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003109 esac
3110 case $enableval in
3111 no)
3112 PYTHONFRAMEWORK=
3113 PYTHONFRAMEWORKDIR=no-framework
3114 PYTHONFRAMEWORKPREFIX=
3115 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003116 FRAMEWORKINSTALLFIRST=
3117 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003118 FRAMEWORKALTINSTALLFIRST=
3119 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003120 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003121 if test "x${prefix}" = "xNONE"; then
3122 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3123 else
3124 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3125 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003126 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003127 ;;
3128 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003129 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003130 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003131 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003132 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003133 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3134 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003135 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003136 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003137
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003138 if test "x${prefix}" = "xNONE" ; then
3139 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003140
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003141 else
3142 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3143 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003144
3145 case "${enableval}" in
3146 /System*)
3147 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3148 if test "${prefix}" = "NONE" ; then
3149 # See below
3150 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3151 fi
3152 ;;
3153
3154 /Library*)
3155 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3156 ;;
3157
3158 */Library/Frameworks)
3159 MDIR="`dirname "${enableval}"`"
3160 MDIR="`dirname "${MDIR}"`"
3161 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3162
3163 if test "${prefix}" = "NONE"; then
3164 # User hasn't specified the
3165 # --prefix option, but wants to install
3166 # the framework in a non-default location,
3167 # ensure that the compatibility links get
3168 # installed relative to that prefix as well
3169 # instead of in /usr/local.
3170 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3171 fi
3172 ;;
3173
3174 *)
3175 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3176 ;;
3177 esac
3178
Jack Jansen127e56e2001-09-11 14:41:54 +00003179 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003180
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003181 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003182 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003183 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003184
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003185 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003186
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003187 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3188
3189 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3190
Jack Jansene578a632001-08-15 01:27:14 +00003191 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003192
Guido van Rossum563e7081996-09-10 18:20:48 +00003193else
Martin v. Löwis11437992002-04-12 09:54:03 +00003194
Jack Jansene578a632001-08-15 01:27:14 +00003195 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003196 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003197 PYTHONFRAMEWORKPREFIX=
3198 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199 FRAMEWORKINSTALLFIRST=
3200 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003201 FRAMEWORKALTINSTALLFIRST=
3202 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003203 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003204 if test "x${prefix}" = "xNONE" ; then
3205 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3206 else
3207 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3208 fi
Jack Jansene578a632001-08-15 01:27:14 +00003209 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003210
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003211
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003212fi
3213
Thomas Wouters477c8d52006-05-27 19:21:47 +00003214
3215
Michael W. Hudson54241132001-12-07 15:38:26 +00003216
3217
3218
3219
Jack Jansene578a632001-08-15 01:27:14 +00003220
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003221
3222
3223
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003224
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003225
Ned Deilyb8f944f2013-11-21 22:42:25 -08003226
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003227
3228cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003229#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003230_ACEOF
3231
3232
Jack Jansene578a632001-08-15 01:27:14 +00003233##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003234## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003235## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003236##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003237# Set name for machine-dependent library files
3238
Matthias Kloseb9621712010-04-24 17:59:49 +00003239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3240$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003241if test -z "$MACHDEP"
3242then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003243 # avoid using uname for cross builds
3244 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003245 # ac_sys_system and ac_sys_release are used for setting
3246 # a lot of different things including 'define_xopen_source'
3247 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003248 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003249 *-*-linux-android*)
3250 ac_sys_system=Linux-android
3251 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003252 *-*-linux*)
3253 ac_sys_system=Linux
3254 ;;
3255 *-*-cygwin*)
3256 ac_sys_system=Cygwin
3257 ;;
3258 *)
3259 # for now, limit cross builds to known configurations
3260 MACHDEP="unknown"
3261 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3262 esac
3263 ac_sys_release=
3264 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003265 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003266 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003267 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003268 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003269 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003270 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003271 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003272 fi
3273 ac_md_system=`echo $ac_sys_system |
3274 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3275 ac_md_release=`echo $ac_sys_release |
3276 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3277 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003278
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003279 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003280 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003281 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003282 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003283 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003284 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003285fi
Guido van Rossum91922671997-10-09 20:24:13 +00003286
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003287
3288if test "$cross_compiling" = yes; then
3289 case "$host" in
3290 *-*-linux*)
3291 case "$host_cpu" in
3292 arm*)
3293 _host_cpu=arm
3294 ;;
3295 *)
3296 _host_cpu=$host_cpu
3297 esac
3298 ;;
3299 *-*-cygwin*)
3300 _host_cpu=
3301 ;;
3302 *)
3303 # for now, limit cross builds to known configurations
3304 MACHDEP="unknown"
3305 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3306 esac
3307 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3308fi
3309
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003310# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3311# disable features if it is defined, without any means to access these
3312# features as extensions. For these systems, we skip the definition of
3313# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3314# some feature, make sure there is no alternative way to access this
3315# feature. Also, when using wildcards, make sure you have verified the
3316# need for not defining _XOPEN_SOURCE on all systems matching the
3317# wildcard, and that the wildcard does not include future systems
3318# (which may remove their limitations).
3319case $ac_sys_system/$ac_sys_release in
3320 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3321 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003322 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003323 # In addition, Stefan Krah confirms that issue #1244610 exists through
3324 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003325 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003326 define_xopen_source=no
3327 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3328 # also defined. This can be overridden by defining _BSD_SOURCE
3329 # As this has a different meaning on Linux, only define it on OpenBSD
3330
Matthias Kloseb9621712010-04-24 17:59:49 +00003331$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003332
3333 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003334 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003335 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3336 # also defined. This can be overridden by defining _BSD_SOURCE
3337 # As this has a different meaning on Linux, only define it on OpenBSD
3338
Matthias Kloseb9621712010-04-24 17:59:49 +00003339$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003340
3341 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003342 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3343 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3344 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003345 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 +00003346 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003347 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3348 # request to enable features supported by the standard as a request
3349 # to disable features not supported by the standard. The best way
3350 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3351 # entirely and define __EXTENSIONS__ instead.
3352 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003353 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003354 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3355 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003356 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003357 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003358 define_xopen_source=no;;
3359 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003360 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003361 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003362 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003363 # On FreeBSD 4, the math functions C89 does not cover are never defined
3364 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3365 FreeBSD/4.*)
3366 define_xopen_source=no;;
3367 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3368 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3369 # identifies itself as Darwin/7.*
3370 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3371 # disables platform specific features beyond repair.
3372 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3373 # has no effect, don't bother defining them
3374 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003375 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003376 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003377 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003378 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3379 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3380 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003381 AIX/4)
3382 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003383 AIX/5)
3384 if test `uname -r` -eq 1; then
3385 define_xopen_source=no
3386 fi
3387 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003388 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3389 # defining NI_NUMERICHOST.
3390 QNX/6.3.2)
3391 define_xopen_source=no
3392 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003393
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003394esac
3395
3396if test $define_xopen_source = yes
3397then
Victor Stinner14d098d2011-09-07 22:29:43 +02003398 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003399
Victor Stinner14d098d2011-09-07 22:29:43 +02003400$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003401
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003402
3403 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3404 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3405 # several APIs are not declared. Since this is also needed in some
3406 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003407
Matthias Kloseb9621712010-04-24 17:59:49 +00003408$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
3410
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003411
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003412$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003414fi
3415
Christian Heimes647cd872013-12-07 23:39:33 +01003416# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3417case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003418 hp*|HP*)
3419 define_stdc_a1=yes;;
3420 *)
3421 define_stdc_a1=no;;
3422esac
3423
3424if test $define_stdc_a1 = yes
3425then
Christian Heimes647cd872013-12-07 23:39:33 +01003426
3427$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3428
Christian Heimesb02bcae2013-12-08 15:21:08 +01003429fi
Christian Heimes647cd872013-12-07 23:39:33 +01003430
Jack Jansen6b08a402004-06-03 12:41:45 +00003431# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3432# it may influence the way we can build extensions, so distutils
3433# needs to check it
3434
Thomas Wouters477c8d52006-05-27 19:21:47 +00003435
Jack Jansen6b08a402004-06-03 12:41:45 +00003436CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003437EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003438
Guido van Rossum627b2d71993-12-24 10:39:16 +00003439# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003440
3441# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3442# for debug/optimization stuff. BASECFLAGS is for flags that are required
3443# just to get things to compile and link. Users are free to override OPT
3444# when running configure or make. The build should not break if they do.
3445# BASECFLAGS should generally not be messed with, however.
3446
3447# XXX shouldn't some/most/all of this code be merged with the stuff later
3448# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3450$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003451
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003452# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003453if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003454 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003455 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003456 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003457 without_gcc=yes;;
3458 yes) CC=gcc
3459 without_gcc=no;;
3460 *) CC=$withval
3461 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003462 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003463else
Martin v. Löwis11437992002-04-12 09:54:03 +00003464
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003465 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003466 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003467 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003468 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003469 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003470fi
3471
Matthias Kloseb9621712010-04-24 17:59:49 +00003472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3473$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003474
Zachary Ware5af85642015-12-21 12:09:17 -06003475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3476$as_echo_n "checking for --with-icc... " >&6; }
3477
3478# Check whether --with-icc was given.
3479if test "${with_icc+set}" = set; then :
3480 withval=$with_icc;
3481 case $withval in
3482 no) CC=${CC:-cc}
3483 with_icc=no;;
3484 yes) CC=icc
3485 CXX=icpc
3486 with_icc=yes;;
3487 *) CC=$withval
3488 with_icc=$withval;;
3489 esac
3490else
3491
3492 with_icc=no
3493fi
3494
3495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3496$as_echo "$with_icc" >&6; }
3497
Guido van Rossum8b131c51995-03-09 14:10:13 +00003498# If the user switches compilers, we can't believe the cache
3499if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3500then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003501 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003502(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003503fi
3504
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003505# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3506# when the compiler supports them, but we don't always want -O2, and
3507# we set -g later.
3508if test -z "$CFLAGS"; then
3509 CFLAGS=
3510fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003511
3512if test "$ac_sys_system" = "Darwin"
3513then
3514 # Compiler selection on MacOSX is more complicated than
3515 # AC_PROG_CC can handle, see Mac/README.txt for more
3516 # information
3517 if test -z "${CC}"
3518 then
3519 found_gcc=
3520 found_clang=
3521 as_save_IFS=$IFS; IFS=:
3522 for as_dir in $PATH
3523 do
3524 IFS=$as_save_IFS
3525 if test -x $as_dir/gcc; then
3526 if test -z "${found_gcc}"; then
3527 found_gcc=$as_dir/gcc
3528 fi
3529 fi
3530 if test -x $as_dir/clang; then
3531 if test -z "${found_clang}"; then
3532 found_clang=$as_dir/clang
3533 fi
3534 fi
3535 done
3536 IFS=$as_save_IFS
3537
3538 if test -n "$found_gcc" -a -n "$found_clang"
3539 then
3540 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3541 then
3542 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3543$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3544 CC="$found_clang"
3545 CXX="$found_clang++"
3546 fi
3547
3548
3549 elif test -z "$found_gcc" -a -n "$found_clang"
3550 then
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3552$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3553 CC="$found_clang"
3554 CXX="$found_clang++"
3555
3556 elif test -z "$found_gcc" -a -z "$found_clang"
3557 then
3558 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3559 if test -n "${found_clang}"
3560 then
3561 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3562$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3563 CC="${found_clang}"
3564 CXX="`/usr/bin/xcrun -find clang++`"
3565
3566 # else: use default behaviour
3567 fi
3568 fi
3569 fi
3570fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003571ac_ext=c
3572ac_cpp='$CPP $CPPFLAGS'
3573ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3574ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3575ac_compiler_gnu=$ac_cv_c_compiler_gnu
3576if test -n "$ac_tool_prefix"; then
3577 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3578set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3580$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003581if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003582 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003583else
3584 if test -n "$CC"; then
3585 ac_cv_prog_CC="$CC" # Let the user override the test.
3586else
Martin v. Löwis11437992002-04-12 09:54:03 +00003587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3588for as_dir in $PATH
3589do
3590 IFS=$as_save_IFS
3591 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003592 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003593 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003594 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003595 $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 +00003596 break 2
3597 fi
3598done
Matthias Kloseb9621712010-04-24 17:59:49 +00003599 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003600IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003601
Jack Jansendd19cf82001-12-06 22:36:17 +00003602fi
3603fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003604CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003605if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3607$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003608else
Matthias Kloseb9621712010-04-24 17:59:49 +00003609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3610$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003611fi
3612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613
Martin v. Löwis11437992002-04-12 09:54:03 +00003614fi
3615if test -z "$ac_cv_prog_CC"; then
3616 ac_ct_CC=$CC
3617 # Extract the first word of "gcc", so it can be a program name with args.
3618set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3620$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003621if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003622 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003623else
3624 if test -n "$ac_ct_CC"; then
3625 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3626else
3627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3628for as_dir in $PATH
3629do
3630 IFS=$as_save_IFS
3631 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003633 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003634 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 $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 +00003636 break 2
3637 fi
3638done
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003640IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003641
3642fi
3643fi
3644ac_ct_CC=$ac_cv_prog_ac_ct_CC
3645if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3647$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003648else
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3650$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003651fi
3652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003653 if test "x$ac_ct_CC" = x; then
3654 CC=""
3655 else
3656 case $cross_compiling:$ac_tool_warned in
3657yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003658{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3659$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003660ac_tool_warned=yes ;;
3661esac
3662 CC=$ac_ct_CC
3663 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003664else
3665 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003666fi
3667
Jack Jansendd19cf82001-12-06 22:36:17 +00003668if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669 if test -n "$ac_tool_prefix"; then
3670 # 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 +00003671set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3673$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003674if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003675 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003676else
3677 if test -n "$CC"; then
3678 ac_cv_prog_CC="$CC" # Let the user override the test.
3679else
Martin v. Löwis11437992002-04-12 09:54:03 +00003680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3681for as_dir in $PATH
3682do
3683 IFS=$as_save_IFS
3684 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003686 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003687 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 $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 +00003689 break 2
3690 fi
3691done
Matthias Kloseb9621712010-04-24 17:59:49 +00003692 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003693IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003694
3695fi
3696fi
3697CC=$ac_cv_prog_CC
3698if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3700$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003701else
Matthias Kloseb9621712010-04-24 17:59:49 +00003702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3703$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003704fi
3705
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003706
Martin v. Löwis11437992002-04-12 09:54:03 +00003707 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003708fi
3709if test -z "$CC"; then
3710 # Extract the first word of "cc", so it can be a program name with args.
3711set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3713$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003714if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003715 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003716else
3717 if test -n "$CC"; then
3718 ac_cv_prog_CC="$CC" # Let the user override the test.
3719else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003720 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003721as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3722for as_dir in $PATH
3723do
3724 IFS=$as_save_IFS
3725 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003726 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003727 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003728 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3729 ac_prog_rejected=yes
3730 continue
3731 fi
3732 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 $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 +00003734 break 2
3735 fi
3736done
Matthias Kloseb9621712010-04-24 17:59:49 +00003737 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003739
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003740if test $ac_prog_rejected = yes; then
3741 # We found a bogon in the path, so make sure we never use it.
3742 set dummy $ac_cv_prog_CC
3743 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003744 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003745 # We chose a different compiler from the bogus one.
3746 # However, it has the same basename, so the bogon will be chosen
3747 # first if we set CC to just the basename; use the full file name.
3748 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003749 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003750 fi
3751fi
3752fi
3753fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003754CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003755if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3757$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003758else
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3760$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003761fi
3762
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003763
Martin v. Löwis11437992002-04-12 09:54:03 +00003764fi
3765if test -z "$CC"; then
3766 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003768 do
3769 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3770set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3772$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003773if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003775else
3776 if test -n "$CC"; then
3777 ac_cv_prog_CC="$CC" # Let the user override the test.
3778else
Martin v. Löwis11437992002-04-12 09:54:03 +00003779as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3780for as_dir in $PATH
3781do
3782 IFS=$as_save_IFS
3783 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003785 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003786 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 $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 +00003788 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003789 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003790done
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003792IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003793
3794fi
3795fi
3796CC=$ac_cv_prog_CC
3797if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3799$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003800else
Matthias Kloseb9621712010-04-24 17:59:49 +00003801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3802$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003803fi
3804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805
Martin v. Löwis11437992002-04-12 09:54:03 +00003806 test -n "$CC" && break
3807 done
3808fi
3809if test -z "$CC"; then
3810 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003812do
3813 # Extract the first word of "$ac_prog", so it can be a program name with args.
3814set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3816$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003817if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003818 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003819else
3820 if test -n "$ac_ct_CC"; then
3821 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3822else
3823as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3824for as_dir in $PATH
3825do
3826 IFS=$as_save_IFS
3827 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003828 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003829 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003830 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 $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 +00003832 break 2
3833 fi
3834done
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003836IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003837
Martin v. Löwis11437992002-04-12 09:54:03 +00003838fi
3839fi
3840ac_ct_CC=$ac_cv_prog_ac_ct_CC
3841if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3843$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003844else
Matthias Kloseb9621712010-04-24 17:59:49 +00003845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3846$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003847fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003848
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849
Martin v. Löwis11437992002-04-12 09:54:03 +00003850 test -n "$ac_ct_CC" && break
3851done
Michael W. Hudson54241132001-12-07 15:38:26 +00003852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853 if test "x$ac_ct_CC" = x; then
3854 CC=""
3855 else
3856 case $cross_compiling:$ac_tool_warned in
3857yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003858{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3859$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003860ac_tool_warned=yes ;;
3861esac
3862 CC=$ac_ct_CC
3863 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003864fi
3865
3866fi
3867
3868
Matthias Kloseb9621712010-04-24 17:59:49 +00003869test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3870$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003871as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003872See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003873
3874# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003875$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3876set X $ac_compile
3877ac_compiler=$2
3878for ac_option in --version -v -V -qversion; do
3879 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003880case "(($ac_try" in
3881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3882 *) ac_try_echo=$ac_try;;
3883esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003884eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3885$as_echo "$ac_try_echo"; } >&5
3886 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003887 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003888 if test -s conftest.err; then
3889 sed '10a\
3890... rest of stderr output deleted ...
3891 10q' conftest.err >conftest.er1
3892 cat conftest.er1 >&5
3893 fi
3894 rm -f conftest.er1 conftest.err
3895 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3896 test $ac_status = 0; }
3897done
Martin v. Löwis11437992002-04-12 09:54:03 +00003898
Matthias Kloseb9621712010-04-24 17:59:49 +00003899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003900/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003901
Martin v. Löwis11437992002-04-12 09:54:03 +00003902int
3903main ()
3904{
3905
3906 ;
3907 return 0;
3908}
3909_ACEOF
3910ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003911ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003912# Try to create an executable without -o first, disregard a.out.
3913# It will help us diagnose broken compilers, and finding out an intuition
3914# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3916$as_echo_n "checking whether the C compiler works... " >&6; }
3917ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3918
3919# The possible output files:
3920ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3921
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922ac_rmfiles=
3923for ac_file in $ac_files
3924do
3925 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003926 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003927 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3928 esac
3929done
3930rm -f $ac_rmfiles
3931
Matthias Kloseb9621712010-04-24 17:59:49 +00003932if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933case "(($ac_try" in
3934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3935 *) ac_try_echo=$ac_try;;
3936esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003937eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3938$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003940 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003941 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3942 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3944# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3945# in a Makefile. We should not override ac_cv_exeext if it was cached,
3946# so that the user can short-circuit this test for compilers unknown to
3947# Autoconf.
3948for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003949do
3950 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003951 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003952 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003953 ;;
3954 [ab].out )
3955 # We found the default executable, but exeext='' is most
3956 # certainly right.
3957 break;;
3958 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003959 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960 then :; else
3961 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3962 fi
3963 # We set ac_cv_exeext here because the later test for it is not
3964 # safe: cross compilers may not add the suffix if given an `-o'
3965 # argument, so we may need to know it at that point already.
3966 # Even if this section looks crufty: it has the advantage of
3967 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003968 break;;
3969 * )
3970 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003971 esac
3972done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973test "$ac_cv_exeext" = no && ac_cv_exeext=
3974
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003975else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003976 ac_file=''
3977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003978if test -z "$ac_file"; then :
3979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3980$as_echo "no" >&6; }
3981$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003982sed 's/^/| /' conftest.$ac_ext >&5
3983
Matthias Kloseb9621712010-04-24 17:59:49 +00003984{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3985$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003986as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003987See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003988else
3989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3990$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3993$as_echo_n "checking for C compiler default output file name... " >&6; }
3994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3995$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003996ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003997
Matthias Kloseb9621712010-04-24 17:59:49 +00003998rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003999ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4001$as_echo_n "checking for suffix of executables... " >&6; }
4002if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004003case "(($ac_try" in
4004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4005 *) ac_try_echo=$ac_try;;
4006esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004007eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4008$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004010 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004011 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4012 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004013 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4014# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4015# work properly (i.e., refer to `conftest.exe'), while it won't with
4016# `rm'.
4017for ac_file in conftest.exe conftest conftest.*; do
4018 test -f "$ac_file" || continue
4019 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004020 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004021 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4022 break;;
4023 * ) break;;
4024 esac
4025done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004026else
Matthias Kloseb9621712010-04-24 17:59:49 +00004027 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4028$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004029as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004030See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004031fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004032rm -f conftest conftest$ac_cv_exeext
4033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4034$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004035
4036rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004037EXEEXT=$ac_cv_exeext
4038ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4040/* end confdefs.h. */
4041#include <stdio.h>
4042int
4043main ()
4044{
4045FILE *f = fopen ("conftest.out", "w");
4046 return ferror (f) || fclose (f) != 0;
4047
4048 ;
4049 return 0;
4050}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004052ac_clean_files="$ac_clean_files conftest.out"
4053# Check that the compiler produces executables we can run. If not, either
4054# the compiler is broken, or we cross compile.
4055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4056$as_echo_n "checking whether we are cross compiling... " >&6; }
4057if test "$cross_compiling" != yes; then
4058 { { ac_try="$ac_link"
4059case "(($ac_try" in
4060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4061 *) ac_try_echo=$ac_try;;
4062esac
4063eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4064$as_echo "$ac_try_echo"; } >&5
4065 (eval "$ac_link") 2>&5
4066 ac_status=$?
4067 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4068 test $ac_status = 0; }
4069 if { ac_try='./conftest$ac_cv_exeext'
4070 { { case "(($ac_try" in
4071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4072 *) ac_try_echo=$ac_try;;
4073esac
4074eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4075$as_echo "$ac_try_echo"; } >&5
4076 (eval "$ac_try") 2>&5
4077 ac_status=$?
4078 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4079 test $ac_status = 0; }; }; then
4080 cross_compiling=no
4081 else
4082 if test "$cross_compiling" = maybe; then
4083 cross_compiling=yes
4084 else
4085 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4086$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004087as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004088If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004089See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004090 fi
4091 fi
4092fi
4093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4094$as_echo "$cross_compiling" >&6; }
4095
4096rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4097ac_clean_files=$ac_clean_files_save
4098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4099$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004100if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004101 $as_echo_n "(cached) " >&6
4102else
4103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004104/* end confdefs.h. */
4105
4106int
4107main ()
4108{
4109
4110 ;
4111 return 0;
4112}
4113_ACEOF
4114rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004115if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004116case "(($ac_try" in
4117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4118 *) ac_try_echo=$ac_try;;
4119esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004120eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4121$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004122 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004123 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004124 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4125 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004126 for ac_file in conftest.o conftest.obj conftest.*; do
4127 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004128 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004130 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4131 break;;
4132 esac
4133done
4134else
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004136sed 's/^/| /' conftest.$ac_ext >&5
4137
Matthias Kloseb9621712010-04-24 17:59:49 +00004138{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4139$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004140as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004141See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004142fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004143rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4146$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004147OBJEXT=$ac_cv_objext
4148ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4150$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004151if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004152 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004153else
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004155/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004156
Martin v. Löwis11437992002-04-12 09:54:03 +00004157int
4158main ()
4159{
4160#ifndef __GNUC__
4161 choke me
4162#endif
4163
4164 ;
4165 return 0;
4166}
4167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004168if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004169 ac_compiler_gnu=yes
4170else
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004174ac_cv_c_compiler_gnu=$ac_compiler_gnu
4175
4176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4178$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4179if test $ac_compiler_gnu = yes; then
4180 GCC=yes
4181else
4182 GCC=
4183fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004184ac_test_CFLAGS=${CFLAGS+set}
4185ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4187$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004188if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004189 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004190else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004191 ac_save_c_werror_flag=$ac_c_werror_flag
4192 ac_c_werror_flag=yes
4193 ac_cv_prog_cc_g=no
4194 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004197
Martin v. Löwis11437992002-04-12 09:54:03 +00004198int
4199main ()
4200{
4201
4202 ;
4203 return 0;
4204}
4205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004206if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004207 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004208else
Matthias Kloseb9621712010-04-24 17:59:49 +00004209 CFLAGS=""
4210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004211/* end confdefs.h. */
4212
4213int
4214main ()
4215{
4216
4217 ;
4218 return 0;
4219}
4220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004221if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004222
Matthias Kloseb9621712010-04-24 17:59:49 +00004223else
4224 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004225 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227/* end confdefs.h. */
4228
4229int
4230main ()
4231{
4232
4233 ;
4234 return 0;
4235}
4236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004237if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004238 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4245 ac_c_werror_flag=$ac_save_c_werror_flag
4246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4248$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004249if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004250 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004251elif test $ac_cv_prog_cc_g = yes; then
4252 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004253 CFLAGS="-g -O2"
4254 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004255 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004256 fi
4257else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004258 if test "$GCC" = yes; then
4259 CFLAGS="-O2"
4260 else
4261 CFLAGS=
4262 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4265$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004266if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004267 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004268else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004269 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004270ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004272/* end confdefs.h. */
4273#include <stdarg.h>
4274#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004275struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004276/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4277struct buf { int x; };
4278FILE * (*rcsopen) (struct buf *, struct stat *, int);
4279static char *e (p, i)
4280 char **p;
4281 int i;
4282{
4283 return p[i];
4284}
4285static char *f (char * (*g) (char **, int), char **p, ...)
4286{
4287 char *s;
4288 va_list v;
4289 va_start (v,p);
4290 s = g (p, va_arg (v,int));
4291 va_end (v);
4292 return s;
4293}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004294
4295/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4296 function prototypes and stuff, but not '\xHH' hex character constants.
4297 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004299 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4300 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004302int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4303
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4305 inside strings and character constants. */
4306#define FOO(x) 'x'
4307int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4308
Skip Montanaro6dead952003-09-25 14:50:04 +00004309int test (int i, double x);
4310struct s1 {int (*f) (int a);};
4311struct s2 {int (*f) (double a);};
4312int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4313int argc;
4314char **argv;
4315int
4316main ()
4317{
4318return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4319 ;
4320 return 0;
4321}
4322_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4324 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004325do
4326 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004327 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330rm -f core conftest.err conftest.$ac_objext
4331 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004332done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004334CC=$ac_save_CC
4335
4336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337# AC_CACHE_VAL
4338case "x$ac_cv_prog_cc_c89" in
4339 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4341$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4344$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004345 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4348$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004349esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004350if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004351
Matthias Kloseb9621712010-04-24 17:59:49 +00004352fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004353
Martin v. Löwis11437992002-04-12 09:54:03 +00004354ac_ext=c
4355ac_cpp='$CPP $CPPFLAGS'
4356ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4357ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4358ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004359
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004360ac_ext=c
4361ac_cpp='$CPP $CPPFLAGS'
4362ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4363ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4364ac_compiler_gnu=$ac_cv_c_compiler_gnu
4365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4366$as_echo_n "checking how to run the C preprocessor... " >&6; }
4367# On Suns, sometimes $CPP names a directory.
4368if test -n "$CPP" && test -d "$CPP"; then
4369 CPP=
4370fi
4371if test -z "$CPP"; then
4372 if ${ac_cv_prog_CPP+:} false; then :
4373 $as_echo_n "(cached) " >&6
4374else
4375 # Double quotes because CPP needs to be expanded
4376 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4377 do
4378 ac_preproc_ok=false
4379for ac_c_preproc_warn_flag in '' yes
4380do
4381 # Use a header file that comes with gcc, so configuring glibc
4382 # with a fresh cross-compiler works.
4383 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4384 # <limits.h> exists even on freestanding compilers.
4385 # On the NeXT, cc -E runs the code through the compiler's parser,
4386 # not just through cpp. "Syntax error" is here to catch this case.
4387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4388/* end confdefs.h. */
4389#ifdef __STDC__
4390# include <limits.h>
4391#else
4392# include <assert.h>
4393#endif
4394 Syntax error
4395_ACEOF
4396if ac_fn_c_try_cpp "$LINENO"; then :
4397
4398else
4399 # Broken: fails on valid input.
4400continue
4401fi
4402rm -f conftest.err conftest.i conftest.$ac_ext
4403
4404 # OK, works on sane cases. Now check whether nonexistent headers
4405 # can be detected and how.
4406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4407/* end confdefs.h. */
4408#include <ac_nonexistent.h>
4409_ACEOF
4410if ac_fn_c_try_cpp "$LINENO"; then :
4411 # Broken: success on invalid input.
4412continue
4413else
4414 # Passes both tests.
4415ac_preproc_ok=:
4416break
4417fi
4418rm -f conftest.err conftest.i conftest.$ac_ext
4419
4420done
4421# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4422rm -f conftest.i conftest.err conftest.$ac_ext
4423if $ac_preproc_ok; then :
4424 break
4425fi
4426
4427 done
4428 ac_cv_prog_CPP=$CPP
4429
4430fi
4431 CPP=$ac_cv_prog_CPP
4432else
4433 ac_cv_prog_CPP=$CPP
4434fi
4435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4436$as_echo "$CPP" >&6; }
4437ac_preproc_ok=false
4438for ac_c_preproc_warn_flag in '' yes
4439do
4440 # Use a header file that comes with gcc, so configuring glibc
4441 # with a fresh cross-compiler works.
4442 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4443 # <limits.h> exists even on freestanding compilers.
4444 # On the NeXT, cc -E runs the code through the compiler's parser,
4445 # not just through cpp. "Syntax error" is here to catch this case.
4446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4447/* end confdefs.h. */
4448#ifdef __STDC__
4449# include <limits.h>
4450#else
4451# include <assert.h>
4452#endif
4453 Syntax error
4454_ACEOF
4455if ac_fn_c_try_cpp "$LINENO"; then :
4456
4457else
4458 # Broken: fails on valid input.
4459continue
4460fi
4461rm -f conftest.err conftest.i conftest.$ac_ext
4462
4463 # OK, works on sane cases. Now check whether nonexistent headers
4464 # can be detected and how.
4465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4466/* end confdefs.h. */
4467#include <ac_nonexistent.h>
4468_ACEOF
4469if ac_fn_c_try_cpp "$LINENO"; then :
4470 # Broken: success on invalid input.
4471continue
4472else
4473 # Passes both tests.
4474ac_preproc_ok=:
4475break
4476fi
4477rm -f conftest.err conftest.i conftest.$ac_ext
4478
4479done
4480# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4481rm -f conftest.i conftest.err conftest.$ac_ext
4482if $ac_preproc_ok; then :
4483
4484else
4485 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4486$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4487as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4488See \`config.log' for more details" "$LINENO" 5; }
4489fi
4490
4491ac_ext=c
4492ac_cpp='$CPP $CPPFLAGS'
4493ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4494ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4495ac_compiler_gnu=$ac_cv_c_compiler_gnu
4496
4497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4498$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4499if ${ac_cv_path_GREP+:} false; then :
4500 $as_echo_n "(cached) " >&6
4501else
4502 if test -z "$GREP"; then
4503 ac_path_GREP_found=false
4504 # Loop through the user's path and test for each of PROGNAME-LIST
4505 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4506for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4507do
4508 IFS=$as_save_IFS
4509 test -z "$as_dir" && as_dir=.
4510 for ac_prog in grep ggrep; do
4511 for ac_exec_ext in '' $ac_executable_extensions; do
4512 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4513 as_fn_executable_p "$ac_path_GREP" || continue
4514# Check for GNU ac_path_GREP and select it if it is found.
4515 # Check for GNU $ac_path_GREP
4516case `"$ac_path_GREP" --version 2>&1` in
4517*GNU*)
4518 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4519*)
4520 ac_count=0
4521 $as_echo_n 0123456789 >"conftest.in"
4522 while :
4523 do
4524 cat "conftest.in" "conftest.in" >"conftest.tmp"
4525 mv "conftest.tmp" "conftest.in"
4526 cp "conftest.in" "conftest.nl"
4527 $as_echo 'GREP' >> "conftest.nl"
4528 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4529 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4530 as_fn_arith $ac_count + 1 && ac_count=$as_val
4531 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4532 # Best one so far, save it but keep looking for a better one
4533 ac_cv_path_GREP="$ac_path_GREP"
4534 ac_path_GREP_max=$ac_count
4535 fi
4536 # 10*(2^10) chars as input seems more than enough
4537 test $ac_count -gt 10 && break
4538 done
4539 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4540esac
4541
4542 $ac_path_GREP_found && break 3
4543 done
4544 done
4545 done
4546IFS=$as_save_IFS
4547 if test -z "$ac_cv_path_GREP"; then
4548 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4549 fi
4550else
4551 ac_cv_path_GREP=$GREP
4552fi
4553
4554fi
4555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4556$as_echo "$ac_cv_path_GREP" >&6; }
4557 GREP="$ac_cv_path_GREP"
4558
4559
Łukasz Langaa785c872016-09-09 17:37:37 -07004560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4561$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4562if ${ac_cv_path_SED+:} false; then :
4563 $as_echo_n "(cached) " >&6
4564else
4565 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4566 for ac_i in 1 2 3 4 5 6 7; do
4567 ac_script="$ac_script$as_nl$ac_script"
4568 done
4569 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4570 { ac_script=; unset ac_script;}
4571 if test -z "$SED"; then
4572 ac_path_SED_found=false
4573 # Loop through the user's path and test for each of PROGNAME-LIST
4574 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4575for as_dir in $PATH
4576do
4577 IFS=$as_save_IFS
4578 test -z "$as_dir" && as_dir=.
4579 for ac_prog in sed gsed; do
4580 for ac_exec_ext in '' $ac_executable_extensions; do
4581 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4582 as_fn_executable_p "$ac_path_SED" || continue
4583# Check for GNU ac_path_SED and select it if it is found.
4584 # Check for GNU $ac_path_SED
4585case `"$ac_path_SED" --version 2>&1` in
4586*GNU*)
4587 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4588*)
4589 ac_count=0
4590 $as_echo_n 0123456789 >"conftest.in"
4591 while :
4592 do
4593 cat "conftest.in" "conftest.in" >"conftest.tmp"
4594 mv "conftest.tmp" "conftest.in"
4595 cp "conftest.in" "conftest.nl"
4596 $as_echo '' >> "conftest.nl"
4597 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4598 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4599 as_fn_arith $ac_count + 1 && ac_count=$as_val
4600 if test $ac_count -gt ${ac_path_SED_max-0}; then
4601 # Best one so far, save it but keep looking for a better one
4602 ac_cv_path_SED="$ac_path_SED"
4603 ac_path_SED_max=$ac_count
4604 fi
4605 # 10*(2^10) chars as input seems more than enough
4606 test $ac_count -gt 10 && break
4607 done
4608 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4609esac
4610
4611 $ac_path_SED_found && break 3
4612 done
4613 done
4614 done
4615IFS=$as_save_IFS
4616 if test -z "$ac_cv_path_SED"; then
4617 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4618 fi
4619else
4620 ac_cv_path_SED=$SED
4621fi
4622
4623fi
4624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4625$as_echo "$ac_cv_path_SED" >&6; }
4626 SED="$ac_cv_path_SED"
4627 rm -f conftest.sed
4628
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004629
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004630
4631
Matthias Kloseb9621712010-04-24 17:59:49 +00004632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4633$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004634
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004635# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004636if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004637 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004638
4639 case $withval in
4640 no) with_cxx_main=no
4641 MAINCC='$(CC)';;
4642 yes) with_cxx_main=yes
4643 MAINCC='$(CXX)';;
4644 *) with_cxx_main=yes
4645 MAINCC=$withval
4646 if test -z "$CXX"
4647 then
4648 CXX=$withval
4649 fi;;
4650 esac
4651else
4652
4653 with_cxx_main=no
4654 MAINCC='$(CC)'
4655
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004656fi
4657
Matthias Kloseb9621712010-04-24 17:59:49 +00004658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4659$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004660
4661preset_cxx="$CXX"
4662if test -z "$CXX"
4663then
4664 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004665 gcc) if test -n "$ac_tool_prefix"; then
4666 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4667set dummy ${ac_tool_prefix}g++; ac_word=$2
4668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4669$as_echo_n "checking for $ac_word... " >&6; }
4670if ${ac_cv_path_CXX+:} false; then :
4671 $as_echo_n "(cached) " >&6
4672else
4673 case $CXX in
4674 [\\/]* | ?:[\\/]*)
4675 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4676 ;;
4677 *)
4678 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4679for as_dir in notfound
4680do
4681 IFS=$as_save_IFS
4682 test -z "$as_dir" && as_dir=.
4683 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004684 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004685 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4686 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4687 break 2
4688 fi
4689done
4690 done
4691IFS=$as_save_IFS
4692
4693 ;;
4694esac
4695fi
4696CXX=$ac_cv_path_CXX
4697if test -n "$CXX"; then
4698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4699$as_echo "$CXX" >&6; }
4700else
4701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4702$as_echo "no" >&6; }
4703fi
4704
4705
4706fi
4707if test -z "$ac_cv_path_CXX"; then
4708 ac_pt_CXX=$CXX
4709 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004710set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4712$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004713if ${ac_cv_path_ac_pt_CXX+:} false; then :
4714 $as_echo_n "(cached) " >&6
4715else
4716 case $ac_pt_CXX in
4717 [\\/]* | ?:[\\/]*)
4718 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4719 ;;
4720 *)
4721 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4722for as_dir in notfound
4723do
4724 IFS=$as_save_IFS
4725 test -z "$as_dir" && as_dir=.
4726 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004727 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004728 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4729 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4730 break 2
4731 fi
4732done
4733 done
4734IFS=$as_save_IFS
4735
4736 ;;
4737esac
4738fi
4739ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4740if test -n "$ac_pt_CXX"; then
4741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4742$as_echo "$ac_pt_CXX" >&6; }
4743else
4744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4745$as_echo "no" >&6; }
4746fi
4747
4748 if test "x$ac_pt_CXX" = x; then
4749 CXX="g++"
4750 else
4751 case $cross_compiling:$ac_tool_warned in
4752yes:)
4753{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4754$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4755ac_tool_warned=yes ;;
4756esac
4757 CXX=$ac_pt_CXX
4758 fi
4759else
4760 CXX="$ac_cv_path_CXX"
4761fi
4762 ;;
4763 cc) if test -n "$ac_tool_prefix"; then
4764 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4765set dummy ${ac_tool_prefix}c++; ac_word=$2
4766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4767$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004768if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004769 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770else
4771 case $CXX in
4772 [\\/]* | ?:[\\/]*)
4773 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4774 ;;
4775 *)
4776 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4777for as_dir in notfound
4778do
4779 IFS=$as_save_IFS
4780 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004781 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004782 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004784 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004785 break 2
4786 fi
4787done
Matthias Kloseb9621712010-04-24 17:59:49 +00004788 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004789IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004791 ;;
4792esac
4793fi
4794CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004795if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4797$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004798else
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4800$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004802
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004803
4804fi
4805if test -z "$ac_cv_path_CXX"; then
4806 ac_pt_CXX=$CXX
4807 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004808set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4810$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004811if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004812 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004813else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004814 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004815 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004816 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 +00004817 ;;
4818 *)
4819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4820for as_dir in notfound
4821do
4822 IFS=$as_save_IFS
4823 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004824 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004825 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004826 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004827 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004828 break 2
4829 fi
4830done
Matthias Kloseb9621712010-04-24 17:59:49 +00004831 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004832IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004833
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004834 ;;
4835esac
4836fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004837ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4838if test -n "$ac_pt_CXX"; then
4839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4840$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004841else
Matthias Kloseb9621712010-04-24 17:59:49 +00004842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4843$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004845
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004846 if test "x$ac_pt_CXX" = x; then
4847 CXX="c++"
4848 else
4849 case $cross_compiling:$ac_tool_warned in
4850yes:)
4851{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4852$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4853ac_tool_warned=yes ;;
4854esac
4855 CXX=$ac_pt_CXX
4856 fi
4857else
4858 CXX="$ac_cv_path_CXX"
4859fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004860 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004861 clang|*/clang) if test -n "$ac_tool_prefix"; then
4862 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4863set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4865$as_echo_n "checking for $ac_word... " >&6; }
4866if ${ac_cv_path_CXX+:} false; then :
4867 $as_echo_n "(cached) " >&6
4868else
4869 case $CXX in
4870 [\\/]* | ?:[\\/]*)
4871 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4872 ;;
4873 *)
4874 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4875for as_dir in notfound
4876do
4877 IFS=$as_save_IFS
4878 test -z "$as_dir" && as_dir=.
4879 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004880 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004881 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4882 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4883 break 2
4884 fi
4885done
4886 done
4887IFS=$as_save_IFS
4888
Ned Deilycbfb9a52012-06-23 16:02:19 -07004889 ;;
4890esac
4891fi
4892CXX=$ac_cv_path_CXX
4893if test -n "$CXX"; then
4894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4895$as_echo "$CXX" >&6; }
4896else
4897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4898$as_echo "no" >&6; }
4899fi
4900
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004901
4902fi
4903if test -z "$ac_cv_path_CXX"; then
4904 ac_pt_CXX=$CXX
4905 # Extract the first word of "clang++", so it can be a program name with args.
4906set dummy clang++; ac_word=$2
4907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4908$as_echo_n "checking for $ac_word... " >&6; }
4909if ${ac_cv_path_ac_pt_CXX+:} false; then :
4910 $as_echo_n "(cached) " >&6
4911else
4912 case $ac_pt_CXX in
4913 [\\/]* | ?:[\\/]*)
4914 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4915 ;;
4916 *)
4917 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4918for as_dir in notfound
4919do
4920 IFS=$as_save_IFS
4921 test -z "$as_dir" && as_dir=.
4922 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004923 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004924 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4925 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4926 break 2
4927 fi
4928done
4929 done
4930IFS=$as_save_IFS
4931
4932 ;;
4933esac
4934fi
4935ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4936if test -n "$ac_pt_CXX"; then
4937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4938$as_echo "$ac_pt_CXX" >&6; }
4939else
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4941$as_echo "no" >&6; }
4942fi
4943
4944 if test "x$ac_pt_CXX" = x; then
4945 CXX="clang++"
4946 else
4947 case $cross_compiling:$ac_tool_warned in
4948yes:)
4949{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4950$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4951ac_tool_warned=yes ;;
4952esac
4953 CXX=$ac_pt_CXX
4954 fi
4955else
4956 CXX="$ac_cv_path_CXX"
4957fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004958 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004959 icc|*/icc) if test -n "$ac_tool_prefix"; then
4960 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4961set dummy ${ac_tool_prefix}icpc; ac_word=$2
4962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4963$as_echo_n "checking for $ac_word... " >&6; }
4964if ${ac_cv_path_CXX+:} false; then :
4965 $as_echo_n "(cached) " >&6
4966else
4967 case $CXX in
4968 [\\/]* | ?:[\\/]*)
4969 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4970 ;;
4971 *)
4972 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4973for as_dir in notfound
4974do
4975 IFS=$as_save_IFS
4976 test -z "$as_dir" && as_dir=.
4977 for ac_exec_ext in '' $ac_executable_extensions; do
4978 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4979 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4980 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4981 break 2
4982 fi
4983done
4984 done
4985IFS=$as_save_IFS
4986
4987 ;;
4988esac
4989fi
4990CXX=$ac_cv_path_CXX
4991if test -n "$CXX"; then
4992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4993$as_echo "$CXX" >&6; }
4994else
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4996$as_echo "no" >&6; }
4997fi
4998
4999
5000fi
5001if test -z "$ac_cv_path_CXX"; then
5002 ac_pt_CXX=$CXX
5003 # Extract the first word of "icpc", so it can be a program name with args.
5004set dummy icpc; ac_word=$2
5005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5006$as_echo_n "checking for $ac_word... " >&6; }
5007if ${ac_cv_path_ac_pt_CXX+:} false; then :
5008 $as_echo_n "(cached) " >&6
5009else
5010 case $ac_pt_CXX in
5011 [\\/]* | ?:[\\/]*)
5012 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5013 ;;
5014 *)
5015 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5016for as_dir in notfound
5017do
5018 IFS=$as_save_IFS
5019 test -z "$as_dir" && as_dir=.
5020 for ac_exec_ext in '' $ac_executable_extensions; do
5021 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5022 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5023 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5024 break 2
5025 fi
5026done
5027 done
5028IFS=$as_save_IFS
5029
5030 ;;
5031esac
5032fi
5033ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5034if test -n "$ac_pt_CXX"; then
5035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5036$as_echo "$ac_pt_CXX" >&6; }
5037else
5038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5039$as_echo "no" >&6; }
5040fi
5041
5042 if test "x$ac_pt_CXX" = x; then
5043 CXX="icpc"
5044 else
5045 case $cross_compiling:$ac_tool_warned in
5046yes:)
5047{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5048$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5049ac_tool_warned=yes ;;
5050esac
5051 CXX=$ac_pt_CXX
5052 fi
5053else
5054 CXX="$ac_cv_path_CXX"
5055fi
5056 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005057 esac
5058 if test "$CXX" = "notfound"
5059 then
5060 CXX=""
5061 fi
5062fi
5063if test -z "$CXX"
5064then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005065 if test -n "$ac_tool_prefix"; then
5066 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5067 do
5068 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5069set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5071$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005072if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005073 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005074else
5075 if test -n "$CXX"; then
5076 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5077else
5078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5079for as_dir in $PATH
5080do
5081 IFS=$as_save_IFS
5082 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005084 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005085 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005087 break 2
5088 fi
5089done
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005091IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005092
5093fi
5094fi
5095CXX=$ac_cv_prog_CXX
5096if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5098$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005099else
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5101$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005102fi
5103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005104
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005105 test -n "$CXX" && break
5106 done
5107fi
5108if test -z "$CXX"; then
5109 ac_ct_CXX=$CXX
5110 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5111do
5112 # Extract the first word of "$ac_prog", so it can be a program name with args.
5113set dummy $ac_prog; ac_word=$2
5114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5115$as_echo_n "checking for $ac_word... " >&6; }
5116if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5117 $as_echo_n "(cached) " >&6
5118else
5119 if test -n "$ac_ct_CXX"; then
5120 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5121else
5122as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5123for as_dir in $PATH
5124do
5125 IFS=$as_save_IFS
5126 test -z "$as_dir" && as_dir=.
5127 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005128 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005129 ac_cv_prog_ac_ct_CXX="$ac_prog"
5130 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5131 break 2
5132 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005133done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005134 done
5135IFS=$as_save_IFS
5136
5137fi
5138fi
5139ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5140if test -n "$ac_ct_CXX"; then
5141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5142$as_echo "$ac_ct_CXX" >&6; }
5143else
5144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5145$as_echo "no" >&6; }
5146fi
5147
5148
5149 test -n "$ac_ct_CXX" && break
5150done
5151
5152 if test "x$ac_ct_CXX" = x; then
5153 CXX="notfound"
5154 else
5155 case $cross_compiling:$ac_tool_warned in
5156yes:)
5157{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5158$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5159ac_tool_warned=yes ;;
5160esac
5161 CXX=$ac_ct_CXX
5162 fi
5163fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005164
5165 if test "$CXX" = "notfound"
5166 then
5167 CXX=""
5168 fi
5169fi
5170if test "$preset_cxx" != "$CXX"
5171then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005172 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005173
5174 By default, distutils will build C++ extension modules with \"$CXX\".
5175 If this is not intended, then set CXX on the configure command line.
5176 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005177$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005178
5179 By default, distutils will build C++ extension modules with \"$CXX\".
5180 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005181 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005182fi
5183
5184
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005185MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5186
5187
5188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5189$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5190cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005191#undef bfin
5192#undef cris
5193#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005194#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005195#undef hppa
5196#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005197#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005198#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005199#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005200#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005201#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005202#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005203 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005204#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005205# if defined(__x86_64__) && defined(__LP64__)
5206 x86_64-linux-gnu
5207# elif defined(__x86_64__) && defined(__ILP32__)
5208 x86_64-linux-gnux32
5209# elif defined(__i386__)
5210 i386-linux-gnu
5211# elif defined(__aarch64__) && defined(__AARCH64EL__)
5212# if defined(__ILP32__)
5213 aarch64_ilp32-linux-gnu
5214# else
5215 aarch64-linux-gnu
5216# endif
5217# elif defined(__aarch64__) && defined(__AARCH64EB__)
5218# if defined(__ILP32__)
5219 aarch64_be_ilp32-linux-gnu
5220# else
5221 aarch64_be-linux-gnu
5222# endif
5223# elif defined(__alpha__)
5224 alpha-linux-gnu
5225# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5226# if defined(__ARMEL__)
5227 arm-linux-gnueabihf
5228# else
5229 armeb-linux-gnueabihf
5230# endif
5231# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5232# if defined(__ARMEL__)
5233 arm-linux-gnueabi
5234# else
5235 armeb-linux-gnueabi
5236# endif
5237# elif defined(__hppa__)
5238 hppa-linux-gnu
5239# elif defined(__ia64__)
5240 ia64-linux-gnu
5241# elif defined(__m68k__) && !defined(__mcoldfire__)
5242 m68k-linux-gnu
5243# elif defined(__mips_hard_float) && defined(_MIPSEL)
5244# if _MIPS_SIM == _ABIO32
5245 mipsel-linux-gnu
5246# elif _MIPS_SIM == _ABIN32
5247 mips64el-linux-gnuabin32
5248# elif _MIPS_SIM == _ABI64
5249 mips64el-linux-gnuabi64
5250# else
5251# error unknown platform triplet
5252# endif
5253# elif defined(__mips_hard_float)
5254# if _MIPS_SIM == _ABIO32
5255 mips-linux-gnu
5256# elif _MIPS_SIM == _ABIN32
5257 mips64-linux-gnuabin32
5258# elif _MIPS_SIM == _ABI64
5259 mips64-linux-gnuabi64
5260# else
5261# error unknown platform triplet
5262# endif
5263# elif defined(__or1k__)
5264 or1k-linux-gnu
5265# elif defined(__powerpc__) && defined(__SPE__)
5266 powerpc-linux-gnuspe
5267# elif defined(__powerpc64__)
5268# if defined(__LITTLE_ENDIAN__)
5269 powerpc64le-linux-gnu
5270# else
5271 powerpc64-linux-gnu
5272# endif
5273# elif defined(__powerpc__)
5274 powerpc-linux-gnu
5275# elif defined(__s390x__)
5276 s390x-linux-gnu
5277# elif defined(__s390__)
5278 s390-linux-gnu
5279# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5280 sh4-linux-gnu
5281# elif defined(__sparc__) && defined(__arch64__)
5282 sparc64-linux-gnu
5283# elif defined(__sparc__)
5284 sparc-linux-gnu
5285# else
5286# error unknown platform triplet
5287# endif
5288#elif defined(__FreeBSD_kernel__)
5289# if defined(__LP64__)
5290 x86_64-kfreebsd-gnu
5291# elif defined(__i386__)
5292 i386-kfreebsd-gnu
5293# else
5294# error unknown platform triplet
5295# endif
5296#elif defined(__gnu_hurd__)
5297 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005298#elif defined(__APPLE__)
5299 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005300#else
5301# error unknown platform triplet
5302#endif
5303
5304EOF
5305
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005306if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005307 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5309$as_echo "$PLATFORM_TRIPLET" >&6; }
5310else
5311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5312$as_echo "none" >&6; }
5313fi
5314rm -f conftest.c conftest.out
5315
5316if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5317 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5318 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5319 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005320elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5321 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005322fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005323
doko@ubuntu.com55532312016-06-14 08:55:19 +02005324if test x$MULTIARCH != x; then
5325 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5326fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005327
5328
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5330$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5331save_LDFLAGS="$LDFLAGS"
5332LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005333
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5335/* end confdefs.h. */
5336
5337int
5338main ()
5339{
5340
5341 ;
5342 return 0;
5343}
5344_ACEOF
5345if ac_fn_c_try_link "$LINENO"; then :
5346 NO_AS_NEEDED="-Wl,--no-as-needed"
5347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5348$as_echo "yes" >&6; }
5349else
5350 NO_AS_NEEDED=""
5351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5352$as_echo "no" >&6; }
5353fi
5354rm -f core conftest.err conftest.$ac_objext \
5355 conftest$ac_exeext conftest.$ac_ext
5356LDFLAGS="$save_LDFLAGS"
5357
5358
5359
5360# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005361
Matthias Kloseb9621712010-04-24 17:59:49 +00005362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5363$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005364if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005365 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005366else
5367 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5368 then ac_cv_path_EGREP="$GREP -E"
5369 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005370 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005371 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005372 # Loop through the user's path and test for each of PROGNAME-LIST
5373 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005374for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5375do
5376 IFS=$as_save_IFS
5377 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005378 for ac_prog in egrep; do
5379 for ac_exec_ext in '' $ac_executable_extensions; do
5380 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005381 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005382# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005383 # Check for GNU $ac_path_EGREP
5384case `"$ac_path_EGREP" --version 2>&1` in
5385*GNU*)
5386 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5387*)
5388 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005389 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005390 while :
5391 do
5392 cat "conftest.in" "conftest.in" >"conftest.tmp"
5393 mv "conftest.tmp" "conftest.in"
5394 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005396 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5397 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005399 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5400 # Best one so far, save it but keep looking for a better one
5401 ac_cv_path_EGREP="$ac_path_EGREP"
5402 ac_path_EGREP_max=$ac_count
5403 fi
5404 # 10*(2^10) chars as input seems more than enough
5405 test $ac_count -gt 10 && break
5406 done
5407 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5408esac
5409
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 $ac_path_EGREP_found && break 3
5411 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005412 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005414IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005416 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 +00005417 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005418else
5419 ac_cv_path_EGREP=$EGREP
5420fi
5421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005422 fi
5423fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5425$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005426 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005427
5428
Matthias Kloseb9621712010-04-24 17:59:49 +00005429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5430$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005431if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005432 $as_echo_n "(cached) " >&6
5433else
5434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005435/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005436#include <stdlib.h>
5437#include <stdarg.h>
5438#include <string.h>
5439#include <float.h>
5440
5441int
5442main ()
5443{
5444
5445 ;
5446 return 0;
5447}
5448_ACEOF
5449if ac_fn_c_try_compile "$LINENO"; then :
5450 ac_cv_header_stdc=yes
5451else
5452 ac_cv_header_stdc=no
5453fi
5454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5455
5456if test $ac_cv_header_stdc = yes; then
5457 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5459/* end confdefs.h. */
5460#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005461
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005462_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005464 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005465
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005466else
Matthias Kloseb9621712010-04-24 17:59:49 +00005467 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005468fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005469rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005470
Matthias Kloseb9621712010-04-24 17:59:49 +00005471fi
5472
5473if test $ac_cv_header_stdc = yes; then
5474 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5476/* end confdefs.h. */
5477#include <stdlib.h>
5478
5479_ACEOF
5480if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5481 $EGREP "free" >/dev/null 2>&1; then :
5482
5483else
5484 ac_cv_header_stdc=no
5485fi
5486rm -f conftest*
5487
5488fi
5489
5490if test $ac_cv_header_stdc = yes; then
5491 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5492 if test "$cross_compiling" = yes; then :
5493 :
5494else
5495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5496/* end confdefs.h. */
5497#include <ctype.h>
5498#include <stdlib.h>
5499#if ((' ' & 0x0FF) == 0x020)
5500# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5501# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5502#else
5503# define ISLOWER(c) \
5504 (('a' <= (c) && (c) <= 'i') \
5505 || ('j' <= (c) && (c) <= 'r') \
5506 || ('s' <= (c) && (c) <= 'z'))
5507# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5508#endif
5509
5510#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5511int
5512main ()
5513{
5514 int i;
5515 for (i = 0; i < 256; i++)
5516 if (XOR (islower (i), ISLOWER (i))
5517 || toupper (i) != TOUPPER (i))
5518 return 2;
5519 return 0;
5520}
5521_ACEOF
5522if ac_fn_c_try_run "$LINENO"; then :
5523
5524else
5525 ac_cv_header_stdc=no
5526fi
5527rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5528 conftest.$ac_objext conftest.beam conftest.$ac_ext
5529fi
5530
5531fi
5532fi
5533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5534$as_echo "$ac_cv_header_stdc" >&6; }
5535if test $ac_cv_header_stdc = yes; then
5536
5537$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5538
5539fi
5540
5541# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5542for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5543 inttypes.h stdint.h unistd.h
5544do :
5545 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5546ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5547"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005548if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005549 cat >>confdefs.h <<_ACEOF
5550#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5551_ACEOF
5552
5553fi
5554
5555done
5556
5557
5558
5559 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 +02005560if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005561 MINIX=yes
5562else
5563 MINIX=
5564fi
5565
5566
5567 if test "$MINIX" = yes; then
5568
5569$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5570
5571
5572$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5573
5574
5575$as_echo "#define _MINIX 1" >>confdefs.h
5576
5577 fi
5578
5579
5580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5581$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005582if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005583 $as_echo_n "(cached) " >&6
5584else
5585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5586/* end confdefs.h. */
5587
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005588# define __EXTENSIONS__ 1
5589 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005590int
5591main ()
5592{
5593
5594 ;
5595 return 0;
5596}
5597_ACEOF
5598if ac_fn_c_try_compile "$LINENO"; then :
5599 ac_cv_safe_to_define___extensions__=yes
5600else
5601 ac_cv_safe_to_define___extensions__=no
5602fi
5603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5604fi
5605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5606$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5607 test $ac_cv_safe_to_define___extensions__ = yes &&
5608 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5609
5610 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5611
5612 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5613
5614 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5615
5616 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5617
5618
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005619
Xavier de Gaye95750b12016-07-09 11:05:42 +02005620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5621$as_echo_n "checking for the Android API level... " >&6; }
5622cat >> conftest.c <<EOF
5623#ifdef __ANDROID__
5624#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005625android_api = __ANDROID_API__
5626arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005627#else
5628#error not Android
5629#endif
5630EOF
5631
5632if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005633 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5634 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5636$as_echo "$ANDROID_API_LEVEL" >&6; }
5637
5638cat >>confdefs.h <<_ACEOF
5639#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5640_ACEOF
5641
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005642
5643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5644$as_echo_n "checking for the Android arm ABI... " >&6; }
5645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5646$as_echo "$_arm_arch" >&6; }
5647 if test "$_arm_arch" = 7; then
5648 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5649 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5650 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005651else
5652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5653$as_echo "not Android" >&6; }
5654fi
5655rm -f conftest.c conftest.out
5656
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657# Check for unsupported systems
5658case $ac_sys_system/$ac_sys_release in
5659atheos*|Linux*/1*)
5660 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5661 echo See README for details.
5662 exit 1;;
5663esac
5664
5665
Matthias Kloseb9621712010-04-24 17:59:49 +00005666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5667$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668
5669# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005670if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671 withval=$with_suffix;
5672 case $withval in
5673 no) EXEEXT=;;
5674 yes) EXEEXT=.exe;;
5675 *) EXEEXT=$withval;;
5676 esac
5677fi
5678
Matthias Kloseb9621712010-04-24 17:59:49 +00005679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5680$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681
5682# Test whether we're running on a non-case-sensitive system, in which
5683# case we give a warning if no ext is given
5684
Matthias Kloseb9621712010-04-24 17:59:49 +00005685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5686$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687if test ! -d CaseSensitiveTestDir; then
5688mkdir CaseSensitiveTestDir
5689fi
5690
5691if test -d casesensitivetestdir
5692then
Matthias Kloseb9621712010-04-24 17:59:49 +00005693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5694$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695 BUILDEXEEXT=.exe
5696else
Matthias Kloseb9621712010-04-24 17:59:49 +00005697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5698$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699 BUILDEXEEXT=$EXEEXT
5700fi
5701rmdir CaseSensitiveTestDir
5702
5703case $MACHDEP in
5704bsdos*)
5705 case $CC in
5706 gcc) CC="$CC -D_HAVE_BSDI";;
5707 esac;;
5708esac
5709
5710case $ac_sys_system in
5711hp*|HP*)
5712 case $CC in
5713 cc|*/cc) CC="$CC -Ae";;
5714 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715esac
5716
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717
Matthias Kloseb9621712010-04-24 17:59:49 +00005718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5719$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720if test -z "$LIBRARY"
5721then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005722 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5725$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726
5727# LDLIBRARY is the name of the library to link against (as opposed to the
5728# name of the library into which to insert object files). BLDLIBRARY is also
5729# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5730# is blank as the main program is not linked directly against LDLIBRARY.
5731# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5732# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5733# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5734# DLLLIBRARY is the shared (i.e., DLL) library.
5735#
5736# RUNSHARED is used to run shared python without installed libraries
5737#
5738# INSTSONAME is the name of the shared library that will be use to install
5739# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005740#
5741# LDVERSION is the shared library version number, normally the Python version
5742# with the ABI build flags appended.
5743
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744
5745
5746
5747
5748
5749
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005750
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751LDLIBRARY="$LIBRARY"
5752BLDLIBRARY='$(LDLIBRARY)'
5753INSTSONAME='$(LDLIBRARY)'
5754DLLLIBRARY=''
5755LDLIBRARYDIR=''
5756RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005757LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758
5759# LINKCC is the command that links the python executable -- default is $(CC).
5760# If CXX is set, and if it is needed to link a main function that was
5761# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5762# python might then depend on the C++ runtime
5763# This is altered for AIX in order to build the export list before
5764# linking.
5765
Matthias Kloseb9621712010-04-24 17:59:49 +00005766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5767$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768if test -z "$LINKCC"
5769then
5770 LINKCC='$(PURIFY) $(MAINCC)'
5771 case $ac_sys_system in
5772 AIX*)
5773 exp_extra="\"\""
5774 if test $ac_sys_release -ge 5 -o \
5775 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5776 exp_extra="."
5777 fi
5778 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779 QNX*)
5780 # qcc must be used because the other compilers do not
5781 # support -N.
5782 LINKCC=qcc;;
5783 esac
5784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5786$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005787
5788# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5789# make sure we default having it set to "no": this is used by
5790# distutils.unixccompiler to know if it should add --enable-new-dtags
5791# to linker command lines, and failing to detect GNU ld simply results
5792# in the same bahaviour as before.
5793
Matthias Kloseb9621712010-04-24 17:59:49 +00005794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5795$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796ac_prog=ld
5797if test "$GCC" = yes; then
5798 ac_prog=`$CC -print-prog-name=ld`
5799fi
5800case `"$ac_prog" -V 2>&1 < /dev/null` in
5801 *GNU*)
5802 GNULD=yes;;
5803 *)
5804 GNULD=no;;
5805esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5807$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808
Matthias Kloseb9621712010-04-24 17:59:49 +00005809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5810$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005812if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813 enableval=$enable_shared;
5814fi
5815
5816
5817if test -z "$enable_shared"
5818then
5819 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005820 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821 enable_shared="yes";;
5822 *)
5823 enable_shared="no";;
5824 esac
5825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5827$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828
Matthias Kloseb9621712010-04-24 17:59:49 +00005829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5830$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005832if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005833 enableval=$enable_profiling;
5834fi
5835
5836if test "x$enable_profiling" = xyes; then
5837 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005838 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840/* end confdefs.h. */
5841int main() { return 0; }
5842_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005843if ac_fn_c_try_link "$LINENO"; then :
5844
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005846 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005848rm -f core conftest.err conftest.$ac_objext \
5849 conftest$ac_exeext conftest.$ac_ext
5850 CC="$ac_save_cc"
5851else
5852 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5855$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856
doko@ubuntu.comba015832012-06-30 16:52:05 +02005857if test "x$enable_profiling" = xyes; then
5858 BASECFLAGS="-pg $BASECFLAGS"
5859 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860fi
5861
Matthias Kloseb9621712010-04-24 17:59:49 +00005862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5863$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864
5865# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5866# library that we build, but we do not want to link against it (we
5867# will find it with a -framework option). For this reason there is an
5868# extra variable BLDLIBRARY against which Python and the extension
5869# modules are linked, BLDLIBRARY. This is normally the same as
5870# LDLIBRARY, but empty for MacOSX framework builds.
5871if test "$enable_framework"
5872then
5873 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005874 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875 BLDLIBRARY=''
5876else
5877 BLDLIBRARY='$(LDLIBRARY)'
5878fi
5879
5880# Other platforms follow
5881if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005882 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883
Matthias Kloseb9621712010-04-24 17:59:49 +00005884$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885
5886 case $ac_sys_system in
5887 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005888 LDLIBRARY='libpython$(LDVERSION).dll.a'
5889 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890 ;;
5891 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005892 LDLIBRARY='libpython$(LDVERSION).so'
5893 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005894 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005896 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005897 then
5898 PY3LIBRARY=libpython3.so
5899 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005901 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005902 LDLIBRARY='libpython$(LDVERSION).so'
5903 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005904 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005906 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005907 then
5908 PY3LIBRARY=libpython3.so
5909 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910 ;;
5911 hp*|HP*)
5912 case `uname -m` in
5913 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005914 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915 ;;
5916 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005917 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918 ;;
5919 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005920 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005921 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005924 LDLIBRARY='libpython$(LDVERSION).dylib'
5925 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005926 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005928 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005929 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005930 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005931 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932
5933 esac
5934else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005935 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936 case $ac_sys_system in
5937 CYGWIN*)
5938 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005939 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 ;;
5941 esac
5942fi
5943
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005944if test "$cross_compiling" = yes; then
5945 RUNSHARED=
5946fi
5947
Matthias Kloseb9621712010-04-24 17:59:49 +00005948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5949$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950
5951if test -n "$ac_tool_prefix"; then
5952 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5953set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5955$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005956if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005957 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958else
5959 if test -n "$RANLIB"; then
5960 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5961else
5962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5963for as_dir in $PATH
5964do
5965 IFS=$as_save_IFS
5966 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005967 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005968 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005970 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971 break 2
5972 fi
5973done
Matthias Kloseb9621712010-04-24 17:59:49 +00005974 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975IFS=$as_save_IFS
5976
5977fi
5978fi
5979RANLIB=$ac_cv_prog_RANLIB
5980if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5982$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983else
Matthias Kloseb9621712010-04-24 17:59:49 +00005984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5985$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986fi
5987
5988
5989fi
5990if test -z "$ac_cv_prog_RANLIB"; then
5991 ac_ct_RANLIB=$RANLIB
5992 # Extract the first word of "ranlib", so it can be a program name with args.
5993set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5995$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005996if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005997 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998else
5999 if test -n "$ac_ct_RANLIB"; then
6000 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6001else
6002as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6003for as_dir in $PATH
6004do
6005 IFS=$as_save_IFS
6006 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006008 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006010 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011 break 2
6012 fi
6013done
Matthias Kloseb9621712010-04-24 17:59:49 +00006014 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015IFS=$as_save_IFS
6016
6017fi
6018fi
6019ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6020if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6022$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006023else
Matthias Kloseb9621712010-04-24 17:59:49 +00006024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6025$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026fi
6027
6028 if test "x$ac_ct_RANLIB" = x; then
6029 RANLIB=":"
6030 else
6031 case $cross_compiling:$ac_tool_warned in
6032yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006033{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6034$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006035ac_tool_warned=yes ;;
6036esac
6037 RANLIB=$ac_ct_RANLIB
6038 fi
6039else
6040 RANLIB="$ac_cv_prog_RANLIB"
6041fi
6042
6043
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006044if test -n "$ac_tool_prefix"; then
6045 for ac_prog in ar aal
6046 do
6047 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6048set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6050$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006051if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006052 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053else
6054 if test -n "$AR"; then
6055 ac_cv_prog_AR="$AR" # Let the user override the test.
6056else
6057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6058for as_dir in $PATH
6059do
6060 IFS=$as_save_IFS
6061 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006062 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006063 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006064 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006065 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006066 break 2
6067 fi
6068done
Matthias Kloseb9621712010-04-24 17:59:49 +00006069 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070IFS=$as_save_IFS
6071
6072fi
6073fi
6074AR=$ac_cv_prog_AR
6075if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6077$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006078else
Matthias Kloseb9621712010-04-24 17:59:49 +00006079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6080$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081fi
6082
6083
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006084 test -n "$AR" && break
6085 done
6086fi
6087if test -z "$AR"; then
6088 ac_ct_AR=$AR
6089 for ac_prog in ar aal
6090do
6091 # Extract the first word of "$ac_prog", so it can be a program name with args.
6092set dummy $ac_prog; ac_word=$2
6093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6094$as_echo_n "checking for $ac_word... " >&6; }
6095if ${ac_cv_prog_ac_ct_AR+:} false; then :
6096 $as_echo_n "(cached) " >&6
6097else
6098 if test -n "$ac_ct_AR"; then
6099 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6100else
6101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6102for as_dir in $PATH
6103do
6104 IFS=$as_save_IFS
6105 test -z "$as_dir" && as_dir=.
6106 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006107 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006108 ac_cv_prog_ac_ct_AR="$ac_prog"
6109 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6110 break 2
6111 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006112done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006113 done
6114IFS=$as_save_IFS
6115
6116fi
6117fi
6118ac_ct_AR=$ac_cv_prog_ac_ct_AR
6119if test -n "$ac_ct_AR"; then
6120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6121$as_echo "$ac_ct_AR" >&6; }
6122else
6123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6124$as_echo "no" >&6; }
6125fi
6126
6127
6128 test -n "$ac_ct_AR" && break
6129done
6130
6131 if test "x$ac_ct_AR" = x; then
6132 AR="ar"
6133 else
6134 case $cross_compiling:$ac_tool_warned in
6135yes:)
6136{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6137$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6138ac_tool_warned=yes ;;
6139esac
6140 AR=$ac_ct_AR
6141 fi
6142fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006143
6144
6145# tweak ARFLAGS only if the user didn't set it on the command line
6146
6147if test -z "$ARFLAGS"
6148then
6149 ARFLAGS="rc"
6150fi
6151
doko@ubuntu.com58844492012-06-30 18:25:32 +02006152if test -n "$ac_tool_prefix"; then
6153 for ac_prog in readelf
6154 do
6155 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6156set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6158$as_echo_n "checking for $ac_word... " >&6; }
6159if ${ac_cv_prog_READELF+:} false; then :
6160 $as_echo_n "(cached) " >&6
6161else
6162 if test -n "$READELF"; then
6163 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6164else
6165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6166for as_dir in $PATH
6167do
6168 IFS=$as_save_IFS
6169 test -z "$as_dir" && as_dir=.
6170 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006171 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006172 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6173 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6174 break 2
6175 fi
6176done
6177 done
6178IFS=$as_save_IFS
6179
6180fi
6181fi
6182READELF=$ac_cv_prog_READELF
6183if test -n "$READELF"; then
6184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6185$as_echo "$READELF" >&6; }
6186else
6187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6188$as_echo "no" >&6; }
6189fi
6190
6191
6192 test -n "$READELF" && break
6193 done
6194fi
6195if test -z "$READELF"; then
6196 ac_ct_READELF=$READELF
6197 for ac_prog in readelf
6198do
6199 # Extract the first word of "$ac_prog", so it can be a program name with args.
6200set dummy $ac_prog; ac_word=$2
6201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6202$as_echo_n "checking for $ac_word... " >&6; }
6203if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6204 $as_echo_n "(cached) " >&6
6205else
6206 if test -n "$ac_ct_READELF"; then
6207 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6208else
6209as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6210for as_dir in $PATH
6211do
6212 IFS=$as_save_IFS
6213 test -z "$as_dir" && as_dir=.
6214 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006215 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006216 ac_cv_prog_ac_ct_READELF="$ac_prog"
6217 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6218 break 2
6219 fi
6220done
6221 done
6222IFS=$as_save_IFS
6223
6224fi
6225fi
6226ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6227if test -n "$ac_ct_READELF"; then
6228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6229$as_echo "$ac_ct_READELF" >&6; }
6230else
6231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6232$as_echo "no" >&6; }
6233fi
6234
6235
6236 test -n "$ac_ct_READELF" && break
6237done
6238
6239 if test "x$ac_ct_READELF" = x; then
6240 READELF=":"
6241 else
6242 case $cross_compiling:$ac_tool_warned in
6243yes:)
6244{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6245$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6246ac_tool_warned=yes ;;
6247esac
6248 READELF=$ac_ct_READELF
6249 fi
6250fi
6251
6252if test "$cross_compiling" = yes; then
6253 case "$READELF" in
6254 readelf|:)
6255 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6256 ;;
6257 esac
6258fi
6259
6260
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006261
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006262case $MACHDEP in
6263bsdos*|hp*|HP*)
6264 # install -d does not work on BSDI or HP-UX
6265 if test -z "$INSTALL"
6266 then
6267 INSTALL="${srcdir}/install-sh -c"
6268 fi
6269esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006270# Find a good install program. We prefer a C program (faster),
6271# so one script is as good as another. But avoid the broken or
6272# incompatible versions:
6273# SysV /etc/install, /usr/sbin/install
6274# SunOS /usr/etc/install
6275# IRIX /sbin/install
6276# AIX /bin/install
6277# AmigaOS /C/install, which installs bootblocks on floppy discs
6278# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6279# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6280# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6281# OS/2's system install, which has a completely different semantic
6282# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006283# Reject install programs that cannot install multiple files.
6284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6285$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006286if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006287if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006288 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006289else
6290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6291for as_dir in $PATH
6292do
6293 IFS=$as_save_IFS
6294 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006295 # Account for people who put trailing slashes in PATH elements.
6296case $as_dir/ in #((
6297 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006298 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006299 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006300 /usr/ucb/* ) ;;
6301 *)
6302 # OSF1 and SCO ODT 3.0 have their own names for install.
6303 # Don't use installbsd from OSF since it installs stuff as root
6304 # by default.
6305 for ac_prog in ginstall scoinst install; do
6306 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006307 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308 if test $ac_prog = install &&
6309 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6310 # AIX install. It has an incompatible calling convention.
6311 :
6312 elif test $ac_prog = install &&
6313 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6314 # program-specific install script used by HP pwplus--don't use.
6315 :
6316 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006317 rm -rf conftest.one conftest.two conftest.dir
6318 echo one > conftest.one
6319 echo two > conftest.two
6320 mkdir conftest.dir
6321 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6322 test -s conftest.one && test -s conftest.two &&
6323 test -s conftest.dir/conftest.one &&
6324 test -s conftest.dir/conftest.two
6325 then
6326 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6327 break 3
6328 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006329 fi
6330 fi
6331 done
6332 done
6333 ;;
6334esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006335
6336 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006337IFS=$as_save_IFS
6338
Matthias Kloseb9621712010-04-24 17:59:49 +00006339rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006340
6341fi
6342 if test "${ac_cv_path_install+set}" = set; then
6343 INSTALL=$ac_cv_path_install
6344 else
6345 # As a last resort, use the slow shell script. Don't cache a
6346 # value for INSTALL within a source directory, because that will
6347 # break other packages using the cache if that directory is
6348 # removed, or if the value is a relative name.
6349 INSTALL=$ac_install_sh
6350 fi
6351fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6353$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006354
6355# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6356# It thinks the first close brace ends the variable substitution.
6357test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6358
6359test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6360
6361test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6362
Matthias Klose93a0ef12012-03-15 18:08:34 +01006363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6364$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6365if test -z "$MKDIR_P"; then
6366 if ${ac_cv_path_mkdir+:} false; then :
6367 $as_echo_n "(cached) " >&6
6368else
6369 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6370for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6371do
6372 IFS=$as_save_IFS
6373 test -z "$as_dir" && as_dir=.
6374 for ac_prog in mkdir gmkdir; do
6375 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006376 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006377 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6378 'mkdir (GNU coreutils) '* | \
6379 'mkdir (coreutils) '* | \
6380 'mkdir (fileutils) '4.1*)
6381 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6382 break 3;;
6383 esac
6384 done
6385 done
6386 done
6387IFS=$as_save_IFS
6388
6389fi
6390
6391 test -d ./--version && rmdir ./--version
6392 if test "${ac_cv_path_mkdir+set}" = set; then
6393 MKDIR_P="$ac_cv_path_mkdir -p"
6394 else
6395 # As a last resort, use the slow shell script. Don't cache a
6396 # value for MKDIR_P within a source directory, because that will
6397 # break other packages using the cache if that directory is
6398 # removed, or if the value is a relative name.
6399 MKDIR_P="$ac_install_sh -d"
6400 fi
6401fi
6402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6403$as_echo "$MKDIR_P" >&6; }
6404
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006405
6406# Not every filesystem supports hard links
6407
6408if test -z "$LN" ; then
6409 case $ac_sys_system in
6410 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006411 *) LN=ln;;
6412 esac
6413fi
6414
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006415# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006416
6417ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006418
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006419# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6421$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006422
6423# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006424if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006425 withval=$with_pydebug;
6426if test "$withval" != no
6427then
6428
Matthias Kloseb9621712010-04-24 17:59:49 +00006429$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006430
Matthias Kloseb9621712010-04-24 17:59:49 +00006431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6432$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006433 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006434 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006435else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6436$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006437fi
6438else
Matthias Kloseb9621712010-04-24 17:59:49 +00006439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6440$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006441fi
6442
6443
T. Woutersddbfa2c2017-05-23 01:30:49 +02006444# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6445# the ABI. This allows enabling assertions without changing the ABI.
6446assertions='false'
6447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6448$as_echo_n "checking for --with-assertions... " >&6; }
6449
6450# Check whether --with-assertions was given.
6451if test "${with_assertions+set}" = set; then :
6452 withval=$with_assertions;
6453if test "$withval" != no
6454then
6455 assertions='true'
6456fi
6457fi
6458
6459if test "$assertions" = 'true'; then
6460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6461$as_echo "yes" >&6; }
6462elif test "$Py_DEBUG" = 'true'; then
6463 assertions='true'
6464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6465$as_echo "implied by --with-pydebug" >&6; }
6466else
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6468$as_echo "no" >&6; }
6469fi
6470
Brett Cannon63d98bc2016-09-06 17:12:40 -07006471# Enable optimization flags
6472
6473
6474Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6476$as_echo_n "checking for --enable-optimizations... " >&6; }
6477# Check whether --enable-optimizations was given.
6478if test "${enable_optimizations+set}" = set; then :
6479 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006480if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006481then
6482 Py_OPT='true'
6483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6484$as_echo "yes" >&6; };
6485else
6486 Py_OPT='false'
6487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6488$as_echo "no" >&6; };
6489fi
6490else
6491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6492$as_echo "no" >&6; }
6493fi
6494
6495if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006496 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6497 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006498 # 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 +00006499 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006500 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006501 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006502 DEF_MAKE_RULE="build_all"
6503else
6504 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006505 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006506 DEF_MAKE_RULE="all"
6507fi
6508
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006509# Enable LTO flags
6510
6511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6512$as_echo_n "checking for --with-lto... " >&6; }
6513
6514# Check whether --with-lto was given.
6515if test "${with_lto+set}" = set; then :
6516 withval=$with_lto;
6517if test "$withval" != no
6518then
6519 Py_LTO='true'
6520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6521$as_echo "yes" >&6; };
6522else
6523 Py_LTO='false'
6524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6525$as_echo "no" >&6; };
6526fi
6527else
6528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6529$as_echo "no" >&6; }
6530fi
6531
6532if test "$Py_LTO" = 'true' ; then
6533 case $CC in
6534 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006535 case $ac_sys_system in
6536 Darwin*)
6537 # Any changes made here should be reflected in the GCC+Darwin case below
6538 LTOFLAGS="-flto -Wl,-export_dynamic"
6539 ;;
6540 *)
6541 LTOFLAGS="-flto"
6542 ;;
6543 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006544 ;;
6545 *gcc*)
6546 case $ac_sys_system in
6547 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006548 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006549 ;;
6550 *)
6551 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6552 ;;
6553 esac
6554 ;;
6555 esac
6556fi
6557
Brett Cannon7188a3e2015-09-18 15:13:44 -07006558# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006559
6560
6561
6562
6563
Gregory P. Smith799520c2016-09-07 16:10:00 -07006564# Make this work on systems where llvm tools are not installed with their
6565# normal names in the default $PATH (ie: Ubuntu). They exist under the
6566# non-suffixed name in their versioned llvm directory.
6567llvm_bin_dir=''
6568llvm_path="${PATH}"
6569if test "${CC}" = "clang"
6570then
6571 clang_bin=`which clang`
6572 # Some systems install clang elsewhere as a symlink to the real path
6573 # which is where the related llvm tools are located.
6574 if test -L "${clang_bin}"
6575 then
6576 clang_dir=`dirname "${clang_bin}"`
6577 clang_bin=`readlink "${clang_bin}"`
6578 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6579 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6580 fi
6581fi
Zachary Ware5af85642015-12-21 12:09:17 -06006582
Gregory P. Smith799520c2016-09-07 16:10:00 -07006583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6584$as_echo_n "checking target system type... " >&6; }
6585if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006586 $as_echo_n "(cached) " >&6
6587else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006588 if test "x$target_alias" = x; then
6589 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006590else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006591 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6592 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6593fi
6594
6595fi
6596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6597$as_echo "$ac_cv_target" >&6; }
6598case $ac_cv_target in
6599*-*-*) ;;
6600*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6601esac
6602target=$ac_cv_target
6603ac_save_IFS=$IFS; IFS='-'
6604set x $ac_cv_target
6605shift
6606target_cpu=$1
6607target_vendor=$2
6608shift; shift
6609# Remember, the first character of IFS is used to create $*,
6610# except with old shells:
6611target_os=$*
6612IFS=$ac_save_IFS
6613case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6614
6615
6616# The aliases save the names the user supplied, while $host etc.
6617# will get canonicalized.
6618test -n "$target_alias" &&
6619 test "$program_prefix$program_suffix$program_transform_name" = \
6620 NONENONEs,x,x, &&
6621 program_prefix=${target_alias}-
6622# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6623set dummy $target_alias-llvm-profdata; ac_word=$2
6624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6625$as_echo_n "checking for $ac_word... " >&6; }
6626if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6627 $as_echo_n "(cached) " >&6
6628else
6629 case $LLVM_PROFDATA in
6630 [\\/]* | ?:[\\/]*)
6631 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6632 ;;
6633 *)
6634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6635for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006636do
6637 IFS=$as_save_IFS
6638 test -z "$as_dir" && as_dir=.
6639 for ac_exec_ext in '' $ac_executable_extensions; do
6640 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006641 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6643 break 2
6644 fi
6645done
6646 done
6647IFS=$as_save_IFS
6648
Gregory P. Smith799520c2016-09-07 16:10:00 -07006649 ;;
6650esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006651fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006652LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6653if test -n "$LLVM_PROFDATA"; then
6654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6655$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006656else
6657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6658$as_echo "no" >&6; }
6659fi
6660
6661
Gregory P. Smith799520c2016-09-07 16:10:00 -07006662if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6663 if test "$build" = "$target"; then
6664 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6665 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6666set dummy llvm-profdata; ac_word=$2
6667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6668$as_echo_n "checking for $ac_word... " >&6; }
6669if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6670 $as_echo_n "(cached) " >&6
6671else
6672 case $ac_pt_LLVM_PROFDATA in
6673 [\\/]* | ?:[\\/]*)
6674 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6675 ;;
6676 *)
6677 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6678for as_dir in ${llvm_path}
6679do
6680 IFS=$as_save_IFS
6681 test -z "$as_dir" && as_dir=.
6682 for ac_exec_ext in '' $ac_executable_extensions; do
6683 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6684 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6685 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6686 break 2
6687 fi
6688done
6689 done
6690IFS=$as_save_IFS
6691
6692 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6693 ;;
6694esac
6695fi
6696ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6697if test -n "$ac_pt_LLVM_PROFDATA"; then
6698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6699$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6700else
6701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6702$as_echo "no" >&6; }
6703fi
6704
6705 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6706 else
6707 LLVM_PROFDATA="''"
6708 fi
6709else
6710 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6711fi
6712
6713
6714if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6715then
6716 LLVM_PROF_FOUND="found"
6717else
6718 LLVM_PROF_FOUND="not-found"
6719fi
6720if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6721then
6722 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6723 if test -n "${found_llvm_profdata}"
6724 then
6725 # llvm-profdata isn't directly in $PATH in some cases.
6726 # https://apple.stackexchange.com/questions/197053/
6727 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6728 LLVM_PROF_FOUND=found
6729 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6730$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6731 fi
6732fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006733LLVM_PROF_ERR=no
6734case $CC in
6735 *clang*)
6736 # Any changes made here should be reflected in the GCC+Darwin case below
6737 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6738 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006739 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006740 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6741 if test $LLVM_PROF_FOUND = not-found
6742 then
6743 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006744 if test "${REQUIRE_PGO}" = "yes"
6745 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006746 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 -07006747 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006748 fi
6749 ;;
6750 *gcc*)
6751 case $ac_sys_system in
6752 Darwin*)
6753 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6754 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006755 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006756 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006757 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006758 then
6759 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006760 if test "${REQUIRE_PGO}" = "yes"
6761 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006762 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 -07006763 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006764 fi
6765 ;;
6766 *)
6767 PGO_PROF_GEN_FLAG="-fprofile-generate"
6768 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6769 LLVM_PROF_MERGER="true"
6770 LLVM_PROF_FILE=""
6771 ;;
6772 esac
6773 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006774 *icc*)
6775 PGO_PROF_GEN_FLAG="-prof-gen"
6776 PGO_PROF_USE_FLAG="-prof-use"
6777 LLVM_PROF_MERGER="true"
6778 LLVM_PROF_FILE=""
6779 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006780esac
6781
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006782# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6783# merged with this chunk of code?
6784
6785# Optimizer/debugger flags
6786# ------------------------
6787# (The following bit of code is complicated enough - please keep things
6788# indented properly. Just pretend you're editing Python code. ;-)
6789
6790# There are two parallel sets of case statements below, one that checks to
6791# see if OPT was set and one that does BASECFLAGS setting based upon
6792# compiler and platform. BASECFLAGS tweaks need to be made even if the
6793# user set OPT.
6794
6795# tweak OPT based on compiler and platform, only if the user didn't set
6796# it on the command line
6797
Victor Stinner9ed34a82017-05-02 22:35:58 +02006798
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006799if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006800then
6801 case $GCC in
6802 yes)
6803 if test "$CC" != 'g++' ; then
6804 STRICT_PROTO="-Wstrict-prototypes"
6805 fi
6806 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6807 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6808 WRAP="-fwrapv"
6809 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006810
Stefan Krahaf04ff22011-12-08 22:20:31 +01006811 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006812 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006813 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006814 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006815 *)
6816 if $CC --version 2>&1 | grep -q clang
6817 then
6818 cc_is_clang=1
6819 else
6820 cc_is_clang=
6821 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006822 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006823
Victor Stinner35f3d242017-04-21 12:35:24 +02006824 if test -n "${cc_is_clang}"
6825 then
6826 # Clang also needs -fwrapv
6827 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006828 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6829 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006830 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006831 fi
6832
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006833 case $ac_cv_prog_cc_g in
6834 yes)
6835 if test "$Py_DEBUG" = 'true' ; then
6836 # Optimization messes up debuggers, so turn it off for
6837 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006838 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006839 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006840 else
Victor Stinner28205b22017-04-21 11:24:34 +02006841 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006842 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006843 else
Victor Stinner28205b22017-04-21 11:24:34 +02006844 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845 fi
6846 ;;
6847 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006848 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849 ;;
6850 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006851
Victor Stinner826f83f2017-04-28 15:07:10 +02006852 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006853
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006854 case $ac_sys_system in
6855 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6856 ;;
6857 esac
6858 ;;
6859
6860 *)
6861 OPT="-O"
6862 ;;
6863 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006864fi
6865
6866
6867
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006868
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006869# The -arch flags for universal builds on OSX
6870UNIVERSAL_ARCH_FLAGS=
6871
6872
6873# tweak BASECFLAGS based on compiler and platform
6874case $GCC in
6875yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006876 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006877
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6879$as_echo_n "checking for -Wextra... " >&6; }
6880 ac_save_cc="$CC"
6881 CC="$CC -Wextra -Werror"
6882 if ${ac_cv_extra_warnings+:} false; then :
6883 $as_echo_n "(cached) " >&6
6884else
6885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6886/* end confdefs.h. */
6887
6888
6889int
6890main ()
6891{
6892
6893 ;
6894 return 0;
6895}
6896
6897_ACEOF
6898if ac_fn_c_try_compile "$LINENO"; then :
6899
6900 ac_cv_extra_warnings=yes
6901
6902else
6903
6904 ac_cv_extra_warnings=no
6905
6906fi
6907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6908fi
6909
6910 CC="$ac_save_cc"
6911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6912$as_echo "$ac_cv_extra_warnings" >&6; }
6913
6914 if test $ac_cv_extra_warnings = yes
6915 then
6916 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6917 fi
6918
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006919 # Python doesn't violate C99 aliasing rules, but older versions of
6920 # GCC produce warnings for legal Python code. Enable
6921 # -fno-strict-aliasing on versions of GCC that support but produce
6922 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6924$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006925 ac_save_cc="$CC"
6926 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006927 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006928 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006929 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006930else
Matthias Kloseb9621712010-04-24 17:59:49 +00006931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006932/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006933
Matthias Kloseb159a552010-04-25 21:00:44 +00006934
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006935int
6936main ()
6937{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006938
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006939 ;
6940 return 0;
6941}
Matthias Kloseb159a552010-04-25 21:00:44 +00006942
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006944if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006945
6946 CC="$ac_save_cc -fstrict-aliasing"
6947 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006949/* end confdefs.h. */
6950
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006951 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006952int
6953main ()
6954{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006955double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006956 ;
6957 return 0;
6958}
Matthias Kloseb159a552010-04-25 21:00:44 +00006959
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006961if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006962
6963 ac_cv_no_strict_aliasing=no
6964
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006965else
Matthias Kloseb159a552010-04-25 21:00:44 +00006966
6967 ac_cv_no_strict_aliasing=yes
6968
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006969fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006971
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006972else
Matthias Kloseb159a552010-04-25 21:00:44 +00006973
6974 ac_cv_no_strict_aliasing=no
6975
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006976fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006978fi
6979
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006980 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006981 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6983$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006984 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006985 then
6986 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6987 fi
6988
Zachary Ware5af85642015-12-21 12:09:17 -06006989 # ICC doesn't recognize the option, but only emits a warning
6990 ## XXX does it emit an unused result warning and can it be disabled?
6991 case "$CC" in
6992 *icc*)
6993 ac_cv_disable_unused_result_warning=no
6994 ;;
6995 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6997$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6998 ac_save_cc="$CC"
6999 CC="$CC -Wunused-result -Werror"
7000 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007001 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007002 $as_echo_n "(cached) " >&6
7003else
7004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7005/* end confdefs.h. */
7006
7007
7008int
7009main ()
7010{
7011
7012 ;
7013 return 0;
7014}
7015
7016_ACEOF
7017if ac_fn_c_try_compile "$LINENO"; then :
7018
7019 ac_cv_disable_unused_result_warning=yes
7020
7021else
7022
7023 ac_cv_disable_unused_result_warning=no
7024
7025fi
7026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7027fi
7028
7029 CFLAGS="$save_CFLAGS"
7030 CC="$ac_save_cc"
7031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7032$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007033 ;;
7034 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007035
7036 if test $ac_cv_disable_unused_result_warning = yes
7037 then
7038 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007039 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7040 fi
7041
7042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7043$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7044 ac_save_cc="$CC"
7045 CC="$CC -Wunused-parameter -Werror"
7046 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7047 $as_echo_n "(cached) " >&6
7048else
7049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7050/* end confdefs.h. */
7051
7052
7053int
7054main ()
7055{
7056
7057 ;
7058 return 0;
7059}
7060
7061_ACEOF
7062if ac_fn_c_try_compile "$LINENO"; then :
7063
7064 ac_cv_disable_unused_parameter_warning=yes
7065
7066else
7067
7068 ac_cv_disable_unused_parameter_warning=no
7069
7070fi
7071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7072fi
7073
7074 CC="$ac_save_cc"
7075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7076$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7077
7078 if test $ac_cv_disable_unused_parameter_warning = yes
7079 then
7080 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7081 fi
7082
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7084$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7085 ac_save_cc="$CC"
7086 CC="$CC -Wmissing-field-initializers -Werror"
7087 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7088 $as_echo_n "(cached) " >&6
7089else
7090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7091/* end confdefs.h. */
7092
7093
7094int
7095main ()
7096{
7097
7098 ;
7099 return 0;
7100}
7101
7102_ACEOF
7103if ac_fn_c_try_compile "$LINENO"; then :
7104
7105 ac_cv_disable_missing_field_initializers=yes
7106
7107else
7108
7109 ac_cv_disable_missing_field_initializers=no
7110
7111fi
7112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7113fi
7114
7115 CC="$ac_save_cc"
7116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7117$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7118
7119 if test $ac_cv_disable_missing_field_initializers = yes
7120 then
7121 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007122 fi
7123
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7125$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7126 ac_save_cc="$CC"
7127 CC="$CC -Wsign-compare"
7128 save_CFLAGS="$CFLAGS"
7129 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7130 $as_echo_n "(cached) " >&6
7131else
7132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7133/* end confdefs.h. */
7134
7135
7136int
7137main ()
7138{
7139
7140 ;
7141 return 0;
7142}
7143
7144_ACEOF
7145if ac_fn_c_try_compile "$LINENO"; then :
7146
7147 ac_cv_enable_sign_compare_warning=yes
7148
7149else
7150
7151 ac_cv_enable_sign_compare_warning=no
7152
7153fi
7154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7155fi
7156
7157 CFLAGS="$save_CFLAGS"
7158 CC="$ac_save_cc"
7159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7160$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7161
7162 if test $ac_cv_enable_sign_compare_warning = yes
7163 then
7164 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7165 fi
7166
7167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7168$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7169 ac_save_cc="$CC"
7170 CC="$CC -Wunreachable-code"
7171 save_CFLAGS="$CFLAGS"
7172 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7173 $as_echo_n "(cached) " >&6
7174else
7175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7176/* end confdefs.h. */
7177
7178
7179int
7180main ()
7181{
7182
7183 ;
7184 return 0;
7185}
7186
7187_ACEOF
7188if ac_fn_c_try_compile "$LINENO"; then :
7189
7190 ac_cv_enable_unreachable_code_warning=yes
7191
7192else
7193
7194 ac_cv_enable_unreachable_code_warning=no
7195
7196fi
7197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7198fi
7199
7200 CFLAGS="$save_CFLAGS"
7201 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007202
7203 # Don't enable unreachable code warning in debug mode, since it usually
7204 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007205 # Issue #24324: Unfortunately, the unreachable code warning does not work
7206 # correctly on gcc and has been silently removed from the compiler.
7207 # It is supported on clang but on OS X systems gcc may be an alias
7208 # for clang. Try to determine if the compiler is not really gcc and,
7209 # if so, only then enable the warning.
7210 if test $ac_cv_enable_unreachable_code_warning = yes && \
7211 test "$Py_DEBUG" != "true" && \
7212 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007213 then
7214 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007215 else
7216 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007217 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7219$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007220
Victor Stinner193ee0a2017-02-06 14:24:00 +01007221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7222$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7223 ac_save_cc="$CC"
7224 CC="$CC -Werror=implicit-function-declaration"
7225 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7226 $as_echo_n "(cached) " >&6
7227else
7228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7229/* end confdefs.h. */
7230
7231
7232int
7233main ()
7234{
7235
7236 ;
7237 return 0;
7238}
7239
7240_ACEOF
7241if ac_fn_c_try_compile "$LINENO"; then :
7242
7243 ac_cv_enable_implicit_function_declaration_error=yes
7244
7245else
7246
7247 ac_cv_enable_implicit_function_declaration_error=no
7248
7249fi
7250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7251fi
7252
7253 CC="$ac_save_cc"
7254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7255$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7256
7257 if test $ac_cv_enable_implicit_function_declaration_error = yes
7258 then
7259 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7260 fi
7261
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007262 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7263 # support. Without this, treatment of subnormals doesn't follow
7264 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007265 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007266 alpha*)
7267 BASECFLAGS="$BASECFLAGS -mieee"
7268 ;;
7269 esac
7270
7271 case $ac_sys_system in
7272 SCO_SV*)
7273 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7274 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007275
7276 # is there any other compiler on Darwin besides gcc?
7277 Darwin*)
7278 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7279 # used to be here, but non-Apple gcc doesn't accept them.
7280 if test "${CC}" = gcc
7281 then
7282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007283$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007284 case "${UNIVERSALSDK}" in
7285 */MacOSX10.4u.sdk)
7286 # Build using 10.4 SDK, force usage of gcc when the
7287 # compiler is gcc, otherwise the user will get very
7288 # confusing error messages when building on OSX 10.6
7289 CC=gcc-4.0
7290 CPP=cpp-4.0
7291 ;;
7292 esac
7293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007294$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007295 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007296
Ned Deily87adb6e2013-10-18 21:09:56 -07007297 if test "${enable_universalsdk}"
7298 then
7299 case "$UNIVERSAL_ARCHS" in
7300 32-bit)
7301 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7302 LIPO_32BIT_FLAGS=""
7303 ARCH_RUN_32BIT=""
7304 ;;
7305 64-bit)
7306 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7307 LIPO_32BIT_FLAGS=""
7308 ARCH_RUN_32BIT="true"
7309 ;;
7310 all)
7311 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7312 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7313 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7314 ;;
7315 intel)
7316 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7317 LIPO_32BIT_FLAGS="-extract i386"
7318 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7319 ;;
7320 intel-32)
7321 UNIVERSAL_ARCH_FLAGS="-arch i386"
7322 LIPO_32BIT_FLAGS=""
7323 ARCH_RUN_32BIT=""
7324 ;;
7325 3-way)
7326 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7327 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7328 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7329 ;;
7330 *)
7331 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7332 ;;
7333 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007334
Ned Deily87adb6e2013-10-18 21:09:56 -07007335 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7336 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7337 if test "${UNIVERSALSDK}" != "/"
7338 then
7339 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7340 fi
7341 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007342
Ned Deily87adb6e2013-10-18 21:09:56 -07007343 # Calculate an appropriate deployment target for this build:
7344 # The deployment target value is used explicitly to enable certain
7345 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007346 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007347 # component of the string returned by distutils.get_platform().
7348 #
7349 # Use the value from:
7350 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7351 # 2. the operating system version of the build machine if >= 10.6
7352 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7353 # below to pick either 10.3, 10.4, or 10.5 as the target.
7354 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007355
Ned Deily87adb6e2013-10-18 21:09:56 -07007356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7357$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007358 cur_target_major=`sw_vers -productVersion | \
7359 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7360 cur_target_minor=`sw_vers -productVersion | \
7361 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7362 cur_target="${cur_target_major}.${cur_target_minor}"
7363 if test ${cur_target_major} -eq 10 && \
7364 test ${cur_target_minor} -ge 3 && \
7365 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007366 then
Ned Deily36820b62014-06-25 13:44:22 -07007367 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007368 cur_target=10.3
7369 if test ${enable_universalsdk}
7370 then
7371 case "$UNIVERSAL_ARCHS" in
7372 all|3-way|intel|64-bit)
7373 # These configurations were first supported in 10.5
7374 cur_target='10.5'
7375 ;;
7376 esac
7377 else
7378 if test `/usr/bin/arch` = "i386"
7379 then
7380 # 10.4 was the first release to support Intel archs
7381 cur_target="10.4"
7382 fi
7383 fi
7384 fi
7385 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007386
Ned Deily87adb6e2013-10-18 21:09:56 -07007387 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7388 # environment with a value that is the same as what we'll use
7389 # in the Makefile to ensure that we'll get the same compiler
7390 # environment during configure and build time.
7391 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7392 export MACOSX_DEPLOYMENT_TARGET
7393 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7395$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007396
Ned Deily87adb6e2013-10-18 21:09:56 -07007397 # end of Darwin* tests
7398 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007399 esac
7400 ;;
7401
7402*)
7403 case $ac_sys_system in
7404 OpenUNIX*|UnixWare*)
7405 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7406 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007407 SCO_SV*)
7408 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7409 ;;
7410 esac
7411 ;;
7412esac
7413
Zachary Ware5af85642015-12-21 12:09:17 -06007414# ICC needs -fp-model strict or floats behave badly
7415case "$CC" in
7416*icc*)
7417 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7418 ;;
7419esac
7420
T. Woutersddbfa2c2017-05-23 01:30:49 +02007421if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007422 :
7423else
7424 OPT="-DNDEBUG $OPT"
7425fi
7426
7427if test "$ac_arch_flags"
7428then
7429 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7430fi
7431
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007432# On some compilers, pthreads are available without further options
7433# (e.g. MacOS X). On some of these systems, the compiler will not
7434# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7435# So we have to see first whether pthreads are available without
7436# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7438$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007439if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007440 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007441else
Matthias Kloseb9621712010-04-24 17:59:49 +00007442 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007443 ac_cv_pthread_is_default=no
7444else
Matthias Kloseb9621712010-04-24 17:59:49 +00007445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446/* end confdefs.h. */
7447
Stefan Krah7dba5942012-11-22 22:49:11 +01007448#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449#include <pthread.h>
7450
7451void* routine(void* p){return NULL;}
7452
7453int main(){
7454 pthread_t p;
7455 if(pthread_create(&p,NULL,routine,NULL)!=0)
7456 return 1;
7457 (void)pthread_detach(p);
7458 return 0;
7459}
7460
7461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007462if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007463
7464 ac_cv_pthread_is_default=yes
7465 ac_cv_kthread=no
7466 ac_cv_pthread=no
7467
7468else
Matthias Kloseb9621712010-04-24 17:59:49 +00007469 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007471rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7472 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007473fi
7474
7475
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007476fi
7477
Matthias Kloseb9621712010-04-24 17:59:49 +00007478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7479$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007480
7481
7482if test $ac_cv_pthread_is_default = yes
7483then
7484 ac_cv_kpthread=no
7485else
7486# -Kpthread, if available, provides the right #defines
7487# and linker options to make pthread_create available
7488# Some compilers won't report that they do not support -Kpthread,
7489# so we need to run a program to see whether it really made the
7490# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7492$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007493if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007494 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495else
7496 ac_save_cc="$CC"
7497CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007498if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007499 ac_cv_kpthread=no
7500else
Matthias Kloseb9621712010-04-24 17:59:49 +00007501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007502/* end confdefs.h. */
7503
Stefan Krah7dba5942012-11-22 22:49:11 +01007504#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007505#include <pthread.h>
7506
7507void* routine(void* p){return NULL;}
7508
7509int main(){
7510 pthread_t p;
7511 if(pthread_create(&p,NULL,routine,NULL)!=0)
7512 return 1;
7513 (void)pthread_detach(p);
7514 return 0;
7515}
7516
7517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007518if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007519 ac_cv_kpthread=yes
7520else
Matthias Kloseb9621712010-04-24 17:59:49 +00007521 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007523rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7524 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007525fi
7526
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007527CC="$ac_save_cc"
7528fi
7529
Matthias Kloseb9621712010-04-24 17:59:49 +00007530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7531$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007532fi
7533
7534if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7535then
7536# -Kthread, if available, provides the right #defines
7537# and linker options to make pthread_create available
7538# Some compilers won't report that they do not support -Kthread,
7539# so we need to run a program to see whether it really made the
7540# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7542$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007543if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007544 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007545else
7546 ac_save_cc="$CC"
7547CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007548if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007549 ac_cv_kthread=no
7550else
Matthias Kloseb9621712010-04-24 17:59:49 +00007551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552/* end confdefs.h. */
7553
Stefan Krah7dba5942012-11-22 22:49:11 +01007554#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007555#include <pthread.h>
7556
7557void* routine(void* p){return NULL;}
7558
7559int main(){
7560 pthread_t p;
7561 if(pthread_create(&p,NULL,routine,NULL)!=0)
7562 return 1;
7563 (void)pthread_detach(p);
7564 return 0;
7565}
7566
7567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007568if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007569 ac_cv_kthread=yes
7570else
Matthias Kloseb9621712010-04-24 17:59:49 +00007571 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007573rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7574 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007575fi
7576
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007577CC="$ac_save_cc"
7578fi
7579
Matthias Kloseb9621712010-04-24 17:59:49 +00007580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7581$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007582fi
7583
7584if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7585then
7586# -pthread, if available, provides the right #defines
7587# and linker options to make pthread_create available
7588# Some compilers won't report that they do not support -pthread,
7589# so we need to run a program to see whether it really made the
7590# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7592$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007593if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007594 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007595else
7596 ac_save_cc="$CC"
7597CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007598if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007599 ac_cv_pthread=no
7600else
Matthias Kloseb9621712010-04-24 17:59:49 +00007601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007602/* end confdefs.h. */
7603
Stefan Krah7dba5942012-11-22 22:49:11 +01007604#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007605#include <pthread.h>
7606
7607void* routine(void* p){return NULL;}
7608
7609int main(){
7610 pthread_t p;
7611 if(pthread_create(&p,NULL,routine,NULL)!=0)
7612 return 1;
7613 (void)pthread_detach(p);
7614 return 0;
7615}
7616
7617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007618if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007619 ac_cv_pthread=yes
7620else
Matthias Kloseb9621712010-04-24 17:59:49 +00007621 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007623rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7624 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007625fi
7626
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007627CC="$ac_save_cc"
7628fi
7629
Matthias Kloseb9621712010-04-24 17:59:49 +00007630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7631$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007632fi
7633
7634# If we have set a CC compiler flag for thread support then
7635# check if it works for CXX, too.
7636ac_cv_cxx_thread=no
7637if test ! -z "$CXX"
7638then
Matthias Kloseb9621712010-04-24 17:59:49 +00007639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7640$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007641ac_save_cxx="$CXX"
7642
7643if test "$ac_cv_kpthread" = "yes"
7644then
7645 CXX="$CXX -Kpthread"
7646 ac_cv_cxx_thread=yes
7647elif test "$ac_cv_kthread" = "yes"
7648then
7649 CXX="$CXX -Kthread"
7650 ac_cv_cxx_thread=yes
7651elif test "$ac_cv_pthread" = "yes"
7652then
7653 CXX="$CXX -pthread"
7654 ac_cv_cxx_thread=yes
7655fi
7656
7657if test $ac_cv_cxx_thread = yes
7658then
7659 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7660 $CXX -c conftest.$ac_ext 2>&5
7661 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7662 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7663 then
7664 ac_cv_cxx_thread=yes
7665 else
7666 ac_cv_cxx_thread=no
7667 fi
7668 rm -fr conftest*
7669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7671$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007672fi
7673CXX="$ac_save_cxx"
7674
7675
7676# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7678$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007679if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007680 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007681else
Matthias Kloseb9621712010-04-24 17:59:49 +00007682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007683/* end confdefs.h. */
7684#include <stdlib.h>
7685#include <stdarg.h>
7686#include <string.h>
7687#include <float.h>
7688
7689int
7690main ()
7691{
7692
7693 ;
7694 return 0;
7695}
7696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007697if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007698 ac_cv_header_stdc=yes
7699else
Matthias Kloseb9621712010-04-24 17:59:49 +00007700 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007701fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7703
7704if test $ac_cv_header_stdc = yes; then
7705 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707/* end confdefs.h. */
7708#include <string.h>
7709
7710_ACEOF
7711if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007712 $EGREP "memchr" >/dev/null 2>&1; then :
7713
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007714else
7715 ac_cv_header_stdc=no
7716fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007717rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007718
7719fi
7720
7721if test $ac_cv_header_stdc = yes; then
7722 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007724/* end confdefs.h. */
7725#include <stdlib.h>
7726
7727_ACEOF
7728if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007729 $EGREP "free" >/dev/null 2>&1; then :
7730
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007731else
7732 ac_cv_header_stdc=no
7733fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007734rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007735
7736fi
7737
7738if test $ac_cv_header_stdc = yes; then
7739 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007740 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007741 :
7742else
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007744/* end confdefs.h. */
7745#include <ctype.h>
7746#include <stdlib.h>
7747#if ((' ' & 0x0FF) == 0x020)
7748# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7749# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7750#else
7751# define ISLOWER(c) \
7752 (('a' <= (c) && (c) <= 'i') \
7753 || ('j' <= (c) && (c) <= 'r') \
7754 || ('s' <= (c) && (c) <= 'z'))
7755# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7756#endif
7757
7758#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7759int
7760main ()
7761{
7762 int i;
7763 for (i = 0; i < 256; i++)
7764 if (XOR (islower (i), ISLOWER (i))
7765 || toupper (i) != TOUPPER (i))
7766 return 2;
7767 return 0;
7768}
7769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007770if ac_fn_c_try_run "$LINENO"; then :
7771
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007772else
Matthias Kloseb9621712010-04-24 17:59:49 +00007773 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007775rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7776 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007777fi
7778
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007779fi
7780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7782$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007783if test $ac_cv_header_stdc = yes; then
7784
Matthias Kloseb9621712010-04-24 17:59:49 +00007785$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007786
7787fi
7788
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007789for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007790fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007791ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007792sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007793unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007794poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007795sys/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 +01007796sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007797sys/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 +01007798sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007799sys/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 -07007800libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007801linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007802sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007803do :
7804 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7805ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007806if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007807 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007808#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007809_ACEOF
7810
7811fi
7812
Guido van Rossum627b2d71993-12-24 10:39:16 +00007813done
7814
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007815ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007816for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007817 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7819$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007820if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007821 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007822else
Matthias Kloseb9621712010-04-24 17:59:49 +00007823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007824/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007825#include <sys/types.h>
7826#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007827
Martin v. Löwis11437992002-04-12 09:54:03 +00007828int
7829main ()
7830{
7831if ((DIR *) 0)
7832return 0;
7833 ;
7834 return 0;
7835}
7836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007837if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007838 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007839else
Matthias Kloseb9621712010-04-24 17:59:49 +00007840 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007844eval ac_res=\$$as_ac_Header
7845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7846$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007847if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007848 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007849#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007850_ACEOF
7851
7852ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007853fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007854
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007855done
7856# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7857if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7859$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007860if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007861 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007862else
Martin v. Löwis11437992002-04-12 09:54:03 +00007863 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007866
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867/* Override any GCC internal prototype to avoid an error.
7868 Use char because int might match the return type of a GCC
7869 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007870#ifdef __cplusplus
7871extern "C"
7872#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007873char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007874int
7875main ()
7876{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007877return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007878 ;
7879 return 0;
7880}
7881_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007882for ac_lib in '' dir; do
7883 if test -z "$ac_lib"; then
7884 ac_res="none required"
7885 else
7886 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007887 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007888 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007889 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007890 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007892rm -f core conftest.err conftest.$ac_objext \
7893 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007894 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007895 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007897done
Victor Stinnere0be4232011-10-25 13:06:09 +02007898if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007899
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007900else
7901 ac_cv_search_opendir=no
7902fi
7903rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007904LIBS=$ac_func_search_save_LIBS
7905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7907$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007908ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007909if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007910 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007911
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007912fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007913
Michael W. Hudson54241132001-12-07 15:38:26 +00007914else
Matthias Kloseb9621712010-04-24 17:59:49 +00007915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7916$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007917if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007918 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007919else
7920 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007922/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007924/* Override any GCC internal prototype to avoid an error.
7925 Use char because int might match the return type of a GCC
7926 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007927#ifdef __cplusplus
7928extern "C"
7929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007930char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007931int
7932main ()
7933{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007934return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007935 ;
7936 return 0;
7937}
7938_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007939for ac_lib in '' x; do
7940 if test -z "$ac_lib"; then
7941 ac_res="none required"
7942 else
7943 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007944 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007945 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007946 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007947 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007949rm -f core conftest.err conftest.$ac_objext \
7950 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007951 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007952 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007954done
Victor Stinnere0be4232011-10-25 13:06:09 +02007955if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007956
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007957else
7958 ac_cv_search_opendir=no
7959fi
7960rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007961LIBS=$ac_func_search_save_LIBS
7962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7964$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007965ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007966if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007967 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007968
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007969fi
7970
7971fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007972
Matthias Kloseb9621712010-04-24 17:59:49 +00007973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7974$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007975if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007976 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007977else
Matthias Kloseb9621712010-04-24 17:59:49 +00007978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007979/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007980#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007981int
7982main ()
7983{
7984return makedev(0, 0);
7985 ;
7986 return 0;
7987}
7988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007989if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007990 ac_cv_header_sys_types_h_makedev=yes
7991else
Matthias Kloseb9621712010-04-24 17:59:49 +00007992 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007994rm -f core conftest.err conftest.$ac_objext \
7995 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007996
7997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7999$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008000
8001if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008002ac_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 +02008003if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008004
Matthias Kloseb9621712010-04-24 17:59:49 +00008005$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008006
8007fi
8008
8009
8010
8011 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008012 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 +02008013if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008014
Matthias Kloseb9621712010-04-24 17:59:49 +00008015$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008016
8017fi
8018
8019
8020 fi
8021fi
8022
Michael W. Hudson54241132001-12-07 15:38:26 +00008023
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008024# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8025# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8026SAVE_CFLAGS=$CFLAGS
8027CFLAGS="-std=c99 $CFLAGS"
8028for ac_header in bluetooth/bluetooth.h
8029do :
8030 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8031if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8032 cat >>confdefs.h <<_ACEOF
8033#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8034_ACEOF
8035
8036fi
8037
8038done
8039
8040CFLAGS=$SAVE_CFLAGS
8041
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008042# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8043for ac_header in net/if.h
8044do :
8045 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8046#ifdef STDC_HEADERS
8047# include <stdlib.h>
8048# include <stddef.h>
8049#else
8050# ifdef HAVE_STDLIB_H
8051# include <stdlib.h>
8052# endif
8053#endif
8054#ifdef HAVE_SYS_SOCKET_H
8055# include <sys/socket.h>
8056#endif
8057
8058"
Victor Stinnere0be4232011-10-25 13:06:09 +02008059if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008060 cat >>confdefs.h <<_ACEOF
8061#define HAVE_NET_IF_H 1
8062_ACEOF
8063
8064fi
8065
8066done
8067
8068
Martin v. Löwis11017b12006-01-14 18:12:57 +00008069# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008070for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008071do :
8072 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 +00008073#ifdef HAVE_ASM_TYPES_H
8074#include <asm/types.h>
8075#endif
8076#ifdef HAVE_SYS_SOCKET_H
8077#include <sys/socket.h>
8078#endif
8079
Matthias Kloseb9621712010-04-24 17:59:49 +00008080"
Victor Stinnere0be4232011-10-25 13:06:09 +02008081if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008082 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008083#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008084_ACEOF
8085
8086fi
8087
8088done
8089
8090
caaveryeffc12f2017-09-06 18:18:10 -04008091for ac_header in linux/vm_sockets.h
8092do :
8093 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8094#ifdef HAVE_SYS_SOCKET_H
8095#include <sys/socket.h>
8096#endif
8097
8098"
8099if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8100 cat >>confdefs.h <<_ACEOF
8101#define HAVE_LINUX_VM_SOCKETS_H 1
8102_ACEOF
8103
8104fi
8105
8106done
8107
8108
Charles-François Natali47413c12011-10-06 19:47:44 +02008109# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008110for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008111do :
8112 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8113ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8114#ifdef HAVE_SYS_SOCKET_H
8115#include <sys/socket.h>
8116#endif
8117
8118"
8119if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8120 cat >>confdefs.h <<_ACEOF
8121#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8122_ACEOF
8123
8124fi
8125
8126done
8127
8128
Guido van Rossum627b2d71993-12-24 10:39:16 +00008129# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008130was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8132$as_echo_n "checking for clock_t in time.h... " >&6; }
8133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008134/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008135#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008136
8137_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008138if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008139 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008140 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008141else
Martin v. Löwis11437992002-04-12 09:54:03 +00008142
8143
Matthias Kloseb9621712010-04-24 17:59:49 +00008144$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008145
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008146
Guido van Rossum627b2d71993-12-24 10:39:16 +00008147fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008148rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008149
Matthias Kloseb9621712010-04-24 17:59:49 +00008150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8151$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008152
Matthias Kloseb9621712010-04-24 17:59:49 +00008153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8154$as_echo_n "checking for makedev... " >&6; }
8155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008156/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008157
Jesus Cea740f53a2010-04-28 11:35:30 +00008158#if defined(MAJOR_IN_MKDEV)
8159#include <sys/mkdev.h>
8160#elif defined(MAJOR_IN_SYSMACROS)
8161#include <sys/sysmacros.h>
8162#else
8163#include <sys/types.h>
8164#endif
8165
Neal Norwitz11690112002-07-30 01:08:28 +00008166int
8167main ()
8168{
Jesus Cea740f53a2010-04-28 11:35:30 +00008169
8170 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008171 ;
8172 return 0;
8173}
Matthias Kloseb159a552010-04-25 21:00:44 +00008174
Neal Norwitz11690112002-07-30 01:08:28 +00008175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008176if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008177 ac_cv_has_makedev=yes
8178else
Matthias Kloseb9621712010-04-24 17:59:49 +00008179 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008181rm -f core conftest.err conftest.$ac_objext \
8182 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8184$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008185if test "$ac_cv_has_makedev" = "yes"; then
8186
Matthias Kloseb9621712010-04-24 17:59:49 +00008187$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008188
8189fi
8190
Christian Heimes985ecdc2013-11-20 11:46:18 +01008191# byte swapping
8192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8193$as_echo_n "checking for le64toh... " >&6; }
8194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8195/* end confdefs.h. */
8196
8197#ifdef HAVE_ENDIAN_H
8198#include <endian.h>
8199#elif defined(HAVE_SYS_ENDIAN_H)
8200#include <sys/endian.h>
8201#endif
8202
8203int
8204main ()
8205{
8206
8207 le64toh(1)
8208 ;
8209 return 0;
8210}
8211
8212_ACEOF
8213if ac_fn_c_try_link "$LINENO"; then :
8214 ac_cv_has_le64toh=yes
8215else
8216 ac_cv_has_le64toh=no
8217fi
8218rm -f core conftest.err conftest.$ac_objext \
8219 conftest$ac_exeext conftest.$ac_ext
8220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8221$as_echo "$ac_cv_has_le64toh" >&6; }
8222if test "$ac_cv_has_le64toh" = "yes"; then
8223
8224$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8225
8226fi
8227
Martin v. Löwis399a6892002-10-04 10:22:02 +00008228use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008229# Don't use largefile support for GNU/Hurd
8230case $ac_sys_system in GNU*)
8231 use_lfs=no
8232esac
8233
Martin v. Löwis399a6892002-10-04 10:22:02 +00008234if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008235# Two defines needed to enable largefile support on various platforms
8236# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008237case $ac_sys_system/$ac_sys_release in
8238AIX*)
8239
8240$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8241
8242 ;;
8243esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008244
Matthias Kloseb9621712010-04-24 17:59:49 +00008245$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008246
8247
Matthias Kloseb9621712010-04-24 17:59:49 +00008248$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008249
Martin v. Löwis399a6892002-10-04 10:22:02 +00008250fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008251
Guido van Rossum84e7b241996-08-19 21:59:00 +00008252# Add some code to confdefs.h so that the test for off_t works on SCO
8253cat >> confdefs.h <<\EOF
8254#if defined(SCO_DS)
8255#undef _OFF_T
8256#endif
8257EOF
8258
Guido van Rossumef2255b2000-03-10 22:30:29 +00008259# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008260ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008261if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008262
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008263else
Martin v. Löwis11437992002-04-12 09:54:03 +00008264
8265cat >>confdefs.h <<_ACEOF
8266#define mode_t int
8267_ACEOF
8268
8269fi
8270
Matthias Kloseb9621712010-04-24 17:59:49 +00008271ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008272if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008273
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008274else
Martin v. Löwis11437992002-04-12 09:54:03 +00008275
8276cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008277#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008278_ACEOF
8279
8280fi
8281
Matthias Kloseb9621712010-04-24 17:59:49 +00008282ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008283if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008284
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008285else
Martin v. Löwis11437992002-04-12 09:54:03 +00008286
8287cat >>confdefs.h <<_ACEOF
8288#define pid_t int
8289_ACEOF
8290
8291fi
8292
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008293
Martin v. Löwis11437992002-04-12 09:54:03 +00008294cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008295#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008296_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008297
Matthias Kloseb9621712010-04-24 17:59:49 +00008298ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008299if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008300
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008301else
Martin v. Löwis11437992002-04-12 09:54:03 +00008302
8303cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008304#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008305_ACEOF
8306
8307fi
8308
Matthias Kloseb9621712010-04-24 17:59:49 +00008309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8310$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008311if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008312 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008313else
Matthias Kloseb9621712010-04-24 17:59:49 +00008314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008315/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008316#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008317
8318_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008319if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008320 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008321 ac_cv_type_uid_t=yes
8322else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008323 ac_cv_type_uid_t=no
8324fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008325rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008326
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008327fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8329$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008330if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008331
Matthias Kloseb9621712010-04-24 17:59:49 +00008332$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008333
8334
Matthias Kloseb9621712010-04-24 17:59:49 +00008335$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008336
8337fi
8338
Mark Dickinson983bc162012-12-02 12:11:38 +00008339
Matthias Kloseb9621712010-04-24 17:59:49 +00008340ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008341if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008342
Matthias Kloseb9621712010-04-24 17:59:49 +00008343$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008344
8345fi
8346
Stefan Krah1919b7e2012-03-21 18:25:23 +01008347ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8348if test "x$ac_cv_type___uint128_t" = xyes; then :
8349
8350$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8351
8352fi
8353
Jack Jansendd19cf82001-12-06 22:36:17 +00008354
Michael W. Hudson54241132001-12-07 15:38:26 +00008355# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008356# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008357# The cast to long int works around a bug in the HP C Compiler
8358# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8359# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8360# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8362$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008363if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008364 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008365else
Matthias Kloseb9621712010-04-24 17:59:49 +00008366 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 +00008367
Martin v. Löwis11437992002-04-12 09:54:03 +00008368else
Matthias Kloseb9621712010-04-24 17:59:49 +00008369 if test "$ac_cv_type_int" = yes; then
8370 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8371$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008372as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008373See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008374 else
8375 ac_cv_sizeof_int=0
8376 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008377fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008378
Martin v. Löwis11437992002-04-12 09:54:03 +00008379fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8381$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008382
8383
8384
Martin v. Löwis11437992002-04-12 09:54:03 +00008385cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008386#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008387_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008388
8389
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008390# The cast to long int works around a bug in the HP C Compiler
8391# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8392# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8393# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8395$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008396if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008397 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008398else
Matthias Kloseb9621712010-04-24 17:59:49 +00008399 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 +00008400
Martin v. Löwis11437992002-04-12 09:54:03 +00008401else
Matthias Kloseb9621712010-04-24 17:59:49 +00008402 if test "$ac_cv_type_long" = yes; then
8403 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8404$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008405as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008406See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008407 else
8408 ac_cv_sizeof_long=0
8409 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008410fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008411
Martin v. Löwis11437992002-04-12 09:54:03 +00008412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8414$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008415
8416
8417
Martin v. Löwis11437992002-04-12 09:54:03 +00008418cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008419#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008420_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008421
8422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008423# The cast to long int works around a bug in the HP C Compiler
8424# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8425# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8426# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8428$as_echo_n "checking size of long long... " >&6; }
8429if ${ac_cv_sizeof_long_long+:} false; then :
8430 $as_echo_n "(cached) " >&6
8431else
8432 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8433
8434else
8435 if test "$ac_cv_type_long_long" = yes; then
8436 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8437$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8438as_fn_error 77 "cannot compute sizeof (long long)
8439See \`config.log' for more details" "$LINENO" 5; }
8440 else
8441 ac_cv_sizeof_long_long=0
8442 fi
8443fi
8444
8445fi
8446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8447$as_echo "$ac_cv_sizeof_long_long" >&6; }
8448
8449
8450
8451cat >>confdefs.h <<_ACEOF
8452#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8453_ACEOF
8454
8455
8456# The cast to long int works around a bug in the HP C Compiler
8457# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8458# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8459# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8461$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008462if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008463 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008464else
Matthias Kloseb9621712010-04-24 17:59:49 +00008465 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 +00008466
Martin v. Löwis11437992002-04-12 09:54:03 +00008467else
Matthias Kloseb9621712010-04-24 17:59:49 +00008468 if test "$ac_cv_type_void_p" = yes; then
8469 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8470$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008471as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008472See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008473 else
8474 ac_cv_sizeof_void_p=0
8475 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008477
Martin v. Löwis11437992002-04-12 09:54:03 +00008478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8480$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008481
8482
8483
Martin v. Löwis11437992002-04-12 09:54:03 +00008484cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008485#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008486_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008487
8488
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008489# The cast to long int works around a bug in the HP C Compiler
8490# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8491# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8492# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8494$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008495if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008497else
Matthias Kloseb9621712010-04-24 17:59:49 +00008498 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 +00008499
Martin v. Löwis11437992002-04-12 09:54:03 +00008500else
Matthias Kloseb9621712010-04-24 17:59:49 +00008501 if test "$ac_cv_type_short" = yes; then
8502 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8503$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008504as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008505See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008506 else
8507 ac_cv_sizeof_short=0
8508 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008509fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008510
Martin v. Löwis11437992002-04-12 09:54:03 +00008511fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8513$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008514
8515
8516
Martin v. Löwis11437992002-04-12 09:54:03 +00008517cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008518#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008519_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008520
8521
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008522# The cast to long int works around a bug in the HP C Compiler
8523# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8524# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8525# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8527$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008528if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008529 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008530else
Matthias Kloseb9621712010-04-24 17:59:49 +00008531 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 +00008532
Martin v. Löwis11437992002-04-12 09:54:03 +00008533else
Matthias Kloseb9621712010-04-24 17:59:49 +00008534 if test "$ac_cv_type_float" = yes; then
8535 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8536$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008537as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008538See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008539 else
8540 ac_cv_sizeof_float=0
8541 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008542fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008543
Martin v. Löwis11437992002-04-12 09:54:03 +00008544fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8546$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008547
8548
8549
Martin v. Löwis11437992002-04-12 09:54:03 +00008550cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008551#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008552_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008553
8554
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008555# The cast to long int works around a bug in the HP C Compiler
8556# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8557# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8558# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8560$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008561if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008562 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008563else
Matthias Kloseb9621712010-04-24 17:59:49 +00008564 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 +00008565
Martin v. Löwis11437992002-04-12 09:54:03 +00008566else
Matthias Kloseb9621712010-04-24 17:59:49 +00008567 if test "$ac_cv_type_double" = yes; then
8568 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8569$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008570as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008571See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008572 else
8573 ac_cv_sizeof_double=0
8574 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008576
Martin v. Löwis11437992002-04-12 09:54:03 +00008577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8579$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008580
8581
8582
Martin v. Löwis11437992002-04-12 09:54:03 +00008583cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008584#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008585_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008586
8587
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008588# The cast to long int works around a bug in the HP C Compiler
8589# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8590# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8591# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8593$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008594if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008595 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008596else
Matthias Kloseb9621712010-04-24 17:59:49 +00008597 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 +00008598
Martin v. Löwis11437992002-04-12 09:54:03 +00008599else
Matthias Kloseb9621712010-04-24 17:59:49 +00008600 if test "$ac_cv_type_fpos_t" = yes; then
8601 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8602$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008603as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008604See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008605 else
8606 ac_cv_sizeof_fpos_t=0
8607 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008608fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008609
Martin v. Löwis11437992002-04-12 09:54:03 +00008610fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8612$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008613
8614
8615
Martin v. Löwis11437992002-04-12 09:54:03 +00008616cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008617#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008618_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008619
Michael W. Hudson54241132001-12-07 15:38:26 +00008620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008621# The cast to long int works around a bug in the HP C Compiler
8622# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8623# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8624# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8626$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008627if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008628 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008629else
Matthias Kloseb9621712010-04-24 17:59:49 +00008630 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 +00008631
Martin v. Löwis18e16552006-02-15 17:27:45 +00008632else
Matthias Kloseb9621712010-04-24 17:59:49 +00008633 if test "$ac_cv_type_size_t" = yes; then
8634 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8635$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008636as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008637See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008638 else
8639 ac_cv_sizeof_size_t=0
8640 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008642
Martin v. Löwis18e16552006-02-15 17:27:45 +00008643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8645$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008646
8647
8648
Martin v. Löwis18e16552006-02-15 17:27:45 +00008649cat >>confdefs.h <<_ACEOF
8650#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8651_ACEOF
8652
8653
Christian Heimes400adb02008-02-01 08:12:03 +00008654# The cast to long int works around a bug in the HP C Compiler
8655# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8656# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8657# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8659$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008660if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008661 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008662else
Matthias Kloseb9621712010-04-24 17:59:49 +00008663 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 +00008664
Christian Heimes400adb02008-02-01 08:12:03 +00008665else
Matthias Kloseb9621712010-04-24 17:59:49 +00008666 if test "$ac_cv_type_pid_t" = yes; then
8667 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008669as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008670See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008671 else
8672 ac_cv_sizeof_pid_t=0
8673 fi
8674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008675
Christian Heimes400adb02008-02-01 08:12:03 +00008676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8678$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008679
8680
8681
8682cat >>confdefs.h <<_ACEOF
8683#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8684_ACEOF
8685
8686
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008687# The cast to long int works around a bug in the HP C Compiler
8688# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8689# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8690# This bug is HP SR number 8606223364.
8691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8692$as_echo_n "checking size of uintptr_t... " >&6; }
8693if ${ac_cv_sizeof_uintptr_t+:} false; then :
8694 $as_echo_n "(cached) " >&6
8695else
8696 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8697
8698else
8699 if test "$ac_cv_type_uintptr_t" = yes; then
8700 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8702as_fn_error 77 "cannot compute sizeof (uintptr_t)
8703See \`config.log' for more details" "$LINENO" 5; }
8704 else
8705 ac_cv_sizeof_uintptr_t=0
8706 fi
8707fi
8708
8709fi
8710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8711$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8712
8713
8714
8715cat >>confdefs.h <<_ACEOF
8716#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8717_ACEOF
8718
8719
Michael W. Hudson54241132001-12-07 15:38:26 +00008720
Matthias Kloseb9621712010-04-24 17:59:49 +00008721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8722$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008723have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008725/* end confdefs.h. */
8726
8727int
8728main ()
8729{
8730long double x; x = (long double)0;
8731 ;
8732 return 0;
8733}
8734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008735if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008736
8737
Matthias Kloseb9621712010-04-24 17:59:49 +00008738$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008739
8740 have_long_double=yes
8741
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008742fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8745$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008746if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008747# The cast to long int works around a bug in the HP C Compiler
8748# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8749# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8750# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8752$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008753if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008754 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008755else
Matthias Kloseb9621712010-04-24 17:59:49 +00008756 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 +00008757
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008758else
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 if test "$ac_cv_type_long_double" = yes; then
8760 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8761$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008762as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008763See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008764 else
8765 ac_cv_sizeof_long_double=0
8766 fi
8767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008768
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8771$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008772
8773
8774
8775cat >>confdefs.h <<_ACEOF
8776#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8777_ACEOF
8778
8779
8780fi
8781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008782# The cast to long int works around a bug in the HP C Compiler
8783# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8784# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8785# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8787$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008788if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008789 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008790else
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 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 +00008792
Thomas Woutersb2137042007-02-01 18:02:27 +00008793else
Matthias Kloseb9621712010-04-24 17:59:49 +00008794 if test "$ac_cv_type__Bool" = yes; then
8795 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008797as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008798See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008799 else
8800 ac_cv_sizeof__Bool=0
8801 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008803
Thomas Woutersb2137042007-02-01 18:02:27 +00008804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8806$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008807
8808
8809
Thomas Woutersb2137042007-02-01 18:02:27 +00008810cat >>confdefs.h <<_ACEOF
8811#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8812_ACEOF
8813
8814
Thomas Woutersb2137042007-02-01 18:02:27 +00008815
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008816# The cast to long int works around a bug in the HP C Compiler
8817# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8818# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8819# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8821$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008822if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008823 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008824else
Matthias Kloseb9621712010-04-24 17:59:49 +00008825 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008826#ifdef HAVE_SYS_TYPES_H
8827#include <sys/types.h>
8828#endif
8829
Matthias Kloseb9621712010-04-24 17:59:49 +00008830"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008831
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008832else
Matthias Kloseb9621712010-04-24 17:59:49 +00008833 if test "$ac_cv_type_off_t" = yes; then
8834 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8835$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008836as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008837See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008838 else
8839 ac_cv_sizeof_off_t=0
8840 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008842
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8845$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008846
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008847
8848
Martin v. Löwis11437992002-04-12 09:54:03 +00008849cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008850#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008851_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008852
Michael W. Hudson54241132001-12-07 15:38:26 +00008853
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008854
Matthias Kloseb9621712010-04-24 17:59:49 +00008855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8856$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008857if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008858 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008859
Matthias Kloseb9621712010-04-24 17:59:49 +00008860$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008861
Matthias Kloseb9621712010-04-24 17:59:49 +00008862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8863$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008864else
Matthias Kloseb9621712010-04-24 17:59:49 +00008865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8866$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008867fi
8868
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008869# The cast to long int works around a bug in the HP C Compiler
8870# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8871# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8872# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8874$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008875if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008876 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008877else
Matthias Kloseb9621712010-04-24 17:59:49 +00008878 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008879#ifdef HAVE_SYS_TYPES_H
8880#include <sys/types.h>
8881#endif
8882#ifdef HAVE_TIME_H
8883#include <time.h>
8884#endif
8885
Matthias Kloseb9621712010-04-24 17:59:49 +00008886"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008887
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008888else
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 if test "$ac_cv_type_time_t" = yes; then
8890 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008892as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008893See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008894 else
8895 ac_cv_sizeof_time_t=0
8896 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008898
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8901$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008902
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008903
8904
Martin v. Löwis11437992002-04-12 09:54:03 +00008905cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008906#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008907_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008908
Michael W. Hudson54241132001-12-07 15:38:26 +00008909
8910
Trent Mick635f6fb2000-08-23 21:33:05 +00008911# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008912ac_save_cc="$CC"
8913if test "$ac_cv_kpthread" = "yes"
8914then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008915elif test "$ac_cv_kthread" = "yes"
8916then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008917elif test "$ac_cv_pthread" = "yes"
8918then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008919fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008920
Matthias Kloseb9621712010-04-24 17:59:49 +00008921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8922$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008923have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008925/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008926
8927 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008928int
8929main ()
8930{
Guido van Rossum12580492000-09-24 16:47:19 +00008931pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008932 ;
8933 return 0;
8934}
Matthias Kloseb159a552010-04-25 21:00:44 +00008935
Martin v. Löwis11437992002-04-12 09:54:03 +00008936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008937if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008938 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8942$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008943if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008944 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008945# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8946# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8947# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8949$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008950if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008951 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008952else
Matthias Kloseb9621712010-04-24 17:59:49 +00008953 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008954#ifdef HAVE_PTHREAD_H
8955#include <pthread.h>
8956#endif
8957
Matthias Kloseb9621712010-04-24 17:59:49 +00008958"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008959
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008960else
Matthias Kloseb9621712010-04-24 17:59:49 +00008961 if test "$ac_cv_type_pthread_t" = yes; then
8962 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8963$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008964as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008965See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008966 else
8967 ac_cv_sizeof_pthread_t=0
8968 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008970
Trent Mick635f6fb2000-08-23 21:33:05 +00008971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8973$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008974
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008975
8976
Martin v. Löwis11437992002-04-12 09:54:03 +00008977cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008978#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008979_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008980
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008981
Trent Mick635f6fb2000-08-23 21:33:05 +00008982fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008983CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008984
Michael W. Hudson54241132001-12-07 15:38:26 +00008985
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008986case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008987 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008988 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8989 ;;
8990 Darwin/*)
8991 OTHER_LIBTOOL_OPT=""
8992 ;;
8993esac
8994
8995
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008996
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008997case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008998 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008999 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9000 if test "${enable_universalsdk}"; then
9001 :
9002 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009003 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009004 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009005 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009006 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009007 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009008 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009009 if test ${gcc_version} '<' 4.0
9010 then
9011 LIBTOOL_CRUFT="-lcc_dynamic"
9012 else
9013 LIBTOOL_CRUFT=""
9014 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009015 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009016 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009017else
Matthias Kloseb9621712010-04-24 17:59:49 +00009018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009019/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009020
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009021 #include <unistd.h>
9022 int main(int argc, char*argv[])
9023 {
9024 if (sizeof(long) == 4) {
9025 return 0;
9026 } else {
9027 return 1;
9028 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009029 }
9030
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009032if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009033 ac_osx_32bit=yes
9034else
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009037rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9038 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009039fi
9040
9041
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009042 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009043 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009044 i386)
9045 MACOSX_DEFAULT_ARCH="i386"
9046 ;;
9047 ppc)
9048 MACOSX_DEFAULT_ARCH="ppc"
9049 ;;
9050 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009051 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009052 ;;
9053 esac
9054 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009055 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009056 i386)
9057 MACOSX_DEFAULT_ARCH="x86_64"
9058 ;;
9059 ppc)
9060 MACOSX_DEFAULT_ARCH="ppc64"
9061 ;;
9062 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009063 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009064 ;;
9065 esac
9066
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009067 fi
9068
9069 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009070 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009071 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009072esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9074$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009075if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009076then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009077 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009078 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009079 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009080
Matthias Kloseb9621712010-04-24 17:59:49 +00009081$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009082
Matthias Kloseb9621712010-04-24 17:59:49 +00009083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9084$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009085 if test $enable_shared = "yes"
9086 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009087 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 +00009088 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009089else
Matthias Kloseb9621712010-04-24 17:59:49 +00009090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9091$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009092fi
9093
Matthias Kloseb9621712010-04-24 17:59:49 +00009094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9095$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009096case $ac_sys_system/$ac_sys_release in
9097 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009098
Matthias Kloseb9621712010-04-24 17:59:49 +00009099$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009100
Matthias Kloseb9621712010-04-24 17:59:49 +00009101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9102$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009103 ;;
9104 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9106$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009107 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009108esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009109
Guido van Rossum0a516c91994-09-12 10:58:40 +00009110# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009111
Michael W. Hudson54241132001-12-07 15:38:26 +00009112
9113
9114
9115
Benjamin Peterson99f03762010-04-11 22:15:28 +00009116
Thomas Wouters477c8d52006-05-27 19:21:47 +00009117
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009118# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9119# -- usually .so, .sl on HP-UX, .dll on Cygwin
9120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9121$as_echo_n "checking the extension of shared libraries... " >&6; }
9122if test -z "$SHLIB_SUFFIX"; then
9123 case $ac_sys_system in
9124 hp*|HP*)
9125 case `uname -m` in
9126 ia64) SHLIB_SUFFIX=.so;;
9127 *) SHLIB_SUFFIX=.sl;;
9128 esac
9129 ;;
9130 CYGWIN*) SHLIB_SUFFIX=.dll;;
9131 *) SHLIB_SUFFIX=.so;;
9132 esac
9133fi
9134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9135$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009136
Guido van Rossum0a516c91994-09-12 10:58:40 +00009137# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009138# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009139# (Shared libraries in this instance are shared modules to be loaded into
9140# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9142$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009143if test -z "$LDSHARED"
9144then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009145 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009146 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009147 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009148 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009149 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009150 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009151 if test "$GCC" = "yes" ; then
9152 LDSHARED='$(CC) -shared'
9153 LDCXXSHARED='$(CXX) -shared'
9154 else
9155 LDSHARED='$(CC) -G'
9156 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009157 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009158 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009159 if test "$GCC" = "yes" ; then
9160 LDSHARED='$(CC) -shared'
9161 LDCXXSHARED='$(CXX) -shared'
9162 else
9163 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009164 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009165 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009166 LDSHARED='$(CC) -bundle'
9167 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009168 if test "$enable_framework" ; then
9169 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009170 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9171 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009172 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009173 else
9174 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009175 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009176 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009177 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009178 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009179 LDSHARED='$(CC) -bundle'
9180 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009181 if test "$enable_framework" ; then
9182 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009183 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9184 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009185 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009186 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009187 # No framework, use the Python app as bundle-loader
9188 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009189 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009190 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009191 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009192 Darwin/*)
9193 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9194 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009195
Ned Deily36820b62014-06-25 13:44:22 -07009196 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9197 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9198 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9199 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9200 if test ${dep_target_major} -eq 10 && \
9201 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009202 then
Ned Deily36820b62014-06-25 13:44:22 -07009203 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009204 LDSHARED='$(CC) -bundle'
9205 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009206 if test "$enable_framework" ; then
9207 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009208 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9209 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009210 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009211 else
9212 # No framework, use the Python app as bundle-loader
9213 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9214 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009215 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009216 fi
Ned Deily36820b62014-06-25 13:44:22 -07009217 else
9218 # building for OS X 10.3 and later
9219 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9220 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9221 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009222 fi
9223 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009224 Linux*|GNU*|QNX*)
9225 LDSHARED='$(CC) -shared'
9226 LDCXXSHARED='$(CXX) -shared';;
9227 BSD/OS*/4*)
9228 LDSHARED="gcc -shared"
9229 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009230 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009231 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009232 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009233 LDSHARED='$(CC) -shared'
9234 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009235 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009236 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009237 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009238 OpenBSD*)
9239 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9240 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009241 LDSHARED='$(CC) -shared $(CCSHARED)'
9242 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009243 else
9244 case `uname -r` in
9245 [01].* | 2.[0-7] | 2.[0-7].*)
9246 LDSHARED="ld -Bshareable ${LDFLAGS}"
9247 ;;
9248 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009249 LDSHARED='$(CC) -shared $(CCSHARED)'
9250 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009251 ;;
9252 esac
9253 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009254 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009255 LDSHARED='$(CC) -shared'
9256 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009257 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009258 if test "$GCC" = "yes" ; then
9259 LDSHARED='$(CC) -shared'
9260 LDCXXSHARED='$(CXX) -shared'
9261 else
9262 LDSHARED='$(CC) -G'
9263 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009264 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009265 SCO_SV*)
9266 LDSHARED='$(CC) -Wl,-G,-Bexport'
9267 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9268 CYGWIN*)
9269 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9270 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009271 *) LDSHARED="ld";;
9272 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009273fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9275$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009276LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009277BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009278# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009279# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9281$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009282if test -z "$CCSHARED"
9283then
Guido van Rossum07397971997-04-29 21:49:50 +00009284 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009285 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009286 then CCSHARED="-fPIC";
9287 elif test `uname -p` = sparc;
9288 then CCSHARED="-xcode=pic32";
9289 else CCSHARED="-Kpic";
9290 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009291 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009292 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009293 else CCSHARED="+z";
9294 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009295 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009296 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009297 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009298 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009299 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009300 if test "$GCC" = "yes"
9301 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009302 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009303 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009304 SCO_SV*)
9305 if test "$GCC" = "yes"
9306 then CCSHARED="-fPIC"
9307 else CCSHARED="-Kpic -belf"
9308 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009309 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009310fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9312$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009313# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009314# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9316$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009317if test -z "$LINKFORSHARED"
9318then
Guido van Rossum07397971997-04-29 21:49:50 +00009319 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009320 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009321 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009322 LINKFORSHARED="-Wl,-E -Wl,+s";;
9323# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009324 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009325 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009326 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009327 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009328 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009329 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009330
9331 # Issue #18075: the default maximum stack size (8MBytes) is too
9332 # small for the default recursion limit. Increase the stack size
9333 # to ensure that tests don't crash
9334 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9335
Jack Jansene578a632001-08-15 01:27:14 +00009336 if test "$enable_framework"
9337 then
Jack Jansenda49e192005-01-07 13:08:22 +00009338 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009339 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009340 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009341 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009342 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009343 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009344 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009345 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9346 then
9347 LINKFORSHARED="-Wl,--export-dynamic"
9348 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009349 SunOS/5*) case $CC in
9350 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009351 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009352 then
9353 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009354 fi;;
9355 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009356 CYGWIN*)
9357 if test $enable_shared = "no"
9358 then
9359 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9360 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009361 QNX*)
9362 # -Wl,-E causes the symbols to be added to the dynamic
9363 # symbol table so that they can be found when a module
9364 # is loaded. -N 2048K causes the stack size to be set
9365 # to 2048 kilobytes so that the stack doesn't overflow
9366 # when running test_compile.py.
9367 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009368 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009369fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9371$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009372
Michael W. Hudson54241132001-12-07 15:38:26 +00009373
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009374
Matthias Kloseb9621712010-04-24 17:59:49 +00009375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9376$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009377if test ! "$LIBRARY" = "$LDLIBRARY"
9378then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009379 case $ac_sys_system in
9380 CYGWIN*)
9381 # Cygwin needs CCSHARED when building extension DLLs
9382 # but not when building the interpreter DLL.
9383 CFLAGSFORSHARED='';;
9384 *)
9385 CFLAGSFORSHARED='$(CCSHARED)'
9386 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009387fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9389$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009390
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009391# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9392# library (with --enable-shared).
9393# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009394# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9395# if it is not required, since it creates a dependency of the shared library
9396# to LIBS. This, in turn, means that applications linking the shared libpython
9397# don't need to link LIBS explicitly. The default should be only changed
9398# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009399
Matthias Kloseb9621712010-04-24 17:59:49 +00009400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9401$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009402case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009403 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009404 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009405esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9407$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009408
9409
Guido van Rossum627b2d71993-12-24 10:39:16 +00009410# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9412$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009413if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009414 $as_echo_n "(cached) " >&6
9415else
9416 ac_check_lib_save_LIBS=$LIBS
9417LIBS="-lsendfile $LIBS"
9418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9419/* end confdefs.h. */
9420
9421/* Override any GCC internal prototype to avoid an error.
9422 Use char because int might match the return type of a GCC
9423 builtin and then its argument prototype would still apply. */
9424#ifdef __cplusplus
9425extern "C"
9426#endif
9427char sendfile ();
9428int
9429main ()
9430{
9431return sendfile ();
9432 ;
9433 return 0;
9434}
9435_ACEOF
9436if ac_fn_c_try_link "$LINENO"; then :
9437 ac_cv_lib_sendfile_sendfile=yes
9438else
9439 ac_cv_lib_sendfile_sendfile=no
9440fi
9441rm -f core conftest.err conftest.$ac_objext \
9442 conftest$ac_exeext conftest.$ac_ext
9443LIBS=$ac_check_lib_save_LIBS
9444fi
9445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9446$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009447if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009448 cat >>confdefs.h <<_ACEOF
9449#define HAVE_LIBSENDFILE 1
9450_ACEOF
9451
9452 LIBS="-lsendfile $LIBS"
9453
9454fi
9455
Matthias Kloseb9621712010-04-24 17:59:49 +00009456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9457$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009458if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009459 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009460else
Martin v. Löwis11437992002-04-12 09:54:03 +00009461 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009462LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009465
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009466/* Override any GCC internal prototype to avoid an error.
9467 Use char because int might match the return type of a GCC
9468 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009469#ifdef __cplusplus
9470extern "C"
9471#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009472char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009473int
9474main ()
9475{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009476return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 ;
9478 return 0;
9479}
9480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009481if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009483else
Matthias Kloseb9621712010-04-24 17:59:49 +00009484 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009485fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009486rm -f core conftest.err conftest.$ac_objext \
9487 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009488LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009489fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9491$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009492if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009493 cat >>confdefs.h <<_ACEOF
9494#define HAVE_LIBDL 1
9495_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009496
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009497 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009498
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009499fi
9500 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9502$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009503if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009504 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009505else
Martin v. Löwis11437992002-04-12 09:54:03 +00009506 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009507LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009509/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009511/* Override any GCC internal prototype to avoid an error.
9512 Use char because int might match the return type of a GCC
9513 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009514#ifdef __cplusplus
9515extern "C"
9516#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009517char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009518int
9519main ()
9520{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009521return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009522 ;
9523 return 0;
9524}
9525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009526if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009527 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009528else
Matthias Kloseb9621712010-04-24 17:59:49 +00009529 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009530fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009531rm -f core conftest.err conftest.$ac_objext \
9532 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009533LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9536$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009537if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009538 cat >>confdefs.h <<_ACEOF
9539#define HAVE_LIBDLD 1
9540_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009541
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009542 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009543
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009544fi
9545 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009546
Georg Brandlb1441c72009-01-03 22:33:39 +00009547# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009548if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9550$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009551if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009552 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009553else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009554 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009558/* Override any GCC internal prototype to avoid an error.
9559 Use char because int might match the return type of a GCC
9560 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009561#ifdef __cplusplus
9562extern "C"
9563#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009564char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009565int
9566main ()
9567{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009568return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009569 ;
9570 return 0;
9571}
9572_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009573for ac_lib in '' pthread rt posix4; do
9574 if test -z "$ac_lib"; then
9575 ac_res="none required"
9576 else
9577 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009578 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009579 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009580 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009581 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009583rm -f core conftest.err conftest.$ac_objext \
9584 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009585 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009586 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009588done
Victor Stinnere0be4232011-10-25 13:06:09 +02009589if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009590
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009591else
9592 ac_cv_search_sem_init=no
9593fi
9594rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009595LIBS=$ac_func_search_save_LIBS
9596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9598$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009599ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009600if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009601 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009602
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009603fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009604 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009605 # posix4 on Solaris 2.6
9606 # pthread (first!) on Linux
9607fi
9608
Martin v. Löwis19d17342003-06-14 21:03:05 +00009609# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9611$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009612if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009613 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009614else
9615 ac_check_lib_save_LIBS=$LIBS
9616LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009618/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009620/* Override any GCC internal prototype to avoid an error.
9621 Use char because int might match the return type of a GCC
9622 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009623#ifdef __cplusplus
9624extern "C"
9625#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009626char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009627int
9628main ()
9629{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009630return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009631 ;
9632 return 0;
9633}
9634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009635if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009636 ac_cv_lib_intl_textdomain=yes
9637else
Matthias Kloseb9621712010-04-24 17:59:49 +00009638 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009640rm -f core conftest.err conftest.$ac_objext \
9641 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009642LIBS=$ac_check_lib_save_LIBS
9643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9645$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009646if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009647
Matthias Kloseb9621712010-04-24 17:59:49 +00009648$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009649
Brett Cannonc6d936e2009-06-07 20:09:53 +00009650 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009651fi
9652
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009653
9654# checks for system dependent C++ extensions support
9655case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009656 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9657$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009659/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009660
Georg Brandl59e87bd2011-02-15 19:48:59 +00009661 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009662int
9663main ()
9664{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009665loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009666 ;
9667 return 0;
9668}
Matthias Kloseb159a552010-04-25 21:00:44 +00009669
Martin v. Löwis11437992002-04-12 09:54:03 +00009670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009671if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009672
Matthias Kloseb159a552010-04-25 21:00:44 +00009673
Matthias Kloseb9621712010-04-24 17:59:49 +00009674$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009675
Matthias Kloseb159a552010-04-25 21:00:44 +00009676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009677$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009678
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009679else
Matthias Kloseb159a552010-04-25 21:00:44 +00009680
9681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009682$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009683
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009685rm -f core conftest.err conftest.$ac_objext \
9686 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009687 *) ;;
9688esac
9689
Christian Heimes985ecdc2013-11-20 11:46:18 +01009690# check for systems that require aligned memory access
9691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9692$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009693if ${ac_cv_aligned_required+:} false; then :
9694 $as_echo_n "(cached) " >&6
9695else
9696 if test "$cross_compiling" = yes; then :
9697 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009698else
9699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9700/* end confdefs.h. */
9701
9702int main()
9703{
9704 char s[16];
9705 int i, *p1, *p2;
9706 for (i=0; i < 16; i++)
9707 s[i] = i;
9708 p1 = (int*)(s+1);
9709 p2 = (int*)(s+2);
9710 if (*p1 == *p2)
9711 return 1;
9712 return 0;
9713}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009714_ACEOF
9715if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009716 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009717else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009718 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009719fi
9720rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9721 conftest.$ac_objext conftest.beam conftest.$ac_ext
9722fi
9723
9724
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009725fi
9726
9727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9728$as_echo "$ac_cv_aligned_required" >&6; }
9729if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009730
9731$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9732
9733fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009734
9735# str, bytes and memoryview hash algorithm
9736
9737
9738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9739$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9740
9741# Check whether --with-hash_algorithm was given.
9742if test "${with_hash_algorithm+set}" = set; then :
9743 withval=$with_hash_algorithm;
9744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9745$as_echo "$withval" >&6; }
9746case "$withval" in
9747 siphash24)
9748 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9749
9750 ;;
9751 fnv)
9752 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9753
9754 ;;
9755 *)
9756 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9757 ;;
9758esac
9759
9760else
9761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9762$as_echo "default" >&6; }
9763fi
9764
9765
Charles-François Natalid30b0222014-05-08 23:08:51 +01009766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9767$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9768
9769# Check whether --with-address_sanitizer was given.
9770if test "${with_address_sanitizer+set}" = set; then :
9771 withval=$with_address_sanitizer;
9772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9773$as_echo "$withval" >&6; }
9774BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9775LDFLAGS="-fsanitize=address $LDFLAGS"
9776
9777else
9778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9779$as_echo "no" >&6; }
9780fi
9781
9782
Guido van Rossum70c7f481998-03-26 18:44:10 +00009783# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9785$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009786if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009787 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009788else
Martin v. Löwis11437992002-04-12 09:54:03 +00009789 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009790LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009793
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009794/* Override any GCC internal prototype to avoid an error.
9795 Use char because int might match the return type of a GCC
9796 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009797#ifdef __cplusplus
9798extern "C"
9799#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009800char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009801int
9802main ()
9803{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009804return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009805 ;
9806 return 0;
9807}
9808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009809if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009810 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009811else
Matthias Kloseb9621712010-04-24 17:59:49 +00009812 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009814rm -f core conftest.err conftest.$ac_objext \
9815 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009816LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9819$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009820if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009821 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009822fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009823 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9825$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009826if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009827 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009828else
Martin v. Löwis11437992002-04-12 09:54:03 +00009829 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009830LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009832/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009834/* Override any GCC internal prototype to avoid an error.
9835 Use char because int might match the return type of a GCC
9836 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009837#ifdef __cplusplus
9838extern "C"
9839#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009840char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009841int
9842main ()
9843{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009844return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009845 ;
9846 return 0;
9847}
9848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009849if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009850 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009851else
Matthias Kloseb9621712010-04-24 17:59:49 +00009852 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009854rm -f core conftest.err conftest.$ac_objext \
9855 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009856LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9859$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009860if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009861 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009862fi
9863 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009864
Matthias Kloseb9621712010-04-24 17:59:49 +00009865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9866$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009868# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009869if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009870 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9872$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009873LIBS="$withval $LIBS"
9874
9875else
Matthias Kloseb9621712010-04-24 17:59:49 +00009876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9877$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009878fi
9879
Guido van Rossum7f43da71994-08-01 12:15:30 +00009880
Victor Stinner8291b5e2015-03-20 16:03:14 +01009881
9882
9883
9884
9885
9886
9887
9888if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9889 if test -n "$ac_tool_prefix"; then
9890 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9891set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9893$as_echo_n "checking for $ac_word... " >&6; }
9894if ${ac_cv_path_PKG_CONFIG+:} false; then :
9895 $as_echo_n "(cached) " >&6
9896else
9897 case $PKG_CONFIG in
9898 [\\/]* | ?:[\\/]*)
9899 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9900 ;;
9901 *)
9902 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9903for as_dir in $PATH
9904do
9905 IFS=$as_save_IFS
9906 test -z "$as_dir" && as_dir=.
9907 for ac_exec_ext in '' $ac_executable_extensions; do
9908 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9909 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9910 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9911 break 2
9912 fi
9913done
9914 done
9915IFS=$as_save_IFS
9916
9917 ;;
9918esac
9919fi
9920PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9921if test -n "$PKG_CONFIG"; then
9922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9923$as_echo "$PKG_CONFIG" >&6; }
9924else
9925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9926$as_echo "no" >&6; }
9927fi
9928
9929
9930fi
9931if test -z "$ac_cv_path_PKG_CONFIG"; then
9932 ac_pt_PKG_CONFIG=$PKG_CONFIG
9933 # Extract the first word of "pkg-config", so it can be a program name with args.
9934set dummy pkg-config; ac_word=$2
9935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9936$as_echo_n "checking for $ac_word... " >&6; }
9937if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9938 $as_echo_n "(cached) " >&6
9939else
9940 case $ac_pt_PKG_CONFIG in
9941 [\\/]* | ?:[\\/]*)
9942 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9943 ;;
9944 *)
9945 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9946for as_dir in $PATH
9947do
9948 IFS=$as_save_IFS
9949 test -z "$as_dir" && as_dir=.
9950 for ac_exec_ext in '' $ac_executable_extensions; do
9951 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9952 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9953 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9954 break 2
9955 fi
9956done
9957 done
9958IFS=$as_save_IFS
9959
9960 ;;
9961esac
9962fi
9963ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9964if test -n "$ac_pt_PKG_CONFIG"; then
9965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9966$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9967else
9968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9969$as_echo "no" >&6; }
9970fi
9971
9972 if test "x$ac_pt_PKG_CONFIG" = x; then
9973 PKG_CONFIG=""
9974 else
9975 case $cross_compiling:$ac_tool_warned in
9976yes:)
9977{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9978$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9979ac_tool_warned=yes ;;
9980esac
9981 PKG_CONFIG=$ac_pt_PKG_CONFIG
9982 fi
9983else
9984 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9985fi
9986
9987fi
9988if test -n "$PKG_CONFIG"; then
9989 _pkg_min_version=0.9.0
9990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9991$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9992 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9994$as_echo "yes" >&6; }
9995 else
9996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9997$as_echo "no" >&6; }
9998 PKG_CONFIG=""
9999 fi
10000fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010001
10002# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10004$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010005
10006# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010007if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010008 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010009else
10010 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010011fi
10012
10013
Matthias Kloseb9621712010-04-24 17:59:49 +000010014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10015$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010016
10017# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10019$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010020
10021# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010022if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010023 withval=$with_system_ffi;
10024fi
10025
10026
Zachary Waref40d4dd2016-09-17 01:25:24 -050010027if test "$ac_sys_system" = "Darwin"
10028then
10029 case "$with_system_ffi" in
10030 "")
10031 with_system_ffi="no"
10032 ;;
10033 yes|no)
10034 ;;
10035 *)
10036 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10037 ;;
10038 esac
10039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10040$as_echo "$with_system_ffi" >&6; }
10041else
10042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10043$as_echo "yes" >&6; }
10044 if test "$with_system_ffi" != ""
10045 then
10046 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10047$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10048 fi
10049 with_system_ffi="yes"
10050fi
Zachary Ware935043d2016-09-09 17:01:21 -070010051
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010052if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010053 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10054else
10055 LIBFFI_INCLUDEDIR=""
10056fi
10057
10058
Stefan Krah60187b52012-03-23 19:06:27 +010010059# Check for use of the system libmpdec library
10060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10061$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10062
10063# Check whether --with-system_libmpdec was given.
10064if test "${with_system_libmpdec+set}" = set; then :
10065 withval=$with_system_libmpdec;
10066else
10067 with_system_libmpdec="no"
10068fi
10069
10070
10071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10072$as_echo "$with_system_libmpdec" >&6; }
10073
Benjamin Peterson076ed002010-10-31 17:11:02 +000010074# Check for support for loadable sqlite extensions
10075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10076$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10077# Check whether --enable-loadable-sqlite-extensions was given.
10078if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10079 enableval=$enable_loadable_sqlite_extensions;
10080else
10081 enable_loadable_sqlite_extensions="no"
10082fi
10083
10084
10085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10086$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10087
Ned Deilyd819b932013-09-06 01:07:05 -070010088# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10089
10090
10091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10092$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10093
10094# Check whether --with-tcltk-includes was given.
10095if test "${with_tcltk_includes+set}" = set; then :
10096 withval=$with_tcltk_includes;
10097else
10098 with_tcltk_includes="default"
10099fi
10100
10101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10102$as_echo "$with_tcltk_includes" >&6; }
10103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10104$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10105
10106# Check whether --with-tcltk-libs was given.
10107if test "${with_tcltk_libs+set}" = set; then :
10108 withval=$with_tcltk_libs;
10109else
10110 with_tcltk_libs="default"
10111fi
10112
10113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10114$as_echo "$with_tcltk_libs" >&6; }
10115if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10116then
10117 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10118 then
10119 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10120 fi
10121 TCLTK_INCLUDES=""
10122 TCLTK_LIBS=""
10123else
10124 TCLTK_INCLUDES="$with_tcltk_includes"
10125 TCLTK_LIBS="$with_tcltk_libs"
10126fi
10127
Matthias Klose55708cc2009-04-30 08:06:49 +000010128# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10130$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010131
10132# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010133if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010134 withval=$with_dbmliborder;
10135if test x$with_dbmliborder = xyes
10136then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010137as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010138else
10139 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10140 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10141 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010142 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010143 fi
10144 done
10145fi
10146fi
10147
Matthias Kloseb9621712010-04-24 17:59:49 +000010148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10149$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010150
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010151# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010152
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010153USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010155
Martin v. Löwis11437992002-04-12 09:54:03 +000010156
10157# Templates for things AC_DEFINEd more than once.
10158# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010159
10160
Martin v. Löwis11437992002-04-12 09:54:03 +000010161
Matthias Kloseb9621712010-04-24 17:59:49 +000010162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10163$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010165# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010166if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010167 withval=$with_threads;
10168fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010169
10170
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010171# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010173# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010174if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010175 withval=$with_thread; with_threads=$with_thread
10176fi
10177
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010178
10179if test -z "$with_threads"
10180then with_threads="yes"
10181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10183$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010184
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010185
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010186if test "$with_threads" = "no"
10187then
10188 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010189elif test "$ac_cv_pthread_is_default" = yes
10190then
Matthias Kloseb9621712010-04-24 17:59:49 +000010191 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010192
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010193 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010194 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010195
10196 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010197 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010198elif test "$ac_cv_kpthread" = "yes"
10199then
10200 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010201 if test "$ac_cv_cxx_thread" = "yes"; then
10202 CXX="$CXX -Kpthread"
10203 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010204 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010205
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010206 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010207 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010208elif test "$ac_cv_kthread" = "yes"
10209then
10210 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010211 if test "$ac_cv_cxx_thread" = "yes"; then
10212 CXX="$CXX -Kthread"
10213 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010214 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010215
10216 posix_threads=yes
10217 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010218elif test "$ac_cv_pthread" = "yes"
10219then
10220 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010221 if test "$ac_cv_cxx_thread" = "yes"; then
10222 CXX="$CXX -pthread"
10223 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010224 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010225
10226 posix_threads=yes
10227 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010228else
10229 if test ! -z "$with_threads" -a -d "$with_threads"
10230 then LDFLAGS="$LDFLAGS -L$with_threads"
10231 fi
10232 if test ! -z "$withval" -a -d "$withval"
10233 then LDFLAGS="$LDFLAGS -L$withval"
10234 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010235
10236 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010237 # define _POSIX_THREADS in unistd.h. Some apparently don't
10238 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10240$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010242/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010243
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010244#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010245#ifdef _POSIX_THREADS
10246yes
10247#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010248
10249_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010250if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010251 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010252 unistd_defines_pthreads=yes
10253else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010254 unistd_defines_pthreads=no
10255fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010256rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010257
Matthias Kloseb9621712010-04-24 17:59:49 +000010258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10259$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010260
Matthias Kloseb9621712010-04-24 17:59:49 +000010261 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010262
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010263 # Just looking for pthread_create in libpthread is not enough:
10264 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10265 # So we really have to include pthread.h, and then link.
10266 _libs=$LIBS
10267 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10269$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010271/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010272
10273#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010274#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010275
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010276void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010277int
10278main ()
10279{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010280
10281pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010282 ;
10283 return 0;
10284}
10285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010286if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010287
Matthias Kloseb9621712010-04-24 17:59:49 +000010288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10289$as_echo "yes" >&6; }
10290 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010291
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010292 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010293 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010294else
Martin v. Löwis11437992002-04-12 09:54:03 +000010295
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010296 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010297 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010298if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010300
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010301 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010302 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010303else
Guido van Rossumad678af1998-10-02 14:42:15 +000010304
Matthias Kloseb9621712010-04-24 17:59:49 +000010305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10306$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010307if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010308 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010309else
Martin v. Löwis11437992002-04-12 09:54:03 +000010310 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010311LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010314
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010315/* Override any GCC internal prototype to avoid an error.
10316 Use char because int might match the return type of a GCC
10317 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010318#ifdef __cplusplus
10319extern "C"
10320#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010321char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010322int
10323main ()
10324{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010325return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010326 ;
10327 return 0;
10328}
10329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010330if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010332else
Matthias Kloseb9621712010-04-24 17:59:49 +000010333 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010334fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010335rm -f core conftest.err conftest.$ac_objext \
10336 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010337LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10340$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010341if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010342 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010343
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010344 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010345 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010346 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010347else
Greg Steinadf63d62000-07-05 10:38:09 +000010348
Matthias Kloseb9621712010-04-24 17:59:49 +000010349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10350$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010351if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010352 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010353else
Martin v. Löwis11437992002-04-12 09:54:03 +000010354 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010355LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010357/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010359/* Override any GCC internal prototype to avoid an error.
10360 Use char because int might match the return type of a GCC
10361 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010362#ifdef __cplusplus
10363extern "C"
10364#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010365char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010366int
10367main ()
10368{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010369return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010370 ;
10371 return 0;
10372}
10373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010374if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010375 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010376else
Matthias Kloseb9621712010-04-24 17:59:49 +000010377 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010379rm -f core conftest.err conftest.$ac_objext \
10380 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010381LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10384$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010385if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010386 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010387
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010388 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010389 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010390 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010391else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010392
Matthias Kloseb9621712010-04-24 17:59:49 +000010393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10394$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010395if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010396 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010397else
Martin v. Löwis11437992002-04-12 09:54:03 +000010398 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010399LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010401/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010402
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010403/* Override any GCC internal prototype to avoid an error.
10404 Use char because int might match the return type of a GCC
10405 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010406#ifdef __cplusplus
10407extern "C"
10408#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010409char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010410int
10411main ()
10412{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010413return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010414 ;
10415 return 0;
10416}
10417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010418if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010419 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010420else
Matthias Kloseb9621712010-04-24 17:59:49 +000010421 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010423rm -f core conftest.err conftest.$ac_objext \
10424 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010425LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010426fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10428$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010429if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010430 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010431
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010432 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010433 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010434 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010435else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010436
Matthias Kloseb9621712010-04-24 17:59:49 +000010437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10438$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010439if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010440 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010441else
Martin v. Löwis11437992002-04-12 09:54:03 +000010442 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010443LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010446
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010447/* Override any GCC internal prototype to avoid an error.
10448 Use char because int might match the return type of a GCC
10449 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010450#ifdef __cplusplus
10451extern "C"
10452#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010453char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010454int
10455main ()
10456{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010457return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010458 ;
10459 return 0;
10460}
10461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010462if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010463 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010464else
Matthias Kloseb9621712010-04-24 17:59:49 +000010465 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010466fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010467rm -f core conftest.err conftest.$ac_objext \
10468 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010469LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010470fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10472$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010473if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010474 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010475
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010476 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010477 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010478 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010479else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010480
Martin v. Löwis130fb172001-07-19 11:00:41 +000010481 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010482fi
10483
Guido van Rossum627b2d71993-12-24 10:39:16 +000010484
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010485fi
10486
Guido van Rossum0be3e491997-05-22 20:33:33 +000010487fi
10488
Guido van Rossum49545951997-12-02 19:28:29 +000010489fi
10490
Guido van Rossumb93a8621998-05-07 13:27:32 +000010491fi
10492
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010494rm -f core conftest.err conftest.$ac_objext \
10495 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010496
Matthias Kloseb9621712010-04-24 17:59:49 +000010497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10498$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010499if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010500 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010501else
Martin v. Löwis11437992002-04-12 09:54:03 +000010502 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010503LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010505/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010506
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010507/* Override any GCC internal prototype to avoid an error.
10508 Use char because int might match the return type of a GCC
10509 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010510#ifdef __cplusplus
10511extern "C"
10512#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010513char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010514int
10515main ()
10516{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010517return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010518 ;
10519 return 0;
10520}
10521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010522if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010523 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010524else
Matthias Kloseb9621712010-04-24 17:59:49 +000010525 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010526fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010527rm -f core conftest.err conftest.$ac_objext \
10528 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010529LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010530fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10532$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010533if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010534 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010535
Martin v. Löwis130fb172001-07-19 11:00:41 +000010536 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010537 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010538 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010539fi
10540
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010541
Neal Norwitza978ab02002-11-02 16:58:05 +000010542 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10544$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010545if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010547else
Martin v. Löwis11437992002-04-12 09:54:03 +000010548 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010549LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010551/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010552
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010553/* Override any GCC internal prototype to avoid an error.
10554 Use char because int might match the return type of a GCC
10555 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010556#ifdef __cplusplus
10557extern "C"
10558#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010559char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010560int
10561main ()
10562{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010563return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010564 ;
10565 return 0;
10566}
10567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010568if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010569 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010570else
Matthias Kloseb9621712010-04-24 17:59:49 +000010571 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010572fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010573rm -f core conftest.err conftest.$ac_objext \
10574 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010575LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010576fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10578$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010579if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010580 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010581
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010582 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010583 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010584 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010585fi
10586
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010587 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010588fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010589
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010590if test "$posix_threads" = "yes"; then
10591 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010592
Matthias Kloseb9621712010-04-24 17:59:49 +000010593$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010594
10595 fi
10596
10597 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10598 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010599 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010600$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010601
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010602 ;;
10603 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010604$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010605
10606 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010607 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010608$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010609
10610 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010611 esac
10612
Matthias Kloseb9621712010-04-24 17:59:49 +000010613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10614$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010615 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010616 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010617else
Matthias Kloseb9621712010-04-24 17:59:49 +000010618 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010619 ac_cv_pthread_system_supported=no
10620else
Matthias Kloseb9621712010-04-24 17:59:49 +000010621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010622/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010623
10624 #include <stdio.h>
10625 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010626 void *foo(void *parm) {
10627 return NULL;
10628 }
10629 main() {
10630 pthread_attr_t attr;
10631 pthread_t id;
10632 if (pthread_attr_init(&attr)) exit(-1);
10633 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10634 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10635 exit(0);
10636 }
10637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010638if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010639 ac_cv_pthread_system_supported=yes
10640else
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010643rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10644 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010645fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010646
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010647
Guido van Rossum627b2d71993-12-24 10:39:16 +000010648fi
10649
Matthias Kloseb9621712010-04-24 17:59:49 +000010650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10651$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010652 if test "$ac_cv_pthread_system_supported" = "yes"; then
10653
Matthias Kloseb9621712010-04-24 17:59:49 +000010654$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010655
10656 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010657 for ac_func in pthread_sigmask
10658do :
10659 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010660if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010661 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010662#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010663_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010664 case $ac_sys_system in
10665 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010666
Matthias Kloseb9621712010-04-24 17:59:49 +000010667$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010668
10669 ;;
10670 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010671fi
10672done
10673
Christian Heimesf77b4b22013-08-21 13:26:05 +020010674 for ac_func in pthread_atfork
10675do :
10676 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10677if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10678 cat >>confdefs.h <<_ACEOF
10679#define HAVE_PTHREAD_ATFORK 1
10680_ACEOF
10681
10682fi
10683done
10684
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010685fi
10686
10687
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010688# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010689
Matthias Kloseb9621712010-04-24 17:59:49 +000010690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10691$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010692# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010693if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010694 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010695 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10697$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010698 ipv6=no
10699 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10701$as_echo "yes" >&6; }
10702 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010703
10704 ipv6=yes
10705 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010706 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010707else
Martin v. Löwis11437992002-04-12 09:54:03 +000010708
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010710/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010711 /* AF_INET6 available check */
10712#include <sys/types.h>
10713#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010714int
10715main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010716{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010717int domain = AF_INET6;
10718 ;
10719 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010720}
Martin v. Löwis11437992002-04-12 09:54:03 +000010721_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010722if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010723
Matthias Kloseb9621712010-04-24 17:59:49 +000010724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10725$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010726 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010727
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010728else
Matthias Kloseb159a552010-04-25 21:00:44 +000010729
Matthias Kloseb9621712010-04-24 17:59:49 +000010730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10731$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010732 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010733
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010734fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010736
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010737if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10739$as_echo_n "checking if RFC2553 API is available... " >&6; }
10740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010741/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010742
10743 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010744#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010745int
10746main ()
10747{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010748struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010749 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010750 ;
10751 return 0;
10752}
Matthias Kloseb159a552010-04-25 21:00:44 +000010753
Martin v. Löwis11437992002-04-12 09:54:03 +000010754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010755if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010756
10757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010758$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010759 ipv6=yes
10760
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010761else
Matthias Kloseb159a552010-04-25 21:00:44 +000010762
10763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010764$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010765 ipv6=no
10766
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010769fi
10770
10771if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010772 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010773
10774fi
10775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010776fi
10777
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010778
10779ipv6type=unknown
10780ipv6lib=none
10781ipv6trylibc=no
10782
10783if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10785$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010786 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10787 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010788 case $i in
10789 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010791/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010792
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010793#include <netinet/in.h>
10794#ifdef IPV6_INRIA_VERSION
10795yes
10796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010797_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010798if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010799 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010800 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010801fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010802rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010803
10804 ;;
10805 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010807/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010808
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010809#include <netinet/in.h>
10810#ifdef __KAME__
10811yes
10812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010813_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010814if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010815 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010816 ipv6type=$i;
10817 ipv6lib=inet6
10818 ipv6libdir=/usr/local/v6/lib
10819 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010820fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010821rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010822
10823 ;;
10824 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010826/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010827
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010828#include <features.h>
10829#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10830yes
10831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010832_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010834 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835 ipv6type=$i;
10836 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010837fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010838rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010839
10840 ;;
10841 linux-inet6)
10842 if test -d /usr/inet6; then
10843 ipv6type=$i
10844 ipv6lib=inet6
10845 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010846 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010847 fi
10848 ;;
10849 solaris)
10850 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010851 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010852 ipv6type=$i
10853 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010854 fi
10855 fi
10856 ;;
10857 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010859/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010860
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010861#include <sys/param.h>
10862#ifdef _TOSHIBA_INET6
10863yes
10864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010865_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010867 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010868 ipv6type=$i;
10869 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010870 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010871fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010872rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010873
10874 ;;
10875 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010877/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010878
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010879#include </usr/local/v6/include/sys/v6config.h>
10880#ifdef __V6D__
10881yes
10882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010883_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010884if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010885 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010886 ipv6type=$i;
10887 ipv6lib=v6;
10888 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010889 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010890fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010891rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010892
10893 ;;
10894 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010896/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010897
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010898#include <sys/param.h>
10899#ifdef _ZETA_MINAMI_INET6
10900yes
10901#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010902_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010903if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010904 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010905 ipv6type=$i;
10906 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010907 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010908fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010909rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010910
10911 ;;
10912 esac
10913 if test "$ipv6type" != "unknown"; then
10914 break
10915 fi
10916 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10918$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010919fi
10920
10921if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10922 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10923 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10924 echo "using lib$ipv6lib"
10925 else
10926 if test $ipv6trylibc = "yes"; then
10927 echo "using libc"
10928 else
10929 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10930 echo "You need to fetch lib$ipv6lib.a from appropriate"
10931 echo 'ipv6 kit and compile beforehand.'
10932 exit 1
10933 fi
10934 fi
10935fi
10936
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10938$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10940/* end confdefs.h. */
10941 /* CAN_RAW_FD_FRAMES available check */
10942#include <linux/can/raw.h>
10943int
10944main ()
10945{
10946int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10947 ;
10948 return 0;
10949}
10950_ACEOF
10951if ac_fn_c_try_compile "$LINENO"; then :
10952
10953
10954$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10955
10956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10957$as_echo "yes" >&6; }
10958
10959else
10960
10961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10962$as_echo "no" >&6; }
10963
10964fi
10965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10966
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010967# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10969$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010970
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010971# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010972if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010973 withval=$with_doc_strings;
10974fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010975
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010976
10977if test -z "$with_doc_strings"
10978then with_doc_strings="yes"
10979fi
10980if test "$with_doc_strings" != "no"
10981then
10982
Matthias Kloseb9621712010-04-24 17:59:49 +000010983$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010984
10985fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10987$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010988
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010989# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10991$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010993# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010994if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010995 withval=$with_pymalloc;
10996fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010997
Neil Schemenauera35c6882001-02-27 04:45:05 +000010998
Neil Schemenauer16c22972002-03-22 15:34:49 +000010999if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011000then
11001 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011002fi
11003if test "$with_pymalloc" != "no"
11004then
Martin v. Löwis11437992002-04-12 09:54:03 +000011005
Matthias Kloseb9621712010-04-24 17:59:49 +000011006$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011007
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011008 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11011$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011012
Nick Coghlan6ea41862017-06-11 13:16:15 +100011013# Check for --with-c-locale-coercion
11014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11015$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11016
11017# Check whether --with-c-locale-coercion was given.
11018if test "${with_c_locale_coercion+set}" = set; then :
11019 withval=$with_c_locale_coercion;
11020fi
11021
11022
11023if test -z "$with_c_locale_coercion"
11024then
11025 with_c_locale_coercion="yes"
11026fi
11027if test "$with_c_locale_coercion" != "no"
11028then
11029
11030$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11031
11032fi
11033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11034$as_echo "$with_c_locale_coercion" >&6; }
11035
11036# Check for --with-c-locale-warning
11037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
11038$as_echo_n "checking for --with-c-locale-warning... " >&6; }
11039
11040# Check whether --with-c-locale-warning was given.
11041if test "${with_c_locale_warning+set}" = set; then :
11042 withval=$with_c_locale_warning;
11043fi
11044
11045
11046if test -z "$with_c_locale_warning"
11047then
11048 with_c_locale_warning="yes"
11049fi
11050if test "$with_c_locale_warning" != "no"
11051then
11052
11053$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
11054
11055fi
11056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
11057$as_echo "$with_c_locale_warning" >&6; }
11058
Benjamin Peterson05159c42009-12-03 03:01:27 +000011059# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11061$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011062
11063# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011064if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011065 withval=$with_valgrind;
11066else
11067 with_valgrind=no
11068fi
11069
Matthias Kloseb9621712010-04-24 17:59:49 +000011070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11071$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011072if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011073 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 +020011074if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011075
Matthias Kloseb9621712010-04-24 17:59:49 +000011076$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011077
11078else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011079 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011080
11081fi
11082
11083
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011084 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011085fi
11086
Łukasz Langaa785c872016-09-09 17:37:37 -070011087# Check for DTrace support
11088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11089$as_echo_n "checking for --with-dtrace... " >&6; }
11090
11091# Check whether --with-dtrace was given.
11092if test "${with_dtrace+set}" = set; then :
11093 withval=$with_dtrace;
11094else
11095 with_dtrace=no
11096fi
11097
11098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11099$as_echo "$with_dtrace" >&6; }
11100
11101
11102
11103
11104
11105DTRACE=
11106DFLAGS=
11107DTRACE_HEADERS=
11108DTRACE_OBJS=
11109
11110if test "$with_dtrace" = "yes"
11111then
11112 # Extract the first word of "dtrace", so it can be a program name with args.
11113set dummy dtrace; ac_word=$2
11114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11115$as_echo_n "checking for $ac_word... " >&6; }
11116if ${ac_cv_path_DTRACE+:} false; then :
11117 $as_echo_n "(cached) " >&6
11118else
11119 case $DTRACE in
11120 [\\/]* | ?:[\\/]*)
11121 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11122 ;;
11123 *)
11124 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11125for as_dir in $PATH
11126do
11127 IFS=$as_save_IFS
11128 test -z "$as_dir" && as_dir=.
11129 for ac_exec_ext in '' $ac_executable_extensions; do
11130 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11131 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11133 break 2
11134 fi
11135done
11136 done
11137IFS=$as_save_IFS
11138
11139 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11140 ;;
11141esac
11142fi
11143DTRACE=$ac_cv_path_DTRACE
11144if test -n "$DTRACE"; then
11145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11146$as_echo "$DTRACE" >&6; }
11147else
11148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11149$as_echo "no" >&6; }
11150fi
11151
11152
11153 if test "$DTRACE" = "not found"; then
11154 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11155 fi
11156
11157$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11158
11159 DTRACE_HEADERS="Include/pydtrace_probes.h"
11160
11161 # On OS X, DTrace providers do not need to be explicitly compiled and
11162 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11163 # generation flag '-G'. We check for presence of this flag, rather than
11164 # hardcoding support by OS, in the interest of robustness.
11165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11166$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11167if ${ac_cv_dtrace_link+:} false; then :
11168 $as_echo_n "(cached) " >&6
11169else
11170 ac_cv_dtrace_link=no
11171 echo 'BEGIN' > conftest.d
11172 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11173 ac_cv_dtrace_link=yes
11174
11175fi
11176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11177$as_echo "$ac_cv_dtrace_link" >&6; }
11178 if test "$ac_cv_dtrace_link" = "yes"; then
11179 DTRACE_OBJS="Python/pydtrace.o"
11180 fi
11181fi
11182
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011183# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011184
Guido van Rossum98935bf2001-09-05 19:13:16 +000011185DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011186
Guido van Rossume97ee181999-12-20 21:27:22 +000011187# the dlopen() function means we might want to use dynload_shlib.o. some
11188# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011189for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011190do :
11191 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011192if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011193 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011194#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011195_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011196
Guido van Rossume97ee181999-12-20 21:27:22 +000011197fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011198done
Guido van Rossume97ee181999-12-20 21:27:22 +000011199
Michael W. Hudson54241132001-12-07 15:38:26 +000011200
Guido van Rossume97ee181999-12-20 21:27:22 +000011201# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11202# loading of modules.
11203
Matthias Kloseb9621712010-04-24 17:59:49 +000011204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11205$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011206if test -z "$DYNLOADFILE"
11207then
11208 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011209 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11210 if test "$ac_cv_func_dlopen" = yes
11211 then DYNLOADFILE="dynload_shlib.o"
11212 else DYNLOADFILE="dynload_aix.o"
11213 fi
11214 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011215 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011216 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11217 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011218 *)
11219 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11220 # out any dynamic loading
11221 if test "$ac_cv_func_dlopen" = yes
11222 then DYNLOADFILE="dynload_shlib.o"
11223 else DYNLOADFILE="dynload_stub.o"
11224 fi
11225 ;;
11226 esac
11227fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11229$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011230if test "$DYNLOADFILE" != "dynload_stub.o"
11231then
Martin v. Löwis11437992002-04-12 09:54:03 +000011232
Matthias Kloseb9621712010-04-24 17:59:49 +000011233$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011234
11235fi
11236
Neil Schemenauer4e425612001-06-19 15:44:15 +000011237# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11238
Michael W. Hudson54241132001-12-07 15:38:26 +000011239
Matthias Kloseb9621712010-04-24 17:59:49 +000011240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11241$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011242if test -z "$MACHDEP_OBJS"
11243then
Jack Jansene578a632001-08-15 01:27:14 +000011244 MACHDEP_OBJS=$extra_machdep_objs
11245else
11246 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011247fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011248if test -z "$MACHDEP_OBJS"; then
11249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11250$as_echo "none" >&6; }
11251else
11252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11253$as_echo "$MACHDEP_OBJS" >&6; }
11254fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011255
Guido van Rossum627b2d71993-12-24 10:39:16 +000011256# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011257for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011258 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011259 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011260 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011261 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011262 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011263 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011264 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011265 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011266 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011267 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011268 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011269 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011270 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011271 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11272 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011273 sigaction sigaltstack siginterrupt sigpending sigrelse \
11274 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011275 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011276 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011277 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011278do :
11279 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11280ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011281if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011282 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011283#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011284_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011285
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011286fi
11287done
11288
Michael W. Hudson54241132001-12-07 15:38:26 +000011289
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011290ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11291 #include <dirent.h>
11292"
11293if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11294
11295$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11296
11297fi
11298
11299
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011300# For some functions, having a definition is not sufficient, since
11301# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11303$as_echo_n "checking for chroot... " >&6; }
11304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011305/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011306#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011307int
11308main ()
11309{
11310void *x=chroot
11311 ;
11312 return 0;
11313}
11314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011315if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011316
Matthias Kloseb9621712010-04-24 17:59:49 +000011317$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011318
Matthias Kloseb159a552010-04-25 21:00:44 +000011319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011320$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011321else
Matthias Kloseb9621712010-04-24 17:59:49 +000011322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11323$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011324
11325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11328$as_echo_n "checking for link... " >&6; }
11329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011330/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011331#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011332int
11333main ()
11334{
11335void *x=link
11336 ;
11337 return 0;
11338}
11339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011340if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011341
Matthias Kloseb9621712010-04-24 17:59:49 +000011342$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011343
Matthias Kloseb159a552010-04-25 21:00:44 +000011344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011345$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011346else
Matthias Kloseb9621712010-04-24 17:59:49 +000011347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11348$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011349
11350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11353$as_echo_n "checking for symlink... " >&6; }
11354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011355/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011356#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011357int
11358main ()
11359{
11360void *x=symlink
11361 ;
11362 return 0;
11363}
11364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011365if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011366
Matthias Kloseb9621712010-04-24 17:59:49 +000011367$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011368
Matthias Kloseb159a552010-04-25 21:00:44 +000011369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011370$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011371else
Matthias Kloseb9621712010-04-24 17:59:49 +000011372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11373$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011374
11375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11378$as_echo_n "checking for fchdir... " >&6; }
11379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011380/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011381#include <unistd.h>
11382int
11383main ()
11384{
11385void *x=fchdir
11386 ;
11387 return 0;
11388}
11389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011390if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011391
Matthias Kloseb9621712010-04-24 17:59:49 +000011392$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011393
Matthias Kloseb159a552010-04-25 21:00:44 +000011394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011395$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011396else
Matthias Kloseb9621712010-04-24 17:59:49 +000011397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11398$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011399
11400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11403$as_echo_n "checking for fsync... " >&6; }
11404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011405/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011406#include <unistd.h>
11407int
11408main ()
11409{
11410void *x=fsync
11411 ;
11412 return 0;
11413}
11414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011415if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011416
Matthias Kloseb9621712010-04-24 17:59:49 +000011417$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011418
Matthias Kloseb159a552010-04-25 21:00:44 +000011419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011420$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011421else
Matthias Kloseb9621712010-04-24 17:59:49 +000011422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11423$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011424
11425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11428$as_echo_n "checking for fdatasync... " >&6; }
11429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011430/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011431#include <unistd.h>
11432int
11433main ()
11434{
11435void *x=fdatasync
11436 ;
11437 return 0;
11438}
11439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011440if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011441
Matthias Kloseb9621712010-04-24 17:59:49 +000011442$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011443
Matthias Kloseb159a552010-04-25 21:00:44 +000011444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011445$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011446else
Matthias Kloseb9621712010-04-24 17:59:49 +000011447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11448$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011449
11450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11453$as_echo_n "checking for epoll... " >&6; }
11454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011455/* end confdefs.h. */
11456#include <sys/epoll.h>
11457int
11458main ()
11459{
11460void *x=epoll_create
11461 ;
11462 return 0;
11463}
11464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011465if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011466
Matthias Kloseb9621712010-04-24 17:59:49 +000011467$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011468
Matthias Kloseb159a552010-04-25 21:00:44 +000011469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011470$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011471else
Matthias Kloseb9621712010-04-24 17:59:49 +000011472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11473$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011474
11475fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11478$as_echo_n "checking for epoll_create1... " >&6; }
11479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11480/* end confdefs.h. */
11481#include <sys/epoll.h>
11482int
11483main ()
11484{
11485void *x=epoll_create1
11486 ;
11487 return 0;
11488}
11489_ACEOF
11490if ac_fn_c_try_compile "$LINENO"; then :
11491
11492$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11493
11494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11495$as_echo "yes" >&6; }
11496else
11497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11498$as_echo "no" >&6; }
11499
11500fi
11501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11503$as_echo_n "checking for kqueue... " >&6; }
11504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011505/* end confdefs.h. */
11506
11507#include <sys/types.h>
11508#include <sys/event.h>
11509
11510int
11511main ()
11512{
11513int x=kqueue()
11514 ;
11515 return 0;
11516}
11517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011518if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011519
Matthias Kloseb9621712010-04-24 17:59:49 +000011520$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011521
Matthias Kloseb159a552010-04-25 21:00:44 +000011522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011523$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011524else
Matthias Kloseb9621712010-04-24 17:59:49 +000011525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11526$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011527
11528fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11531$as_echo_n "checking for prlimit... " >&6; }
11532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11533/* end confdefs.h. */
11534
11535#include <sys/time.h>
11536#include <sys/resource.h>
11537
11538int
11539main ()
11540{
11541void *x=prlimit
11542 ;
11543 return 0;
11544}
11545_ACEOF
11546if ac_fn_c_try_compile "$LINENO"; then :
11547
11548$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11549
11550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11551$as_echo "yes" >&6; }
11552else
11553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11554$as_echo "no" >&6; }
11555
11556fi
11557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11558
Martin v. Löwisd5843682002-11-21 20:41:28 +000011559# On some systems (eg. FreeBSD 5), we would find a definition of the
11560# functions ctermid_r, setgroups in the library, but no prototype
11561# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11562# address to avoid compiler warnings and potential miscompilations
11563# because of the missing prototypes.
11564
Matthias Kloseb9621712010-04-24 17:59:49 +000011565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11566$as_echo_n "checking for ctermid_r... " >&6; }
11567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011568/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011569
Martin v. Löwisd5843682002-11-21 20:41:28 +000011570#include <stdio.h>
11571
Martin v. Löwisd5843682002-11-21 20:41:28 +000011572int
11573main ()
11574{
11575void* p = ctermid_r
11576 ;
11577 return 0;
11578}
11579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011580if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011581
Matthias Kloseb9621712010-04-24 17:59:49 +000011582$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011583
Matthias Kloseb159a552010-04-25 21:00:44 +000011584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011585$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011586else
Matthias Kloseb9621712010-04-24 17:59:49 +000011587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11588$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011589
11590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11592
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11594$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011595if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011596 $as_echo_n "(cached) " >&6
11597else
11598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011599/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011600#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011601int
11602main ()
11603{
11604void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011605
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011606 ;
11607 return 0;
11608}
11609_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011610if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011611 ac_cv_flock_decl=yes
11612else
11613 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011614
11615fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011617
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011618fi
11619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11620$as_echo "$ac_cv_flock_decl" >&6; }
11621if test "x${ac_cv_flock_decl}" = xyes; then
11622 for ac_func in flock
11623do :
11624 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011625if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011626 cat >>confdefs.h <<_ACEOF
11627#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011628_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011629
Antoine Pitroua3000072010-09-07 14:52:42 +000011630else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011632$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011633if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011634 $as_echo_n "(cached) " >&6
11635else
11636 ac_check_lib_save_LIBS=$LIBS
11637LIBS="-lbsd $LIBS"
11638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11639/* end confdefs.h. */
11640
11641/* Override any GCC internal prototype to avoid an error.
11642 Use char because int might match the return type of a GCC
11643 builtin and then its argument prototype would still apply. */
11644#ifdef __cplusplus
11645extern "C"
11646#endif
11647char flock ();
11648int
11649main ()
11650{
11651return flock ();
11652 ;
11653 return 0;
11654}
11655_ACEOF
11656if ac_fn_c_try_link "$LINENO"; then :
11657 ac_cv_lib_bsd_flock=yes
11658else
11659 ac_cv_lib_bsd_flock=no
11660fi
11661rm -f core conftest.err conftest.$ac_objext \
11662 conftest$ac_exeext conftest.$ac_ext
11663LIBS=$ac_check_lib_save_LIBS
11664fi
11665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11666$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011667if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011668 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011669
11670
11671$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11672
11673
11674fi
11675
11676
11677fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011678done
11679
Antoine Pitroua3000072010-09-07 14:52:42 +000011680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011681
Matthias Kloseb9621712010-04-24 17:59:49 +000011682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11683$as_echo_n "checking for getpagesize... " >&6; }
11684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011685/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011686
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011687#include <unistd.h>
11688
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011689int
11690main ()
11691{
11692void* p = getpagesize
11693 ;
11694 return 0;
11695}
11696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011697if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011698
Matthias Kloseb9621712010-04-24 17:59:49 +000011699$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011700
Matthias Kloseb159a552010-04-25 21:00:44 +000011701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011702$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011703else
Matthias Kloseb9621712010-04-24 17:59:49 +000011704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11705$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011706
11707fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011709
Victor Stinner984890f2011-11-24 13:53:38 +010011710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11711$as_echo_n "checking for broken unsetenv... " >&6; }
11712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11713/* end confdefs.h. */
11714
11715#include <stdlib.h>
11716
11717int
11718main ()
11719{
11720int res = unsetenv("DUMMY")
11721 ;
11722 return 0;
11723}
11724_ACEOF
11725if ac_fn_c_try_compile "$LINENO"; then :
11726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11727$as_echo "no" >&6; }
11728else
11729
11730$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11731
11732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11733$as_echo "yes" >&6; }
11734
11735fi
11736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11737
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011738for ac_prog in true
11739do
11740 # Extract the first word of "$ac_prog", so it can be a program name with args.
11741set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11743$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011744if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011745 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011746else
11747 if test -n "$TRUE"; then
11748 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11749else
11750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11751for as_dir in $PATH
11752do
11753 IFS=$as_save_IFS
11754 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011755 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011756 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011757 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011758 $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 +000011759 break 2
11760 fi
11761done
Matthias Kloseb9621712010-04-24 17:59:49 +000011762 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011763IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011764
11765fi
11766fi
11767TRUE=$ac_cv_prog_TRUE
11768if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11770$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011771else
Matthias Kloseb9621712010-04-24 17:59:49 +000011772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11773$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011774fi
11775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011776
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011777 test -n "$TRUE" && break
11778done
11779test -n "$TRUE" || TRUE="/bin/true"
11780
11781
Matthias Kloseb9621712010-04-24 17:59:49 +000011782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11783$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011784if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011785 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011786else
11787 ac_check_lib_save_LIBS=$LIBS
11788LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011790/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011792/* Override any GCC internal prototype to avoid an error.
11793 Use char because int might match the return type of a GCC
11794 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011795#ifdef __cplusplus
11796extern "C"
11797#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011798char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011799int
11800main ()
11801{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011802return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011803 ;
11804 return 0;
11805}
11806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011807if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011808 ac_cv_lib_c_inet_aton=yes
11809else
Matthias Kloseb9621712010-04-24 17:59:49 +000011810 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011812rm -f core conftest.err conftest.$ac_objext \
11813 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011814LIBS=$ac_check_lib_save_LIBS
11815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11817$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011818if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011819 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011820else
Matthias Kloseb9621712010-04-24 17:59:49 +000011821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11822$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011823if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011824 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011825else
11826 ac_check_lib_save_LIBS=$LIBS
11827LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011829/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011830
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011831/* Override any GCC internal prototype to avoid an error.
11832 Use char because int might match the return type of a GCC
11833 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011834#ifdef __cplusplus
11835extern "C"
11836#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011837char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011838int
11839main ()
11840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011841return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011842 ;
11843 return 0;
11844}
11845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011846if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011847 ac_cv_lib_resolv_inet_aton=yes
11848else
Matthias Kloseb9621712010-04-24 17:59:49 +000011849 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011850fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011851rm -f core conftest.err conftest.$ac_objext \
11852 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011853LIBS=$ac_check_lib_save_LIBS
11854fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11856$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011857if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011858 cat >>confdefs.h <<_ACEOF
11859#define HAVE_LIBRESOLV 1
11860_ACEOF
11861
11862 LIBS="-lresolv $LIBS"
11863
11864fi
11865
11866
11867fi
11868
11869
Christian Heimesd0764e22007-12-04 15:00:33 +000011870# On Tru64, chflags seems to be present, but calling it will
11871# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11873$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011874if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011875 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011876else
Matthias Kloseb9621712010-04-24 17:59:49 +000011877 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011878 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011879else
Matthias Kloseb9621712010-04-24 17:59:49 +000011880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011881/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011882
Christian Heimesd0764e22007-12-04 15:00:33 +000011883#include <sys/stat.h>
11884#include <unistd.h>
11885int main(int argc, char*argv[])
11886{
11887 if(chflags(argv[0], 0) != 0)
11888 return 1;
11889 return 0;
11890}
Ned Deily3eb67d52011-06-28 00:00:28 -070011891
Christian Heimesd0764e22007-12-04 15:00:33 +000011892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011893if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011894 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011895else
Matthias Kloseb9621712010-04-24 17:59:49 +000011896 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011897fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011898rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11899 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011900fi
11901
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011902
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011903fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11905$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011906if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011907 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011908if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011909 ac_cv_have_chflags="yes"
11910else
11911 ac_cv_have_chflags="no"
11912fi
11913
11914fi
11915if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011916
Matthias Kloseb9621712010-04-24 17:59:49 +000011917$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011918
11919fi
11920
Matthias Kloseb9621712010-04-24 17:59:49 +000011921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11922$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011923if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011924 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011925else
Matthias Kloseb9621712010-04-24 17:59:49 +000011926 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011927 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011928else
Matthias Kloseb9621712010-04-24 17:59:49 +000011929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011930/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011931
Christian Heimesd0764e22007-12-04 15:00:33 +000011932#include <sys/stat.h>
11933#include <unistd.h>
11934int main(int argc, char*argv[])
11935{
11936 if(lchflags(argv[0], 0) != 0)
11937 return 1;
11938 return 0;
11939}
Ned Deily3eb67d52011-06-28 00:00:28 -070011940
Christian Heimesd0764e22007-12-04 15:00:33 +000011941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011942if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011943 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011944else
Matthias Kloseb9621712010-04-24 17:59:49 +000011945 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011946fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11948 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011949fi
11950
11951
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011952fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11954$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011955if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011956 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011957if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011958 ac_cv_have_lchflags="yes"
11959else
11960 ac_cv_have_lchflags="no"
11961fi
11962
11963fi
11964if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011965
Matthias Kloseb9621712010-04-24 17:59:49 +000011966$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011967
11968fi
11969
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011970case $ac_sys_system/$ac_sys_release in
11971Darwin/*)
11972 _CUR_CFLAGS="${CFLAGS}"
11973 _CUR_LDFLAGS="${LDFLAGS}"
11974 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11975 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11976 ;;
11977esac
11978
Matthias Kloseb9621712010-04-24 17:59:49 +000011979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11980$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011981if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011982 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011983else
11984 ac_check_lib_save_LIBS=$LIBS
11985LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011987/* end confdefs.h. */
11988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011989/* Override any GCC internal prototype to avoid an error.
11990 Use char because int might match the return type of a GCC
11991 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011992#ifdef __cplusplus
11993extern "C"
11994#endif
11995char inflateCopy ();
11996int
11997main ()
11998{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011999return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012000 ;
12001 return 0;
12002}
12003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012004if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012005 ac_cv_lib_z_inflateCopy=yes
12006else
Matthias Kloseb9621712010-04-24 17:59:49 +000012007 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012009rm -f core conftest.err conftest.$ac_objext \
12010 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012011LIBS=$ac_check_lib_save_LIBS
12012fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12014$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012015if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012016
Matthias Kloseb9621712010-04-24 17:59:49 +000012017$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012018
12019fi
12020
12021
12022case $ac_sys_system/$ac_sys_release in
12023Darwin/*)
12024 CFLAGS="${_CUR_CFLAGS}"
12025 LDFLAGS="${_CUR_LDFLAGS}"
12026 ;;
12027esac
12028
Matthias Kloseb9621712010-04-24 17:59:49 +000012029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12030$as_echo_n "checking for hstrerror... " >&6; }
12031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012032/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012033
Martin v. Löwise9416172003-05-03 10:12:45 +000012034#include <netdb.h>
12035
Martin v. Löwise9416172003-05-03 10:12:45 +000012036int
12037main ()
12038{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012039void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012040 ;
12041 return 0;
12042}
12043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012044if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012045
Matthias Kloseb9621712010-04-24 17:59:49 +000012046$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012047
Matthias Kloseb159a552010-04-25 21:00:44 +000012048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012049$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012050else
Matthias Kloseb9621712010-04-24 17:59:49 +000012051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12052$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012053
12054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012055rm -f core conftest.err conftest.$ac_objext \
12056 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012057
Matthias Kloseb9621712010-04-24 17:59:49 +000012058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12059$as_echo_n "checking for inet_aton... " >&6; }
12060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012061/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012062
Martin v. Löwis86d66262006-02-17 08:40:11 +000012063#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012064#include <sys/socket.h>
12065#include <netinet/in.h>
12066#include <arpa/inet.h>
12067
Martin v. Löwise9416172003-05-03 10:12:45 +000012068int
12069main ()
12070{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012071void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012072 ;
12073 return 0;
12074}
12075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012076if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012077
Matthias Kloseb9621712010-04-24 17:59:49 +000012078$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012079
Matthias Kloseb159a552010-04-25 21:00:44 +000012080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012081$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012082else
Matthias Kloseb9621712010-04-24 17:59:49 +000012083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12084$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012085
12086fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012087rm -f core conftest.err conftest.$ac_objext \
12088 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012089
Matthias Kloseb9621712010-04-24 17:59:49 +000012090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12091$as_echo_n "checking for inet_pton... " >&6; }
12092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012093/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012094
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012095#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012096#include <sys/socket.h>
12097#include <netinet/in.h>
12098#include <arpa/inet.h>
12099
Martin v. Löwise9416172003-05-03 10:12:45 +000012100int
12101main ()
12102{
12103void* p = inet_pton
12104 ;
12105 return 0;
12106}
12107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012108if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012109
Matthias Kloseb9621712010-04-24 17:59:49 +000012110$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012111
Matthias Kloseb159a552010-04-25 21:00:44 +000012112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012113$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012114else
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12116$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012117
12118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012120
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012121# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12123$as_echo_n "checking for setgroups... " >&6; }
12124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012125/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012126
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012127#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012128#ifdef HAVE_GRP_H
12129#include <grp.h>
12130#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012131
Martin v. Löwisd5843682002-11-21 20:41:28 +000012132int
12133main ()
12134{
12135void* p = setgroups
12136 ;
12137 return 0;
12138}
12139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012140if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012141
Matthias Kloseb9621712010-04-24 17:59:49 +000012142$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012143
Matthias Kloseb159a552010-04-25 21:00:44 +000012144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012145$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012146else
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12148$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012149
12150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012152
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012153# check for openpty and forkpty
12154
12155for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012156do :
12157 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012158if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012159 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012160#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012161_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012162
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012163else
Matthias Kloseb9621712010-04-24 17:59:49 +000012164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12165$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012166if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012167 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012168else
Martin v. Löwis11437992002-04-12 09:54:03 +000012169 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012170LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012172/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012174/* Override any GCC internal prototype to avoid an error.
12175 Use char because int might match the return type of a GCC
12176 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012177#ifdef __cplusplus
12178extern "C"
12179#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012180char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012181int
12182main ()
12183{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012184return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012185 ;
12186 return 0;
12187}
12188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012189if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012190 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012191else
Matthias Kloseb9621712010-04-24 17:59:49 +000012192 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012194rm -f core conftest.err conftest.$ac_objext \
12195 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012196LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012197fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12199$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012200if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012202 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012203else
Matthias Kloseb9621712010-04-24 17:59:49 +000012204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12205$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012206if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012207 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012208else
12209 ac_check_lib_save_LIBS=$LIBS
12210LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012212/* end confdefs.h. */
12213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012214/* Override any GCC internal prototype to avoid an error.
12215 Use char because int might match the return type of a GCC
12216 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012217#ifdef __cplusplus
12218extern "C"
12219#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012220char openpty ();
12221int
12222main ()
12223{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012224return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012225 ;
12226 return 0;
12227}
12228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012229if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012230 ac_cv_lib_bsd_openpty=yes
12231else
Matthias Kloseb9621712010-04-24 17:59:49 +000012232 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012234rm -f core conftest.err conftest.$ac_objext \
12235 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012236LIBS=$ac_check_lib_save_LIBS
12237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12239$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012240if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012241 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012242 LIBS="$LIBS -lbsd"
12243fi
12244
12245
12246fi
12247
Fred Drake8cef4cf2000-06-28 16:40:38 +000012248
12249fi
12250done
12251
12252for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012253do :
12254 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012255if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012256 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012257#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012258_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012259
Fred Drake8cef4cf2000-06-28 16:40:38 +000012260else
Matthias Kloseb9621712010-04-24 17:59:49 +000012261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12262$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012263if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012264 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012265else
Martin v. Löwis11437992002-04-12 09:54:03 +000012266 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012267LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012269/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012270
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012271/* Override any GCC internal prototype to avoid an error.
12272 Use char because int might match the return type of a GCC
12273 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012274#ifdef __cplusplus
12275extern "C"
12276#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012277char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012278int
12279main ()
12280{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012281return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012282 ;
12283 return 0;
12284}
12285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012286if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012287 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012288else
Matthias Kloseb9621712010-04-24 17:59:49 +000012289 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012290fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012291rm -f core conftest.err conftest.$ac_objext \
12292 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012293LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12296$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012297if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012298 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012299 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012300else
Matthias Kloseb9621712010-04-24 17:59:49 +000012301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12302$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012303if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012305else
12306 ac_check_lib_save_LIBS=$LIBS
12307LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012309/* end confdefs.h. */
12310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012311/* Override any GCC internal prototype to avoid an error.
12312 Use char because int might match the return type of a GCC
12313 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012314#ifdef __cplusplus
12315extern "C"
12316#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012317char forkpty ();
12318int
12319main ()
12320{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012321return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012322 ;
12323 return 0;
12324}
12325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012326if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012327 ac_cv_lib_bsd_forkpty=yes
12328else
Matthias Kloseb9621712010-04-24 17:59:49 +000012329 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012331rm -f core conftest.err conftest.$ac_objext \
12332 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012333LIBS=$ac_check_lib_save_LIBS
12334fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12336$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012337if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012338 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012339 LIBS="$LIBS -lbsd"
12340fi
12341
12342
12343fi
12344
Fred Drake8cef4cf2000-06-28 16:40:38 +000012345
12346fi
12347done
12348
Jack Jansendd19cf82001-12-06 22:36:17 +000012349
Christian Heimesb186d002008-03-18 15:15:01 +000012350# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012351for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012352do :
12353 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012354if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012355 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012356#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012357_ACEOF
12358
12359fi
12360done
12361
12362
Michael W. Hudson54241132001-12-07 15:38:26 +000012363# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012364for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012365do :
12366 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12367ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012368if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012369 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012370#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012371_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012372
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012373fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012374done
12375
Michael W. Hudson54241132001-12-07 15:38:26 +000012376
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012377ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012378if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012379 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012380
Martin v. Löwis1142de32002-03-29 16:28:31 +000012381else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012382 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012383 *" dup2.$ac_objext "* ) ;;
12384 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012385 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012386esac
12387
Martin v. Löwis1142de32002-03-29 16:28:31 +000012388fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012389
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012390ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012391if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012392 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12393
12394else
12395 case " $LIBOBJS " in
12396 *" strdup.$ac_objext "* ) ;;
12397 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12398 ;;
12399esac
12400
12401fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012402
12403
12404for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012405do :
12406 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012407if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012408 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012409#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012412/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012413#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012414int
12415main ()
12416{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012417getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012418 ;
12419 return 0;
12420}
12421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012422if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012423
Matthias Kloseb9621712010-04-24 17:59:49 +000012424$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012425
Guido van Rossum627b2d71993-12-24 10:39:16 +000012426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012428
Guido van Rossum627b2d71993-12-24 10:39:16 +000012429fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012430done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012431
Jack Jansen150753c2003-03-29 22:07:47 +000012432for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012433do :
12434 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012435if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012436 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012437#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012440/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012441#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012442int
12443main ()
12444{
12445setpgrp(0,0);
12446 ;
12447 return 0;
12448}
12449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012450if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012451
Matthias Kloseb9621712010-04-24 17:59:49 +000012452$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012453
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012456
12457fi
12458done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012459
Thomas Wouters3a584202000-08-05 23:28:51 +000012460for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012461do :
12462 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012463if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012464 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012465#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012468/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012469#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012470int
12471main ()
12472{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012473gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012474 ;
12475 return 0;
12476}
12477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012478if ac_fn_c_try_compile "$LINENO"; then :
12479
Guido van Rossum627b2d71993-12-24 10:39:16 +000012480else
Skip Montanaro6dead952003-09-25 14:50:04 +000012481
Matthias Kloseb9621712010-04-24 17:59:49 +000012482$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012483
Martin v. Löwis11437992002-04-12 09:54:03 +000012484
Guido van Rossum627b2d71993-12-24 10:39:16 +000012485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012487
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012488fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012489done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012490
Michael W. Hudson54241132001-12-07 15:38:26 +000012491
Victor Stinnere0be4232011-10-25 13:06:09 +020012492for ac_func in clock_gettime
12493do :
12494 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12495if test "x$ac_cv_func_clock_gettime" = xyes; then :
12496 cat >>confdefs.h <<_ACEOF
12497#define HAVE_CLOCK_GETTIME 1
12498_ACEOF
12499
12500else
12501
12502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12503$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12504if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12505 $as_echo_n "(cached) " >&6
12506else
12507 ac_check_lib_save_LIBS=$LIBS
12508LIBS="-lrt $LIBS"
12509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12510/* end confdefs.h. */
12511
12512/* Override any GCC internal prototype to avoid an error.
12513 Use char because int might match the return type of a GCC
12514 builtin and then its argument prototype would still apply. */
12515#ifdef __cplusplus
12516extern "C"
12517#endif
12518char clock_gettime ();
12519int
12520main ()
12521{
12522return clock_gettime ();
12523 ;
12524 return 0;
12525}
12526_ACEOF
12527if ac_fn_c_try_link "$LINENO"; then :
12528 ac_cv_lib_rt_clock_gettime=yes
12529else
12530 ac_cv_lib_rt_clock_gettime=no
12531fi
12532rm -f core conftest.err conftest.$ac_objext \
12533 conftest$ac_exeext conftest.$ac_ext
12534LIBS=$ac_check_lib_save_LIBS
12535fi
12536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12537$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12538if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12539
Victor Stinner7efb8332014-08-29 15:41:08 +020012540 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012541 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12542
12543
12544$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12545
12546
12547fi
12548
12549
12550fi
12551done
12552
12553
12554for ac_func in clock_getres
12555do :
12556 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12557if test "x$ac_cv_func_clock_getres" = xyes; then :
12558 cat >>confdefs.h <<_ACEOF
12559#define HAVE_CLOCK_GETRES 1
12560_ACEOF
12561
12562else
12563
12564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12565$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12566if ${ac_cv_lib_rt_clock_getres+:} false; then :
12567 $as_echo_n "(cached) " >&6
12568else
12569 ac_check_lib_save_LIBS=$LIBS
12570LIBS="-lrt $LIBS"
12571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12572/* end confdefs.h. */
12573
12574/* Override any GCC internal prototype to avoid an error.
12575 Use char because int might match the return type of a GCC
12576 builtin and then its argument prototype would still apply. */
12577#ifdef __cplusplus
12578extern "C"
12579#endif
12580char clock_getres ();
12581int
12582main ()
12583{
12584return clock_getres ();
12585 ;
12586 return 0;
12587}
12588_ACEOF
12589if ac_fn_c_try_link "$LINENO"; then :
12590 ac_cv_lib_rt_clock_getres=yes
12591else
12592 ac_cv_lib_rt_clock_getres=no
12593fi
12594rm -f core conftest.err conftest.$ac_objext \
12595 conftest$ac_exeext conftest.$ac_ext
12596LIBS=$ac_check_lib_save_LIBS
12597fi
12598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12599$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12600if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12601
12602 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12603
12604
12605fi
12606
12607
12608fi
12609done
12610
12611
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012612for ac_func in clock_settime
12613do :
12614 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12615if test "x$ac_cv_func_clock_settime" = xyes; then :
12616 cat >>confdefs.h <<_ACEOF
12617#define HAVE_CLOCK_SETTIME 1
12618_ACEOF
12619
12620else
12621
12622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12623$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12624if ${ac_cv_lib_rt_clock_settime+:} false; then :
12625 $as_echo_n "(cached) " >&6
12626else
12627 ac_check_lib_save_LIBS=$LIBS
12628LIBS="-lrt $LIBS"
12629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12630/* end confdefs.h. */
12631
12632/* Override any GCC internal prototype to avoid an error.
12633 Use char because int might match the return type of a GCC
12634 builtin and then its argument prototype would still apply. */
12635#ifdef __cplusplus
12636extern "C"
12637#endif
12638char clock_settime ();
12639int
12640main ()
12641{
12642return clock_settime ();
12643 ;
12644 return 0;
12645}
12646_ACEOF
12647if ac_fn_c_try_link "$LINENO"; then :
12648 ac_cv_lib_rt_clock_settime=yes
12649else
12650 ac_cv_lib_rt_clock_settime=no
12651fi
12652rm -f core conftest.err conftest.$ac_objext \
12653 conftest$ac_exeext conftest.$ac_ext
12654LIBS=$ac_check_lib_save_LIBS
12655fi
12656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12657$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12658if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12659
12660 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12661
12662
12663fi
12664
12665
12666fi
12667done
12668
12669
Matthias Kloseb9621712010-04-24 17:59:49 +000012670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12671$as_echo_n "checking for major... " >&6; }
12672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012673/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012674
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012675#if defined(MAJOR_IN_MKDEV)
12676#include <sys/mkdev.h>
12677#elif defined(MAJOR_IN_SYSMACROS)
12678#include <sys/sysmacros.h>
12679#else
12680#include <sys/types.h>
12681#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012682
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012683int
12684main ()
12685{
12686
12687 makedev(major(0),minor(0));
12688
12689 ;
12690 return 0;
12691}
12692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012693if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012694
12695
Matthias Kloseb9621712010-04-24 17:59:49 +000012696$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012697
Matthias Kloseb9621712010-04-24 17:59:49 +000012698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12699$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012700
12701else
Skip Montanaro6dead952003-09-25 14:50:04 +000012702
Matthias Kloseb9621712010-04-24 17:59:49 +000012703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12704$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012705
12706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012707rm -f core conftest.err conftest.$ac_objext \
12708 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012709
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012710# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12711# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12713$as_echo_n "checking for if_nameindex... " >&6; }
12714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12715/* end confdefs.h. */
12716
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012717#include <stdio.h>
12718#ifdef STDC_HEADERS
12719# include <stdlib.h>
12720# include <stddef.h>
12721#else
12722# ifdef HAVE_STDLIB_H
12723# include <stdlib.h>
12724# endif
12725#endif
12726#ifdef HAVE_SYS_SOCKET_H
12727# include <sys/socket.h>
12728#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012729#ifdef HAVE_NET_IF_H
12730# include <net/if.h>
12731#endif
12732
12733int
12734main ()
12735{
12736struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12737 ;
12738 return 0;
12739}
12740_ACEOF
12741if ac_fn_c_try_link "$LINENO"; then :
12742
12743$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12744
12745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12746$as_echo "yes" >&6; }
12747else
12748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12749$as_echo "no" >&6; }
12750
12751fi
12752rm -f core conftest.err conftest.$ac_objext \
12753 conftest$ac_exeext conftest.$ac_ext
12754
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012755# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12756# macro is not defined in android-ndk-r13.
12757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12758$as_echo_n "checking for lockf... " >&6; }
12759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12760/* end confdefs.h. */
12761#include <unistd.h>
12762int
12763main ()
12764{
12765lockf(0, F_LOCK, 0);
12766 ;
12767 return 0;
12768}
12769_ACEOF
12770if ac_fn_c_try_link "$LINENO"; then :
12771
12772$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12773
12774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12775$as_echo "yes" >&6; }
12776else
12777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12778$as_echo "no" >&6; }
12779
12780fi
12781rm -f core conftest.err conftest.$ac_objext \
12782 conftest$ac_exeext conftest.$ac_ext
12783
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012784# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012785# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12787$as_echo_n "checking for getaddrinfo... " >&6; }
12788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012789/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012790
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012791#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012792#include <sys/socket.h>
12793#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012794#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012795
Martin v. Löwis11437992002-04-12 09:54:03 +000012796int
12797main ()
12798{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012799getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012800 ;
12801 return 0;
12802}
12803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012804if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012805 have_getaddrinfo=yes
12806else
Matthias Kloseb9621712010-04-24 17:59:49 +000012807 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012809rm -f core conftest.err conftest.$ac_objext \
12810 conftest$ac_exeext conftest.$ac_ext
12811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12812$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012813if test $have_getaddrinfo = yes
12814then
Matthias Kloseb9621712010-04-24 17:59:49 +000012815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12816$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012817 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012818 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012819else
Matthias Kloseb9621712010-04-24 17:59:49 +000012820 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012821
12822if test "${enable_ipv6+set}" = set; then
12823 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12824else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012825 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012826fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012827else
Matthias Kloseb9621712010-04-24 17:59:49 +000012828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012829/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012830
Stefan Krah19c21392012-11-22 23:47:32 +010012831#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012832#include <sys/types.h>
12833#include <netdb.h>
12834#include <string.h>
12835#include <sys/socket.h>
12836#include <netinet/in.h>
12837
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012838int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012839{
12840 int passive, gaierr, inet4 = 0, inet6 = 0;
12841 struct addrinfo hints, *ai, *aitop;
12842 char straddr[INET6_ADDRSTRLEN], strport[16];
12843
12844 for (passive = 0; passive <= 1; passive++) {
12845 memset(&hints, 0, sizeof(hints));
12846 hints.ai_family = AF_UNSPEC;
12847 hints.ai_flags = passive ? AI_PASSIVE : 0;
12848 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012849 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012850 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12851 (void)gai_strerror(gaierr);
12852 goto bad;
12853 }
12854 for (ai = aitop; ai; ai = ai->ai_next) {
12855 if (ai->ai_addr == NULL ||
12856 ai->ai_addrlen == 0 ||
12857 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12858 straddr, sizeof(straddr), strport, sizeof(strport),
12859 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12860 goto bad;
12861 }
12862 switch (ai->ai_family) {
12863 case AF_INET:
12864 if (strcmp(strport, "54321") != 0) {
12865 goto bad;
12866 }
12867 if (passive) {
12868 if (strcmp(straddr, "0.0.0.0") != 0) {
12869 goto bad;
12870 }
12871 } else {
12872 if (strcmp(straddr, "127.0.0.1") != 0) {
12873 goto bad;
12874 }
12875 }
12876 inet4++;
12877 break;
12878 case AF_INET6:
12879 if (strcmp(strport, "54321") != 0) {
12880 goto bad;
12881 }
12882 if (passive) {
12883 if (strcmp(straddr, "::") != 0) {
12884 goto bad;
12885 }
12886 } else {
12887 if (strcmp(straddr, "::1") != 0) {
12888 goto bad;
12889 }
12890 }
12891 inet6++;
12892 break;
12893 case AF_UNSPEC:
12894 goto bad;
12895 break;
12896 default:
12897 /* another family support? */
12898 break;
12899 }
12900 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012901 freeaddrinfo(aitop);
12902 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012903 }
12904
12905 if (!(inet4 == 0 || inet4 == 2))
12906 goto bad;
12907 if (!(inet6 == 0 || inet6 == 2))
12908 goto bad;
12909
12910 if (aitop)
12911 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012912 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012913
12914 bad:
12915 if (aitop)
12916 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012917 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012918}
12919
Martin v. Löwis11437992002-04-12 09:54:03 +000012920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012921if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012922 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012923else
Matthias Kloseb9621712010-04-24 17:59:49 +000012924 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012925fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12927 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012929
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012930fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012931
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012933
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12935$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12936
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012937if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012938then
12939 if test $ipv6 = yes
12940 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012941 echo 'Fatal: You must get working getaddrinfo() function.'
12942 echo ' or you can specify "--disable-ipv6"'.
12943 exit 1
12944 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012945else
Martin v. Löwis11437992002-04-12 09:54:03 +000012946
Matthias Kloseb9621712010-04-24 17:59:49 +000012947$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012948
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012949fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012950
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012951for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012952do :
12953 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012954if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012955 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012956#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012957_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012958
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012959fi
12960done
12961
Michael W. Hudson54241132001-12-07 15:38:26 +000012962
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012963# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12965$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012966if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012967 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012968else
Matthias Kloseb9621712010-04-24 17:59:49 +000012969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012970/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012971#include <sys/types.h>
12972#include <sys/time.h>
12973#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012974
Martin v. Löwis11437992002-04-12 09:54:03 +000012975int
12976main ()
12977{
12978if ((struct tm *) 0)
12979return 0;
12980 ;
12981 return 0;
12982}
12983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012984if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012985 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012986else
Matthias Kloseb9621712010-04-24 17:59:49 +000012987 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012990fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12992$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012993if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012994
Matthias Kloseb9621712010-04-24 17:59:49 +000012995$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012996
12997fi
12998
Matthias Kloseb9621712010-04-24 17:59:49 +000012999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13000$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013001if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013002 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013003else
Matthias Kloseb9621712010-04-24 17:59:49 +000013004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013005/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013006#include <sys/types.h>
13007#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013008
Martin v. Löwis11437992002-04-12 09:54:03 +000013009int
13010main ()
13011{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013012struct tm tm;
13013 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013014 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013015 ;
13016 return 0;
13017}
13018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013019if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013020 ac_cv_struct_tm=time.h
13021else
Matthias Kloseb9621712010-04-24 17:59:49 +000013022 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013025fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13027$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013028if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013029
Matthias Kloseb9621712010-04-24 17:59:49 +000013030$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013031
13032fi
13033
Matthias Kloseb9621712010-04-24 17:59:49 +000013034ac_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 +000013035#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013036
Matthias Kloseb9621712010-04-24 17:59:49 +000013037"
Victor Stinnere0be4232011-10-25 13:06:09 +020013038if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013039
13040cat >>confdefs.h <<_ACEOF
13041#define HAVE_STRUCT_TM_TM_ZONE 1
13042_ACEOF
13043
13044
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013045fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013046
Martin v. Löwis11437992002-04-12 09:54:03 +000013047if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13048
Matthias Kloseb9621712010-04-24 17:59:49 +000013049$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013050
13051else
Matthias Kloseb9621712010-04-24 17:59:49 +000013052 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13053"
Victor Stinnere0be4232011-10-25 13:06:09 +020013054if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013055 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013056else
Matthias Kloseb9621712010-04-24 17:59:49 +000013057 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013058fi
13059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013060cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013061#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013062_ACEOF
13063
Matthias Kloseb9621712010-04-24 17:59:49 +000013064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13065$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013066if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013067 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013068else
Matthias Kloseb9621712010-04-24 17:59:49 +000013069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013070/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013071#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013072#if !HAVE_DECL_TZNAME
13073extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013075
Martin v. Löwis11437992002-04-12 09:54:03 +000013076int
13077main ()
13078{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013079return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013080 ;
13081 return 0;
13082}
13083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013084if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013085 ac_cv_var_tzname=yes
13086else
Matthias Kloseb9621712010-04-24 17:59:49 +000013087 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013089rm -f core conftest.err conftest.$ac_objext \
13090 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13093$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013094 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013095
Matthias Kloseb9621712010-04-24 17:59:49 +000013096$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013097
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013098 fi
13099fi
13100
Matthias Kloseb9621712010-04-24 17:59:49 +000013101ac_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 +020013102if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013103
13104cat >>confdefs.h <<_ACEOF
13105#define HAVE_STRUCT_STAT_ST_RDEV 1
13106_ACEOF
13107
13108
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013109fi
13110
Matthias Kloseb9621712010-04-24 17:59:49 +000013111ac_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 +020013112if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013113
Martin v. Löwis11437992002-04-12 09:54:03 +000013114cat >>confdefs.h <<_ACEOF
13115#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13116_ACEOF
13117
13118
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013119fi
13120
Matthias Kloseb9621712010-04-24 17:59:49 +000013121ac_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 +020013122if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013123
13124cat >>confdefs.h <<_ACEOF
13125#define HAVE_STRUCT_STAT_ST_FLAGS 1
13126_ACEOF
13127
13128
13129fi
13130
Matthias Kloseb9621712010-04-24 17:59:49 +000013131ac_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 +020013132if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013133
13134cat >>confdefs.h <<_ACEOF
13135#define HAVE_STRUCT_STAT_ST_GEN 1
13136_ACEOF
13137
13138
13139fi
13140
Matthias Kloseb9621712010-04-24 17:59:49 +000013141ac_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 +020013142if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013143
13144cat >>confdefs.h <<_ACEOF
13145#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13146_ACEOF
13147
13148
13149fi
13150
Matthias Kloseb9621712010-04-24 17:59:49 +000013151ac_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 +020013152if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013153
Martin v. Löwis11437992002-04-12 09:54:03 +000013154cat >>confdefs.h <<_ACEOF
13155#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13156_ACEOF
13157
13158
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013159fi
13160
Stefan Krah267b6392016-04-26 01:09:18 +020013161ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13162 #include <sys/types.h>
13163 #include <pwd.h>
13164
13165"
13166if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13167
13168cat >>confdefs.h <<_ACEOF
13169#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13170_ACEOF
13171
13172
13173fi
13174ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13175 #include <sys/types.h>
13176 #include <pwd.h>
13177
13178"
13179if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13180
13181cat >>confdefs.h <<_ACEOF
13182#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13183_ACEOF
13184
13185
13186fi
13187
Zachary Ware6a6967e2016-10-01 00:47:27 -050013188# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13189ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13190"
13191if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13192
13193cat >>confdefs.h <<_ACEOF
13194#define HAVE_SIGINFO_T_SI_BAND 1
13195_ACEOF
13196
13197
13198fi
13199
Michael W. Hudson54241132001-12-07 15:38:26 +000013200
Matthias Kloseb9621712010-04-24 17:59:49 +000013201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13202$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013203if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013204 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013205else
Matthias Kloseb159a552010-04-25 21:00:44 +000013206
Matthias Kloseb9621712010-04-24 17:59:49 +000013207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013208/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013209#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013210int
13211main ()
13212{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013213return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013214 ;
13215 return 0;
13216}
13217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013218if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013219 ac_cv_header_time_altzone=yes
13220else
Matthias Kloseb9621712010-04-24 17:59:49 +000013221 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013225fi
13226
Matthias Kloseb9621712010-04-24 17:59:49 +000013227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13228$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013229if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013230
Matthias Kloseb9621712010-04-24 17:59:49 +000013231$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013232
13233fi
13234
Guido van Rossumda88dad1995-01-26 00:46:29 +000013235was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13237$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013239/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013240
13241#include <sys/types.h>
13242#include <sys/select.h>
13243#include <sys/time.h>
13244
Martin v. Löwis11437992002-04-12 09:54:03 +000013245int
13246main ()
13247{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013248;
Martin v. Löwis11437992002-04-12 09:54:03 +000013249 ;
13250 return 0;
13251}
13252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013253if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013254
13255
Matthias Kloseb9621712010-04-24 17:59:49 +000013256$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013257
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013258 was_it_defined=yes
13259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13263$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013264
Matthias Kloseb9621712010-04-24 17:59:49 +000013265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13266$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013267if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013268 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013269else
Matthias Kloseb9621712010-04-24 17:59:49 +000013270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013271/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013272#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013273int
13274main ()
13275{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013276struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013277 ;
13278 return 0;
13279}
13280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013281if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013282 ac_cv_struct_addrinfo=yes
13283else
Matthias Kloseb9621712010-04-24 17:59:49 +000013284 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13287fi
13288
Matthias Kloseb9621712010-04-24 17:59:49 +000013289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13290$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013291if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013292
Matthias Kloseb9621712010-04-24 17:59:49 +000013293$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013294
13295fi
13296
Matthias Kloseb9621712010-04-24 17:59:49 +000013297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13298$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013299if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013300 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013301else
Matthias Kloseb9621712010-04-24 17:59:49 +000013302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013303/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013304
13305# include <sys/types.h>
13306# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013307int
13308main ()
13309{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013310struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013311 ;
13312 return 0;
13313}
13314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013315if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013316 ac_cv_struct_sockaddr_storage=yes
13317else
Matthias Kloseb9621712010-04-24 17:59:49 +000013318 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13321fi
13322
Matthias Kloseb9621712010-04-24 17:59:49 +000013323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13324$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013325if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013326
Matthias Kloseb9621712010-04-24 17:59:49 +000013327$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013328
13329fi
13330
Christian Heimesdffa3942016-09-05 23:54:41 +020013331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13332$as_echo_n "checking for sockaddr_alg... " >&6; }
13333if ${ac_cv_struct_sockaddr_alg+:} false; then :
13334 $as_echo_n "(cached) " >&6
13335else
13336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13337/* end confdefs.h. */
13338
13339# include <sys/types.h>
13340# include <sys/socket.h>
13341# include <linux/if_alg.h>
13342int
13343main ()
13344{
13345struct sockaddr_alg s
13346 ;
13347 return 0;
13348}
13349_ACEOF
13350if ac_fn_c_try_compile "$LINENO"; then :
13351 ac_cv_struct_sockaddr_alg=yes
13352else
13353 ac_cv_struct_sockaddr_alg=no
13354fi
13355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13356fi
13357
13358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13359$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13360if test $ac_cv_struct_sockaddr_alg = yes; then
13361
13362$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13363
13364fi
13365
Guido van Rossum627b2d71993-12-24 10:39:16 +000013366# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013367
Matthias Kloseb9621712010-04-24 17:59:49 +000013368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13369$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013370if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013371 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013372else
Matthias Kloseb9621712010-04-24 17:59:49 +000013373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013374/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013375$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013376int
13377main ()
13378{
13379static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013380test_array [0] = 0;
13381return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013382
13383 ;
13384 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013385}
Martin v. Löwis11437992002-04-12 09:54:03 +000013386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013387if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013388 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013389else
Matthias Kloseb9621712010-04-24 17:59:49 +000013390 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013393fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13395$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013396if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013398
13399fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013400
Matthias Kloseb9621712010-04-24 17:59:49 +000013401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13402$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013403if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013404 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013405else
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013407/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013408
Martin v. Löwis11437992002-04-12 09:54:03 +000013409int
13410main ()
13411{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013412
Martin v. Löwis11437992002-04-12 09:54:03 +000013413#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013414 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013415 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013416 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013417 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013418 char const *const *pcpcc;
13419 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 /* NEC SVR4.0.2 mips cc rejects this. */
13421 struct point {int x, y;};
13422 static struct point const zero = {0,0};
13423 /* AIX XL C 1.02.0.0 rejects this.
13424 It does not let you subtract one const X* pointer from another in
13425 an arm of an if-expression whose if-part is not a constant
13426 expression */
13427 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013428 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013429 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013430 ++pcpcc;
13431 ppc = (char**) pcpcc;
13432 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013433 { /* SCO 3.2v4 cc rejects this sort of thing. */
13434 char tx;
13435 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013436 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013437
Martin v. Löwis11437992002-04-12 09:54:03 +000013438 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013439 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013440 }
13441 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13442 int x[] = {25, 17};
13443 const int *foo = &x[0];
13444 ++foo;
13445 }
13446 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13447 typedef const int *iptr;
13448 iptr p = 0;
13449 ++p;
13450 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013451 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013452 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013453 struct s { int j; const int *ap[3]; } bx;
13454 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013455 }
13456 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13457 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013458 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013459 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013460 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013461#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013462
Martin v. Löwis11437992002-04-12 09:54:03 +000013463 ;
13464 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013465}
Martin v. Löwis11437992002-04-12 09:54:03 +000013466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013467if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013468 ac_cv_c_const=yes
13469else
Matthias Kloseb9621712010-04-24 17:59:49 +000013470 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013473fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13475$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013476if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013477
Matthias Kloseb9621712010-04-24 17:59:49 +000013478$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013479
13480fi
13481
Michael W. Hudson54241132001-12-07 15:38:26 +000013482
Guido van Rossumda88dad1995-01-26 00:46:29 +000013483works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13485$as_echo_n "checking for working signed char... " >&6; }
13486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013487/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013488
Martin v. Löwis11437992002-04-12 09:54:03 +000013489int
13490main ()
13491{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013492signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013493 ;
13494 return 0;
13495}
13496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013497if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013498 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013499else
Skip Montanaro6dead952003-09-25 14:50:04 +000013500
Matthias Kloseb9621712010-04-24 17:59:49 +000013501$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013502
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013503
Guido van Rossum7f43da71994-08-01 12:15:30 +000013504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13507$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013508
Guido van Rossumda88dad1995-01-26 00:46:29 +000013509have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13511$as_echo_n "checking for prototypes... " >&6; }
13512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013513/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013514int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013515int
13516main ()
13517{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013518return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013519 ;
13520 return 0;
13521}
13522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013523if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013524
Matthias Kloseb9621712010-04-24 17:59:49 +000013525$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013526
Matthias Kloseb159a552010-04-25 21:00:44 +000013527 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13531$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013532
Guido van Rossumda88dad1995-01-26 00:46:29 +000013533works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13535$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013537/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013538
13539#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013540int foo(int x, ...) {
13541 va_list va;
13542 va_start(va, x);
13543 va_arg(va, int);
13544 va_arg(va, char *);
13545 va_arg(va, double);
13546 return 0;
13547}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013548
Martin v. Löwis11437992002-04-12 09:54:03 +000013549int
13550main ()
13551{
Guido van Rossum90eea071996-08-30 20:58:57 +000013552return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013553 ;
13554 return 0;
13555}
13556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013557if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013558
13559
Matthias Kloseb9621712010-04-24 17:59:49 +000013560$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013561
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013562 works=yes
13563
Guido van Rossum627b2d71993-12-24 10:39:16 +000013564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13567$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013568
Martin v. Löwisd6320502004-08-12 13:45:08 +000013569# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13571$as_echo_n "checking for socketpair... " >&6; }
13572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013573/* end confdefs.h. */
13574
13575#include <sys/types.h>
13576#include <sys/socket.h>
13577
13578int
13579main ()
13580{
13581void *x=socketpair
13582 ;
13583 return 0;
13584}
13585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013586if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013587
Matthias Kloseb9621712010-04-24 17:59:49 +000013588$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013589
Matthias Kloseb159a552010-04-25 21:00:44 +000013590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013591$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013592else
Matthias Kloseb9621712010-04-24 17:59:49 +000013593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13594$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013595
13596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013598
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013599# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13601$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013603/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013604#include <sys/types.h>
13605#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013606int
13607main ()
13608{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013609struct sockaddr x;
13610x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013611 ;
13612 return 0;
13613}
13614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013615if ac_fn_c_try_compile "$LINENO"; then :
13616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13617$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013618
Matthias Kloseb9621712010-04-24 17:59:49 +000013619$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013620
13621else
Matthias Kloseb9621712010-04-24 17:59:49 +000013622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13623$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013624
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013627
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013628# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013629
13630
Matthias Kloseb9621712010-04-24 17:59:49 +000013631ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013632if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013633
Matthias Kloseb9621712010-04-24 17:59:49 +000013634 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013635
Matthias Kloseb9621712010-04-24 17:59:49 +000013636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13637$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013638 OLD_CFLAGS=$CFLAGS
13639 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013641/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013642
13643# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013644
Martin v. Löwis11437992002-04-12 09:54:03 +000013645int
13646main ()
13647{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013648
13649 char *name;
13650 struct hostent *he, *res;
13651 char buffer[2048];
13652 int buflen = 2048;
13653 int h_errnop;
13654
13655 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013656
13657 ;
13658 return 0;
13659}
13660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013661if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013662
Matthias Kloseb9621712010-04-24 17:59:49 +000013663 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013664
Martin v. Löwis11437992002-04-12 09:54:03 +000013665
Matthias Kloseb9621712010-04-24 17:59:49 +000013666$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013667
Matthias Kloseb9621712010-04-24 17:59:49 +000013668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13669$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013670
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013671else
Skip Montanaro6dead952003-09-25 14:50:04 +000013672
Matthias Kloseb9621712010-04-24 17:59:49 +000013673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13674$as_echo "no" >&6; }
13675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13676$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013678/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013679
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013680# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013681
Martin v. Löwis11437992002-04-12 09:54:03 +000013682int
13683main ()
13684{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013685
13686 char *name;
13687 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013688 char buffer[2048];
13689 int buflen = 2048;
13690 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013691
Matthias Kloseb159a552010-04-25 21:00:44 +000013692 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013693
13694 ;
13695 return 0;
13696}
13697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013698if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013699
Matthias Kloseb9621712010-04-24 17:59:49 +000013700 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013701
Martin v. Löwis11437992002-04-12 09:54:03 +000013702
Matthias Kloseb159a552010-04-25 21:00:44 +000013703$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013704
Matthias Kloseb9621712010-04-24 17:59:49 +000013705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13706$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013707
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013708else
Skip Montanaro6dead952003-09-25 14:50:04 +000013709
Matthias Kloseb9621712010-04-24 17:59:49 +000013710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13711$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13713$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13715/* end confdefs.h. */
13716
13717# include <netdb.h>
13718
13719int
13720main ()
13721{
13722
13723 char *name;
13724 struct hostent *he;
13725 struct hostent_data data;
13726
13727 (void) gethostbyname_r(name, he, &data);
13728
13729 ;
13730 return 0;
13731}
13732_ACEOF
13733if ac_fn_c_try_compile "$LINENO"; then :
13734
13735 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13736
13737
13738$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13739
13740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13741$as_echo "yes" >&6; }
13742
13743else
13744
13745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13746$as_echo "no" >&6; }
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
Martin v. Löwis11437992002-04-12 09:54:03 +000013750
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013753
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013754fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013756 CFLAGS=$OLD_CFLAGS
13757
13758else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013759
Matthias Kloseb9621712010-04-24 17:59:49 +000013760 for ac_func in gethostbyname
13761do :
13762 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013763if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013764 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013765#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013766_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013767
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013768fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013769done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013770
Michael W. Hudson54241132001-12-07 15:38:26 +000013771
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013772fi
13773
Michael W. Hudson54241132001-12-07 15:38:26 +000013774
13775
13776
13777
13778
13779
Guido van Rossum627b2d71993-12-24 10:39:16 +000013780# checks for system services
13781# (none yet)
13782
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013783# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013784ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013785if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013786
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013787else
Matthias Kloseb9621712010-04-24 17:59:49 +000013788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13789$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013790if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013791 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013792else
Martin v. Löwis11437992002-04-12 09:54:03 +000013793 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013794LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013797
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798/* Override any GCC internal prototype to avoid an error.
13799 Use char because int might match the return type of a GCC
13800 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013801#ifdef __cplusplus
13802extern "C"
13803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013804char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013805int
13806main ()
13807{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013808return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013809 ;
13810 return 0;
13811}
13812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013813if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013814 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013815else
Matthias Kloseb9621712010-04-24 17:59:49 +000013816 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013817fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013818rm -f core conftest.err conftest.$ac_objext \
13819 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013820LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013821fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13823$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013824if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013825 cat >>confdefs.h <<_ACEOF
13826#define HAVE_LIBIEEE 1
13827_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013828
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013829 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013830
Guido van Rossum627b2d71993-12-24 10:39:16 +000013831fi
13832
Michael W. Hudson54241132001-12-07 15:38:26 +000013833
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013834fi
13835
Michael W. Hudson54241132001-12-07 15:38:26 +000013836
Guido van Rossum7f253911997-05-09 02:42:48 +000013837# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13839$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013840
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013841# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013842if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013843 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013844if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013845then
13846
Matthias Kloseb9621712010-04-24 17:59:49 +000013847$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013848
Matthias Kloseb9621712010-04-24 17:59:49 +000013849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13850$as_echo "yes" >&6; }
13851else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13852$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013853fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013854else
Matthias Kloseb9621712010-04-24 17:59:49 +000013855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13856$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013857fi
13858
Guido van Rossum7f253911997-05-09 02:42:48 +000013859
Guido van Rossum7f43da71994-08-01 12:15:30 +000013860# check for --with-libm=...
13861
Guido van Rossum563e7081996-09-10 18:20:48 +000013862case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013863Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013864*) LIBM=-lm
13865esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13867$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013869# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013870if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013871 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013872if test "$withval" = no
13873then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13875$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013876elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013877then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13879$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013880else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013881fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013882else
Matthias Kloseb9621712010-04-24 17:59:49 +000013883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13884$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013885fi
13886
Guido van Rossum7f43da71994-08-01 12:15:30 +000013887
13888# check for --with-libc=...
13889
Matthias Kloseb9621712010-04-24 17:59:49 +000013890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13891$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013892
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013893# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013894if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013895 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013896if test "$withval" = no
13897then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13899$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013900elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013901then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13903$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013904else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013905fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013906else
Matthias Kloseb9621712010-04-24 17:59:49 +000013907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13908$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013909fi
13910
Guido van Rossum7f43da71994-08-01 12:15:30 +000013911
Stefan Krah1919b7e2012-03-21 18:25:23 +010013912# **************************************
13913# * Check for gcc x64 inline assembler *
13914# **************************************
13915
13916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13917$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13919/* end confdefs.h. */
13920
13921int
13922main ()
13923{
13924
13925 __asm__ __volatile__ ("movq %rcx, %rax");
13926
13927 ;
13928 return 0;
13929}
13930_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013931if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013932 have_gcc_asm_for_x64=yes
13933else
13934 have_gcc_asm_for_x64=no
13935fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013936rm -f core conftest.err conftest.$ac_objext \
13937 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13939$as_echo "$have_gcc_asm_for_x64" >&6; }
13940if test "$have_gcc_asm_for_x64" = yes
13941then
13942
13943$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13944
13945fi
13946
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013947# **************************************************
13948# * Check for various properties of floating point *
13949# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013950
Matthias Kloseb9621712010-04-24 17:59:49 +000013951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13952$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013953if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013954 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013955else
13956
Matthias Kloseb9621712010-04-24 17:59:49 +000013957if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013958 ac_cv_little_endian_double=no
13959else
Matthias Kloseb9621712010-04-24 17:59:49 +000013960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013961/* end confdefs.h. */
13962
13963#include <string.h>
13964int main() {
13965 double x = 9006104071832581.0;
13966 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13967 return 0;
13968 else
13969 return 1;
13970}
13971
13972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013973if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013974 ac_cv_little_endian_double=yes
13975else
Matthias Kloseb9621712010-04-24 17:59:49 +000013976 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013977fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013978rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13979 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013980fi
13981
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013982fi
13983
Matthias Kloseb9621712010-04-24 17:59:49 +000013984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13985$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013986if test "$ac_cv_little_endian_double" = yes
13987then
13988
Matthias Kloseb9621712010-04-24 17:59:49 +000013989$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013990
13991fi
13992
Matthias Kloseb9621712010-04-24 17:59:49 +000013993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13994$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013995if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013996 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013997else
13998
Matthias Kloseb9621712010-04-24 17:59:49 +000013999if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014000 ac_cv_big_endian_double=no
14001else
Matthias Kloseb9621712010-04-24 17:59:49 +000014002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014003/* end confdefs.h. */
14004
14005#include <string.h>
14006int main() {
14007 double x = 9006104071832581.0;
14008 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
14009 return 0;
14010 else
14011 return 1;
14012}
14013
14014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014015if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014016 ac_cv_big_endian_double=yes
14017else
Matthias Kloseb9621712010-04-24 17:59:49 +000014018 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014020rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14021 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014022fi
14023
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014024fi
14025
Matthias Kloseb9621712010-04-24 17:59:49 +000014026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
14027$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014028if test "$ac_cv_big_endian_double" = yes
14029then
14030
Matthias Kloseb9621712010-04-24 17:59:49 +000014031$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014032
14033fi
14034
14035# Some ARM platforms use a mixed-endian representation for doubles.
14036# While Python doesn't currently have full support for these platforms
14037# (see e.g., issue 1762561), we can at least make sure that float <-> string
14038# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14040$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014041if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014042 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014043else
14044
Matthias Kloseb9621712010-04-24 17:59:49 +000014045if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014046 ac_cv_mixed_endian_double=no
14047else
Matthias Kloseb9621712010-04-24 17:59:49 +000014048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014049/* end confdefs.h. */
14050
14051#include <string.h>
14052int main() {
14053 double x = 9006104071832581.0;
14054 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14055 return 0;
14056 else
14057 return 1;
14058}
14059
14060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014061if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014062 ac_cv_mixed_endian_double=yes
14063else
Matthias Kloseb9621712010-04-24 17:59:49 +000014064 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014065fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014066rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14067 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014068fi
14069
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014070fi
14071
Matthias Kloseb9621712010-04-24 17:59:49 +000014072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14073$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014074if test "$ac_cv_mixed_endian_double" = yes
14075then
14076
Matthias Kloseb9621712010-04-24 17:59:49 +000014077$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014078
14079fi
14080
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014081# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014082# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014083# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014084# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014085# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014086# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014087
14088# This inline assembler syntax may also work for suncc and icc,
14089# so we try it on all platforms.
14090
Matthias Kloseb9621712010-04-24 17:59:49 +000014091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14092$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014094/* end confdefs.h. */
14095
14096int
14097main ()
14098{
14099
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014100 unsigned short cw;
14101 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14102 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014103
14104 ;
14105 return 0;
14106}
14107_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014108if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014109 have_gcc_asm_for_x87=yes
14110else
Matthias Kloseb9621712010-04-24 17:59:49 +000014111 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014112fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014113rm -f core conftest.err conftest.$ac_objext \
14114 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14116$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014117if test "$have_gcc_asm_for_x87" = yes
14118then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014119
Matthias Kloseb9621712010-04-24 17:59:49 +000014120$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014121
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014122fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014123
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14125$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14127/* end confdefs.h. */
14128
14129int
14130main ()
14131{
14132
14133 unsigned int fpcr;
14134 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14135 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14136
14137 ;
14138 return 0;
14139}
14140_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014141if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014142 have_gcc_asm_for_mc68881=yes
14143else
14144 have_gcc_asm_for_mc68881=no
14145fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014146rm -f core conftest.err conftest.$ac_objext \
14147 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14149$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14150if test "$have_gcc_asm_for_mc68881" = yes
14151then
14152
14153$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14154
14155fi
14156
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014157# Detect whether system arithmetic is subject to x87-style double
14158# rounding issues. The result of this test has little meaning on non
14159# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14160# mode is round-to-nearest and double rounding issues are present, and
14161# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14163$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014164# $BASECFLAGS may affect the result
14165ac_save_cc="$CC"
14166CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014167if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014168 ac_cv_x87_double_rounding=no
14169else
Matthias Kloseb9621712010-04-24 17:59:49 +000014170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014171/* end confdefs.h. */
14172
14173#include <stdlib.h>
14174#include <math.h>
14175int main() {
14176 volatile double x, y, z;
14177 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14178 x = 0.99999999999999989; /* 1-2**-53 */
14179 y = 1./x;
14180 if (y != 1.)
14181 exit(0);
14182 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14183 x = 1e16;
14184 y = 2.99999;
14185 z = x + y;
14186 if (z != 1e16+4.)
14187 exit(0);
14188 /* both tests show evidence of double rounding */
14189 exit(1);
14190}
14191
14192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014193if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014194 ac_cv_x87_double_rounding=no
14195else
Matthias Kloseb9621712010-04-24 17:59:49 +000014196 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014197fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14199 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014200fi
14201
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014202CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14204$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014205if test "$ac_cv_x87_double_rounding" = yes
14206then
14207
Matthias Kloseb9621712010-04-24 17:59:49 +000014208$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014209
14210fi
14211
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014212# ************************************
14213# * Check for mathematical functions *
14214# ************************************
14215
14216LIBS_SAVE=$LIBS
14217LIBS="$LIBS $LIBM"
14218
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014219for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14220do :
14221 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14222ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014223if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014224 cat >>confdefs.h <<_ACEOF
14225#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14226_ACEOF
14227
14228fi
14229done
14230
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014231for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014232do :
14233 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14234ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014235if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014236 cat >>confdefs.h <<_ACEOF
14237#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14238_ACEOF
14239
14240fi
14241done
14242
14243ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14244"
Victor Stinnere0be4232011-10-25 13:06:09 +020014245if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014246 ac_have_decl=1
14247else
14248 ac_have_decl=0
14249fi
14250
14251cat >>confdefs.h <<_ACEOF
14252#define HAVE_DECL_ISINF $ac_have_decl
14253_ACEOF
14254ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14255"
Victor Stinnere0be4232011-10-25 13:06:09 +020014256if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014257 ac_have_decl=1
14258else
14259 ac_have_decl=0
14260fi
14261
14262cat >>confdefs.h <<_ACEOF
14263#define HAVE_DECL_ISNAN $ac_have_decl
14264_ACEOF
14265ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14266"
Victor Stinnere0be4232011-10-25 13:06:09 +020014267if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014268 ac_have_decl=1
14269else
14270 ac_have_decl=0
14271fi
14272
14273cat >>confdefs.h <<_ACEOF
14274#define HAVE_DECL_ISFINITE $ac_have_decl
14275_ACEOF
14276
14277
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014278# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14279# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14281$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014282if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014283 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014284else
14285
Matthias Kloseb9621712010-04-24 17:59:49 +000014286if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014287 ac_cv_tanh_preserves_zero_sign=no
14288else
Matthias Kloseb9621712010-04-24 17:59:49 +000014289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014290/* end confdefs.h. */
14291
14292#include <math.h>
14293#include <stdlib.h>
14294int main() {
14295 /* return 0 if either negative zeros don't exist
14296 on this platform or if negative zeros exist
14297 and tanh(-0.) == -0. */
14298 if (atan2(0., -1.) == atan2(-0., -1.) ||
14299 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14300 else exit(1);
14301}
14302
14303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014304if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014305 ac_cv_tanh_preserves_zero_sign=yes
14306else
Matthias Kloseb9621712010-04-24 17:59:49 +000014307 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014308fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014309rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14310 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014311fi
14312
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014313fi
14314
Matthias Kloseb9621712010-04-24 17:59:49 +000014315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14316$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014317if test "$ac_cv_tanh_preserves_zero_sign" = yes
14318then
14319
Matthias Kloseb9621712010-04-24 17:59:49 +000014320$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014321
14322fi
14323
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014324if test "$ac_cv_func_log1p" = yes
14325then
14326 # On some versions of AIX, log1p(-0.) returns 0. instead of
14327 # -0. See issue #9920.
14328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14329$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014330 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014331 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014332else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014333
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014334 if test "$cross_compiling" = yes; then :
14335 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014336else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14338/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014339
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014340 #include <math.h>
14341 #include <stdlib.h>
14342 int main() {
14343 /* Fail if the signs of log1p(-0.) and -0. can be
14344 distinguished. */
14345 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14346 return 0;
14347 else
14348 return 1;
14349 }
14350
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014351_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014352if ac_fn_c_try_run "$LINENO"; then :
14353 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014354else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014355 ac_cv_log1p_drops_zero_sign=yes
14356fi
14357rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14358 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014359fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014360
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014361fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014362
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14364$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14365fi
14366if test "$ac_cv_log1p_drops_zero_sign" = yes
14367then
14368
14369$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14370
14371fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014372
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014373LIBS=$LIBS_SAVE
14374
Mark Dickinsona614f042009-11-28 12:48:43 +000014375# For multiprocessing module, check that sem_open
14376# actually works. For FreeBSD versions <= 7.2,
14377# the kernel module that provides POSIX semaphores
14378# isn't loaded by default, so an attempt to call
14379# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14381$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014382if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014383 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014384else
Matthias Kloseb9621712010-04-24 17:59:49 +000014385 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014386 ac_cv_posix_semaphores_enabled=yes
14387else
Matthias Kloseb9621712010-04-24 17:59:49 +000014388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014389/* end confdefs.h. */
14390
14391#include <unistd.h>
14392#include <fcntl.h>
14393#include <stdio.h>
14394#include <semaphore.h>
14395#include <sys/stat.h>
14396
14397int main(void) {
14398 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14399 if (a == SEM_FAILED) {
14400 perror("sem_open");
14401 return 1;
14402 }
14403 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014404 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014405 return 0;
14406}
14407
14408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014409if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014410 ac_cv_posix_semaphores_enabled=yes
14411else
Matthias Kloseb9621712010-04-24 17:59:49 +000014412 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014413fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014414rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14415 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014416fi
14417
14418
Mark Dickinsona614f042009-11-28 12:48:43 +000014419fi
14420
Matthias Kloseb9621712010-04-24 17:59:49 +000014421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14422$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014423if test $ac_cv_posix_semaphores_enabled = no
14424then
14425
Matthias Kloseb9621712010-04-24 17:59:49 +000014426$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014427
14428fi
14429
Mark Dickinson10683072009-04-18 21:18:19 +000014430# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14432$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014433if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014434 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014435else
Matthias Kloseb9621712010-04-24 17:59:49 +000014436 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014437 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014438else
Matthias Kloseb9621712010-04-24 17:59:49 +000014439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014440/* end confdefs.h. */
14441
14442#include <unistd.h>
14443#include <fcntl.h>
14444#include <stdio.h>
14445#include <semaphore.h>
14446#include <sys/stat.h>
14447
14448int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014449 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014450 int count;
14451 int res;
14452 if(a==SEM_FAILED){
14453 perror("sem_open");
14454 return 1;
14455
14456 }
14457 res = sem_getvalue(a, &count);
14458 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014459 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014460 return res==-1 ? 1 : 0;
14461}
14462
Mark Dickinson10683072009-04-18 21:18:19 +000014463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014464if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014465 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014466else
Matthias Kloseb9621712010-04-24 17:59:49 +000014467 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014468fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014469rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14470 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014471fi
14472
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014473
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014474fi
14475
Matthias Kloseb9621712010-04-24 17:59:49 +000014476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14477$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014478if test $ac_cv_broken_sem_getvalue = yes
14479then
14480
Matthias Kloseb9621712010-04-24 17:59:49 +000014481$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014482
14483fi
14484
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014485ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14486"
14487if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14488 ac_have_decl=1
14489else
14490 ac_have_decl=0
14491fi
14492
14493cat >>confdefs.h <<_ACEOF
14494#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14495_ACEOF
14496ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14497"
14498if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14499 ac_have_decl=1
14500else
14501 ac_have_decl=0
14502fi
14503
14504cat >>confdefs.h <<_ACEOF
14505#define HAVE_DECL_RTLD_NOW $ac_have_decl
14506_ACEOF
14507ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14508"
14509if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14510 ac_have_decl=1
14511else
14512 ac_have_decl=0
14513fi
14514
14515cat >>confdefs.h <<_ACEOF
14516#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14517_ACEOF
14518ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14519"
14520if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14521 ac_have_decl=1
14522else
14523 ac_have_decl=0
14524fi
14525
14526cat >>confdefs.h <<_ACEOF
14527#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14528_ACEOF
14529ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14530"
14531if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14532 ac_have_decl=1
14533else
14534 ac_have_decl=0
14535fi
14536
14537cat >>confdefs.h <<_ACEOF
14538#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14539_ACEOF
14540ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14541"
14542if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14543 ac_have_decl=1
14544else
14545 ac_have_decl=0
14546fi
14547
14548cat >>confdefs.h <<_ACEOF
14549#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14550_ACEOF
14551ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14552"
14553if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14554 ac_have_decl=1
14555else
14556 ac_have_decl=0
14557fi
14558
14559cat >>confdefs.h <<_ACEOF
14560#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14561_ACEOF
14562
14563
Mark Dickinsonbd792642009-03-18 20:06:12 +000014564# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14566$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014567# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014568if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014569 enableval=$enable_big_digits; case $enable_big_digits in
14570yes)
14571 enable_big_digits=30 ;;
14572no)
14573 enable_big_digits=15 ;;
1457415|30)
14575 ;;
14576*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014577 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 +000014578esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14580$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014581
14582cat >>confdefs.h <<_ACEOF
14583#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14584_ACEOF
14585
14586
14587else
Matthias Kloseb9621712010-04-24 17:59:49 +000014588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14589$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014590fi
14591
14592
Guido van Rossumef2255b2000-03-10 22:30:29 +000014593# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014594ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014595if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014596
14597
Matthias Kloseb9621712010-04-24 17:59:49 +000014598$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014599
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014600 wchar_h="yes"
14601
Guido van Rossumef2255b2000-03-10 22:30:29 +000014602else
Martin v. Löwis11437992002-04-12 09:54:03 +000014603 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014604
14605fi
14606
Michael W. Hudson54241132001-12-07 15:38:26 +000014607
Martin v. Löwis11437992002-04-12 09:54:03 +000014608
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014609# determine wchar_t size
14610if test "$wchar_h" = yes
14611then
Matthias Kloseb9621712010-04-24 17:59:49 +000014612 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014613# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14614# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14615# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14617$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014618if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014619 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014620else
Matthias Kloseb9621712010-04-24 17:59:49 +000014621 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14622"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014623
Martin v. Löwis11437992002-04-12 09:54:03 +000014624else
Matthias Kloseb9621712010-04-24 17:59:49 +000014625 if test "$ac_cv_type_wchar_t" = yes; then
14626 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14627$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014628as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014629See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014630 else
14631 ac_cv_sizeof_wchar_t=0
14632 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014633fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014634
Martin v. Löwis11437992002-04-12 09:54:03 +000014635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14637$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014638
14639
14640
Martin v. Löwis11437992002-04-12 09:54:03 +000014641cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014642#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014643_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014644
Michael W. Hudson54241132001-12-07 15:38:26 +000014645
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014646fi
14647
Matthias Kloseb9621712010-04-24 17:59:49 +000014648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14649$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014650have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014652/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014653
14654#include <tcl.h>
14655#if TCL_UTF_MAX != 6
14656# error "NOT UCS4_TCL"
14657#endif
14658int
14659main ()
14660{
14661
14662 ;
14663 return 0;
14664}
14665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014666if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014667
14668
Matthias Kloseb9621712010-04-24 17:59:49 +000014669$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014670
14671 have_ucs4_tcl=yes
14672
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014673fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14676$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014677
Skip Montanaro6dead952003-09-25 14:50:04 +000014678# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014679if test "$wchar_h" = yes
14680then
14681 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14683$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014684 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014685 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014686else
14687
Matthias Kloseb9621712010-04-24 17:59:49 +000014688 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014689 ac_cv_wchar_t_signed=yes
14690else
Matthias Kloseb9621712010-04-24 17:59:49 +000014691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014692/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014693
14694 #include <wchar.h>
14695 int main()
14696 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014697 /* Success: exit code 0 */
14698 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014699 }
14700
14701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014702if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014703 ac_cv_wchar_t_signed=yes
14704else
Matthias Kloseb9621712010-04-24 17:59:49 +000014705 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014707rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14708 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014709fi
14710
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014711fi
14712
Matthias Kloseb9621712010-04-24 17:59:49 +000014713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14714$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014715fi
14716
Georg Brandl52d168a2008-01-07 18:10:24 +000014717# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014718if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014719 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014720then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014721 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014722
Matthias Kloseb9621712010-04-24 17:59:49 +000014723$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014724
Georg Brandl52d168a2008-01-07 18:10:24 +000014725else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014726 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014727fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14729$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014730
14731# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14733$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014734if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014735 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014736else
Matthias Kloseb9621712010-04-24 17:59:49 +000014737 ac_cv_c_bigendian=unknown
14738 # See if we're dealing with a universal compiler.
14739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14740/* end confdefs.h. */
14741#ifndef __APPLE_CC__
14742 not a universal capable compiler
14743 #endif
14744 typedef int dummy;
14745
Skip Montanaro6dead952003-09-25 14:50:04 +000014746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014747if ac_fn_c_try_compile "$LINENO"; then :
14748
14749 # Check for potential -arch flags. It is not universal unless
14750 # there are at least two -arch flags with different values.
14751 ac_arch=
14752 ac_prev=
14753 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14754 if test -n "$ac_prev"; then
14755 case $ac_word in
14756 i?86 | x86_64 | ppc | ppc64)
14757 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14758 ac_arch=$ac_word
14759 else
14760 ac_cv_c_bigendian=universal
14761 break
14762 fi
14763 ;;
14764 esac
14765 ac_prev=
14766 elif test "x$ac_word" = "x-arch"; then
14767 ac_prev=arch
14768 fi
14769 done
14770fi
14771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14772 if test $ac_cv_c_bigendian = unknown; then
14773 # See if sys/param.h defines the BYTE_ORDER macro.
14774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014775/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014776#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014777 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014778
Martin v. Löwis11437992002-04-12 09:54:03 +000014779int
14780main ()
14781{
Matthias Kloseb9621712010-04-24 17:59:49 +000014782#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14783 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14784 && LITTLE_ENDIAN)
14785 bogus endian macros
14786 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014787
14788 ;
14789 return 0;
14790}
14791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014792if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014793 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014795/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014796#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014797 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014798
Martin v. Löwis11437992002-04-12 09:54:03 +000014799int
14800main ()
14801{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014802#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014803 not big endian
14804 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014805
14806 ;
14807 return 0;
14808}
14809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014810if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014811 ac_cv_c_bigendian=yes
14812else
Matthias Kloseb9621712010-04-24 17:59:49 +000014813 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014816fi
14817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14818 fi
14819 if test $ac_cv_c_bigendian = unknown; then
14820 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014822/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014823#include <limits.h>
14824
Martin v. Löwis11437992002-04-12 09:54:03 +000014825int
14826main ()
14827{
Matthias Kloseb9621712010-04-24 17:59:49 +000014828#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14829 bogus endian macros
14830 #endif
14831
Martin v. Löwis11437992002-04-12 09:54:03 +000014832 ;
14833 return 0;
14834}
14835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014836if ac_fn_c_try_compile "$LINENO"; then :
14837 # It does; now see whether it defined to _BIG_ENDIAN or not.
14838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14839/* end confdefs.h. */
14840#include <limits.h>
14841
14842int
14843main ()
14844{
14845#ifndef _BIG_ENDIAN
14846 not big endian
14847 #endif
14848
14849 ;
14850 return 0;
14851}
14852_ACEOF
14853if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014854 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014855else
Matthias Kloseb9621712010-04-24 17:59:49 +000014856 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14859fi
14860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14861 fi
14862 if test $ac_cv_c_bigendian = unknown; then
14863 # Compile a test program.
14864 if test "$cross_compiling" = yes; then :
14865 # Try to guess by grepping values from an object file.
14866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14867/* end confdefs.h. */
14868short int ascii_mm[] =
14869 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14870 short int ascii_ii[] =
14871 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14872 int use_ascii (int i) {
14873 return ascii_mm[i] + ascii_ii[i];
14874 }
14875 short int ebcdic_ii[] =
14876 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14877 short int ebcdic_mm[] =
14878 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14879 int use_ebcdic (int i) {
14880 return ebcdic_mm[i] + ebcdic_ii[i];
14881 }
14882 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014883
Matthias Kloseb9621712010-04-24 17:59:49 +000014884int
14885main ()
14886{
14887return use_ascii (foo) == use_ebcdic (foo);
14888 ;
14889 return 0;
14890}
14891_ACEOF
14892if ac_fn_c_try_compile "$LINENO"; then :
14893 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14894 ac_cv_c_bigendian=yes
14895 fi
14896 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14897 if test "$ac_cv_c_bigendian" = unknown; then
14898 ac_cv_c_bigendian=no
14899 else
14900 # finding both strings is unlikely to happen, but who knows?
14901 ac_cv_c_bigendian=unknown
14902 fi
14903 fi
14904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014906else
Matthias Kloseb9621712010-04-24 17:59:49 +000014907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014908/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014909$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014910int
14911main ()
14912{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913
Matthias Kloseb9621712010-04-24 17:59:49 +000014914 /* Are we little or big endian? From Harbison&Steele. */
14915 union
14916 {
14917 long int l;
14918 char c[sizeof (long int)];
14919 } u;
14920 u.l = 1;
14921 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014922
14923 ;
14924 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014925}
Martin v. Löwis11437992002-04-12 09:54:03 +000014926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014927if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014928 ac_cv_c_bigendian=no
14929else
Matthias Kloseb9621712010-04-24 17:59:49 +000014930 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014931fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14933 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014935
Matthias Kloseb9621712010-04-24 17:59:49 +000014936 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014937fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14939$as_echo "$ac_cv_c_bigendian" >&6; }
14940 case $ac_cv_c_bigendian in #(
14941 yes)
14942 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14943;; #(
14944 no)
14945 ;; #(
14946 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014947
Matthias Kloseb9621712010-04-24 17:59:49 +000014948$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014949
Matthias Kloseb9621712010-04-24 17:59:49 +000014950 ;; #(
14951 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014952 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014953 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014954 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014955
Michael W. Hudson54241132001-12-07 15:38:26 +000014956
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014957# ABI version string for Python extension modules. This appears between the
14958# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14959# from the following attributes which affect the ABI of this Python build (in
14960# this order):
14961#
14962# * The Python implementation (always 'cpython-' for us)
14963# * The major and minor version numbers
14964# * --with-pydebug (adds a 'd')
14965# * --with-pymalloc (adds a 'm')
14966# * --with-wide-unicode (adds a 'u')
14967#
14968# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014969# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14970# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014971
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14973$as_echo_n "checking ABIFLAGS... " >&6; }
14974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14975$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14977$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014978SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14980$as_echo "$SOABI" >&6; }
14981
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014982
14983case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014984 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014985 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14986 *)
14987 EXT_SUFFIX=${SHLIB_SUFFIX};;
14988esac
14989
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14991$as_echo_n "checking LDVERSION... " >&6; }
14992LDVERSION='$(VERSION)$(ABIFLAGS)'
14993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14994$as_echo "$LDVERSION" >&6; }
14995
doko@python.org87421192013-01-26 11:39:31 +010014996
doko@ubuntu.com55532312016-06-14 08:55:19 +020014997if test x$PLATFORM_TRIPLET = x; then
14998 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14999else
15000 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15001fi
doko@python.org87421192013-01-26 11:39:31 +010015002
15003
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015004# Check whether right shifting a negative integer extends the sign bit
15005# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15007$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015008if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015009 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015010else
Martin v. Löwis11437992002-04-12 09:54:03 +000015011
Matthias Kloseb9621712010-04-24 17:59:49 +000015012if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015013 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015014else
Matthias Kloseb9621712010-04-24 17:59:49 +000015015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015016/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015017
15018int main()
15019{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015020 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015021}
15022
Martin v. Löwis11437992002-04-12 09:54:03 +000015023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015024if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015025 ac_cv_rshift_extends_sign=yes
15026else
Matthias Kloseb9621712010-04-24 17:59:49 +000015027 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015029rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15030 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015031fi
15032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015033fi
15034
Matthias Kloseb9621712010-04-24 17:59:49 +000015035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15036$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015037if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015038then
Martin v. Löwis11437992002-04-12 09:54:03 +000015039
Matthias Kloseb9621712010-04-24 17:59:49 +000015040$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015041
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015042fi
15043
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015044# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15046$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015047if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015048 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015049else
Martin v. Löwis11437992002-04-12 09:54:03 +000015050
Matthias Kloseb9621712010-04-24 17:59:49 +000015051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015052/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015053#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015054int
15055main ()
15056{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015057
15058 FILE *f = fopen("/dev/null", "r");
15059 flockfile(f);
15060 getc_unlocked(f);
15061 funlockfile(f);
15062
Martin v. Löwis11437992002-04-12 09:54:03 +000015063 ;
15064 return 0;
15065}
15066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015067if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015068 ac_cv_have_getc_unlocked=yes
15069else
Matthias Kloseb9621712010-04-24 17:59:49 +000015070 ac_cv_have_getc_unlocked=no
15071fi
15072rm -f core conftest.err conftest.$ac_objext \
15073 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015075
Matthias Kloseb9621712010-04-24 17:59:49 +000015076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15077$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015078if test "$ac_cv_have_getc_unlocked" = yes
15079then
Martin v. Löwis11437992002-04-12 09:54:03 +000015080
Matthias Kloseb9621712010-04-24 17:59:49 +000015081$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015082
15083fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015084
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015085# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015086# save the value of LIBS so we don't actually link Python with readline
15087LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015088
Gregory P. Smith18820942008-09-07 06:24:49 +000015089# On some systems we need to link readline to a termcap compatible
15090# library. NOTE: Keep the precedence of listed libraries synchronised
15091# with setup.py.
15092py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15094$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015095for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015096 if test -z "$py_libtermcap"; then
15097 READLINE_LIBS="-lreadline"
15098 else
15099 READLINE_LIBS="-lreadline -l$py_libtermcap"
15100 fi
15101 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015103/* end confdefs.h. */
15104
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015105/* Override any GCC internal prototype to avoid an error.
15106 Use char because int might match the return type of a GCC
15107 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015108#ifdef __cplusplus
15109extern "C"
15110#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015111char readline ();
15112int
15113main ()
15114{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015115return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015116 ;
15117 return 0;
15118}
15119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015120if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015121 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015122fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015123rm -f core conftest.err conftest.$ac_objext \
15124 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015125 if test $py_cv_lib_readline = yes; then
15126 break
15127 fi
15128done
15129# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15130#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015131if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15133$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015134else
Matthias Kloseb9621712010-04-24 17:59:49 +000015135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15136$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015137
Matthias Kloseb9621712010-04-24 17:59:49 +000015138$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015139
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015140fi
15141
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015142# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015144/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015145#include <readline/readline.h>
15146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015147if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015148 have_readline=yes
15149else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015150 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015151
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015152fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015153rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015154if test $have_readline = yes
15155then
Matthias Kloseb9621712010-04-24 17:59:49 +000015156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015157/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015158#include <readline/readline.h>
15159
15160_ACEOF
15161if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015162 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015163
Matthias Kloseb9621712010-04-24 17:59:49 +000015164$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015165
15166fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015167rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015168
Matthias Kloseb9621712010-04-24 17:59:49 +000015169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015170/* end confdefs.h. */
15171#include <readline/readline.h>
15172
15173_ACEOF
15174if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015175 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015176
Matthias Kloseb9621712010-04-24 17:59:49 +000015177$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015178
15179fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015180rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015181
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015182fi
15183
Martin v. Löwis0daad592001-09-30 21:09:59 +000015184# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15186$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015187if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015188 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015189else
Martin v. Löwis11437992002-04-12 09:54:03 +000015190 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015191LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015193/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015195/* Override any GCC internal prototype to avoid an error.
15196 Use char because int might match the return type of a GCC
15197 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015198#ifdef __cplusplus
15199extern "C"
15200#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015201char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015202int
15203main ()
15204{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015205return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015206 ;
15207 return 0;
15208}
15209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015210if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015211 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015212else
Matthias Kloseb9621712010-04-24 17:59:49 +000015213 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015215rm -f core conftest.err conftest.$ac_objext \
15216 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015217LIBS=$ac_check_lib_save_LIBS
15218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15220$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015221if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015222
Matthias Kloseb9621712010-04-24 17:59:49 +000015223$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015224
Martin v. Löwis0daad592001-09-30 21:09:59 +000015225fi
15226
Michael W. Hudson54241132001-12-07 15:38:26 +000015227
Thomas Wouters89d996e2007-09-08 17:39:28 +000015228# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15230$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015231if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015232 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015233else
15234 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015235LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015237/* end confdefs.h. */
15238
15239/* Override any GCC internal prototype to avoid an error.
15240 Use char because int might match the return type of a GCC
15241 builtin and then its argument prototype would still apply. */
15242#ifdef __cplusplus
15243extern "C"
15244#endif
15245char rl_completion_display_matches_hook ();
15246int
15247main ()
15248{
15249return rl_completion_display_matches_hook ();
15250 ;
15251 return 0;
15252}
15253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015254if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015255 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15256else
Matthias Kloseb9621712010-04-24 17:59:49 +000015257 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015258fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015259rm -f core conftest.err conftest.$ac_objext \
15260 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015261LIBS=$ac_check_lib_save_LIBS
15262fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15264$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015265if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015266
Matthias Kloseb9621712010-04-24 17:59:49 +000015267$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015268
15269fi
15270
15271
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015272# also in 4.0, but not in editline
15273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15274$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15275if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15276 $as_echo_n "(cached) " >&6
15277else
15278 ac_check_lib_save_LIBS=$LIBS
15279LIBS="-lreadline $READLINE_LIBS $LIBS"
15280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15281/* end confdefs.h. */
15282
15283/* Override any GCC internal prototype to avoid an error.
15284 Use char because int might match the return type of a GCC
15285 builtin and then its argument prototype would still apply. */
15286#ifdef __cplusplus
15287extern "C"
15288#endif
15289char rl_resize_terminal ();
15290int
15291main ()
15292{
15293return rl_resize_terminal ();
15294 ;
15295 return 0;
15296}
15297_ACEOF
15298if ac_fn_c_try_link "$LINENO"; then :
15299 ac_cv_lib_readline_rl_resize_terminal=yes
15300else
15301 ac_cv_lib_readline_rl_resize_terminal=no
15302fi
15303rm -f core conftest.err conftest.$ac_objext \
15304 conftest$ac_exeext conftest.$ac_ext
15305LIBS=$ac_check_lib_save_LIBS
15306fi
15307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15308$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15309if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15310
15311$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15312
15313fi
15314
15315
Martin v. Löwis0daad592001-09-30 21:09:59 +000015316# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15318$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015319if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015320 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015321else
Martin v. Löwis11437992002-04-12 09:54:03 +000015322 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015323LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015327/* Override any GCC internal prototype to avoid an error.
15328 Use char because int might match the return type of a GCC
15329 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015330#ifdef __cplusplus
15331extern "C"
15332#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015333char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015334int
15335main ()
15336{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015337return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015338 ;
15339 return 0;
15340}
15341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015342if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015343 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015344else
Matthias Kloseb9621712010-04-24 17:59:49 +000015345 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015346fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015347rm -f core conftest.err conftest.$ac_objext \
15348 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015349LIBS=$ac_check_lib_save_LIBS
15350fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15352$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015353if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015354
Matthias Kloseb9621712010-04-24 17:59:49 +000015355$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015356
Guido van Rossum353ae582001-07-10 16:45:32 +000015357fi
15358
Jack Jansendd19cf82001-12-06 22:36:17 +000015359
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015360# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015362/* end confdefs.h. */
15363#include <readline/readline.h>
15364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015365if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015366 have_readline=yes
15367else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015368 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015369
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015370fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015371rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015372if test $have_readline = yes
15373then
Matthias Kloseb9621712010-04-24 17:59:49 +000015374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015375/* end confdefs.h. */
15376#include <readline/readline.h>
15377
15378_ACEOF
15379if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015380 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015381
Matthias Kloseb9621712010-04-24 17:59:49 +000015382$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015383
15384fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015385rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015386
15387fi
15388
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15390$as_echo_n "checking for append_history in -lreadline... " >&6; }
15391if ${ac_cv_lib_readline_append_history+:} false; then :
15392 $as_echo_n "(cached) " >&6
15393else
15394 ac_check_lib_save_LIBS=$LIBS
15395LIBS="-lreadline $READLINE_LIBS $LIBS"
15396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15397/* end confdefs.h. */
15398
15399/* Override any GCC internal prototype to avoid an error.
15400 Use char because int might match the return type of a GCC
15401 builtin and then its argument prototype would still apply. */
15402#ifdef __cplusplus
15403extern "C"
15404#endif
15405char append_history ();
15406int
15407main ()
15408{
15409return append_history ();
15410 ;
15411 return 0;
15412}
15413_ACEOF
15414if ac_fn_c_try_link "$LINENO"; then :
15415 ac_cv_lib_readline_append_history=yes
15416else
15417 ac_cv_lib_readline_append_history=no
15418fi
15419rm -f core conftest.err conftest.$ac_objext \
15420 conftest$ac_exeext conftest.$ac_ext
15421LIBS=$ac_check_lib_save_LIBS
15422fi
15423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15424$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15425if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15426
15427$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15428
15429fi
15430
15431
Martin v. Löwis82bca632006-02-10 20:49:30 +000015432# End of readline checks: restore LIBS
15433LIBS=$LIBS_no_readline
15434
Matthias Kloseb9621712010-04-24 17:59:49 +000015435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15436$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015437if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015438 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015439else
Martin v. Löwis11437992002-04-12 09:54:03 +000015440
Matthias Kloseb9621712010-04-24 17:59:49 +000015441if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015442 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015443else
Matthias Kloseb9621712010-04-24 17:59:49 +000015444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015445/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015446
15447int main()
15448{
15449 int val1 = nice(1);
15450 if (val1 != -1 && val1 == nice(2))
15451 exit(0);
15452 exit(1);
15453}
15454
Martin v. Löwis11437992002-04-12 09:54:03 +000015455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015456if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015457 ac_cv_broken_nice=yes
15458else
Matthias Kloseb9621712010-04-24 17:59:49 +000015459 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015461rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15462 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015463fi
15464
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015465fi
15466
Matthias Kloseb9621712010-04-24 17:59:49 +000015467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15468$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015469if test "$ac_cv_broken_nice" = yes
15470then
Martin v. Löwis11437992002-04-12 09:54:03 +000015471
Matthias Kloseb9621712010-04-24 17:59:49 +000015472$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015473
15474fi
15475
Matthias Kloseb9621712010-04-24 17:59:49 +000015476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15477$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015478if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015479 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015480else
Matthias Kloseb9621712010-04-24 17:59:49 +000015481 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015482 ac_cv_broken_poll=no
15483else
Matthias Kloseb9621712010-04-24 17:59:49 +000015484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015485/* end confdefs.h. */
15486
15487#include <poll.h>
15488
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015489int main()
15490{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015491 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015492 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015493
15494 close (42);
15495
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015496 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015497 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015498 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015499 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015500 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015501 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015502 return 1;
15503}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015504
15505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015506if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015507 ac_cv_broken_poll=yes
15508else
Matthias Kloseb9621712010-04-24 17:59:49 +000015509 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015510fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015511rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15512 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015514
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015515fi
15516
Matthias Kloseb9621712010-04-24 17:59:49 +000015517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15518$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015519if test "$ac_cv_broken_poll" = yes
15520then
15521
Matthias Kloseb9621712010-04-24 17:59:49 +000015522$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015523
15524fi
15525
Brett Cannon43802422005-02-10 20:48:03 +000015526# 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 +000015527# (which is not required by ISO C or UNIX spec) and/or if we support
15528# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015529ac_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 +000015530#include <$ac_cv_struct_tm>
15531
Matthias Kloseb9621712010-04-24 17:59:49 +000015532"
Victor Stinnere0be4232011-10-25 13:06:09 +020015533if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015534
15535cat >>confdefs.h <<_ACEOF
15536#define HAVE_STRUCT_TM_TM_ZONE 1
15537_ACEOF
15538
15539
15540fi
15541
15542if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15543
Matthias Kloseb9621712010-04-24 17:59:49 +000015544$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015545
15546else
Matthias Kloseb9621712010-04-24 17:59:49 +000015547 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15548"
Victor Stinnere0be4232011-10-25 13:06:09 +020015549if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015550 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015551else
Matthias Kloseb9621712010-04-24 17:59:49 +000015552 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015553fi
15554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015555cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015556#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015557_ACEOF
15558
Matthias Kloseb9621712010-04-24 17:59:49 +000015559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15560$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015561if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015562 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015563else
Matthias Kloseb9621712010-04-24 17:59:49 +000015564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015565/* end confdefs.h. */
15566#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015567#if !HAVE_DECL_TZNAME
15568extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015569#endif
15570
15571int
15572main ()
15573{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015574return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015575 ;
15576 return 0;
15577}
15578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015579if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015580 ac_cv_var_tzname=yes
15581else
Matthias Kloseb9621712010-04-24 17:59:49 +000015582 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015584rm -f core conftest.err conftest.$ac_objext \
15585 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015586fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15588$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015589 if test $ac_cv_var_tzname = yes; then
15590
Matthias Kloseb9621712010-04-24 17:59:49 +000015591$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015592
15593 fi
15594fi
15595
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015596
Martin v. Löwis1d459062005-03-14 21:23:33 +000015597# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15599$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015600if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015601 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015602else
15603
Matthias Kloseb9621712010-04-24 17:59:49 +000015604if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015605 ac_cv_working_tzset=no
15606else
Matthias Kloseb9621712010-04-24 17:59:49 +000015607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015608/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015609
15610#include <stdlib.h>
15611#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015612#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015613
15614#if HAVE_TZNAME
15615extern char *tzname[];
15616#endif
15617
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015618int main()
15619{
Brett Cannon18367812003-09-19 00:59:16 +000015620 /* Note that we need to ensure that not only does tzset(3)
15621 do 'something' with localtime, but it works as documented
15622 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015623 This includes making sure that tzname is set properly if
15624 tm->tm_zone does not exist since it is the alternative way
15625 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015626
15627 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015628 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015629 */
15630
Martin v. Löwis1d459062005-03-14 21:23:33 +000015631 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015632 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15633
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015634 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015635 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015636 if (localtime(&groundhogday)->tm_hour != 0)
15637 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015638#if HAVE_TZNAME
15639 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15640 if (strcmp(tzname[0], "UTC") ||
15641 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15642 exit(1);
15643#endif
Brett Cannon18367812003-09-19 00:59:16 +000015644
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015645 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015646 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015647 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015648 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015649#if HAVE_TZNAME
15650 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15651 exit(1);
15652#endif
Brett Cannon18367812003-09-19 00:59:16 +000015653
15654 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15655 tzset();
15656 if (localtime(&groundhogday)->tm_hour != 11)
15657 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015658#if HAVE_TZNAME
15659 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15660 exit(1);
15661#endif
15662
15663#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015664 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15665 exit(1);
15666 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15667 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015668#endif
Brett Cannon18367812003-09-19 00:59:16 +000015669
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015670 exit(0);
15671}
15672
15673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015674if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015675 ac_cv_working_tzset=yes
15676else
Matthias Kloseb9621712010-04-24 17:59:49 +000015677 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015678fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015679rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15680 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015681fi
15682
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015683fi
15684
Matthias Kloseb9621712010-04-24 17:59:49 +000015685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15686$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015687if test "$ac_cv_working_tzset" = yes
15688then
15689
Matthias Kloseb9621712010-04-24 17:59:49 +000015690$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015691
15692fi
15693
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015694# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15696$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015697if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015698 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015699else
Matthias Kloseb9621712010-04-24 17:59:49 +000015700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015701/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015702#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015703int
15704main ()
15705{
15706
15707struct stat st;
15708st.st_mtim.tv_nsec = 1;
15709
15710 ;
15711 return 0;
15712}
15713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015714if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015715 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015716else
Matthias Kloseb9621712010-04-24 17:59:49 +000015717 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15720fi
15721
Matthias Kloseb9621712010-04-24 17:59:49 +000015722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15723$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015724if test "$ac_cv_stat_tv_nsec" = yes
15725then
15726
Matthias Kloseb9621712010-04-24 17:59:49 +000015727$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015728
15729fi
15730
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015731# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15733$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015734if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015735 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015736else
Matthias Kloseb9621712010-04-24 17:59:49 +000015737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015738/* end confdefs.h. */
15739#include <sys/stat.h>
15740int
15741main ()
15742{
15743
15744struct stat st;
15745st.st_mtimespec.tv_nsec = 1;
15746
15747 ;
15748 return 0;
15749}
15750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015751if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015752 ac_cv_stat_tv_nsec2=yes
15753else
Matthias Kloseb9621712010-04-24 17:59:49 +000015754 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15757fi
15758
Matthias Kloseb9621712010-04-24 17:59:49 +000015759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15760$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015761if test "$ac_cv_stat_tv_nsec2" = yes
15762then
15763
Matthias Kloseb9621712010-04-24 17:59:49 +000015764$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015765
15766fi
15767
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015768# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015769ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015770if test "$cross_compiling" = no; then
15771 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15772fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015773
15774for ac_header in curses.h ncurses.h
15775do :
15776 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15777ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15778if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15779 cat >>confdefs.h <<_ACEOF
15780#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15781_ACEOF
15782
15783fi
15784
15785done
15786
15787
15788# On Solaris, term.h requires curses.h
15789for ac_header in term.h
15790do :
15791 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15792#ifdef HAVE_CURSES_H
15793#include <curses.h>
15794#endif
15795
15796"
15797if test "x$ac_cv_header_term_h" = xyes; then :
15798 cat >>confdefs.h <<_ACEOF
15799#define HAVE_TERM_H 1
15800_ACEOF
15801
15802fi
15803
15804done
15805
15806
Jack Jansen666b1e72001-10-31 12:11:48 +000015807# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15809$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015810if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015811 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015812else
Matthias Kloseb9621712010-04-24 17:59:49 +000015813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015814/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015815#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015816int
15817main ()
15818{
Jack Jansen666b1e72001-10-31 12:11:48 +000015819
15820 int rtn;
15821 rtn = mvwdelch(0,0,0);
15822
Martin v. Löwis11437992002-04-12 09:54:03 +000015823 ;
15824 return 0;
15825}
15826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015827if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015828 ac_cv_mvwdelch_is_expression=yes
15829else
Matthias Kloseb9621712010-04-24 17:59:49 +000015830 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15833fi
15834
Matthias Kloseb9621712010-04-24 17:59:49 +000015835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15836$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015837
15838if test "$ac_cv_mvwdelch_is_expression" = yes
15839then
Martin v. Löwis11437992002-04-12 09:54:03 +000015840
Matthias Kloseb9621712010-04-24 17:59:49 +000015841$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015842
15843fi
15844
Matthias Kloseb9621712010-04-24 17:59:49 +000015845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15846$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015847if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015848 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015849else
Matthias Kloseb9621712010-04-24 17:59:49 +000015850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015851/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015852#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015853int
15854main ()
15855{
Jack Jansen666b1e72001-10-31 12:11:48 +000015856
15857 WINDOW *w;
15858 w->_flags = 0;
15859
Martin v. Löwis11437992002-04-12 09:54:03 +000015860 ;
15861 return 0;
15862}
15863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015864if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015865 ac_cv_window_has_flags=yes
15866else
Matthias Kloseb9621712010-04-24 17:59:49 +000015867 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15870fi
15871
Matthias Kloseb9621712010-04-24 17:59:49 +000015872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15873$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015874
Jack Jansen666b1e72001-10-31 12:11:48 +000015875
15876if test "$ac_cv_window_has_flags" = yes
15877then
Martin v. Löwis11437992002-04-12 09:54:03 +000015878
Matthias Kloseb9621712010-04-24 17:59:49 +000015879$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015880
15881fi
15882
Matthias Kloseb9621712010-04-24 17:59:49 +000015883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15884$as_echo_n "checking for is_term_resized... " >&6; }
15885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015886/* end confdefs.h. */
15887#include <curses.h>
15888int
15889main ()
15890{
15891void *x=is_term_resized
15892 ;
15893 return 0;
15894}
15895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015896if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015897
Matthias Kloseb9621712010-04-24 17:59:49 +000015898$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015899
Matthias Kloseb159a552010-04-25 21:00:44 +000015900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015901$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015902else
Matthias Kloseb9621712010-04-24 17:59:49 +000015903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15904$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015905
15906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15908
Matthias Kloseb9621712010-04-24 17:59:49 +000015909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15910$as_echo_n "checking for resize_term... " >&6; }
15911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015912/* end confdefs.h. */
15913#include <curses.h>
15914int
15915main ()
15916{
15917void *x=resize_term
15918 ;
15919 return 0;
15920}
15921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015922if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015923
Matthias Kloseb9621712010-04-24 17:59:49 +000015924$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015925
Matthias Kloseb159a552010-04-25 21:00:44 +000015926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015927$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015928else
Matthias Kloseb9621712010-04-24 17:59:49 +000015929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15930$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015931
15932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15934
Matthias Kloseb9621712010-04-24 17:59:49 +000015935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15936$as_echo_n "checking for resizeterm... " >&6; }
15937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015938/* end confdefs.h. */
15939#include <curses.h>
15940int
15941main ()
15942{
15943void *x=resizeterm
15944 ;
15945 return 0;
15946}
15947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015948if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015949
Matthias Kloseb9621712010-04-24 17:59:49 +000015950$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015951
Matthias Kloseb159a552010-04-25 21:00:44 +000015952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015953$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015954else
Matthias Kloseb9621712010-04-24 17:59:49 +000015955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15956$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015957
15958fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015960# last curses configure check
15961CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015962
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15964$as_echo "$as_me: checking for device files" >&6;}
15965
15966if test "x$cross_compiling" = xyes; then
15967 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15969$as_echo_n "checking for /dev/ptmx... " >&6; }
15970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15971$as_echo "not set" >&6; }
15972 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15973 fi
15974 if test "${ac_cv_file__dev_ptc+set}" != set; then
15975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15976$as_echo_n "checking for /dev/ptc... " >&6; }
15977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15978$as_echo "not set" >&6; }
15979 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15980 fi
15981fi
15982
Matthias Kloseb9621712010-04-24 17:59:49 +000015983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15984$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015985if ${ac_cv_file__dev_ptmx+:} false; then :
15986 $as_echo_n "(cached) " >&6
15987else
15988 test "$cross_compiling" = yes &&
15989 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15990if test -r "/dev/ptmx"; then
15991 ac_cv_file__dev_ptmx=yes
15992else
15993 ac_cv_file__dev_ptmx=no
15994fi
15995fi
15996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15997$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15998if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015999
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016000fi
16001
16002if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016003
Matthias Kloseb9621712010-04-24 17:59:49 +000016004$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016005
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16008$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016009if ${ac_cv_file__dev_ptc+:} false; then :
16010 $as_echo_n "(cached) " >&6
16011else
16012 test "$cross_compiling" = yes &&
16013 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16014if test -r "/dev/ptc"; then
16015 ac_cv_file__dev_ptc=yes
16016else
16017 ac_cv_file__dev_ptc=no
16018fi
16019fi
16020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16021$as_echo "$ac_cv_file__dev_ptc" >&6; }
16022if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016023
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016024fi
16025
16026if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016027
Matthias Kloseb9621712010-04-24 17:59:49 +000016028$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016029
Neal Norwitz865400f2003-03-21 01:42:58 +000016030fi
16031
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016032if test $ac_sys_system = Darwin
16033then
16034 LIBS="$LIBS -framework CoreFoundation"
16035fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016036
Matthias Kloseb9621712010-04-24 17:59:49 +000016037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16038$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016039if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016040 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016041else
Matthias Kloseb9621712010-04-24 17:59:49 +000016042 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016043 ac_cv_have_size_t_format="cross -- assuming yes"
16044
Thomas Wouters477c8d52006-05-27 19:21:47 +000016045else
Matthias Kloseb9621712010-04-24 17:59:49 +000016046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016047/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016048
Thomas Wouters477c8d52006-05-27 19:21:47 +000016049#include <stdio.h>
16050#include <stddef.h>
16051#include <string.h>
16052
Christian Heimes2c181612007-12-17 20:04:13 +000016053#ifdef HAVE_SYS_TYPES_H
16054#include <sys/types.h>
16055#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016056
16057#ifdef HAVE_SSIZE_T
16058typedef ssize_t Py_ssize_t;
16059#elif SIZEOF_VOID_P == SIZEOF_LONG
16060typedef long Py_ssize_t;
16061#else
16062typedef int Py_ssize_t;
16063#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016064
Christian Heimes2c181612007-12-17 20:04:13 +000016065int main()
16066{
16067 char buffer[256];
16068
Thomas Wouters477c8d52006-05-27 19:21:47 +000016069 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16070 return 1;
16071
Thomas Wouters89f507f2006-12-13 04:49:30 +000016072 if (strcmp(buffer, "123"))
16073 return 1;
16074
16075 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16076 return 1;
16077
16078 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016079 return 1;
16080
16081 return 0;
16082}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016083
Thomas Wouters477c8d52006-05-27 19:21:47 +000016084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016085if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016086 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016087else
Matthias Kloseb9621712010-04-24 17:59:49 +000016088 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016090rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16091 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016092fi
16093
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16096$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016097if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016098
Matthias Kloseb9621712010-04-24 17:59:49 +000016099$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016100
16101fi
16102
Matthias Kloseb9621712010-04-24 17:59:49 +000016103ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016104#ifdef HAVE_SYS_TYPES_H
16105#include <sys/types.h>
16106#endif
16107#ifdef HAVE_SYS_SOCKET_H
16108#include <sys/socket.h>
16109#endif
16110
Matthias Kloseb9621712010-04-24 17:59:49 +000016111"
Victor Stinnere0be4232011-10-25 13:06:09 +020016112if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016113
Martin v. Löwis11437992002-04-12 09:54:03 +000016114else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016115
Matthias Kloseb9621712010-04-24 17:59:49 +000016116$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016117
16118fi
16119
Michael W. Hudson54241132001-12-07 15:38:26 +000016120
Matthias Kloseb9621712010-04-24 17:59:49 +000016121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16122$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016123if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016124 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016125else
Matthias Kloseb9621712010-04-24 17:59:49 +000016126 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016127 ac_cv_broken_mbstowcs=no
16128else
Matthias Kloseb9621712010-04-24 17:59:49 +000016129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016130/* end confdefs.h. */
16131
Stefan Krah19c21392012-11-22 23:47:32 +010016132#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016133#include<stdlib.h>
16134int main() {
16135 size_t len = -1;
16136 const char *str = "text";
16137 len = mbstowcs(NULL, str, 0);
16138 return (len != 4);
16139}
16140
16141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016142if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016143 ac_cv_broken_mbstowcs=no
16144else
Matthias Kloseb9621712010-04-24 17:59:49 +000016145 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016147rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16148 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016149fi
16150
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016151fi
16152
Matthias Kloseb9621712010-04-24 17:59:49 +000016153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16154$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016155if test "$ac_cv_broken_mbstowcs" = yes
16156then
16157
Matthias Kloseb9621712010-04-24 17:59:49 +000016158$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016159
16160fi
16161
Antoine Pitroub52ec782009-01-25 16:34:23 +000016162# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16164$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016165
16166# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016167if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016168 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016169if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016170then
16171
Matthias Kloseb9621712010-04-24 17:59:49 +000016172$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016173
Matthias Kloseb9621712010-04-24 17:59:49 +000016174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16175$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016176fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016177if test "$withval" = no
16178then
16179
16180$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16181
Matthias Kloseb9621712010-04-24 17:59:49 +000016182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16183$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016184fi
16185
Antoine Pitrou042b1282010-08-13 21:15:58 +000016186else
16187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16188$as_echo "no value specified" >&6; }
16189fi
16190
Antoine Pitroub52ec782009-01-25 16:34:23 +000016191
Matthias Kloseb17289e2012-03-15 19:51:34 +010016192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16193$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16194if ${ac_cv_computed_gotos+:} false; then :
16195 $as_echo_n "(cached) " >&6
16196else
16197 if test "$cross_compiling" = yes; then :
16198 if test "${with_computed_gotos+set}" = set; then
16199 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16200 else
16201 ac_cv_computed_gotos=no
16202 fi
16203else
16204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16205/* end confdefs.h. */
16206
16207int main(int argc, char **argv)
16208{
16209 static void *targets[1] = { &&LABEL1 };
16210 goto LABEL2;
16211LABEL1:
16212 return 0;
16213LABEL2:
16214 goto *targets[0];
16215 return 1;
16216}
16217
16218_ACEOF
16219if ac_fn_c_try_run "$LINENO"; then :
16220 ac_cv_computed_gotos=yes
16221else
16222 ac_cv_computed_gotos=no
16223fi
16224rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16225 conftest.$ac_objext conftest.beam conftest.$ac_ext
16226fi
16227
16228fi
16229
16230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16231$as_echo "$ac_cv_computed_gotos" >&6; }
16232case "$ac_cv_computed_gotos" in yes*)
16233
16234$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16235
16236esac
16237
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016238case $ac_sys_system in
16239AIX*)
16240
16241$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16242 ;;
16243esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016244
Michael W. Hudson54241132001-12-07 15:38:26 +000016245
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016246
16247
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016248for h in `(cd $srcdir;echo Python/thread_*.h)`
16249do
16250 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16251done
16252
Michael W. Hudson54241132001-12-07 15:38:26 +000016253
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016254SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16256$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016257for dir in $SRCDIRS; do
16258 if test ! -d $dir; then
16259 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016260 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016261done
Matthias Kloseb9621712010-04-24 17:59:49 +000016262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16263$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016264
Stefan Krah1919b7e2012-03-21 18:25:23 +010016265# Availability of -O2:
16266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16267$as_echo_n "checking for -O2... " >&6; }
16268saved_cflags="$CFLAGS"
16269CFLAGS="-O2"
16270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16271/* end confdefs.h. */
16272
16273int
16274main ()
16275{
16276
16277
16278 ;
16279 return 0;
16280}
16281_ACEOF
16282if ac_fn_c_try_compile "$LINENO"; then :
16283 have_O2=yes
16284else
16285 have_O2=no
16286fi
16287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16289$as_echo "$have_O2" >&6; }
16290CFLAGS="$saved_cflags"
16291
16292# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16293# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16295$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16296saved_cflags="$CFLAGS"
16297CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16298if test "$have_O2" = no; then
16299 CFLAGS=""
16300fi
16301if test "$cross_compiling" = yes; then :
16302 have_glibc_memmove_bug=undefined
16303else
16304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16305/* end confdefs.h. */
16306
16307#include <stdio.h>
16308#include <stdlib.h>
16309#include <string.h>
16310void foo(void *p, void *q) { memmove(p, q, 19); }
16311int main() {
16312 char a[32] = "123456789000000000";
16313 foo(&a[9], a);
16314 if (strcmp(a, "123456789123456789000000000") != 0)
16315 return 1;
16316 foo(a, &a[9]);
16317 if (strcmp(a, "123456789000000000") != 0)
16318 return 1;
16319 return 0;
16320}
16321
16322_ACEOF
16323if ac_fn_c_try_run "$LINENO"; then :
16324 have_glibc_memmove_bug=no
16325else
16326 have_glibc_memmove_bug=yes
16327fi
16328rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16329 conftest.$ac_objext conftest.beam conftest.$ac_ext
16330fi
16331
16332CFLAGS="$saved_cflags"
16333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16334$as_echo "$have_glibc_memmove_bug" >&6; }
16335if test "$have_glibc_memmove_bug" = yes; then
16336
16337$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16338
16339fi
16340
16341if test "$have_gcc_asm_for_x87" = yes; then
16342 # Some versions of gcc miscompile inline asm:
16343 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16344 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16345 case $CC in
16346 *gcc*)
16347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16348$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16349 saved_cflags="$CFLAGS"
16350 CFLAGS="-O2"
16351 if test "$cross_compiling" = yes; then :
16352 have_ipa_pure_const_bug=undefined
16353else
16354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16355/* end confdefs.h. */
16356
16357 __attribute__((noinline)) int
16358 foo(int *p) {
16359 int r;
16360 asm ( "movl \$6, (%1)\n\t"
16361 "xorl %0, %0\n\t"
16362 : "=r" (r) : "r" (p) : "memory"
16363 );
16364 return r;
16365 }
16366 int main() {
16367 int p = 8;
16368 if ((foo(&p) ? : p) != 6)
16369 return 1;
16370 return 0;
16371 }
16372
16373_ACEOF
16374if ac_fn_c_try_run "$LINENO"; then :
16375 have_ipa_pure_const_bug=no
16376else
16377 have_ipa_pure_const_bug=yes
16378fi
16379rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16380 conftest.$ac_objext conftest.beam conftest.$ac_ext
16381fi
16382
16383 CFLAGS="$saved_cflags"
16384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16385$as_echo "$have_ipa_pure_const_bug" >&6; }
16386 if test "$have_ipa_pure_const_bug" = yes; then
16387
16388$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16389
16390 fi
16391 ;;
16392 esac
16393fi
16394
Victor Stinner4f5366e2015-01-09 02:13:19 +010016395# Check for stdatomic.h
16396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16397$as_echo_n "checking for stdatomic.h... " >&6; }
16398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16399/* end confdefs.h. */
16400
16401
16402 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016403 atomic_int value = ATOMIC_VAR_INIT(1);
16404 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016405 int main() {
16406 int loaded_value = atomic_load(&value);
16407 return 0;
16408 }
16409
16410
16411_ACEOF
16412if ac_fn_c_try_link "$LINENO"; then :
16413 have_stdatomic_h=yes
16414else
16415 have_stdatomic_h=no
16416fi
16417rm -f core conftest.err conftest.$ac_objext \
16418 conftest$ac_exeext conftest.$ac_ext
16419
16420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16421$as_echo "$have_stdatomic_h" >&6; }
16422
16423if test "$have_stdatomic_h" = yes; then
16424
16425$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16426
16427fi
16428
16429# Check for GCC >= 4.7 __atomic builtins
16430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16431$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16433/* end confdefs.h. */
16434
16435
16436 volatile int val = 1;
16437 int main() {
16438 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16439 return 0;
16440 }
16441
16442
16443_ACEOF
16444if ac_fn_c_try_link "$LINENO"; then :
16445 have_builtin_atomic=yes
16446else
16447 have_builtin_atomic=no
16448fi
16449rm -f core conftest.err conftest.$ac_objext \
16450 conftest$ac_exeext conftest.$ac_ext
16451
16452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16453$as_echo "$have_builtin_atomic" >&6; }
16454
16455if test "$have_builtin_atomic" = yes; then
16456
16457$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16458
16459fi
16460
Ned Deily322f5ba2013-11-21 23:01:59 -080016461# ensurepip option
16462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16463$as_echo_n "checking for ensurepip... " >&6; }
16464
16465# Check whether --with-ensurepip was given.
16466if test "${with_ensurepip+set}" = set; then :
16467 withval=$with_ensurepip;
16468else
16469 with_ensurepip=upgrade
16470fi
16471
16472case $with_ensurepip in #(
16473 yes|upgrade) :
16474 ENSUREPIP=upgrade ;; #(
16475 install) :
16476 ENSUREPIP=install ;; #(
16477 no) :
16478 ENSUREPIP=no ;; #(
16479 *) :
16480 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16481esac
16482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16483$as_echo "$ENSUREPIP" >&6; }
16484
16485
Victor Stinner35a97c02015-03-08 02:59:09 +010016486# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16488$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16490/* end confdefs.h. */
16491
16492
16493 #include <dirent.h>
16494
16495 int main() {
16496 struct dirent entry;
16497 return entry.d_type == DT_UNKNOWN;
16498 }
16499
16500
16501_ACEOF
16502if ac_fn_c_try_link "$LINENO"; then :
16503 have_dirent_d_type=yes
16504else
16505 have_dirent_d_type=no
16506fi
16507rm -f core conftest.err conftest.$ac_objext \
16508 conftest$ac_exeext conftest.$ac_ext
16509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16510$as_echo "$have_dirent_d_type" >&6; }
16511
16512if test "$have_dirent_d_type" = yes; then
16513
16514$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16515
16516fi
16517
Victor Stinner9eb57c52015-03-19 22:21:49 +010016518# check if the Linux getrandom() syscall is available
16519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16520$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16522/* end confdefs.h. */
16523
16524
Victor Stinner1b80b242016-04-12 22:34:58 +020016525 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016526 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016527 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016528
16529 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016530 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016531 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016532 const int flags = GRND_NONBLOCK;
16533 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016534 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016535 return 0;
16536 }
16537
16538
16539_ACEOF
16540if ac_fn_c_try_link "$LINENO"; then :
16541 have_getrandom_syscall=yes
16542else
16543 have_getrandom_syscall=no
16544fi
16545rm -f core conftest.err conftest.$ac_objext \
16546 conftest$ac_exeext conftest.$ac_ext
16547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16548$as_echo "$have_getrandom_syscall" >&6; }
16549
16550if test "$have_getrandom_syscall" = yes; then
16551
16552$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16553
16554fi
16555
Victor Stinner3abf44e2015-09-18 15:38:37 +020016556# check if the getrandom() function is available
16557# the test was written for the Solaris function of <sys/random.h>
16558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16559$as_echo_n "checking for the getrandom() function... " >&6; }
16560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16561/* end confdefs.h. */
16562
16563
16564 #include <sys/random.h>
16565
16566 int main() {
16567 char buffer[1];
16568 const size_t buflen = sizeof(buffer);
16569 const int flags = 0;
16570 /* ignore the result, Python checks for ENOSYS at runtime */
16571 (void)getrandom(buffer, buflen, flags);
16572 return 0;
16573 }
16574
16575
16576_ACEOF
16577if ac_fn_c_try_link "$LINENO"; then :
16578 have_getrandom=yes
16579else
16580 have_getrandom=no
16581fi
16582rm -f core conftest.err conftest.$ac_objext \
16583 conftest$ac_exeext conftest.$ac_ext
16584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16585$as_echo "$have_getrandom" >&6; }
16586
16587if test "$have_getrandom" = yes; then
16588
16589$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16590
16591fi
16592
Guido van Rossum627b2d71993-12-24 10:39:16 +000016593# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016594ac_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 +000016595
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016596ac_config_files="$ac_config_files Modules/ld_so_aix"
16597
Martin v. Löwis11437992002-04-12 09:54:03 +000016598cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016599# This file is a shell script that caches the results of configure
16600# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016601# scripts and configure runs, see configure's option --config-cache.
16602# It is not useful on other systems. If it contains results you don't
16603# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016604#
Martin v. Löwis11437992002-04-12 09:54:03 +000016605# config.status only pays attention to the cache file if you give it
16606# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016607#
Skip Montanaro6dead952003-09-25 14:50:04 +000016608# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016609# loading this file, other *unset* `ac_cv_foo' will be assigned the
16610# following values.
16611
16612_ACEOF
16613
Guido van Rossumf78abae1997-01-21 22:02:36 +000016614# The following way of writing the cache mishandles newlines in values,
16615# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016616# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016617# Ultrix sh set writes to stderr and can't be redirected directly,
16618# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016619(
16620 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16621 eval ac_val=\$$ac_var
16622 case $ac_val in #(
16623 *${as_nl}*)
16624 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016625 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16626$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016627 esac
16628 case $ac_var in #(
16629 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016630 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16631 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016632 esac ;;
16633 esac
16634 done
16635
Martin v. Löwis11437992002-04-12 09:54:03 +000016636 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016637 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16638 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016639 # `set' does not quote correctly, so add quotes: double-quote
16640 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016641 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016642 "s/'/'\\\\''/g;
16643 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016644 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016645 *)
16646 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016647 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016648 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016649 esac |
16650 sort
16651) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016652 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016653 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016654 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016655 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016656 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16657 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016658 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16659 :end' >>confcache
16660if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16661 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016662 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016663 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16664$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016665 if test ! -f "$cache_file" || test -h "$cache_file"; then
16666 cat confcache >"$cache_file"
16667 else
16668 case $cache_file in #(
16669 */* | ?:*)
16670 mv -f confcache "$cache_file"$$ &&
16671 mv -f "$cache_file"$$ "$cache_file" ;; #(
16672 *)
16673 mv -f confcache "$cache_file" ;;
16674 esac
16675 fi
16676 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016677 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016678 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16679$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016680 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016681fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016682rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016683
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016684test "x$prefix" = xNONE && prefix=$ac_default_prefix
16685# Let make expand exec_prefix.
16686test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016687
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016688DEFS=-DHAVE_CONFIG_H
16689
Skip Montanaro6dead952003-09-25 14:50:04 +000016690ac_libobjs=
16691ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016692U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016693for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16694 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016695 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016696 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016697 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16698 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016699 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16700 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016701done
16702LIBOBJS=$ac_libobjs
16703
16704LTLIBOBJS=$ac_ltlibobjs
16705
16706
Martin v. Löwis11437992002-04-12 09:54:03 +000016707
Matthias Kloseb9621712010-04-24 17:59:49 +000016708
Victor Stinnere0be4232011-10-25 13:06:09 +020016709: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016710ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016711ac_clean_files_save=$ac_clean_files
16712ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016713{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16714$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16715as_write_fail=0
16716cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016717#! $SHELL
16718# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016719# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016720# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016721# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016722
Martin v. Löwis11437992002-04-12 09:54:03 +000016723debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016724ac_cs_recheck=false
16725ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016726
Matthias Kloseb9621712010-04-24 17:59:49 +000016727SHELL=\${CONFIG_SHELL-$SHELL}
16728export SHELL
16729_ASEOF
16730cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16731## -------------------- ##
16732## M4sh Initialization. ##
16733## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016734
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016735# Be more Bourne compatible
16736DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016737if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016738 emulate sh
16739 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016740 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016741 # is contrary to our usage. Disable this feature.
16742 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016743 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016744else
Matthias Kloseb9621712010-04-24 17:59:49 +000016745 case `(set -o) 2>/dev/null` in #(
16746 *posix*) :
16747 set -o posix ;; #(
16748 *) :
16749 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016750esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016751fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016752
16753
Matthias Kloseb9621712010-04-24 17:59:49 +000016754as_nl='
16755'
16756export as_nl
16757# Printing a long string crashes Solaris 7 /usr/bin/printf.
16758as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16759as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16760as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16761# Prefer a ksh shell builtin over an external printf program on Solaris,
16762# but without wasting forks for bash or zsh.
16763if test -z "$BASH_VERSION$ZSH_VERSION" \
16764 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16765 as_echo='print -r --'
16766 as_echo_n='print -rn --'
16767elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16768 as_echo='printf %s\n'
16769 as_echo_n='printf %s'
16770else
16771 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16772 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16773 as_echo_n='/usr/ucb/echo -n'
16774 else
16775 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16776 as_echo_n_body='eval
16777 arg=$1;
16778 case $arg in #(
16779 *"$as_nl"*)
16780 expr "X$arg" : "X\\(.*\\)$as_nl";
16781 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16782 esac;
16783 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16784 '
16785 export as_echo_n_body
16786 as_echo_n='sh -c $as_echo_n_body as_echo'
16787 fi
16788 export as_echo_body
16789 as_echo='sh -c $as_echo_body as_echo'
16790fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016791
16792# The user is always right.
16793if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016794 PATH_SEPARATOR=:
16795 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16796 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16797 PATH_SEPARATOR=';'
16798 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016799fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016801
16802# IFS
16803# We need space, tab and new line, in precisely that order. Quoting is
16804# there to prevent editors from complaining about space-tab.
16805# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16806# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016807IFS=" "" $as_nl"
16808
16809# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016810as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016811case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016812 *[\\/]* ) as_myself=$0 ;;
16813 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016814for as_dir in $PATH
16815do
16816 IFS=$as_save_IFS
16817 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016818 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16819 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016820IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016821
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016822 ;;
16823esac
16824# We did not find ourselves, most probably we were run as `sh COMMAND'
16825# in which case we are not to be found in the path.
16826if test "x$as_myself" = x; then
16827 as_myself=$0
16828fi
16829if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016830 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16831 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016832fi
16833
Matthias Kloseb9621712010-04-24 17:59:49 +000016834# Unset variables that we do not need and which cause bugs (e.g. in
16835# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16836# suppresses any "Segmentation fault" message there. '((' could
16837# trigger a bug in pdksh 5.2.14.
16838for as_var in BASH_ENV ENV MAIL MAILPATH
16839do eval test x\${$as_var+set} = xset \
16840 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016841done
16842PS1='$ '
16843PS2='> '
16844PS4='+ '
16845
16846# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016847LC_ALL=C
16848export LC_ALL
16849LANGUAGE=C
16850export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016851
Matthias Kloseb9621712010-04-24 17:59:49 +000016852# CDPATH.
16853(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16854
16855
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016856# as_fn_error STATUS ERROR [LINENO LOG_FD]
16857# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016858# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16859# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016860# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016861as_fn_error ()
16862{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016863 as_status=$1; test $as_status -eq 0 && as_status=1
16864 if test "$4"; then
16865 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16866 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016867 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016868 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016869 as_fn_exit $as_status
16870} # as_fn_error
16871
16872
16873# as_fn_set_status STATUS
16874# -----------------------
16875# Set $? to STATUS, without forking.
16876as_fn_set_status ()
16877{
16878 return $1
16879} # as_fn_set_status
16880
16881# as_fn_exit STATUS
16882# -----------------
16883# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16884as_fn_exit ()
16885{
16886 set +e
16887 as_fn_set_status $1
16888 exit $1
16889} # as_fn_exit
16890
16891# as_fn_unset VAR
16892# ---------------
16893# Portably unset VAR.
16894as_fn_unset ()
16895{
16896 { eval $1=; unset $1;}
16897}
16898as_unset=as_fn_unset
16899# as_fn_append VAR VALUE
16900# ----------------------
16901# Append the text in VALUE to the end of the definition contained in VAR. Take
16902# advantage of any shell optimizations that allow amortized linear growth over
16903# repeated appends, instead of the typical quadratic growth present in naive
16904# implementations.
16905if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16906 eval 'as_fn_append ()
16907 {
16908 eval $1+=\$2
16909 }'
16910else
16911 as_fn_append ()
16912 {
16913 eval $1=\$$1\$2
16914 }
16915fi # as_fn_append
16916
16917# as_fn_arith ARG...
16918# ------------------
16919# Perform arithmetic evaluation on the ARGs, and store the result in the
16920# global $as_val. Take advantage of shells that can avoid forks. The arguments
16921# must be portable across $(()) and expr.
16922if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16923 eval 'as_fn_arith ()
16924 {
16925 as_val=$(( $* ))
16926 }'
16927else
16928 as_fn_arith ()
16929 {
16930 as_val=`expr "$@" || test $? -eq 1`
16931 }
16932fi # as_fn_arith
16933
16934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016935if expr a : '\(a\)' >/dev/null 2>&1 &&
16936 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16937 as_expr=expr
16938else
16939 as_expr=false
16940fi
16941
16942if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16943 as_basename=basename
16944else
16945 as_basename=false
16946fi
16947
Matthias Kloseb9621712010-04-24 17:59:49 +000016948if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16949 as_dirname=dirname
16950else
16951 as_dirname=false
16952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016953
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016954as_me=`$as_basename -- "$0" ||
16955$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16956 X"$0" : 'X\(//\)$' \| \
16957 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016958$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016959 sed '/^.*\/\([^/][^/]*\)\/*$/{
16960 s//\1/
16961 q
16962 }
16963 /^X\/\(\/\/\)$/{
16964 s//\1/
16965 q
16966 }
16967 /^X\/\(\/\).*/{
16968 s//\1/
16969 q
16970 }
16971 s/.*/./; q'`
16972
Matthias Kloseb9621712010-04-24 17:59:49 +000016973# Avoid depending upon Character Ranges.
16974as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16975as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16976as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16977as_cr_digits='0123456789'
16978as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016979
16980ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016981case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016982-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016983 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016984 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016985 xy) ECHO_C='\c';;
16986 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16987 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016988 esac;;
16989*)
16990 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016991esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016992
Martin v. Löwis11437992002-04-12 09:54:03 +000016993rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016994if test -d conf$$.dir; then
16995 rm -f conf$$.dir/conf$$.file
16996else
16997 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016998 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016999fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017000if (echo >conf$$.file) 2>/dev/null; then
17001 if ln -s conf$$.file conf$$ 2>/dev/null; then
17002 as_ln_s='ln -s'
17003 # ... but there are two gotchas:
17004 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17005 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017006 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017007 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017008 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017009 elif ln conf$$.file conf$$ 2>/dev/null; then
17010 as_ln_s=ln
17011 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017012 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017013 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017014else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017015 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017017rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17018rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017019
Matthias Kloseb9621712010-04-24 17:59:49 +000017020
17021# as_fn_mkdir_p
17022# -------------
17023# Create "$as_dir" as a directory, including parents if necessary.
17024as_fn_mkdir_p ()
17025{
17026
17027 case $as_dir in #(
17028 -*) as_dir=./$as_dir;;
17029 esac
17030 test -d "$as_dir" || eval $as_mkdir_p || {
17031 as_dirs=
17032 while :; do
17033 case $as_dir in #(
17034 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17035 *) as_qdir=$as_dir;;
17036 esac
17037 as_dirs="'$as_qdir' $as_dirs"
17038 as_dir=`$as_dirname -- "$as_dir" ||
17039$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17040 X"$as_dir" : 'X\(//\)[^/]' \| \
17041 X"$as_dir" : 'X\(//\)$' \| \
17042 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17043$as_echo X"$as_dir" |
17044 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17045 s//\1/
17046 q
17047 }
17048 /^X\(\/\/\)[^/].*/{
17049 s//\1/
17050 q
17051 }
17052 /^X\(\/\/\)$/{
17053 s//\1/
17054 q
17055 }
17056 /^X\(\/\).*/{
17057 s//\1/
17058 q
17059 }
17060 s/.*/./; q'`
17061 test -d "$as_dir" && break
17062 done
17063 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017064 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017065
17066
17067} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017068if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017069 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017070else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017071 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017072 as_mkdir_p=false
17073fi
17074
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017075
17076# as_fn_executable_p FILE
17077# -----------------------
17078# Test if FILE is an executable regular file.
17079as_fn_executable_p ()
17080{
17081 test -f "$1" && test -x "$1"
17082} # as_fn_executable_p
17083as_test_x='test -x'
17084as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017085
17086# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017087as_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 +000017088
17089# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017090as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017091
17092
Martin v. Löwis11437992002-04-12 09:54:03 +000017093exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017094## ----------------------------------- ##
17095## Main body of $CONFIG_STATUS script. ##
17096## ----------------------------------- ##
17097_ASEOF
17098test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017099
Matthias Kloseb9621712010-04-24 17:59:49 +000017100cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17101# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017102# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017103# values after options handling.
17104ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017105This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017106generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017107
17108 CONFIG_FILES = $CONFIG_FILES
17109 CONFIG_HEADERS = $CONFIG_HEADERS
17110 CONFIG_LINKS = $CONFIG_LINKS
17111 CONFIG_COMMANDS = $CONFIG_COMMANDS
17112 $ $0 $@
17113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017114on `(hostname || uname -n) 2>/dev/null | sed 1q`
17115"
17116
Martin v. Löwis11437992002-04-12 09:54:03 +000017117_ACEOF
17118
Matthias Kloseb9621712010-04-24 17:59:49 +000017119case $ac_config_files in *"
17120"*) set x $ac_config_files; shift; ac_config_files=$*;;
17121esac
17122
17123case $ac_config_headers in *"
17124"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17125esac
17126
17127
17128cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017129# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017130config_files="$ac_config_files"
17131config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017133_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017134
Matthias Kloseb9621712010-04-24 17:59:49 +000017135cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017136ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017137\`$as_me' instantiates files and other configuration actions
17138from templates according to the current configuration. Unless the files
17139and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017140
Matthias Kloseb9621712010-04-24 17:59:49 +000017141Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017142
17143 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017144 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017145 --config print configuration, then exit
17146 -q, --quiet, --silent
17147 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017148 -d, --debug don't remove temporary files
17149 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017150 --file=FILE[:TEMPLATE]
17151 instantiate the configuration file FILE
17152 --header=FILE[:TEMPLATE]
17153 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017154
17155Configuration files:
17156$config_files
17157
17158Configuration headers:
17159$config_headers
17160
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017161Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017164cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17165ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017166ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017167python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017168configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017169 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017170
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017171Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017172This config.status script is free software; the Free Software Foundation
17173gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017174
17175ac_pwd='$ac_pwd'
17176srcdir='$srcdir'
17177INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017178MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017179test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017180_ACEOF
17181
Matthias Kloseb9621712010-04-24 17:59:49 +000017182cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17183# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017184ac_need_defaults=:
17185while test $# != 0
17186do
17187 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017188 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017189 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17190 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017191 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017192 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017193 --*=)
17194 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17195 ac_optarg=
17196 ac_shift=:
17197 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017198 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017199 ac_option=$1
17200 ac_optarg=$2
17201 ac_shift=shift
17202 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017203 esac
17204
Skip Montanaro6dead952003-09-25 14:50:04 +000017205 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017206 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017207 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17208 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017209 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017210 $as_echo "$ac_cs_version"; exit ;;
17211 --config | --confi | --conf | --con | --co | --c )
17212 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017213 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017214 debug=: ;;
17215 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017216 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017217 case $ac_optarg in
17218 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017219 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017220 esac
17221 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017222 ac_need_defaults=false;;
17223 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017224 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017225 case $ac_optarg in
17226 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17227 esac
17228 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017229 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017230 --he | --h)
17231 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017232 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017233Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017234 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017235 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017236 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17237 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17238 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017239
17240 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017241 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017242Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017243
Matthias Kloseb9621712010-04-24 17:59:49 +000017244 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017245 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017246
17247 esac
17248 shift
17249done
17250
Skip Montanaro6dead952003-09-25 14:50:04 +000017251ac_configure_extra_args=
17252
17253if $ac_cs_silent; then
17254 exec 6>/dev/null
17255 ac_configure_extra_args="$ac_configure_extra_args --silent"
17256fi
17257
17258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017259cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017260if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017261 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017262 shift
17263 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17264 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017265 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017266 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017267fi
17268
Martin v. Löwis11437992002-04-12 09:54:03 +000017269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017270cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017271exec 5>>config.log
17272{
17273 echo
17274 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17275## Running $as_me. ##
17276_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017277 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017278} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017281cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017282_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017283
Matthias Kloseb9621712010-04-24 17:59:49 +000017284cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017285
17286# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017287for ac_config_target in $ac_config_targets
17288do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017289 case $ac_config_target in
17290 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17291 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17292 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017293 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17294 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017295 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17296 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017297 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017298 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017299 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017300
Victor Stinnere0be4232011-10-25 13:06:09 +020017301 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017302 esac
17303done
17304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017305
Martin v. Löwis11437992002-04-12 09:54:03 +000017306# If the user did not use the arguments to specify the items to instantiate,
17307# then the envvar interface is used. Set only those that are not.
17308# We use the long form for the default assignment because of an extremely
17309# bizarre bug on SunOS 4.1.3.
17310if $ac_need_defaults; then
17311 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17312 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17313fi
17314
Skip Montanaro6dead952003-09-25 14:50:04 +000017315# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017316# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017317# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017318# Hook for its removal unless debugging.
17319# Note that there is a small window in which the directory will not be cleaned:
17320# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017321$debug ||
17322{
Victor Stinnere0be4232011-10-25 13:06:09 +020017323 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017324 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017325 : "${ac_tmp:=$tmp}"
17326 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017327' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017328 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017329}
Martin v. Löwis11437992002-04-12 09:54:03 +000017330# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017331
Martin v. Löwis11437992002-04-12 09:54:03 +000017332{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017333 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017334 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017335} ||
17336{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017337 tmp=./conf$$-$RANDOM
17338 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017339} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017340ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017341
Matthias Kloseb9621712010-04-24 17:59:49 +000017342# Set up the scripts for CONFIG_FILES section.
17343# No need to generate them if there are no CONFIG_FILES.
17344# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017345if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017346
Matthias Kloseb9621712010-04-24 17:59:49 +000017347
17348ac_cr=`echo X | tr X '\015'`
17349# On cygwin, bash can eat \r inside `` if the user requested igncr.
17350# But we know of no other shell where ac_cr would be empty at this
17351# point, so we can use a bashism as a fallback.
17352if test "x$ac_cr" = x; then
17353 eval ac_cr=\$\'\\r\'
17354fi
17355ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17356if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017357 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017358else
17359 ac_cs_awk_cr=$ac_cr
17360fi
17361
Victor Stinnere0be4232011-10-25 13:06:09 +020017362echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017363_ACEOF
17364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017365
Matthias Kloseb9621712010-04-24 17:59:49 +000017366{
17367 echo "cat >conf$$subs.awk <<_ACEOF" &&
17368 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17369 echo "_ACEOF"
17370} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017371 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17372ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017373ac_delim='%!_!# '
17374for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017375 . ./conf$$subs.sh ||
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
Matthias Kloseb9621712010-04-24 17:59:49 +000017378 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17379 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380 break
17381 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017382 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017383 else
17384 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017385 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017386done
Matthias Kloseb9621712010-04-24 17:59:49 +000017387rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017388
Matthias Kloseb9621712010-04-24 17:59:49 +000017389cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017390cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017392sed -n '
17393h
17394s/^/S["/; s/!.*/"]=/
17395p
17396g
17397s/^[^!]*!//
17398:repl
17399t repl
17400s/'"$ac_delim"'$//
17401t delim
17402:nl
17403h
17404s/\(.\{148\}\)..*/\1/
17405t more1
17406s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17407p
17408n
17409b repl
17410:more1
17411s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17412p
17413g
17414s/.\{148\}//
17415t nl
17416:delim
17417h
17418s/\(.\{148\}\)..*/\1/
17419t more2
17420s/["\\]/\\&/g; s/^/"/; s/$/"/
17421p
17422b
17423:more2
17424s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17425p
17426g
17427s/.\{148\}//
17428t delim
17429' <conf$$subs.awk | sed '
17430/^[^""]/{
17431 N
17432 s/\n//
17433}
17434' >>$CONFIG_STATUS || ac_write_fail=1
17435rm -f conf$$subs.awk
17436cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17437_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017438cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017439 for (key in S) S_is_set[key] = 1
17440 FS = ""
17441
17442}
17443{
17444 line = $ 0
17445 nfields = split(line, field, "@")
17446 substed = 0
17447 len = length(field[1])
17448 for (i = 2; i < nfields; i++) {
17449 key = field[i]
17450 keylen = length(key)
17451 if (S_is_set[key]) {
17452 value = S[key]
17453 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17454 len += length(value) + length(field[++i])
17455 substed = 1
17456 } else
17457 len += 1 + keylen
17458 }
17459
17460 print line
17461}
17462
17463_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017465cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17466if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17467 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17468else
17469 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017470fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017471 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017472_ACEOF
17473
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017474# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17475# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017476# trailing colons and then remove the whole line if VPATH becomes empty
17477# (actually we leave an empty line to preserve line numbers).
17478if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017479 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17480h
17481s///
17482s/^/:/
17483s/[ ]*$/:/
17484s/:\$(srcdir):/:/g
17485s/:\${srcdir}:/:/g
17486s/:@srcdir@:/:/g
17487s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017488s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017489x
17490s/\(=[ ]*\).*/\1/
17491G
17492s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017493s/^[^=]*=[ ]*$//
17494}'
17495fi
17496
Matthias Kloseb9621712010-04-24 17:59:49 +000017497cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017498fi # test -n "$CONFIG_FILES"
17499
Matthias Kloseb9621712010-04-24 17:59:49 +000017500# Set up the scripts for CONFIG_HEADERS section.
17501# No need to generate them if there are no CONFIG_HEADERS.
17502# This happens for instance with `./config.status Makefile'.
17503if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017504cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017505BEGIN {
17506_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017507
Matthias Kloseb9621712010-04-24 17:59:49 +000017508# Transform confdefs.h into an awk script `defines.awk', embedded as
17509# here-document in config.status, that substitutes the proper values into
17510# config.h.in to produce config.h.
17511
17512# Create a delimiter string that does not exist in confdefs.h, to ease
17513# handling of long lines.
17514ac_delim='%!_!# '
17515for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017516 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17517 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017518 break
17519 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017520 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017521 else
17522 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17523 fi
17524done
17525
17526# For the awk script, D is an array of macro values keyed by name,
17527# likewise P contains macro parameters if any. Preserve backslash
17528# newline sequences.
17529
17530ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17531sed -n '
17532s/.\{148\}/&'"$ac_delim"'/g
17533t rset
17534:rset
17535s/^[ ]*#[ ]*define[ ][ ]*/ /
17536t def
17537d
17538:def
17539s/\\$//
17540t bsnl
17541s/["\\]/\\&/g
17542s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17543D["\1"]=" \3"/p
17544s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17545d
17546:bsnl
17547s/["\\]/\\&/g
17548s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17549D["\1"]=" \3\\\\\\n"\\/p
17550t cont
17551s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17552t cont
17553d
17554:cont
17555n
17556s/.\{148\}/&'"$ac_delim"'/g
17557t clear
17558:clear
17559s/\\$//
17560t bsnlc
17561s/["\\]/\\&/g; s/^/"/; s/$/"/p
17562d
17563:bsnlc
17564s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17565b cont
17566' <confdefs.h | sed '
17567s/'"$ac_delim"'/"\\\
17568"/g' >>$CONFIG_STATUS || ac_write_fail=1
17569
17570cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17571 for (key in D) D_is_set[key] = 1
17572 FS = ""
17573}
17574/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17575 line = \$ 0
17576 split(line, arg, " ")
17577 if (arg[1] == "#") {
17578 defundef = arg[2]
17579 mac1 = arg[3]
17580 } else {
17581 defundef = substr(arg[1], 2)
17582 mac1 = arg[2]
17583 }
17584 split(mac1, mac2, "(") #)
17585 macro = mac2[1]
17586 prefix = substr(line, 1, index(line, defundef) - 1)
17587 if (D_is_set[macro]) {
17588 # Preserve the white space surrounding the "#".
17589 print prefix "define", macro P[macro] D[macro]
17590 next
17591 } else {
17592 # Replace #undef with comments. This is necessary, for example,
17593 # in the case of _POSIX_SOURCE, which is predefined and required
17594 # on some systems where configure will not decide to define it.
17595 if (defundef == "undef") {
17596 print "/*", prefix defundef, macro, "*/"
17597 next
17598 }
17599 }
17600}
17601{ print }
17602_ACAWK
17603_ACEOF
17604cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017605 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017606fi # test -n "$CONFIG_HEADERS"
17607
17608
17609eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17610shift
17611for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017612do
17613 case $ac_tag in
17614 :[FHLC]) ac_mode=$ac_tag; continue;;
17615 esac
17616 case $ac_mode$ac_tag in
17617 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017618 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017619 :[FH]-) ac_tag=-:-;;
17620 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17621 esac
17622 ac_save_IFS=$IFS
17623 IFS=:
17624 set x $ac_tag
17625 IFS=$ac_save_IFS
17626 shift
17627 ac_file=$1
17628 shift
17629
17630 case $ac_mode in
17631 :L) ac_source=$1;;
17632 :[FH])
17633 ac_file_inputs=
17634 for ac_f
17635 do
17636 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017637 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017638 *) # Look for the file first in the build tree, then in the source tree
17639 # (if the path is not absolute). The absolute path cannot be DOS-style,
17640 # because $ac_f cannot contain `:'.
17641 test -f "$ac_f" ||
17642 case $ac_f in
17643 [\\/$]*) false;;
17644 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17645 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017646 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017647 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017648 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17649 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017650 done
17651
17652 # Let's still pretend it is `configure' which instantiates (i.e., don't
17653 # use $as_me), people would be surprised to read:
17654 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017655 configure_input='Generated from '`
17656 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17657 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017658 if test x"$ac_file" != x-; then
17659 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017660 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17661$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017662 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017663 # Neutralize special characters interpreted by sed in replacement strings.
17664 case $configure_input in #(
17665 *\&* | *\|* | *\\* )
17666 ac_sed_conf_input=`$as_echo "$configure_input" |
17667 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17668 *) ac_sed_conf_input=$configure_input;;
17669 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017670
17671 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017672 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17673 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017674 esac
17675 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017676 esac
17677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017678 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017679$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017680 X"$ac_file" : 'X\(//\)[^/]' \| \
17681 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017682 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017683$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017684 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17685 s//\1/
17686 q
17687 }
17688 /^X\(\/\/\)[^/].*/{
17689 s//\1/
17690 q
17691 }
17692 /^X\(\/\/\)$/{
17693 s//\1/
17694 q
17695 }
17696 /^X\(\/\).*/{
17697 s//\1/
17698 q
17699 }
17700 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017701 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017702 ac_builddir=.
17703
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017704case "$ac_dir" in
17705.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17706*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017707 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017708 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017709 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017710 case $ac_top_builddir_sub in
17711 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17712 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17713 esac ;;
17714esac
17715ac_abs_top_builddir=$ac_pwd
17716ac_abs_builddir=$ac_pwd$ac_dir_suffix
17717# for backward compatibility:
17718ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017719
17720case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017721 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017722 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017723 ac_top_srcdir=$ac_top_builddir_sub
17724 ac_abs_top_srcdir=$ac_pwd ;;
17725 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017726 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017727 ac_top_srcdir=$srcdir
17728 ac_abs_top_srcdir=$srcdir ;;
17729 *) # Relative name.
17730 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17731 ac_top_srcdir=$ac_top_build_prefix$srcdir
17732 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017733esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017734ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017735
Martin v. Löwis11437992002-04-12 09:54:03 +000017736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017737 case $ac_mode in
17738 :F)
17739 #
17740 # CONFIG_FILE
17741 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017742
17743 case $INSTALL in
17744 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017745 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017746 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017747 ac_MKDIR_P=$MKDIR_P
17748 case $MKDIR_P in
17749 [\\/$]* | ?:[\\/]* ) ;;
17750 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17751 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017752_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017753
Matthias Kloseb9621712010-04-24 17:59:49 +000017754cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017755# If the template does not know about datarootdir, expand it.
17756# FIXME: This hack should be removed a few years after 2.60.
17757ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017758ac_sed_dataroot='
17759/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017760 p
17761 q
17762}
17763/@datadir@/p
17764/@docdir@/p
17765/@infodir@/p
17766/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017767/@mandir@/p'
17768case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017769*datarootdir*) ac_datarootdir_seen=yes;;
17770*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017771 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17772$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017774cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017775 ac_datarootdir_hack='
17776 s&@datadir@&$datadir&g
17777 s&@docdir@&$docdir&g
17778 s&@infodir@&$infodir&g
17779 s&@localedir@&$localedir&g
17780 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017781 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017782esac
17783_ACEOF
17784
17785# Neutralize VPATH when `$srcdir' = `.'.
17786# Shell code in configure.ac might set extrasub.
17787# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017788cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17789ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017790$extrasub
17791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017792cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017793:t
17794/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017795s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017796s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017797s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017798s&@srcdir@&$ac_srcdir&;t t
17799s&@abs_srcdir@&$ac_abs_srcdir&;t t
17800s&@top_srcdir@&$ac_top_srcdir&;t t
17801s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17802s&@builddir@&$ac_builddir&;t t
17803s&@abs_builddir@&$ac_abs_builddir&;t t
17804s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17805s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017806s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017807$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017808"
Victor Stinnere0be4232011-10-25 13:06:09 +020017809eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17810 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017811
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017812test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017813 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17814 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17815 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017817which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017818$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017819which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017820
Victor Stinnere0be4232011-10-25 13:06:09 +020017821 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017822 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017823 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17824 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017825 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017826 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017827 ;;
17828 :H)
17829 #
17830 # CONFIG_HEADER
17831 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017832 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017833 {
17834 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017835 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17836 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017837 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017838 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017839 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17840$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017841 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017842 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017843 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017844 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017845 fi
17846 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017847 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017848 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017849 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017850 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017851 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017853
17854 esac
17855
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017856
17857 case $ac_file$ac_mode in
17858 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17859
17860 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017861done # for ac_tag
17862
Guido van Rossum627b2d71993-12-24 10:39:16 +000017863
Matthias Kloseb9621712010-04-24 17:59:49 +000017864as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017865_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017866ac_clean_files=$ac_clean_files_save
17867
Matthias Kloseb9621712010-04-24 17:59:49 +000017868test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017869 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017870
Martin v. Löwis11437992002-04-12 09:54:03 +000017871
17872# configure is writing to config.log, and then calls config.status.
17873# config.status does its own redirection, appending to config.log.
17874# Unfortunately, on DOS this fails, as config.log is still kept open
17875# by configure, so config.status won't be able to write to it; its
17876# output is simply discarded. So we exec the FD to /dev/null,
17877# effectively closing config.log, so it can be properly (re)opened and
17878# appended to by config.status. When coming back to configure, we
17879# need to make the FD available again.
17880if test "$no_create" != yes; then
17881 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017882 ac_config_status_args=
17883 test "$silent" = yes &&
17884 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017885 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017886 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017887 exec 5>>config.log
17888 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17889 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017890 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017891fi
17892if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17893 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17894$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017895fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017896
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017897
Christian Heimes75ed8902013-11-20 01:11:18 +010017898echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017899if test ! -f Modules/Setup
17900then
17901 cp $srcdir/Modules/Setup.dist Modules/Setup
17902fi
17903
Christian Heimes75ed8902013-11-20 01:11:18 +010017904echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017905if test ! -f Modules/Setup.local
17906then
17907 echo "# Edit this file for local setup changes" >Modules/Setup.local
17908fi
17909
Christian Heimes75ed8902013-11-20 01:11:18 +010017910echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017911$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17912 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017913 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017914mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017915
17916if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17917 echo "" >&6
17918 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070017919 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 +000017920 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017921 echo "" >&6
17922 echo "" >&6
17923fi
17924