blob: c9340c68605483dd0dada2fb2c6ea315b7c74019 [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
731SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200732_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000733MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000734FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800736FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKALTINSTALLLAST
738FRAMEWORKALTINSTALLFIRST
739FRAMEWORKINSTALLLAST
740FRAMEWORKINSTALLFIRST
741PYTHONFRAMEWORKINSTALLDIR
742PYTHONFRAMEWORKPREFIX
743PYTHONFRAMEWORKDIR
744PYTHONFRAMEWORKIDENTIFIER
745PYTHONFRAMEWORK
746LIPO_32BIT_FLAGS
747ARCH_RUN_32BIT
748UNIVERSALSDK
749CONFIG_ARGS
750SOVERSION
751VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200752PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200753PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100754host_os
755host_vendor
756host_cpu
757host
758build_os
759build_vendor
760build_cpu
761build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500762HAS_GIT
763GITBRANCH
764GITTAG
765GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400766BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000767target_alias
768host_alias
769build_alias
770LIBS
771ECHO_T
772ECHO_N
773ECHO_C
774DEFS
775mandir
776localedir
777libdir
778psdir
779pdfdir
780dvidir
781htmldir
782infodir
783docdir
784oldincludedir
785includedir
Benjamin Petersone4f961b2017-04-14 09:36:45 -0700786runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000787localstatedir
788sharedstatedir
789sysconfdir
790datadir
791datarootdir
792libexecdir
793sbindir
794bindir
795program_transform_name
796prefix
797exec_prefix
798PACKAGE_URL
799PACKAGE_BUGREPORT
800PACKAGE_STRING
801PACKAGE_VERSION
802PACKAGE_TARNAME
803PACKAGE_NAME
804PATH_SEPARATOR
805SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000806ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000807ac_user_opts='
808enable_option_checking
809enable_universalsdk
810with_universal_archs
811with_framework_name
812enable_framework
813with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600814with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_cxx_main
816with_suffix
817enable_shared
818enable_profiling
819with_pydebug
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000820enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700821with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100822with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100823with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_libs
825with_system_expat
826with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100827with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000828enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700829with_tcltk_includes
830with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_threads
833with_thread
834enable_ipv6
835with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_pymalloc
837with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700838with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_fpectl
840with_libm
841with_libc
842enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000843with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800844with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000845'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 ac_precious_vars='build_alias
847host_alias
848target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100849MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850CC
851CFLAGS
852LDFLAGS
853LIBS
854CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100855CPP
856PKG_CONFIG
857PKG_CONFIG_PATH
858PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859
Guido van Rossum627b2d71993-12-24 10:39:16 +0000860
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000862ac_init_help=
863ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000864ac_unrecognized_opts=
865ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866# The variables have the same names as the options, with
867# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000868cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871no_recursion=
872prefix=NONE
873program_prefix=NONE
874program_suffix=NONE
875program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880x_includes=NONE
881x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000882
883# Installation directory options.
884# These are left unexpanded so users can "make install exec_prefix=/foo"
885# and all the variables that are supposed to be based on exec_prefix
886# by default will actually change.
887# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889bindir='${exec_prefix}/bin'
890sbindir='${exec_prefix}/sbin'
891libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892datarootdir='${prefix}/share'
893datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894sysconfdir='${prefix}/etc'
895sharedstatedir='${prefix}/com'
896localstatedir='${prefix}/var'
Benjamin Petersone4f961b2017-04-14 09:36:45 -0700897runstatedir='${localstatedir}/run'
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
Benjamin Petersone4f961b2017-04-14 09:36:45 -07001150 -runstatedir | --runstatedir | --runstatedi | --runstated \
1151 | --runstate | --runstat | --runsta | --runst | --runs \
1152 | --run | --ru | --r)
1153 ac_prev=runstatedir ;;
1154 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1155 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1156 | --run=* | --ru=* | --r=*)
1157 runstatedir=$ac_optarg ;;
1158
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001159 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1160 ac_prev=sbindir ;;
1161 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1162 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164
1165 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1166 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1167 | --sharedst | --shareds | --shared | --share | --shar \
1168 | --sha | --sh)
1169 ac_prev=sharedstatedir ;;
1170 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1171 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1172 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1173 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001175
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176 -site | --site | --sit)
1177 ac_prev=site ;;
1178 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001180
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1182 ac_prev=srcdir ;;
1183 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001186 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1187 | --syscon | --sysco | --sysc | --sys | --sy)
1188 ac_prev=sysconfdir ;;
1189 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1190 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001192
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1199 verbose=yes ;;
1200
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 -version | --version | --versio | --versi | --vers | -V)
1202 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
1204 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001206 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001208 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 ac_useropt_orig=$ac_useropt
1210 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1211 case $ac_user_opts in
1212 *"
1213"with_$ac_useropt"
1214"*) ;;
1215 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1216 ac_unrecognized_sep=', ';;
1217 esac
1218 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001219
1220 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001224 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 ac_useropt_orig=$ac_useropt
1226 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1227 case $ac_user_opts in
1228 *"
1229"with_$ac_useropt"
1230"*) ;;
1231 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1232 ac_unrecognized_sep=', ';;
1233 esac
1234 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001236 --x)
1237 # Obsolete; use --with-x.
1238 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239
1240 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1241 | --x-incl | --x-inc | --x-in | --x-i)
1242 ac_prev=x_includes ;;
1243 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1244 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246
1247 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1248 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1249 ac_prev=x_libraries ;;
1250 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1251 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001253
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001254 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1255Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256 ;;
1257
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 *=*)
1259 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1260 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 case $ac_envvar in #(
1262 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001263 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001265 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 export $ac_envvar ;;
1267
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001268 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001272 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001273 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274 ;;
1275
1276 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277done
1278
Guido van Rossum7f43da71994-08-01 12:15:30 +00001279if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001280 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001281 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001282fi
1283
Matthias Kloseb9621712010-04-24 17:59:49 +00001284if test -n "$ac_unrecognized_opts"; then
1285 case $enable_option_checking in
1286 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001287 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001288 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1289 esac
1290fi
1291
1292# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1294 datadir sysconfdir sharedstatedir localstatedir includedir \
1295 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersone4f961b2017-04-14 09:36:45 -07001296 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001297do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001299 # Remove trailing slashes.
1300 case $ac_val in
1301 */ )
1302 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1303 eval $ac_var=\$ac_val;;
1304 esac
1305 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001306 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001307 [\\/$]* | ?:[\\/]* ) continue;;
1308 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001309 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001310 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001311done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001312
Martin v. Löwis11437992002-04-12 09:54:03 +00001313# There might be people who depend on the old broken behavior: `$host'
1314# used to hold the argument of --host etc.
1315# FIXME: To remove some day.
1316build=$build_alias
1317host=$host_alias
1318target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319
Martin v. Löwis11437992002-04-12 09:54:03 +00001320# FIXME: To remove some day.
1321if test "x$host_alias" != x; then
1322 if test "x$build_alias" = x; then
1323 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001324 elif test "x$build_alias" != "x$host_alias"; then
1325 cross_compiling=yes
1326 fi
1327fi
1328
1329ac_tool_prefix=
1330test -n "$host_alias" && ac_tool_prefix=$host_alias-
1331
1332test "$silent" = yes && exec 6>/dev/null
1333
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335ac_pwd=`pwd` && test -n "$ac_pwd" &&
1336ac_ls_di=`ls -di .` &&
1337ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001338 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001340 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341
1342
Guido van Rossum627b2d71993-12-24 10:39:16 +00001343# Find the source files, if location was not specified.
1344if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001345 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001347 ac_confdir=`$as_dirname -- "$as_myself" ||
1348$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1349 X"$as_myself" : 'X\(//\)[^/]' \| \
1350 X"$as_myself" : 'X\(//\)$' \| \
1351 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1352$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001353 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\/\)[^/].*/{
1358 s//\1/
1359 q
1360 }
1361 /^X\(\/\/\)$/{
1362 s//\1/
1363 q
1364 }
1365 /^X\(\/\).*/{
1366 s//\1/
1367 q
1368 }
1369 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001370 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001372 srcdir=..
1373 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001374else
1375 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377if test ! -r "$srcdir/$ac_unique_file"; then
1378 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001379 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001381ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1382ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001383 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001384 pwd)`
1385# When building in place, set srcdir=.
1386if test "$ac_abs_confdir" = "$ac_pwd"; then
1387 srcdir=.
1388fi
1389# Remove unnecessary trailing slashes from srcdir.
1390# Double slashes in file names in object file debugging info
1391# mess up M-x gdb in Emacs.
1392case $srcdir in
1393*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1394esac
1395for ac_var in $ac_precious_vars; do
1396 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1397 eval ac_env_${ac_var}_value=\$${ac_var}
1398 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1399 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1400done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001401
Martin v. Löwis11437992002-04-12 09:54:03 +00001402#
1403# Report the --help message.
1404#
1405if test "$ac_init_help" = "long"; then
1406 # Omit some internal or obsolete options to make the list less imposing.
1407 # This message is too long to be a string in the A/UX 3.1 sh.
1408 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001409\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001410
1411Usage: $0 [OPTION]... [VAR=VALUE]...
1412
1413To assign environment variables (e.g., CC, CFLAGS...), specify them as
1414VAR=VALUE. See below for descriptions of some of the useful variables.
1415
1416Defaults for the options are specified in brackets.
1417
1418Configuration:
1419 -h, --help display this help and exit
1420 --help=short display options specific to this package
1421 --help=recursive display the short help of all the included packages
1422 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001423 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001424 --cache-file=FILE cache test results in FILE [disabled]
1425 -C, --config-cache alias for \`--cache-file=config.cache'
1426 -n, --no-create do not create output files
1427 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1428
Martin v. Löwis11437992002-04-12 09:54:03 +00001429Installation directories:
1430 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001431 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001432 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434
1435By default, \`make install' will install all the files in
1436\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1437an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1438for instance \`--prefix=\$HOME'.
1439
1440For better control, use the options below.
1441
1442Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001443 --bindir=DIR user executables [EPREFIX/bin]
1444 --sbindir=DIR system admin executables [EPREFIX/sbin]
1445 --libexecdir=DIR program executables [EPREFIX/libexec]
1446 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1447 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1448 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersone4f961b2017-04-14 09:36:45 -07001449 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001450 --libdir=DIR object code libraries [EPREFIX/lib]
1451 --includedir=DIR C header files [PREFIX/include]
1452 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1453 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1454 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1455 --infodir=DIR info documentation [DATAROOTDIR/info]
1456 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1457 --mandir=DIR man documentation [DATAROOTDIR/man]
1458 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1459 --htmldir=DIR html documentation [DOCDIR]
1460 --dvidir=DIR dvi documentation [DOCDIR]
1461 --pdfdir=DIR pdf documentation [DOCDIR]
1462 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001463_ACEOF
1464
1465 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001466
1467System types:
1468 --build=BUILD configure for building on BUILD [guessed]
1469 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001470 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001471_ACEOF
1472fi
1473
1474if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001475 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001476 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001477 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 cat <<\_ACEOF
1479
1480Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001481 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001482 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1483 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001484 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001485 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --enable-framework[=INSTALLDIR]
1487 Build (MacOSX|Darwin) framework
1488 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001489 --enable-profiling enable C-level code profiling
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)164eea52016-11-20 21:13:16 +00001490 --enable-optimizations Enable expensive optimizations (PGO, etc). Disabled
1491 by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001492 --enable-loadable-sqlite-extensions
1493 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001494 --enable-ipv6 Enable ipv6 (with ipv4) support
1495 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001496 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001497 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001498
1499Optional Packages:
1500 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1501 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001502 --with-universal-archs=ARCH
1503 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001504 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001505 --with-framework-name=FRAMEWORK
1506 specify an alternate name of the framework built
1507 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001508 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001509 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001510 --with-cxx-main=<compiler>
1511 compile main() and link python executable with C++
1512 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with-suffix=.exe set executable suffix
1514 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001515 --with-lto Enable Link Time Optimization in PGO builds.
1516 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001517 --with-hash-algorithm=[fnv|siphash24]
1518 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001519 --with-address-sanitizer
1520 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001521 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001522 --with-system-expat build pyexpat module using an installed expat
1523 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001524 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001525 --with-system-libmpdec build _decimal module using an installed libmpdec
1526 library
Ned Deilyd819b932013-09-06 01:07:05 -07001527 --with-tcltk-includes='-I...'
1528 override search for Tcl and Tk include files
1529 --with-tcltk-libs='-L...'
1530 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001531 --with-dbmliborder=db1:db2:...
1532 order to check db backends for dbm. Valid value is a
1533 colon separated string with the backend names
1534 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001535 --with(out)-threads[=DIRECTORY]
1536 disable/enable thread support
1537 --with(out)-thread[=DIRECTORY]
1538 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001539 --with(out)-doc-strings disable/enable documentation strings
1540 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001541 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001542 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001543 --with-fpectl enable SIGFPE catching
1544 --with-libm=STRING math library
1545 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001546 --with(out)-computed-gotos
1547 Use computed gotos in evaluation loop (enabled by
1548 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001549 --with(out)-ensurepip=[=upgrade]
1550 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001551
1552Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001553 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001554 CC C compiler command
1555 CFLAGS C compiler flags
1556 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1557 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001559 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001562 PKG_CONFIG path to pkg-config utility
1563 PKG_CONFIG_PATH
1564 directories to add to pkg-config's search path
1565 PKG_CONFIG_LIBDIR
1566 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001567
1568Use these variables to override the choices made by `configure' or to help
1569it to find libraries and programs with nonstandard names/locations.
1570
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001571Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001572_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001574fi
1575
1576if test "$ac_init_help" = "recursive"; then
1577 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 test -d "$ac_dir" ||
1580 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1581 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001582 ac_builddir=.
1583
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584case "$ac_dir" in
1585.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1586*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001587 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001588 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001589 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 case $ac_top_builddir_sub in
1591 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1592 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1593 esac ;;
1594esac
1595ac_abs_top_builddir=$ac_pwd
1596ac_abs_builddir=$ac_pwd$ac_dir_suffix
1597# for backward compatibility:
1598ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001599
1600case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 ac_top_srcdir=$ac_top_builddir_sub
1604 ac_abs_top_srcdir=$ac_pwd ;;
1605 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001607 ac_top_srcdir=$srcdir
1608 ac_abs_top_srcdir=$srcdir ;;
1609 *) # Relative name.
1610 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1611 ac_top_srcdir=$ac_top_build_prefix$srcdir
1612 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001613esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 cd "$ac_dir" || { ac_status=$?; continue; }
1617 # Check for guested configure.
1618 if test -f "$ac_srcdir/configure.gnu"; then
1619 echo &&
1620 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1621 elif test -f "$ac_srcdir/configure"; then
1622 echo &&
1623 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001624 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001625 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626 fi || ac_status=$?
1627 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001628 done
1629fi
1630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001632if $ac_init_version; then
1633 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001634python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001635generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001636
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001637Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001638This configure script is free software; the Free Software Foundation
1639gives unlimited permission to copy, distribute and modify it.
1640_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001641 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001643
1644## ------------------------ ##
1645## Autoconf initialization. ##
1646## ------------------------ ##
1647
1648# ac_fn_c_try_compile LINENO
1649# --------------------------
1650# Try to compile conftest.$ac_ext, and return whether this succeeded.
1651ac_fn_c_try_compile ()
1652{
1653 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1654 rm -f conftest.$ac_objext
1655 if { { ac_try="$ac_compile"
1656case "(($ac_try" in
1657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1658 *) ac_try_echo=$ac_try;;
1659esac
1660eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1661$as_echo "$ac_try_echo"; } >&5
1662 (eval "$ac_compile") 2>conftest.err
1663 ac_status=$?
1664 if test -s conftest.err; then
1665 grep -v '^ *+' conftest.err >conftest.er1
1666 cat conftest.er1 >&5
1667 mv -f conftest.er1 conftest.err
1668 fi
1669 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1670 test $ac_status = 0; } && {
1671 test -z "$ac_c_werror_flag" ||
1672 test ! -s conftest.err
1673 } && test -s conftest.$ac_objext; then :
1674 ac_retval=0
1675else
1676 $as_echo "$as_me: failed program was:" >&5
1677sed 's/^/| /' conftest.$ac_ext >&5
1678
1679 ac_retval=1
1680fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001681 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001682 as_fn_set_status $ac_retval
1683
1684} # ac_fn_c_try_compile
1685
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001686# ac_fn_c_try_cpp LINENO
1687# ----------------------
1688# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1689ac_fn_c_try_cpp ()
1690{
1691 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692 if { { ac_try="$ac_cpp conftest.$ac_ext"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1700 ac_status=$?
1701 if test -s conftest.err; then
1702 grep -v '^ *+' conftest.err >conftest.er1
1703 cat conftest.er1 >&5
1704 mv -f conftest.er1 conftest.err
1705 fi
1706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707 test $ac_status = 0; } > conftest.i && {
1708 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1709 test ! -s conftest.err
1710 }; then :
1711 ac_retval=0
1712else
1713 $as_echo "$as_me: failed program was:" >&5
1714sed 's/^/| /' conftest.$ac_ext >&5
1715
1716 ac_retval=1
1717fi
1718 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1719 as_fn_set_status $ac_retval
1720
1721} # ac_fn_c_try_cpp
1722
Matthias Kloseb9621712010-04-24 17:59:49 +00001723# ac_fn_c_try_link LINENO
1724# -----------------------
1725# Try to link conftest.$ac_ext, and return whether this succeeded.
1726ac_fn_c_try_link ()
1727{
1728 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729 rm -f conftest.$ac_objext conftest$ac_exeext
1730 if { { ac_try="$ac_link"
1731case "(($ac_try" in
1732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1733 *) ac_try_echo=$ac_try;;
1734esac
1735eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1736$as_echo "$ac_try_echo"; } >&5
1737 (eval "$ac_link") 2>conftest.err
1738 ac_status=$?
1739 if test -s conftest.err; then
1740 grep -v '^ *+' conftest.err >conftest.er1
1741 cat conftest.er1 >&5
1742 mv -f conftest.er1 conftest.err
1743 fi
1744 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1745 test $ac_status = 0; } && {
1746 test -z "$ac_c_werror_flag" ||
1747 test ! -s conftest.err
1748 } && test -s conftest$ac_exeext && {
1749 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001750 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001751 }; then :
1752 ac_retval=0
1753else
1754 $as_echo "$as_me: failed program was:" >&5
1755sed 's/^/| /' conftest.$ac_ext >&5
1756
1757 ac_retval=1
1758fi
1759 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1760 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1761 # interfere with the next link command; also delete a directory that is
1762 # left behind by Apple's compiler. We do this before executing the actions.
1763 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001764 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001765 as_fn_set_status $ac_retval
1766
1767} # ac_fn_c_try_link
1768
Matthias Kloseb9621712010-04-24 17:59:49 +00001769# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1770# -------------------------------------------------------
1771# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1772# the include files in INCLUDES and setting the cache variable VAR
1773# accordingly.
1774ac_fn_c_check_header_mongrel ()
1775{
1776 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001777 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1779$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001780if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001781 $as_echo_n "(cached) " >&6
1782fi
1783eval ac_res=\$$3
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1785$as_echo "$ac_res" >&6; }
1786else
1787 # Is the header compilable?
1788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1789$as_echo_n "checking $2 usability... " >&6; }
1790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1791/* end confdefs.h. */
1792$4
1793#include <$2>
1794_ACEOF
1795if ac_fn_c_try_compile "$LINENO"; then :
1796 ac_header_compiler=yes
1797else
1798 ac_header_compiler=no
1799fi
1800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1802$as_echo "$ac_header_compiler" >&6; }
1803
1804# Is the header present?
1805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1806$as_echo_n "checking $2 presence... " >&6; }
1807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1808/* end confdefs.h. */
1809#include <$2>
1810_ACEOF
1811if ac_fn_c_try_cpp "$LINENO"; then :
1812 ac_header_preproc=yes
1813else
1814 ac_header_preproc=no
1815fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001816rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1818$as_echo "$ac_header_preproc" >&6; }
1819
1820# So? What about this header?
1821case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1822 yes:no: )
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1824$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1826$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1827 ;;
1828 no:yes:* )
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1830$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1832$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1834$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1836$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1838$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001839( $as_echo "## --------------------------------------- ##
1840## Report this to https://bugs.python.org/ ##
1841## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001842 ) | sed "s/^/$as_me: WARNING: /" >&2
1843 ;;
1844esac
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1846$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001847if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001848 $as_echo_n "(cached) " >&6
1849else
1850 eval "$3=\$ac_header_compiler"
1851fi
1852eval ac_res=\$$3
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1854$as_echo "$ac_res" >&6; }
1855fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001856 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001857
1858} # ac_fn_c_check_header_mongrel
1859
1860# ac_fn_c_try_run LINENO
1861# ----------------------
1862# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1863# that executables *can* be run.
1864ac_fn_c_try_run ()
1865{
1866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867 if { { ac_try="$ac_link"
1868case "(($ac_try" in
1869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1870 *) ac_try_echo=$ac_try;;
1871esac
1872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1873$as_echo "$ac_try_echo"; } >&5
1874 (eval "$ac_link") 2>&5
1875 ac_status=$?
1876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1877 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1878 { { case "(($ac_try" in
1879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1880 *) ac_try_echo=$ac_try;;
1881esac
1882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1883$as_echo "$ac_try_echo"; } >&5
1884 (eval "$ac_try") 2>&5
1885 ac_status=$?
1886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1887 test $ac_status = 0; }; }; then :
1888 ac_retval=0
1889else
1890 $as_echo "$as_me: program exited with status $ac_status" >&5
1891 $as_echo "$as_me: failed program was:" >&5
1892sed 's/^/| /' conftest.$ac_ext >&5
1893
1894 ac_retval=$ac_status
1895fi
1896 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001897 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001898 as_fn_set_status $ac_retval
1899
1900} # ac_fn_c_try_run
1901
1902# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1903# -------------------------------------------------------
1904# Tests whether HEADER exists and can be compiled using the include files in
1905# INCLUDES, setting the cache variable VAR accordingly.
1906ac_fn_c_check_header_compile ()
1907{
1908 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1910$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001911if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001912 $as_echo_n "(cached) " >&6
1913else
1914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1915/* end confdefs.h. */
1916$4
1917#include <$2>
1918_ACEOF
1919if ac_fn_c_try_compile "$LINENO"; then :
1920 eval "$3=yes"
1921else
1922 eval "$3=no"
1923fi
1924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1925fi
1926eval ac_res=\$$3
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1928$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001929 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001930
1931} # ac_fn_c_check_header_compile
1932
Matthias Kloseb9621712010-04-24 17:59:49 +00001933# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1934# -------------------------------------------
1935# Tests whether TYPE exists after having included INCLUDES, setting cache
1936# variable VAR accordingly.
1937ac_fn_c_check_type ()
1938{
1939 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1941$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001942if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001943 $as_echo_n "(cached) " >&6
1944else
1945 eval "$3=no"
1946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947/* end confdefs.h. */
1948$4
1949int
1950main ()
1951{
1952if (sizeof ($2))
1953 return 0;
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h. */
1961$4
1962int
1963main ()
1964{
1965if (sizeof (($2)))
1966 return 0;
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971if ac_fn_c_try_compile "$LINENO"; then :
1972
1973else
1974 eval "$3=yes"
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1979fi
1980eval ac_res=\$$3
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001983 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001984
1985} # ac_fn_c_check_type
1986
Matthias Kloseb9621712010-04-24 17:59:49 +00001987# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1988# --------------------------------------------
1989# Tries to find the compile-time value of EXPR in a program that includes
1990# INCLUDES, setting VAR accordingly. Returns whether the value could be
1991# computed
1992ac_fn_c_compute_int ()
1993{
1994 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995 if test "$cross_compiling" = yes; then
1996 # Depending upon the size, compute the lo and hi bounds.
1997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$4
2000int
2001main ()
2002{
2003static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002004test_array [0] = 0;
2005return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002006
2007 ;
2008 return 0;
2009}
2010_ACEOF
2011if ac_fn_c_try_compile "$LINENO"; then :
2012 ac_lo=0 ac_mid=0
2013 while :; do
2014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015/* end confdefs.h. */
2016$4
2017int
2018main ()
2019{
2020static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002021test_array [0] = 0;
2022return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002023
2024 ;
2025 return 0;
2026}
2027_ACEOF
2028if ac_fn_c_try_compile "$LINENO"; then :
2029 ac_hi=$ac_mid; break
2030else
2031 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2032 if test $ac_lo -le $ac_mid; then
2033 ac_lo= ac_hi=
2034 break
2035 fi
2036 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2037fi
2038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2039 done
2040else
2041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2042/* end confdefs.h. */
2043$4
2044int
2045main ()
2046{
2047static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002048test_array [0] = 0;
2049return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002050
2051 ;
2052 return 0;
2053}
2054_ACEOF
2055if ac_fn_c_try_compile "$LINENO"; then :
2056 ac_hi=-1 ac_mid=-1
2057 while :; do
2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059/* end confdefs.h. */
2060$4
2061int
2062main ()
2063{
2064static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002065test_array [0] = 0;
2066return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002067
2068 ;
2069 return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_compile "$LINENO"; then :
2073 ac_lo=$ac_mid; break
2074else
2075 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2076 if test $ac_mid -le $ac_hi; then
2077 ac_lo= ac_hi=
2078 break
2079 fi
2080 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083 done
2084else
2085 ac_lo= ac_hi=
2086fi
2087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090# Binary search between lo and hi bounds.
2091while test "x$ac_lo" != "x$ac_hi"; do
2092 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094/* end confdefs.h. */
2095$4
2096int
2097main ()
2098{
2099static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002100test_array [0] = 0;
2101return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002102
2103 ;
2104 return 0;
2105}
2106_ACEOF
2107if ac_fn_c_try_compile "$LINENO"; then :
2108 ac_hi=$ac_mid
2109else
2110 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2111fi
2112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2113done
2114case $ac_lo in #((
2115?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2116'') ac_retval=1 ;;
2117esac
2118 else
2119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
2121$4
2122static long int longval () { return $2; }
2123static unsigned long int ulongval () { return $2; }
2124#include <stdio.h>
2125#include <stdlib.h>
2126int
2127main ()
2128{
2129
2130 FILE *f = fopen ("conftest.val", "w");
2131 if (! f)
2132 return 1;
2133 if (($2) < 0)
2134 {
2135 long int i = longval ();
2136 if (i != ($2))
2137 return 1;
2138 fprintf (f, "%ld", i);
2139 }
2140 else
2141 {
2142 unsigned long int i = ulongval ();
2143 if (i != ($2))
2144 return 1;
2145 fprintf (f, "%lu", i);
2146 }
2147 /* Do not output a trailing newline, as this causes \r\n confusion
2148 on some platforms. */
2149 return ferror (f) || fclose (f) != 0;
2150
2151 ;
2152 return 0;
2153}
2154_ACEOF
2155if ac_fn_c_try_run "$LINENO"; then :
2156 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2157else
2158 ac_retval=1
2159fi
2160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2161 conftest.$ac_objext conftest.beam conftest.$ac_ext
2162rm -f conftest.val
2163
2164 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002165 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002166 as_fn_set_status $ac_retval
2167
2168} # ac_fn_c_compute_int
2169
2170# ac_fn_c_check_func LINENO FUNC VAR
2171# ----------------------------------
2172# Tests whether FUNC exists, setting the cache variable VAR accordingly
2173ac_fn_c_check_func ()
2174{
2175 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2177$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002178if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002179 $as_echo_n "(cached) " >&6
2180else
2181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182/* end confdefs.h. */
2183/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2184 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2185#define $2 innocuous_$2
2186
2187/* System header to define __stub macros and hopefully few prototypes,
2188 which can conflict with char $2 (); below.
2189 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2190 <limits.h> exists even on freestanding compilers. */
2191
2192#ifdef __STDC__
2193# include <limits.h>
2194#else
2195# include <assert.h>
2196#endif
2197
2198#undef $2
2199
2200/* Override any GCC internal prototype to avoid an error.
2201 Use char because int might match the return type of a GCC
2202 builtin and then its argument prototype would still apply. */
2203#ifdef __cplusplus
2204extern "C"
2205#endif
2206char $2 ();
2207/* The GNU C library defines this for functions which it implements
2208 to always fail with ENOSYS. Some functions are actually named
2209 something starting with __ and the normal name is an alias. */
2210#if defined __stub_$2 || defined __stub___$2
2211choke me
2212#endif
2213
2214int
2215main ()
2216{
2217return $2 ();
2218 ;
2219 return 0;
2220}
2221_ACEOF
2222if ac_fn_c_try_link "$LINENO"; then :
2223 eval "$3=yes"
2224else
2225 eval "$3=no"
2226fi
2227rm -f core conftest.err conftest.$ac_objext \
2228 conftest$ac_exeext conftest.$ac_ext
2229fi
2230eval ac_res=\$$3
2231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2232$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002233 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002234
2235} # ac_fn_c_check_func
2236
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002237# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2238# ---------------------------------------------
2239# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2240# accordingly.
2241ac_fn_c_check_decl ()
2242{
2243 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2244 as_decl_name=`echo $2|sed 's/ *(.*//'`
2245 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2247$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2248if eval \${$3+:} false; then :
2249 $as_echo_n "(cached) " >&6
2250else
2251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252/* end confdefs.h. */
2253$4
2254int
2255main ()
2256{
2257#ifndef $as_decl_name
2258#ifdef __cplusplus
2259 (void) $as_decl_use;
2260#else
2261 (void) $as_decl_name;
2262#endif
2263#endif
2264
2265 ;
2266 return 0;
2267}
2268_ACEOF
2269if ac_fn_c_try_compile "$LINENO"; then :
2270 eval "$3=yes"
2271else
2272 eval "$3=no"
2273fi
2274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2275fi
2276eval ac_res=\$$3
2277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2278$as_echo "$ac_res" >&6; }
2279 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2280
2281} # ac_fn_c_check_decl
2282
Matthias Kloseb9621712010-04-24 17:59:49 +00002283# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2284# ----------------------------------------------------
2285# Tries to find if the field MEMBER exists in type AGGR, after including
2286# INCLUDES, setting cache variable VAR accordingly.
2287ac_fn_c_check_member ()
2288{
2289 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2291$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002292if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002293 $as_echo_n "(cached) " >&6
2294else
2295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2296/* end confdefs.h. */
2297$5
2298int
2299main ()
2300{
2301static $2 ac_aggr;
2302if (ac_aggr.$3)
2303return 0;
2304 ;
2305 return 0;
2306}
2307_ACEOF
2308if ac_fn_c_try_compile "$LINENO"; then :
2309 eval "$4=yes"
2310else
2311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h. */
2313$5
2314int
2315main ()
2316{
2317static $2 ac_aggr;
2318if (sizeof ac_aggr.$3)
2319return 0;
2320 ;
2321 return 0;
2322}
2323_ACEOF
2324if ac_fn_c_try_compile "$LINENO"; then :
2325 eval "$4=yes"
2326else
2327 eval "$4=no"
2328fi
2329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2330fi
2331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2332fi
2333eval ac_res=\$$4
2334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2335$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002336 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002337
2338} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002340This file contains any messages produced by compilers while
2341running configure, to aid debugging if configure makes a mistake.
2342
Ned Deily4829bc62016-09-12 17:29:04 -04002343It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002344generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002345
2346 $ $0 $@
2347
2348_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002350{
2351cat <<_ASUNAME
2352## --------- ##
2353## Platform. ##
2354## --------- ##
2355
2356hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2357uname -m = `(uname -m) 2>/dev/null || echo unknown`
2358uname -r = `(uname -r) 2>/dev/null || echo unknown`
2359uname -s = `(uname -s) 2>/dev/null || echo unknown`
2360uname -v = `(uname -v) 2>/dev/null || echo unknown`
2361
2362/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2363/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2364
2365/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2366/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2367/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002368/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002369/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2370/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2371/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2372
2373_ASUNAME
2374
2375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2376for as_dir in $PATH
2377do
2378 IFS=$as_save_IFS
2379 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002380 $as_echo "PATH: $as_dir"
2381 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002382IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002383
2384} >&5
2385
2386cat >&5 <<_ACEOF
2387
2388
2389## ----------- ##
2390## Core tests. ##
2391## ----------- ##
2392
2393_ACEOF
2394
2395
2396# Keep a trace of the command line.
2397# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002398# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002399# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002400# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002401ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002402ac_configure_args0=
2403ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002404ac_must_keep_next=false
2405for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002406do
Skip Montanaro6dead952003-09-25 14:50:04 +00002407 for ac_arg
2408 do
2409 case $ac_arg in
2410 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2411 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2412 | -silent | --silent | --silen | --sile | --sil)
2413 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002414 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 esac
2417 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002418 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002420 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002422 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002424 case $ac_arg in
2425 *=* | --config-cache | -C | -disable-* | --disable-* \
2426 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2427 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2428 | -with-* | --with-* | -without-* | --without-* | --x)
2429 case "$ac_configure_args0 " in
2430 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2431 esac
2432 ;;
2433 -* ) ac_must_keep_next=true ;;
2434 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002436 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 ;;
2438 esac
2439 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002440done
Matthias Kloseb9621712010-04-24 17:59:49 +00002441{ ac_configure_args0=; unset ac_configure_args0;}
2442{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002443
2444# When interrupted or exit'd, cleanup temporary files, and complete
2445# config.log. We remove comments because anyway the quotes in there
2446# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447# WARNING: Use '\'' to represent an apostrophe within the trap.
2448# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002449trap 'exit_status=$?
2450 # Save into config.log some information that might help in debugging.
2451 {
2452 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002453
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002454 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002455## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002456## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002457 echo
2458 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459(
2460 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2461 eval ac_val=\$$ac_var
2462 case $ac_val in #(
2463 *${as_nl}*)
2464 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2466$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 esac
2468 case $ac_var in #(
2469 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002470 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2471 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 esac ;;
2473 esac
2474 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2477 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 "s/'\''/'\''\\\\'\'''\''/g;
2480 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2481 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002482 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002484 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 esac |
2486 sort
2487)
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002489
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002490 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002491## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002492## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 echo
2494 for ac_var in $ac_subst_vars
2495 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 eval ac_val=\$$ac_var
2497 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 done | sort
2502 echo
2503
2504 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002505 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002507## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 echo
2509 for ac_var in $ac_subst_files
2510 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 eval ac_val=\$$ac_var
2512 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 done | sort
2517 echo
2518 fi
2519
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002521 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002522## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002523## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 echo
2527 fi
2528 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002529 $as_echo "$as_me: caught signal $ac_signal"
2530 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 rm -f core *.core core.conftest.* &&
2533 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002536for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002538done
2539ac_signal=0
2540
2541# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002543
Matthias Kloseb9621712010-04-24 17:59:49 +00002544$as_echo "/* confdefs.h */" > confdefs.h
2545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546# Predefined preprocessor variables.
2547
2548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_NAME "$PACKAGE_NAME"
2550_ACEOF
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2554_ACEOF
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_VERSION "$PACKAGE_VERSION"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_STRING "$PACKAGE_STRING"
2562_ACEOF
2563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2566_ACEOF
2567
Matthias Kloseb9621712010-04-24 17:59:49 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_URL "$PACKAGE_URL"
2570_ACEOF
2571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572
2573# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002574# Prefer an explicitly selected file to automatically selected ones.
2575ac_site_file1=NONE
2576ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578 # We do not want a PATH search for config.site.
2579 case $CONFIG_SITE in #((
2580 -*) ac_site_file1=./$CONFIG_SITE;;
2581 */*) ac_site_file1=$CONFIG_SITE;;
2582 *) ac_site_file1=./$CONFIG_SITE;;
2583 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 ac_site_file1=$prefix/share/config.site
2586 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587else
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 ac_site_file1=$ac_default_prefix/share/config.site
2589 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002591for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592do
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 test "x$ac_site_file" = xNONE && continue
2594 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2595 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2596$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002598 . "$ac_site_file" \
2599 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2600$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2601as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002602See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002603 fi
2604done
2605
2606if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 # Some versions of bash will fail to source /dev/null (special files
2608 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2609 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2610 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2611$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2614 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 esac
2616 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002617else
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2619$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 >$cache_file
2621fi
2622
2623# Check that the precious variables saved in the cache have kept the same
2624# value.
2625ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2628 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2630 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 case $ac_old_set,$ac_new_set in
2632 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2634$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 ac_cache_corrupted=: ;;
2636 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2638$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 ac_cache_corrupted=: ;;
2640 ,);;
2641 *)
2642 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 # differences in whitespace do not lead to failure.
2644 ac_old_val_w=`echo x $ac_old_val`
2645 ac_new_val_w=`echo x $ac_new_val`
2646 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2648$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2649 ac_cache_corrupted=:
2650 else
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2652$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2653 eval $ac_var=\$ac_old_val
2654 fi
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2656$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2658$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 fi;;
2660 esac
2661 # Pass precious variables to config.status.
2662 if test "$ac_new_set" = set; then
2663 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 *) ac_arg=$ac_var=$ac_new_val ;;
2666 esac
2667 case " $ac_configure_args " in
2668 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 esac
2671 fi
2672done
2673if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2675$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2677$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002678 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002680## -------------------- ##
2681## Main body of script. ##
2682## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002683
Guido van Rossum7f43da71994-08-01 12:15:30 +00002684ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002686ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2687ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2688ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689
Guido van Rossum627b2d71993-12-24 10:39:16 +00002690
Michael W. Hudson54241132001-12-07 15:38:26 +00002691
Trent Nelson4d4ec652012-10-16 08:51:24 -04002692
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002693if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002694 # If we're building out-of-tree, we need to make sure the following
2695 # resources get picked up before their $srcdir counterparts.
2696 # Objects/ -> typeslots.inc
2697 # Include/ -> Python-ast.h, graminit.h
2698 # Python/ -> importlib.h
2699 # (A side effect of this is that these resources will automatically be
2700 # regenerated when building out-of-tree, regardless of whether or not
2701 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2702 # off.)
2703 BASECPPFLAGS="-IObjects -IInclude -IPython"
2704else
2705 BASECPPFLAGS=""
2706fi
2707
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002708
2709
2710
2711
Victor Stinner9ed34a82017-05-02 22:35:58 +02002712if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002713then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002714# Extract the first word of "git", so it can be a program name with args.
2715set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2717$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002718if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002719 $as_echo_n "(cached) " >&6
2720else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002721 if test -n "$HAS_GIT"; then
2722 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002723else
2724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2725for as_dir in $PATH
2726do
2727 IFS=$as_save_IFS
2728 test -z "$as_dir" && as_dir=.
2729 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002731 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2733 break 2
2734 fi
2735done
2736 done
2737IFS=$as_save_IFS
2738
Ned Deily5c4b0d02017-03-04 00:19:55 -05002739 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002740fi
2741fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002742HAS_GIT=$ac_cv_prog_HAS_GIT
2743if test -n "$HAS_GIT"; then
2744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2745$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002746else
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2748$as_echo "no" >&6; }
2749fi
2750
2751
2752else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002753HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002754fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002755if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002756then
Ned Deily554626a2017-03-20 23:41:52 -04002757 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2758 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002759 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002760else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002761 GITVERSION=""
2762 GITTAG=""
2763 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002764fi
2765
2766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002767ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002768
2769
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002770ac_aux_dir=
2771for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2772 if test -f "$ac_dir/install-sh"; then
2773 ac_aux_dir=$ac_dir
2774 ac_install_sh="$ac_aux_dir/install-sh -c"
2775 break
2776 elif test -f "$ac_dir/install.sh"; then
2777 ac_aux_dir=$ac_dir
2778 ac_install_sh="$ac_aux_dir/install.sh -c"
2779 break
2780 elif test -f "$ac_dir/shtool"; then
2781 ac_aux_dir=$ac_dir
2782 ac_install_sh="$ac_aux_dir/shtool install -c"
2783 break
2784 fi
2785done
2786if test -z "$ac_aux_dir"; then
2787 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2788fi
2789
2790# These three variables are undocumented and unsupported,
2791# and are intended to be withdrawn in a future Autoconf release.
2792# They can cause serious problems if a builder's source tree is in a directory
2793# whose full name contains unusual characters.
2794ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2795ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2796ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2797
2798
2799# Make sure we can run config.sub.
2800$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2801 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2802
2803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2804$as_echo_n "checking build system type... " >&6; }
2805if ${ac_cv_build+:} false; then :
2806 $as_echo_n "(cached) " >&6
2807else
2808 ac_build_alias=$build_alias
2809test "x$ac_build_alias" = x &&
2810 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2811test "x$ac_build_alias" = x &&
2812 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2813ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2814 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2815
2816fi
2817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2818$as_echo "$ac_cv_build" >&6; }
2819case $ac_cv_build in
2820*-*-*) ;;
2821*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2822esac
2823build=$ac_cv_build
2824ac_save_IFS=$IFS; IFS='-'
2825set x $ac_cv_build
2826shift
2827build_cpu=$1
2828build_vendor=$2
2829shift; shift
2830# Remember, the first character of IFS is used to create $*,
2831# except with old shells:
2832build_os=$*
2833IFS=$ac_save_IFS
2834case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2835
2836
2837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2838$as_echo_n "checking host system type... " >&6; }
2839if ${ac_cv_host+:} false; then :
2840 $as_echo_n "(cached) " >&6
2841else
2842 if test "x$host_alias" = x; then
2843 ac_cv_host=$ac_cv_build
2844else
2845 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2846 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2847fi
2848
2849fi
2850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2851$as_echo "$ac_cv_host" >&6; }
2852case $ac_cv_host in
2853*-*-*) ;;
2854*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2855esac
2856host=$ac_cv_host
2857ac_save_IFS=$IFS; IFS='-'
2858set x $ac_cv_host
2859shift
2860host_cpu=$1
2861host_vendor=$2
2862shift; shift
2863# Remember, the first character of IFS is used to create $*,
2864# except with old shells:
2865host_os=$*
2866IFS=$ac_save_IFS
2867case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2868
2869
2870
doko@python.orga10e4a92013-01-25 18:45:12 +01002871
2872
Ned Deilyfcbc2462014-08-22 13:32:49 -07002873# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2874rm -f pybuilddir.txt
2875
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002876for ac_prog in python$PACKAGE_VERSION python3 python
2877do
2878 # Extract the first word of "$ac_prog", so it can be a program name with args.
2879set dummy $ac_prog; ac_word=$2
2880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2881$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002882if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002883 $as_echo_n "(cached) " >&6
2884else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002885 if test -n "$PYTHON_FOR_REGEN"; then
2886 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002887else
2888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2889for as_dir in $PATH
2890do
2891 IFS=$as_save_IFS
2892 test -z "$as_dir" && as_dir=.
2893 for ac_exec_ext in '' $ac_executable_extensions; do
2894 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002895 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2897 break 2
2898 fi
2899done
2900 done
2901IFS=$as_save_IFS
2902
2903fi
2904fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002905PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2906if test -n "$PYTHON_FOR_REGEN"; then
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2908$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002909else
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2911$as_echo "no" >&6; }
2912fi
2913
2914
Victor Stinnera5c62a82017-05-03 18:21:48 +02002915 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002916done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002917test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002918
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002919
2920
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002921if test "$cross_compiling" = yes; then
2922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2923$as_echo_n "checking for python interpreter for cross build... " >&6; }
2924 if test -z "$PYTHON_FOR_BUILD"; then
2925 for interp in python$PACKAGE_VERSION python3 python; do
2926 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002927 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 +02002928 break
2929 fi
2930 interp=
2931 done
2932 if test x$interp = x; then
2933 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2934 fi
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2936$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002937 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 +02002938 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002939elif test "$cross_compiling" = maybe; then
2940 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002941else
2942 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2943fi
2944
2945
Martin v. Löwis11437992002-04-12 09:54:03 +00002946
Benjamin Petersond23f8222009-04-05 19:13:16 +00002947if test "$prefix" != "/"; then
2948 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2949fi
2950
2951
Martin v. Löwis11437992002-04-12 09:54:03 +00002952
2953
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002954# We don't use PACKAGE_ variables, and they cause conflicts
2955# with other autoconf-based packages that include Python.h
2956grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2957rm confdefs.h
2958mv confdefs.h.new confdefs.h
2959
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002960
Ned Deily4829bc62016-09-12 17:29:04 -04002961VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002962
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002963# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002964
2965SOVERSION=1.0
2966
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002967# The later defininition of _XOPEN_SOURCE disables certain features
2968# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2969
Matthias Kloseb9621712010-04-24 17:59:49 +00002970$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002971
2972
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002973# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2974# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2975# them.
2976
Matthias Kloseb9621712010-04-24 17:59:49 +00002977$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002978
2979
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002980# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2981# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2982# them.
2983
Matthias Kloseb9621712010-04-24 17:59:49 +00002984$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002985
2986
Martin v. Löwisd6320502004-08-12 13:45:08 +00002987# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2988# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2989
Matthias Kloseb9621712010-04-24 17:59:49 +00002990$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002991
2992
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002993# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2994# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2995# them.
2996
Matthias Kloseb9621712010-04-24 17:59:49 +00002997$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002998
2999
3000
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003001define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003002
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003003# Arguments passed to configure.
3004
3005CONFIG_ARGS="$ac_configure_args"
3006
Matthias Kloseb9621712010-04-24 17:59:49 +00003007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3008$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003009# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003010if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003011 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003012 case $enableval in
3013 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003014 # Locate the best usable SDK, see Mac/README.txt for more
3015 # information
3016 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003017 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003018 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003019 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3020 if test ! -d "${enableval}"
3021 then
3022 enableval=/
3023 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003024 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003025 ;;
3026 esac
3027 case $enableval in
3028 no)
3029 UNIVERSALSDK=
3030 enable_universalsdk=
3031 ;;
3032 *)
3033 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003034 if test ! -d "${UNIVERSALSDK}"
3035 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003036 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003037 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003038 ;;
3039 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003040
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041
Thomas Wouters477c8d52006-05-27 19:21:47 +00003042else
3043
3044 UNIVERSALSDK=
3045 enable_universalsdk=
3046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003047fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003048
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049if test -n "${UNIVERSALSDK}"
3050then
Matthias Kloseb9621712010-04-24 17:59:49 +00003051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3052$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053else
Matthias Kloseb9621712010-04-24 17:59:49 +00003054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3055$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003056fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003058
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003059
Ned Deily87adb6e2013-10-18 21:09:56 -07003060ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003061
Ned Deilycbfb9a52012-06-23 16:02:19 -07003062# For backward compatibility reasons we prefer to select '32-bit' if available,
3063# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003064UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003065if test "`uname -s`" = "Darwin"
3066then
3067 if test -n "${UNIVERSALSDK}"
3068 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003069 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003070 then
3071 UNIVERSAL_ARCHS="intel"
3072 fi
3073 fi
3074fi
3075
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003076
Matthias Kloseb9621712010-04-24 17:59:49 +00003077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3078$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003079
3080# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003081if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003082 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003083 UNIVERSAL_ARCHS="$withval"
3084
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003085fi
3086
Ned Deily87adb6e2013-10-18 21:09:56 -07003087if test -n "${UNIVERSALSDK}"
3088then
3089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3090$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3091else
3092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3093$as_echo "no" >&6; }
3094fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003095
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003096
3097# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003098if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003099 withval=$with_framework_name;
3100 PYTHONFRAMEWORK=${withval}
3101 PYTHONFRAMEWORKDIR=${withval}.framework
3102 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3103
3104else
3105
3106 PYTHONFRAMEWORK=Python
3107 PYTHONFRAMEWORKDIR=Python.framework
3108 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3109
3110fi
3111
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003112# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003113if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003114 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003115 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003116 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003117 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003118 esac
3119 case $enableval in
3120 no)
3121 PYTHONFRAMEWORK=
3122 PYTHONFRAMEWORKDIR=no-framework
3123 PYTHONFRAMEWORKPREFIX=
3124 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003125 FRAMEWORKINSTALLFIRST=
3126 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003127 FRAMEWORKALTINSTALLFIRST=
3128 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003129 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003130 if test "x${prefix}" = "xNONE"; then
3131 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3132 else
3133 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3134 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003135 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003136 ;;
3137 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003138 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003139 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003140 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003141 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003142 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3143 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003144 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003145 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003146
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003147 if test "x${prefix}" = "xNONE" ; then
3148 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003149
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003150 else
3151 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3152 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003153
3154 case "${enableval}" in
3155 /System*)
3156 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3157 if test "${prefix}" = "NONE" ; then
3158 # See below
3159 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3160 fi
3161 ;;
3162
3163 /Library*)
3164 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3165 ;;
3166
3167 */Library/Frameworks)
3168 MDIR="`dirname "${enableval}"`"
3169 MDIR="`dirname "${MDIR}"`"
3170 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3171
3172 if test "${prefix}" = "NONE"; then
3173 # User hasn't specified the
3174 # --prefix option, but wants to install
3175 # the framework in a non-default location,
3176 # ensure that the compatibility links get
3177 # installed relative to that prefix as well
3178 # instead of in /usr/local.
3179 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3180 fi
3181 ;;
3182
3183 *)
3184 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3185 ;;
3186 esac
3187
Jack Jansen127e56e2001-09-11 14:41:54 +00003188 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003189
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003190 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003192 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003194 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003195
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003196 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3197
3198 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3199
Jack Jansene578a632001-08-15 01:27:14 +00003200 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003201
Guido van Rossum563e7081996-09-10 18:20:48 +00003202else
Martin v. Löwis11437992002-04-12 09:54:03 +00003203
Jack Jansene578a632001-08-15 01:27:14 +00003204 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003205 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003206 PYTHONFRAMEWORKPREFIX=
3207 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003208 FRAMEWORKINSTALLFIRST=
3209 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003210 FRAMEWORKALTINSTALLFIRST=
3211 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003212 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003213 if test "x${prefix}" = "xNONE" ; then
3214 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3215 else
3216 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3217 fi
Jack Jansene578a632001-08-15 01:27:14 +00003218 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003219
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003220
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003221fi
3222
Thomas Wouters477c8d52006-05-27 19:21:47 +00003223
3224
Michael W. Hudson54241132001-12-07 15:38:26 +00003225
3226
3227
3228
Jack Jansene578a632001-08-15 01:27:14 +00003229
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003230
3231
3232
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003233
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003234
Ned Deilyb8f944f2013-11-21 22:42:25 -08003235
Jack Jansene578a632001-08-15 01:27:14 +00003236##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003237## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003238## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003239##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003240# Set name for machine-dependent library files
3241
Matthias Kloseb9621712010-04-24 17:59:49 +00003242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3243$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003244if test -z "$MACHDEP"
3245then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003246 # avoid using uname for cross builds
3247 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003248 # ac_sys_system and ac_sys_release are used for setting
3249 # a lot of different things including 'define_xopen_source'
3250 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003251 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003252 *-*-linux-android*)
3253 ac_sys_system=Linux-android
3254 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003255 *-*-linux*)
3256 ac_sys_system=Linux
3257 ;;
3258 *-*-cygwin*)
3259 ac_sys_system=Cygwin
3260 ;;
3261 *)
3262 # for now, limit cross builds to known configurations
3263 MACHDEP="unknown"
3264 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3265 esac
3266 ac_sys_release=
3267 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003268 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003269 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003270 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003271 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003272 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003273 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003274 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003275 fi
3276 ac_md_system=`echo $ac_sys_system |
3277 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3278 ac_md_release=`echo $ac_sys_release |
3279 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3280 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003281
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003282 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003283 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003284 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003285 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003286 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003287 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003288 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003289fi
Guido van Rossum91922671997-10-09 20:24:13 +00003290
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003291
3292if test "$cross_compiling" = yes; then
3293 case "$host" in
3294 *-*-linux*)
3295 case "$host_cpu" in
3296 arm*)
3297 _host_cpu=arm
3298 ;;
3299 *)
3300 _host_cpu=$host_cpu
3301 esac
3302 ;;
3303 *-*-cygwin*)
3304 _host_cpu=
3305 ;;
3306 *)
3307 # for now, limit cross builds to known configurations
3308 MACHDEP="unknown"
3309 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3310 esac
3311 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3312fi
3313
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003314# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3315# disable features if it is defined, without any means to access these
3316# features as extensions. For these systems, we skip the definition of
3317# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3318# some feature, make sure there is no alternative way to access this
3319# feature. Also, when using wildcards, make sure you have verified the
3320# need for not defining _XOPEN_SOURCE on all systems matching the
3321# wildcard, and that the wildcard does not include future systems
3322# (which may remove their limitations).
3323case $ac_sys_system/$ac_sys_release in
3324 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3325 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003326 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003327 # In addition, Stefan Krah confirms that issue #1244610 exists through
3328 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003329 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003330 define_xopen_source=no
3331 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3332 # also defined. This can be overridden by defining _BSD_SOURCE
3333 # As this has a different meaning on Linux, only define it on OpenBSD
3334
Matthias Kloseb9621712010-04-24 17:59:49 +00003335$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003336
3337 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003338 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003339 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3340 # also defined. This can be overridden by defining _BSD_SOURCE
3341 # As this has a different meaning on Linux, only define it on OpenBSD
3342
Matthias Kloseb9621712010-04-24 17:59:49 +00003343$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003344
3345 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003346 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3347 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3348 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003349 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 +00003350 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003351 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3352 # request to enable features supported by the standard as a request
3353 # to disable features not supported by the standard. The best way
3354 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3355 # entirely and define __EXTENSIONS__ instead.
3356 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003357 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003358 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3359 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003360 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003361 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003362 define_xopen_source=no;;
3363 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003364 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003365 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003366 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003367 # On FreeBSD 4, the math functions C89 does not cover are never defined
3368 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3369 FreeBSD/4.*)
3370 define_xopen_source=no;;
3371 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3372 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3373 # identifies itself as Darwin/7.*
3374 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3375 # disables platform specific features beyond repair.
3376 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3377 # has no effect, don't bother defining them
3378 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003379 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003380 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003381 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003382 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3383 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3384 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003385 AIX/4)
3386 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003387 AIX/5)
3388 if test `uname -r` -eq 1; then
3389 define_xopen_source=no
3390 fi
3391 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003392 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3393 # defining NI_NUMERICHOST.
3394 QNX/6.3.2)
3395 define_xopen_source=no
3396 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003397
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003398esac
3399
3400if test $define_xopen_source = yes
3401then
Victor Stinner14d098d2011-09-07 22:29:43 +02003402 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003403
Victor Stinner14d098d2011-09-07 22:29:43 +02003404$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003405
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003406
3407 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3408 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3409 # several APIs are not declared. Since this is also needed in some
3410 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
Matthias Kloseb9621712010-04-24 17:59:49 +00003412$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
3414
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003415
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003416$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003417
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003418fi
3419
Christian Heimes647cd872013-12-07 23:39:33 +01003420# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3421case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003422 hp*|HP*)
3423 define_stdc_a1=yes;;
3424 *)
3425 define_stdc_a1=no;;
3426esac
3427
3428if test $define_stdc_a1 = yes
3429then
Christian Heimes647cd872013-12-07 23:39:33 +01003430
3431$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3432
Christian Heimesb02bcae2013-12-08 15:21:08 +01003433fi
Christian Heimes647cd872013-12-07 23:39:33 +01003434
Guido van Rossum91922671997-10-09 20:24:13 +00003435#
3436# SGI compilers allow the specification of the both the ABI and the
3437# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003438# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003439#
3440# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3441# thus supply support for various ABI/ISA combinations. The MACHDEP
3442# variable is also adjusted.
3443#
3444
3445if test ! -z "$SGI_ABI"
3446then
3447 CC="cc $SGI_ABI"
3448 LDFLAGS="$SGI_ABI $LDFLAGS"
3449 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3450fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3452$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003453
Jack Jansen6b08a402004-06-03 12:41:45 +00003454# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3455# it may influence the way we can build extensions, so distutils
3456# needs to check it
3457
Thomas Wouters477c8d52006-05-27 19:21:47 +00003458
Jack Jansen6b08a402004-06-03 12:41:45 +00003459CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003460EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003461
Guido van Rossum627b2d71993-12-24 10:39:16 +00003462# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003463
3464# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3465# for debug/optimization stuff. BASECFLAGS is for flags that are required
3466# just to get things to compile and link. Users are free to override OPT
3467# when running configure or make. The build should not break if they do.
3468# BASECFLAGS should generally not be messed with, however.
3469
3470# XXX shouldn't some/most/all of this code be merged with the stuff later
3471# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3473$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003474
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003475# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003476if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003477 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003478 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003479 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003480 without_gcc=yes;;
3481 yes) CC=gcc
3482 without_gcc=no;;
3483 *) CC=$withval
3484 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003485 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003486else
Martin v. Löwis11437992002-04-12 09:54:03 +00003487
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003488 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003489 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003490 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003491 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003492 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003493fi
3494
Matthias Kloseb9621712010-04-24 17:59:49 +00003495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3496$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003497
Zachary Ware5af85642015-12-21 12:09:17 -06003498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3499$as_echo_n "checking for --with-icc... " >&6; }
3500
3501# Check whether --with-icc was given.
3502if test "${with_icc+set}" = set; then :
3503 withval=$with_icc;
3504 case $withval in
3505 no) CC=${CC:-cc}
3506 with_icc=no;;
3507 yes) CC=icc
3508 CXX=icpc
3509 with_icc=yes;;
3510 *) CC=$withval
3511 with_icc=$withval;;
3512 esac
3513else
3514
3515 with_icc=no
3516fi
3517
3518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3519$as_echo "$with_icc" >&6; }
3520
Guido van Rossum8b131c51995-03-09 14:10:13 +00003521# If the user switches compilers, we can't believe the cache
3522if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3523then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003524 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003525(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003526fi
3527
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003528# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3529# when the compiler supports them, but we don't always want -O2, and
3530# we set -g later.
3531if test -z "$CFLAGS"; then
3532 CFLAGS=
3533fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003534
3535if test "$ac_sys_system" = "Darwin"
3536then
3537 # Compiler selection on MacOSX is more complicated than
3538 # AC_PROG_CC can handle, see Mac/README.txt for more
3539 # information
3540 if test -z "${CC}"
3541 then
3542 found_gcc=
3543 found_clang=
3544 as_save_IFS=$IFS; IFS=:
3545 for as_dir in $PATH
3546 do
3547 IFS=$as_save_IFS
3548 if test -x $as_dir/gcc; then
3549 if test -z "${found_gcc}"; then
3550 found_gcc=$as_dir/gcc
3551 fi
3552 fi
3553 if test -x $as_dir/clang; then
3554 if test -z "${found_clang}"; then
3555 found_clang=$as_dir/clang
3556 fi
3557 fi
3558 done
3559 IFS=$as_save_IFS
3560
3561 if test -n "$found_gcc" -a -n "$found_clang"
3562 then
3563 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3564 then
3565 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3566$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3567 CC="$found_clang"
3568 CXX="$found_clang++"
3569 fi
3570
3571
3572 elif test -z "$found_gcc" -a -n "$found_clang"
3573 then
3574 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3575$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3576 CC="$found_clang"
3577 CXX="$found_clang++"
3578
3579 elif test -z "$found_gcc" -a -z "$found_clang"
3580 then
3581 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3582 if test -n "${found_clang}"
3583 then
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3585$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3586 CC="${found_clang}"
3587 CXX="`/usr/bin/xcrun -find clang++`"
3588
3589 # else: use default behaviour
3590 fi
3591 fi
3592 fi
3593fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003594ac_ext=c
3595ac_cpp='$CPP $CPPFLAGS'
3596ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3597ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3598ac_compiler_gnu=$ac_cv_c_compiler_gnu
3599if test -n "$ac_tool_prefix"; then
3600 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3601set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3603$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003604if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003605 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003606else
3607 if test -n "$CC"; then
3608 ac_cv_prog_CC="$CC" # Let the user override the test.
3609else
Martin v. Löwis11437992002-04-12 09:54:03 +00003610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3611for as_dir in $PATH
3612do
3613 IFS=$as_save_IFS
3614 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003615 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003616 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003617 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 $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 +00003619 break 2
3620 fi
3621done
Matthias Kloseb9621712010-04-24 17:59:49 +00003622 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003623IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003624
Jack Jansendd19cf82001-12-06 22:36:17 +00003625fi
3626fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003627CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003628if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3630$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003631else
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3633$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003634fi
3635
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003636
Martin v. Löwis11437992002-04-12 09:54:03 +00003637fi
3638if test -z "$ac_cv_prog_CC"; then
3639 ac_ct_CC=$CC
3640 # Extract the first word of "gcc", so it can be a program name with args.
3641set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3643$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003644if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003646else
3647 if test -n "$ac_ct_CC"; then
3648 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3649else
3650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3651for as_dir in $PATH
3652do
3653 IFS=$as_save_IFS
3654 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003655 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003656 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003657 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003658 $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 +00003659 break 2
3660 fi
3661done
Matthias Kloseb9621712010-04-24 17:59:49 +00003662 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003663IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003664
3665fi
3666fi
3667ac_ct_CC=$ac_cv_prog_ac_ct_CC
3668if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3670$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003671else
Matthias Kloseb9621712010-04-24 17:59:49 +00003672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3673$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003674fi
3675
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003676 if test "x$ac_ct_CC" = x; then
3677 CC=""
3678 else
3679 case $cross_compiling:$ac_tool_warned in
3680yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003681{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3682$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003683ac_tool_warned=yes ;;
3684esac
3685 CC=$ac_ct_CC
3686 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003687else
3688 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003689fi
3690
Jack Jansendd19cf82001-12-06 22:36:17 +00003691if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692 if test -n "$ac_tool_prefix"; then
3693 # 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 +00003694set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3696$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003697if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003698 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003699else
3700 if test -n "$CC"; then
3701 ac_cv_prog_CC="$CC" # Let the user override the test.
3702else
Martin v. Löwis11437992002-04-12 09:54:03 +00003703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3704for as_dir in $PATH
3705do
3706 IFS=$as_save_IFS
3707 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003708 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003709 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003710 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 $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 +00003712 break 2
3713 fi
3714done
Matthias Kloseb9621712010-04-24 17:59:49 +00003715 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003716IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003717
3718fi
3719fi
3720CC=$ac_cv_prog_CC
3721if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3723$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003724else
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3726$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003727fi
3728
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729
Martin v. Löwis11437992002-04-12 09:54:03 +00003730 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003731fi
3732if test -z "$CC"; then
3733 # Extract the first word of "cc", so it can be a program name with args.
3734set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3736$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003737if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003739else
3740 if test -n "$CC"; then
3741 ac_cv_prog_CC="$CC" # Let the user override the test.
3742else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003743 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3745for as_dir in $PATH
3746do
3747 IFS=$as_save_IFS
3748 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003750 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003751 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3752 ac_prog_rejected=yes
3753 continue
3754 fi
3755 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 $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 +00003757 break 2
3758 fi
3759done
Matthias Kloseb9621712010-04-24 17:59:49 +00003760 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003761IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003762
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003763if test $ac_prog_rejected = yes; then
3764 # We found a bogon in the path, so make sure we never use it.
3765 set dummy $ac_cv_prog_CC
3766 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003768 # We chose a different compiler from the bogus one.
3769 # However, it has the same basename, so the bogon will be chosen
3770 # first if we set CC to just the basename; use the full file name.
3771 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003772 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003773 fi
3774fi
3775fi
3776fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003777CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003778if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3780$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003781else
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3783$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003784fi
3785
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786
Martin v. Löwis11437992002-04-12 09:54:03 +00003787fi
3788if test -z "$CC"; then
3789 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003790 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003791 do
3792 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3793set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3795$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003796if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003798else
3799 if test -n "$CC"; then
3800 ac_cv_prog_CC="$CC" # Let the user override the test.
3801else
Martin v. Löwis11437992002-04-12 09:54:03 +00003802as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3803for as_dir in $PATH
3804do
3805 IFS=$as_save_IFS
3806 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003808 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003809 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 $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 +00003811 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003812 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003813done
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003815IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003816
3817fi
3818fi
3819CC=$ac_cv_prog_CC
3820if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3822$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003823else
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3825$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003826fi
3827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003828
Martin v. Löwis11437992002-04-12 09:54:03 +00003829 test -n "$CC" && break
3830 done
3831fi
3832if test -z "$CC"; then
3833 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003834 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003835do
3836 # Extract the first word of "$ac_prog", so it can be a program name with args.
3837set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3839$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003840if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003841 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003842else
3843 if test -n "$ac_ct_CC"; then
3844 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3845else
3846as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3847for as_dir in $PATH
3848do
3849 IFS=$as_save_IFS
3850 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003852 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003853 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003854 $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 +00003855 break 2
3856 fi
3857done
Matthias Kloseb9621712010-04-24 17:59:49 +00003858 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003859IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003860
Martin v. Löwis11437992002-04-12 09:54:03 +00003861fi
3862fi
3863ac_ct_CC=$ac_cv_prog_ac_ct_CC
3864if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3866$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003867else
Matthias Kloseb9621712010-04-24 17:59:49 +00003868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3869$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003870fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003871
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003872
Martin v. Löwis11437992002-04-12 09:54:03 +00003873 test -n "$ac_ct_CC" && break
3874done
Michael W. Hudson54241132001-12-07 15:38:26 +00003875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003876 if test "x$ac_ct_CC" = x; then
3877 CC=""
3878 else
3879 case $cross_compiling:$ac_tool_warned in
3880yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003881{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3882$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003883ac_tool_warned=yes ;;
3884esac
3885 CC=$ac_ct_CC
3886 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003887fi
3888
3889fi
3890
3891
Matthias Kloseb9621712010-04-24 17:59:49 +00003892test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3893$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003894as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003895See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003896
3897# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003898$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3899set X $ac_compile
3900ac_compiler=$2
3901for ac_option in --version -v -V -qversion; do
3902 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003903case "(($ac_try" in
3904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3905 *) ac_try_echo=$ac_try;;
3906esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003907eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3908$as_echo "$ac_try_echo"; } >&5
3909 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003910 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003911 if test -s conftest.err; then
3912 sed '10a\
3913... rest of stderr output deleted ...
3914 10q' conftest.err >conftest.er1
3915 cat conftest.er1 >&5
3916 fi
3917 rm -f conftest.er1 conftest.err
3918 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3919 test $ac_status = 0; }
3920done
Martin v. Löwis11437992002-04-12 09:54:03 +00003921
Matthias Kloseb9621712010-04-24 17:59:49 +00003922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003923/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003924
Martin v. Löwis11437992002-04-12 09:54:03 +00003925int
3926main ()
3927{
3928
3929 ;
3930 return 0;
3931}
3932_ACEOF
3933ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003934ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003935# Try to create an executable without -o first, disregard a.out.
3936# It will help us diagnose broken compilers, and finding out an intuition
3937# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3939$as_echo_n "checking whether the C compiler works... " >&6; }
3940ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3941
3942# The possible output files:
3943ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3944
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945ac_rmfiles=
3946for ac_file in $ac_files
3947do
3948 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003949 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003950 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3951 esac
3952done
3953rm -f $ac_rmfiles
3954
Matthias Kloseb9621712010-04-24 17:59:49 +00003955if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956case "(($ac_try" in
3957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3958 *) ac_try_echo=$ac_try;;
3959esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003960eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3961$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003962 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003963 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003964 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3965 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3967# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3968# in a Makefile. We should not override ac_cv_exeext if it was cached,
3969# so that the user can short-circuit this test for compilers unknown to
3970# Autoconf.
3971for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003972do
3973 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003974 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003975 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003976 ;;
3977 [ab].out )
3978 # We found the default executable, but exeext='' is most
3979 # certainly right.
3980 break;;
3981 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003982 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003983 then :; else
3984 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3985 fi
3986 # We set ac_cv_exeext here because the later test for it is not
3987 # safe: cross compilers may not add the suffix if given an `-o'
3988 # argument, so we may need to know it at that point already.
3989 # Even if this section looks crufty: it has the advantage of
3990 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003991 break;;
3992 * )
3993 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003994 esac
3995done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003996test "$ac_cv_exeext" = no && ac_cv_exeext=
3997
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003998else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003999 ac_file=''
4000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004001if test -z "$ac_file"; then :
4002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4003$as_echo "no" >&6; }
4004$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004005sed 's/^/| /' conftest.$ac_ext >&5
4006
Matthias Kloseb9621712010-04-24 17:59:49 +00004007{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4008$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004009as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004010See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004011else
4012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4013$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4016$as_echo_n "checking for C compiler default output file name... " >&6; }
4017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4018$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004019ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004020
Matthias Kloseb9621712010-04-24 17:59:49 +00004021rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004022ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4024$as_echo_n "checking for suffix of executables... " >&6; }
4025if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004026case "(($ac_try" in
4027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4028 *) ac_try_echo=$ac_try;;
4029esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004030eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4031$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004032 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004033 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004034 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4035 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004036 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4037# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4038# work properly (i.e., refer to `conftest.exe'), while it won't with
4039# `rm'.
4040for ac_file in conftest.exe conftest conftest.*; do
4041 test -f "$ac_file" || continue
4042 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004043 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004044 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4045 break;;
4046 * ) break;;
4047 esac
4048done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004049else
Matthias Kloseb9621712010-04-24 17:59:49 +00004050 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4051$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004052as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004053See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004054fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004055rm -f conftest conftest$ac_cv_exeext
4056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4057$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004058
4059rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004060EXEEXT=$ac_cv_exeext
4061ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4063/* end confdefs.h. */
4064#include <stdio.h>
4065int
4066main ()
4067{
4068FILE *f = fopen ("conftest.out", "w");
4069 return ferror (f) || fclose (f) != 0;
4070
4071 ;
4072 return 0;
4073}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004075ac_clean_files="$ac_clean_files conftest.out"
4076# Check that the compiler produces executables we can run. If not, either
4077# the compiler is broken, or we cross compile.
4078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4079$as_echo_n "checking whether we are cross compiling... " >&6; }
4080if test "$cross_compiling" != yes; then
4081 { { ac_try="$ac_link"
4082case "(($ac_try" in
4083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4084 *) ac_try_echo=$ac_try;;
4085esac
4086eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4087$as_echo "$ac_try_echo"; } >&5
4088 (eval "$ac_link") 2>&5
4089 ac_status=$?
4090 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4091 test $ac_status = 0; }
4092 if { ac_try='./conftest$ac_cv_exeext'
4093 { { case "(($ac_try" in
4094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4095 *) ac_try_echo=$ac_try;;
4096esac
4097eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4098$as_echo "$ac_try_echo"; } >&5
4099 (eval "$ac_try") 2>&5
4100 ac_status=$?
4101 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4102 test $ac_status = 0; }; }; then
4103 cross_compiling=no
4104 else
4105 if test "$cross_compiling" = maybe; then
4106 cross_compiling=yes
4107 else
4108 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4109$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004110as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004111If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004112See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004113 fi
4114 fi
4115fi
4116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4117$as_echo "$cross_compiling" >&6; }
4118
4119rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4120ac_clean_files=$ac_clean_files_save
4121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4122$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004123if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004124 $as_echo_n "(cached) " >&6
4125else
4126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004127/* end confdefs.h. */
4128
4129int
4130main ()
4131{
4132
4133 ;
4134 return 0;
4135}
4136_ACEOF
4137rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004138if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004139case "(($ac_try" in
4140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4141 *) ac_try_echo=$ac_try;;
4142esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004143eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4144$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004145 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004146 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004147 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4148 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004149 for ac_file in conftest.o conftest.obj conftest.*; do
4150 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004151 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004152 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004153 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4154 break;;
4155 esac
4156done
4157else
Matthias Kloseb9621712010-04-24 17:59:49 +00004158 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004159sed 's/^/| /' conftest.$ac_ext >&5
4160
Matthias Kloseb9621712010-04-24 17:59:49 +00004161{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4162$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004163as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004164See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004165fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004166rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004167fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4169$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004170OBJEXT=$ac_cv_objext
4171ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4173$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004174if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004175 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004176else
Matthias Kloseb9621712010-04-24 17:59:49 +00004177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004179
Martin v. Löwis11437992002-04-12 09:54:03 +00004180int
4181main ()
4182{
4183#ifndef __GNUC__
4184 choke me
4185#endif
4186
4187 ;
4188 return 0;
4189}
4190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004191if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004192 ac_compiler_gnu=yes
4193else
Matthias Kloseb9621712010-04-24 17:59:49 +00004194 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004197ac_cv_c_compiler_gnu=$ac_compiler_gnu
4198
4199fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4201$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4202if test $ac_compiler_gnu = yes; then
4203 GCC=yes
4204else
4205 GCC=
4206fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004207ac_test_CFLAGS=${CFLAGS+set}
4208ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4210$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004211if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004212 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004213else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004214 ac_save_c_werror_flag=$ac_c_werror_flag
4215 ac_c_werror_flag=yes
4216 ac_cv_prog_cc_g=no
4217 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004220
Martin v. Löwis11437992002-04-12 09:54:03 +00004221int
4222main ()
4223{
4224
4225 ;
4226 return 0;
4227}
4228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004229if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004230 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004231else
Matthias Kloseb9621712010-04-24 17:59:49 +00004232 CFLAGS=""
4233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004234/* end confdefs.h. */
4235
4236int
4237main ()
4238{
4239
4240 ;
4241 return 0;
4242}
4243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004244if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245
Matthias Kloseb9621712010-04-24 17:59:49 +00004246else
4247 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004248 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004250/* end confdefs.h. */
4251
4252int
4253main ()
4254{
4255
4256 ;
4257 return 0;
4258}
4259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004260if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4268 ac_c_werror_flag=$ac_save_c_werror_flag
4269fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4271$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004272if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004274elif test $ac_cv_prog_cc_g = yes; then
4275 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004276 CFLAGS="-g -O2"
4277 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004278 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004279 fi
4280else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004281 if test "$GCC" = yes; then
4282 CFLAGS="-O2"
4283 else
4284 CFLAGS=
4285 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004286fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4288$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004289if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004290 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004291else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004292 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004293ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004295/* end confdefs.h. */
4296#include <stdarg.h>
4297#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004298struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004299/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4300struct buf { int x; };
4301FILE * (*rcsopen) (struct buf *, struct stat *, int);
4302static char *e (p, i)
4303 char **p;
4304 int i;
4305{
4306 return p[i];
4307}
4308static char *f (char * (*g) (char **, int), char **p, ...)
4309{
4310 char *s;
4311 va_list v;
4312 va_start (v,p);
4313 s = g (p, va_arg (v,int));
4314 va_end (v);
4315 return s;
4316}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004317
4318/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4319 function prototypes and stuff, but not '\xHH' hex character constants.
4320 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004321 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004322 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4323 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004324 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004325int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4326
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4328 inside strings and character constants. */
4329#define FOO(x) 'x'
4330int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4331
Skip Montanaro6dead952003-09-25 14:50:04 +00004332int test (int i, double x);
4333struct s1 {int (*f) (int a);};
4334struct s2 {int (*f) (double a);};
4335int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4336int argc;
4337char **argv;
4338int
4339main ()
4340{
4341return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4342 ;
4343 return 0;
4344}
4345_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4347 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004348do
4349 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004350 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004353rm -f core conftest.err conftest.$ac_objext
4354 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004355done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004357CC=$ac_save_CC
4358
4359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360# AC_CACHE_VAL
4361case "x$ac_cv_prog_cc_c89" in
4362 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4364$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4367$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004368 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4371$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004372esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004373if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004374
Matthias Kloseb9621712010-04-24 17:59:49 +00004375fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004376
Martin v. Löwis11437992002-04-12 09:54:03 +00004377ac_ext=c
4378ac_cpp='$CPP $CPPFLAGS'
4379ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4380ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4381ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004382
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004383ac_ext=c
4384ac_cpp='$CPP $CPPFLAGS'
4385ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4386ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4387ac_compiler_gnu=$ac_cv_c_compiler_gnu
4388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4389$as_echo_n "checking how to run the C preprocessor... " >&6; }
4390# On Suns, sometimes $CPP names a directory.
4391if test -n "$CPP" && test -d "$CPP"; then
4392 CPP=
4393fi
4394if test -z "$CPP"; then
4395 if ${ac_cv_prog_CPP+:} false; then :
4396 $as_echo_n "(cached) " >&6
4397else
4398 # Double quotes because CPP needs to be expanded
4399 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4400 do
4401 ac_preproc_ok=false
4402for ac_c_preproc_warn_flag in '' yes
4403do
4404 # Use a header file that comes with gcc, so configuring glibc
4405 # with a fresh cross-compiler works.
4406 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4407 # <limits.h> exists even on freestanding compilers.
4408 # On the NeXT, cc -E runs the code through the compiler's parser,
4409 # not just through cpp. "Syntax error" is here to catch this case.
4410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4411/* end confdefs.h. */
4412#ifdef __STDC__
4413# include <limits.h>
4414#else
4415# include <assert.h>
4416#endif
4417 Syntax error
4418_ACEOF
4419if ac_fn_c_try_cpp "$LINENO"; then :
4420
4421else
4422 # Broken: fails on valid input.
4423continue
4424fi
4425rm -f conftest.err conftest.i conftest.$ac_ext
4426
4427 # OK, works on sane cases. Now check whether nonexistent headers
4428 # can be detected and how.
4429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4430/* end confdefs.h. */
4431#include <ac_nonexistent.h>
4432_ACEOF
4433if ac_fn_c_try_cpp "$LINENO"; then :
4434 # Broken: success on invalid input.
4435continue
4436else
4437 # Passes both tests.
4438ac_preproc_ok=:
4439break
4440fi
4441rm -f conftest.err conftest.i conftest.$ac_ext
4442
4443done
4444# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4445rm -f conftest.i conftest.err conftest.$ac_ext
4446if $ac_preproc_ok; then :
4447 break
4448fi
4449
4450 done
4451 ac_cv_prog_CPP=$CPP
4452
4453fi
4454 CPP=$ac_cv_prog_CPP
4455else
4456 ac_cv_prog_CPP=$CPP
4457fi
4458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4459$as_echo "$CPP" >&6; }
4460ac_preproc_ok=false
4461for ac_c_preproc_warn_flag in '' yes
4462do
4463 # Use a header file that comes with gcc, so configuring glibc
4464 # with a fresh cross-compiler works.
4465 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4466 # <limits.h> exists even on freestanding compilers.
4467 # On the NeXT, cc -E runs the code through the compiler's parser,
4468 # not just through cpp. "Syntax error" is here to catch this case.
4469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4470/* end confdefs.h. */
4471#ifdef __STDC__
4472# include <limits.h>
4473#else
4474# include <assert.h>
4475#endif
4476 Syntax error
4477_ACEOF
4478if ac_fn_c_try_cpp "$LINENO"; then :
4479
4480else
4481 # Broken: fails on valid input.
4482continue
4483fi
4484rm -f conftest.err conftest.i conftest.$ac_ext
4485
4486 # OK, works on sane cases. Now check whether nonexistent headers
4487 # can be detected and how.
4488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4489/* end confdefs.h. */
4490#include <ac_nonexistent.h>
4491_ACEOF
4492if ac_fn_c_try_cpp "$LINENO"; then :
4493 # Broken: success on invalid input.
4494continue
4495else
4496 # Passes both tests.
4497ac_preproc_ok=:
4498break
4499fi
4500rm -f conftest.err conftest.i conftest.$ac_ext
4501
4502done
4503# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4504rm -f conftest.i conftest.err conftest.$ac_ext
4505if $ac_preproc_ok; then :
4506
4507else
4508 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4509$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4510as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4511See \`config.log' for more details" "$LINENO" 5; }
4512fi
4513
4514ac_ext=c
4515ac_cpp='$CPP $CPPFLAGS'
4516ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4517ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4518ac_compiler_gnu=$ac_cv_c_compiler_gnu
4519
4520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4521$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4522if ${ac_cv_path_GREP+:} false; then :
4523 $as_echo_n "(cached) " >&6
4524else
4525 if test -z "$GREP"; then
4526 ac_path_GREP_found=false
4527 # Loop through the user's path and test for each of PROGNAME-LIST
4528 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4529for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4530do
4531 IFS=$as_save_IFS
4532 test -z "$as_dir" && as_dir=.
4533 for ac_prog in grep ggrep; do
4534 for ac_exec_ext in '' $ac_executable_extensions; do
4535 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4536 as_fn_executable_p "$ac_path_GREP" || continue
4537# Check for GNU ac_path_GREP and select it if it is found.
4538 # Check for GNU $ac_path_GREP
4539case `"$ac_path_GREP" --version 2>&1` in
4540*GNU*)
4541 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4542*)
4543 ac_count=0
4544 $as_echo_n 0123456789 >"conftest.in"
4545 while :
4546 do
4547 cat "conftest.in" "conftest.in" >"conftest.tmp"
4548 mv "conftest.tmp" "conftest.in"
4549 cp "conftest.in" "conftest.nl"
4550 $as_echo 'GREP' >> "conftest.nl"
4551 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4552 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4553 as_fn_arith $ac_count + 1 && ac_count=$as_val
4554 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4555 # Best one so far, save it but keep looking for a better one
4556 ac_cv_path_GREP="$ac_path_GREP"
4557 ac_path_GREP_max=$ac_count
4558 fi
4559 # 10*(2^10) chars as input seems more than enough
4560 test $ac_count -gt 10 && break
4561 done
4562 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4563esac
4564
4565 $ac_path_GREP_found && break 3
4566 done
4567 done
4568 done
4569IFS=$as_save_IFS
4570 if test -z "$ac_cv_path_GREP"; then
4571 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4572 fi
4573else
4574 ac_cv_path_GREP=$GREP
4575fi
4576
4577fi
4578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4579$as_echo "$ac_cv_path_GREP" >&6; }
4580 GREP="$ac_cv_path_GREP"
4581
4582
Łukasz Langaa785c872016-09-09 17:37:37 -07004583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4584$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4585if ${ac_cv_path_SED+:} false; then :
4586 $as_echo_n "(cached) " >&6
4587else
4588 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4589 for ac_i in 1 2 3 4 5 6 7; do
4590 ac_script="$ac_script$as_nl$ac_script"
4591 done
4592 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4593 { ac_script=; unset ac_script;}
4594 if test -z "$SED"; then
4595 ac_path_SED_found=false
4596 # Loop through the user's path and test for each of PROGNAME-LIST
4597 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4598for as_dir in $PATH
4599do
4600 IFS=$as_save_IFS
4601 test -z "$as_dir" && as_dir=.
4602 for ac_prog in sed gsed; do
4603 for ac_exec_ext in '' $ac_executable_extensions; do
4604 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4605 as_fn_executable_p "$ac_path_SED" || continue
4606# Check for GNU ac_path_SED and select it if it is found.
4607 # Check for GNU $ac_path_SED
4608case `"$ac_path_SED" --version 2>&1` in
4609*GNU*)
4610 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4611*)
4612 ac_count=0
4613 $as_echo_n 0123456789 >"conftest.in"
4614 while :
4615 do
4616 cat "conftest.in" "conftest.in" >"conftest.tmp"
4617 mv "conftest.tmp" "conftest.in"
4618 cp "conftest.in" "conftest.nl"
4619 $as_echo '' >> "conftest.nl"
4620 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4621 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4622 as_fn_arith $ac_count + 1 && ac_count=$as_val
4623 if test $ac_count -gt ${ac_path_SED_max-0}; then
4624 # Best one so far, save it but keep looking for a better one
4625 ac_cv_path_SED="$ac_path_SED"
4626 ac_path_SED_max=$ac_count
4627 fi
4628 # 10*(2^10) chars as input seems more than enough
4629 test $ac_count -gt 10 && break
4630 done
4631 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4632esac
4633
4634 $ac_path_SED_found && break 3
4635 done
4636 done
4637 done
4638IFS=$as_save_IFS
4639 if test -z "$ac_cv_path_SED"; then
4640 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4641 fi
4642else
4643 ac_cv_path_SED=$SED
4644fi
4645
4646fi
4647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4648$as_echo "$ac_cv_path_SED" >&6; }
4649 SED="$ac_cv_path_SED"
4650 rm -f conftest.sed
4651
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004652
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004653
4654
Matthias Kloseb9621712010-04-24 17:59:49 +00004655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4656$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004657
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004658# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004659if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004660 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004661
4662 case $withval in
4663 no) with_cxx_main=no
4664 MAINCC='$(CC)';;
4665 yes) with_cxx_main=yes
4666 MAINCC='$(CXX)';;
4667 *) with_cxx_main=yes
4668 MAINCC=$withval
4669 if test -z "$CXX"
4670 then
4671 CXX=$withval
4672 fi;;
4673 esac
4674else
4675
4676 with_cxx_main=no
4677 MAINCC='$(CC)'
4678
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004679fi
4680
Matthias Kloseb9621712010-04-24 17:59:49 +00004681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4682$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004683
4684preset_cxx="$CXX"
4685if test -z "$CXX"
4686then
4687 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004688 gcc) if test -n "$ac_tool_prefix"; then
4689 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4690set dummy ${ac_tool_prefix}g++; ac_word=$2
4691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4692$as_echo_n "checking for $ac_word... " >&6; }
4693if ${ac_cv_path_CXX+:} false; then :
4694 $as_echo_n "(cached) " >&6
4695else
4696 case $CXX in
4697 [\\/]* | ?:[\\/]*)
4698 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4699 ;;
4700 *)
4701 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4702for as_dir in notfound
4703do
4704 IFS=$as_save_IFS
4705 test -z "$as_dir" && as_dir=.
4706 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004707 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004708 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4709 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4710 break 2
4711 fi
4712done
4713 done
4714IFS=$as_save_IFS
4715
4716 ;;
4717esac
4718fi
4719CXX=$ac_cv_path_CXX
4720if test -n "$CXX"; then
4721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4722$as_echo "$CXX" >&6; }
4723else
4724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4725$as_echo "no" >&6; }
4726fi
4727
4728
4729fi
4730if test -z "$ac_cv_path_CXX"; then
4731 ac_pt_CXX=$CXX
4732 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004733set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4735$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004736if ${ac_cv_path_ac_pt_CXX+:} false; then :
4737 $as_echo_n "(cached) " >&6
4738else
4739 case $ac_pt_CXX in
4740 [\\/]* | ?:[\\/]*)
4741 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4742 ;;
4743 *)
4744 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4745for as_dir in notfound
4746do
4747 IFS=$as_save_IFS
4748 test -z "$as_dir" && as_dir=.
4749 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004750 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004751 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4752 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4753 break 2
4754 fi
4755done
4756 done
4757IFS=$as_save_IFS
4758
4759 ;;
4760esac
4761fi
4762ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4763if test -n "$ac_pt_CXX"; then
4764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4765$as_echo "$ac_pt_CXX" >&6; }
4766else
4767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4768$as_echo "no" >&6; }
4769fi
4770
4771 if test "x$ac_pt_CXX" = x; then
4772 CXX="g++"
4773 else
4774 case $cross_compiling:$ac_tool_warned in
4775yes:)
4776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4778ac_tool_warned=yes ;;
4779esac
4780 CXX=$ac_pt_CXX
4781 fi
4782else
4783 CXX="$ac_cv_path_CXX"
4784fi
4785 ;;
4786 cc) if test -n "$ac_tool_prefix"; then
4787 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4788set dummy ${ac_tool_prefix}c++; ac_word=$2
4789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4790$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004791if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004792 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004793else
4794 case $CXX in
4795 [\\/]* | ?:[\\/]*)
4796 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4797 ;;
4798 *)
4799 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4800for as_dir in notfound
4801do
4802 IFS=$as_save_IFS
4803 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004804 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004805 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004806 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004807 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004808 break 2
4809 fi
4810done
Matthias Kloseb9621712010-04-24 17:59:49 +00004811 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004812IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004813
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004814 ;;
4815esac
4816fi
4817CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004818if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4820$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004821else
Matthias Kloseb9621712010-04-24 17:59:49 +00004822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4823$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004825
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004826
4827fi
4828if test -z "$ac_cv_path_CXX"; then
4829 ac_pt_CXX=$CXX
4830 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004831set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4833$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004834if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004835 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004836else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004837 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004838 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004839 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 +00004840 ;;
4841 *)
4842 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4843for as_dir in notfound
4844do
4845 IFS=$as_save_IFS
4846 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004847 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004848 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004849 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004850 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004851 break 2
4852 fi
4853done
Matthias Kloseb9621712010-04-24 17:59:49 +00004854 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004855IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004856
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004857 ;;
4858esac
4859fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004860ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4861if test -n "$ac_pt_CXX"; then
4862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4863$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004864else
Matthias Kloseb9621712010-04-24 17:59:49 +00004865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4866$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004868
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004869 if test "x$ac_pt_CXX" = x; then
4870 CXX="c++"
4871 else
4872 case $cross_compiling:$ac_tool_warned in
4873yes:)
4874{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4875$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4876ac_tool_warned=yes ;;
4877esac
4878 CXX=$ac_pt_CXX
4879 fi
4880else
4881 CXX="$ac_cv_path_CXX"
4882fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004883 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004884 clang|*/clang) if test -n "$ac_tool_prefix"; then
4885 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4886set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4888$as_echo_n "checking for $ac_word... " >&6; }
4889if ${ac_cv_path_CXX+:} false; then :
4890 $as_echo_n "(cached) " >&6
4891else
4892 case $CXX in
4893 [\\/]* | ?:[\\/]*)
4894 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4895 ;;
4896 *)
4897 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4898for as_dir in notfound
4899do
4900 IFS=$as_save_IFS
4901 test -z "$as_dir" && as_dir=.
4902 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004903 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004904 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4905 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4906 break 2
4907 fi
4908done
4909 done
4910IFS=$as_save_IFS
4911
Ned Deilycbfb9a52012-06-23 16:02:19 -07004912 ;;
4913esac
4914fi
4915CXX=$ac_cv_path_CXX
4916if test -n "$CXX"; then
4917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4918$as_echo "$CXX" >&6; }
4919else
4920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4921$as_echo "no" >&6; }
4922fi
4923
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004924
4925fi
4926if test -z "$ac_cv_path_CXX"; then
4927 ac_pt_CXX=$CXX
4928 # Extract the first word of "clang++", so it can be a program name with args.
4929set dummy clang++; ac_word=$2
4930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4931$as_echo_n "checking for $ac_word... " >&6; }
4932if ${ac_cv_path_ac_pt_CXX+:} false; then :
4933 $as_echo_n "(cached) " >&6
4934else
4935 case $ac_pt_CXX in
4936 [\\/]* | ?:[\\/]*)
4937 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4938 ;;
4939 *)
4940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4941for as_dir in notfound
4942do
4943 IFS=$as_save_IFS
4944 test -z "$as_dir" && as_dir=.
4945 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004946 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004947 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4949 break 2
4950 fi
4951done
4952 done
4953IFS=$as_save_IFS
4954
4955 ;;
4956esac
4957fi
4958ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4959if test -n "$ac_pt_CXX"; then
4960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4961$as_echo "$ac_pt_CXX" >&6; }
4962else
4963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4964$as_echo "no" >&6; }
4965fi
4966
4967 if test "x$ac_pt_CXX" = x; then
4968 CXX="clang++"
4969 else
4970 case $cross_compiling:$ac_tool_warned in
4971yes:)
4972{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4973$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4974ac_tool_warned=yes ;;
4975esac
4976 CXX=$ac_pt_CXX
4977 fi
4978else
4979 CXX="$ac_cv_path_CXX"
4980fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004981 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004982 icc|*/icc) if test -n "$ac_tool_prefix"; then
4983 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4984set dummy ${ac_tool_prefix}icpc; ac_word=$2
4985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4986$as_echo_n "checking for $ac_word... " >&6; }
4987if ${ac_cv_path_CXX+:} false; then :
4988 $as_echo_n "(cached) " >&6
4989else
4990 case $CXX in
4991 [\\/]* | ?:[\\/]*)
4992 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4993 ;;
4994 *)
4995 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4996for as_dir in notfound
4997do
4998 IFS=$as_save_IFS
4999 test -z "$as_dir" && as_dir=.
5000 for ac_exec_ext in '' $ac_executable_extensions; do
5001 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5002 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5003 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5004 break 2
5005 fi
5006done
5007 done
5008IFS=$as_save_IFS
5009
5010 ;;
5011esac
5012fi
5013CXX=$ac_cv_path_CXX
5014if test -n "$CXX"; then
5015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5016$as_echo "$CXX" >&6; }
5017else
5018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5019$as_echo "no" >&6; }
5020fi
5021
5022
5023fi
5024if test -z "$ac_cv_path_CXX"; then
5025 ac_pt_CXX=$CXX
5026 # Extract the first word of "icpc", so it can be a program name with args.
5027set dummy icpc; ac_word=$2
5028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5029$as_echo_n "checking for $ac_word... " >&6; }
5030if ${ac_cv_path_ac_pt_CXX+:} false; then :
5031 $as_echo_n "(cached) " >&6
5032else
5033 case $ac_pt_CXX in
5034 [\\/]* | ?:[\\/]*)
5035 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5036 ;;
5037 *)
5038 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5039for as_dir in notfound
5040do
5041 IFS=$as_save_IFS
5042 test -z "$as_dir" && as_dir=.
5043 for ac_exec_ext in '' $ac_executable_extensions; do
5044 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5045 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5047 break 2
5048 fi
5049done
5050 done
5051IFS=$as_save_IFS
5052
5053 ;;
5054esac
5055fi
5056ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5057if test -n "$ac_pt_CXX"; then
5058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5059$as_echo "$ac_pt_CXX" >&6; }
5060else
5061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5062$as_echo "no" >&6; }
5063fi
5064
5065 if test "x$ac_pt_CXX" = x; then
5066 CXX="icpc"
5067 else
5068 case $cross_compiling:$ac_tool_warned in
5069yes:)
5070{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5071$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5072ac_tool_warned=yes ;;
5073esac
5074 CXX=$ac_pt_CXX
5075 fi
5076else
5077 CXX="$ac_cv_path_CXX"
5078fi
5079 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005080 esac
5081 if test "$CXX" = "notfound"
5082 then
5083 CXX=""
5084 fi
5085fi
5086if test -z "$CXX"
5087then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005088 if test -n "$ac_tool_prefix"; then
5089 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5090 do
5091 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5092set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5094$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005095if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005097else
5098 if test -n "$CXX"; then
5099 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5100else
5101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5102for as_dir in $PATH
5103do
5104 IFS=$as_save_IFS
5105 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005106 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005107 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005108 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005109 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005110 break 2
5111 fi
5112done
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005114IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005115
5116fi
5117fi
5118CXX=$ac_cv_prog_CXX
5119if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5121$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005122else
Matthias Kloseb9621712010-04-24 17:59:49 +00005123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5124$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005125fi
5126
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005127
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005128 test -n "$CXX" && break
5129 done
5130fi
5131if test -z "$CXX"; then
5132 ac_ct_CXX=$CXX
5133 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5134do
5135 # Extract the first word of "$ac_prog", so it can be a program name with args.
5136set dummy $ac_prog; ac_word=$2
5137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5138$as_echo_n "checking for $ac_word... " >&6; }
5139if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5140 $as_echo_n "(cached) " >&6
5141else
5142 if test -n "$ac_ct_CXX"; then
5143 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5144else
5145as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5146for as_dir in $PATH
5147do
5148 IFS=$as_save_IFS
5149 test -z "$as_dir" && as_dir=.
5150 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005151 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005152 ac_cv_prog_ac_ct_CXX="$ac_prog"
5153 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5154 break 2
5155 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005156done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005157 done
5158IFS=$as_save_IFS
5159
5160fi
5161fi
5162ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5163if test -n "$ac_ct_CXX"; then
5164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5165$as_echo "$ac_ct_CXX" >&6; }
5166else
5167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5168$as_echo "no" >&6; }
5169fi
5170
5171
5172 test -n "$ac_ct_CXX" && break
5173done
5174
5175 if test "x$ac_ct_CXX" = x; then
5176 CXX="notfound"
5177 else
5178 case $cross_compiling:$ac_tool_warned in
5179yes:)
5180{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5181$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5182ac_tool_warned=yes ;;
5183esac
5184 CXX=$ac_ct_CXX
5185 fi
5186fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005187
5188 if test "$CXX" = "notfound"
5189 then
5190 CXX=""
5191 fi
5192fi
5193if test "$preset_cxx" != "$CXX"
5194then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005195 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005196
5197 By default, distutils will build C++ extension modules with \"$CXX\".
5198 If this is not intended, then set CXX on the configure command line.
5199 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005200$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005201
5202 By default, distutils will build C++ extension modules with \"$CXX\".
5203 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005204 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005205fi
5206
5207
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005208MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5209
5210
5211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5212$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5213cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005214#undef bfin
5215#undef cris
5216#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005217#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005218#undef hppa
5219#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005220#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005221#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005222#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005223#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005224#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005225#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005226 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005227#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005228# if defined(__x86_64__) && defined(__LP64__)
5229 x86_64-linux-gnu
5230# elif defined(__x86_64__) && defined(__ILP32__)
5231 x86_64-linux-gnux32
5232# elif defined(__i386__)
5233 i386-linux-gnu
5234# elif defined(__aarch64__) && defined(__AARCH64EL__)
5235# if defined(__ILP32__)
5236 aarch64_ilp32-linux-gnu
5237# else
5238 aarch64-linux-gnu
5239# endif
5240# elif defined(__aarch64__) && defined(__AARCH64EB__)
5241# if defined(__ILP32__)
5242 aarch64_be_ilp32-linux-gnu
5243# else
5244 aarch64_be-linux-gnu
5245# endif
5246# elif defined(__alpha__)
5247 alpha-linux-gnu
5248# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5249# if defined(__ARMEL__)
5250 arm-linux-gnueabihf
5251# else
5252 armeb-linux-gnueabihf
5253# endif
5254# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5255# if defined(__ARMEL__)
5256 arm-linux-gnueabi
5257# else
5258 armeb-linux-gnueabi
5259# endif
5260# elif defined(__hppa__)
5261 hppa-linux-gnu
5262# elif defined(__ia64__)
5263 ia64-linux-gnu
5264# elif defined(__m68k__) && !defined(__mcoldfire__)
5265 m68k-linux-gnu
5266# elif defined(__mips_hard_float) && defined(_MIPSEL)
5267# if _MIPS_SIM == _ABIO32
5268 mipsel-linux-gnu
5269# elif _MIPS_SIM == _ABIN32
5270 mips64el-linux-gnuabin32
5271# elif _MIPS_SIM == _ABI64
5272 mips64el-linux-gnuabi64
5273# else
5274# error unknown platform triplet
5275# endif
5276# elif defined(__mips_hard_float)
5277# if _MIPS_SIM == _ABIO32
5278 mips-linux-gnu
5279# elif _MIPS_SIM == _ABIN32
5280 mips64-linux-gnuabin32
5281# elif _MIPS_SIM == _ABI64
5282 mips64-linux-gnuabi64
5283# else
5284# error unknown platform triplet
5285# endif
5286# elif defined(__or1k__)
5287 or1k-linux-gnu
5288# elif defined(__powerpc__) && defined(__SPE__)
5289 powerpc-linux-gnuspe
5290# elif defined(__powerpc64__)
5291# if defined(__LITTLE_ENDIAN__)
5292 powerpc64le-linux-gnu
5293# else
5294 powerpc64-linux-gnu
5295# endif
5296# elif defined(__powerpc__)
5297 powerpc-linux-gnu
5298# elif defined(__s390x__)
5299 s390x-linux-gnu
5300# elif defined(__s390__)
5301 s390-linux-gnu
5302# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5303 sh4-linux-gnu
5304# elif defined(__sparc__) && defined(__arch64__)
5305 sparc64-linux-gnu
5306# elif defined(__sparc__)
5307 sparc-linux-gnu
5308# else
5309# error unknown platform triplet
5310# endif
5311#elif defined(__FreeBSD_kernel__)
5312# if defined(__LP64__)
5313 x86_64-kfreebsd-gnu
5314# elif defined(__i386__)
5315 i386-kfreebsd-gnu
5316# else
5317# error unknown platform triplet
5318# endif
5319#elif defined(__gnu_hurd__)
5320 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005321#elif defined(__APPLE__)
5322 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005323#else
5324# error unknown platform triplet
5325#endif
5326
5327EOF
5328
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005329if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005330 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5332$as_echo "$PLATFORM_TRIPLET" >&6; }
5333else
5334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5335$as_echo "none" >&6; }
5336fi
5337rm -f conftest.c conftest.out
5338
5339if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5340 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5341 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5342 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005343elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5344 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005345fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005346
doko@ubuntu.com55532312016-06-14 08:55:19 +02005347if test x$MULTIARCH != x; then
5348 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5349fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005350
5351
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5353$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5354save_LDFLAGS="$LDFLAGS"
5355LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005356
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5358/* end confdefs.h. */
5359
5360int
5361main ()
5362{
5363
5364 ;
5365 return 0;
5366}
5367_ACEOF
5368if ac_fn_c_try_link "$LINENO"; then :
5369 NO_AS_NEEDED="-Wl,--no-as-needed"
5370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5371$as_echo "yes" >&6; }
5372else
5373 NO_AS_NEEDED=""
5374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5375$as_echo "no" >&6; }
5376fi
5377rm -f core conftest.err conftest.$ac_objext \
5378 conftest$ac_exeext conftest.$ac_ext
5379LDFLAGS="$save_LDFLAGS"
5380
5381
5382
5383# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005384
Matthias Kloseb9621712010-04-24 17:59:49 +00005385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5386$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005387if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005388 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005389else
5390 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5391 then ac_cv_path_EGREP="$GREP -E"
5392 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005394 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 # Loop through the user's path and test for each of PROGNAME-LIST
5396 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005397for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5398do
5399 IFS=$as_save_IFS
5400 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005401 for ac_prog in egrep; do
5402 for ac_exec_ext in '' $ac_executable_extensions; do
5403 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005404 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005405# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005406 # Check for GNU $ac_path_EGREP
5407case `"$ac_path_EGREP" --version 2>&1` in
5408*GNU*)
5409 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5410*)
5411 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005413 while :
5414 do
5415 cat "conftest.in" "conftest.in" >"conftest.tmp"
5416 mv "conftest.tmp" "conftest.in"
5417 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005418 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005419 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5420 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005421 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005422 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5423 # Best one so far, save it but keep looking for a better one
5424 ac_cv_path_EGREP="$ac_path_EGREP"
5425 ac_path_EGREP_max=$ac_count
5426 fi
5427 # 10*(2^10) chars as input seems more than enough
5428 test $ac_count -gt 10 && break
5429 done
5430 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5431esac
5432
Matthias Kloseb9621712010-04-24 17:59:49 +00005433 $ac_path_EGREP_found && break 3
5434 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005435 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005436 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005437IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005438 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005439 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 +00005440 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005441else
5442 ac_cv_path_EGREP=$EGREP
5443fi
5444
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005445 fi
5446fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5448$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005449 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005450
5451
Matthias Kloseb9621712010-04-24 17:59:49 +00005452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5453$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005454if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005455 $as_echo_n "(cached) " >&6
5456else
5457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005458/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005459#include <stdlib.h>
5460#include <stdarg.h>
5461#include <string.h>
5462#include <float.h>
5463
5464int
5465main ()
5466{
5467
5468 ;
5469 return 0;
5470}
5471_ACEOF
5472if ac_fn_c_try_compile "$LINENO"; then :
5473 ac_cv_header_stdc=yes
5474else
5475 ac_cv_header_stdc=no
5476fi
5477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5478
5479if test $ac_cv_header_stdc = yes; then
5480 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5482/* end confdefs.h. */
5483#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005484
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005485_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005486if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005487 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005488
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005489else
Matthias Kloseb9621712010-04-24 17:59:49 +00005490 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005491fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005492rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005493
Matthias Kloseb9621712010-04-24 17:59:49 +00005494fi
5495
5496if test $ac_cv_header_stdc = yes; then
5497 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5499/* end confdefs.h. */
5500#include <stdlib.h>
5501
5502_ACEOF
5503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5504 $EGREP "free" >/dev/null 2>&1; then :
5505
5506else
5507 ac_cv_header_stdc=no
5508fi
5509rm -f conftest*
5510
5511fi
5512
5513if test $ac_cv_header_stdc = yes; then
5514 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5515 if test "$cross_compiling" = yes; then :
5516 :
5517else
5518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5519/* end confdefs.h. */
5520#include <ctype.h>
5521#include <stdlib.h>
5522#if ((' ' & 0x0FF) == 0x020)
5523# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5524# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5525#else
5526# define ISLOWER(c) \
5527 (('a' <= (c) && (c) <= 'i') \
5528 || ('j' <= (c) && (c) <= 'r') \
5529 || ('s' <= (c) && (c) <= 'z'))
5530# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5531#endif
5532
5533#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5534int
5535main ()
5536{
5537 int i;
5538 for (i = 0; i < 256; i++)
5539 if (XOR (islower (i), ISLOWER (i))
5540 || toupper (i) != TOUPPER (i))
5541 return 2;
5542 return 0;
5543}
5544_ACEOF
5545if ac_fn_c_try_run "$LINENO"; then :
5546
5547else
5548 ac_cv_header_stdc=no
5549fi
5550rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5551 conftest.$ac_objext conftest.beam conftest.$ac_ext
5552fi
5553
5554fi
5555fi
5556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5557$as_echo "$ac_cv_header_stdc" >&6; }
5558if test $ac_cv_header_stdc = yes; then
5559
5560$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5561
5562fi
5563
5564# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5565for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5566 inttypes.h stdint.h unistd.h
5567do :
5568 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5569ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5570"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005571if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005572 cat >>confdefs.h <<_ACEOF
5573#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5574_ACEOF
5575
5576fi
5577
5578done
5579
5580
5581
5582 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 +02005583if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005584 MINIX=yes
5585else
5586 MINIX=
5587fi
5588
5589
5590 if test "$MINIX" = yes; then
5591
5592$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5593
5594
5595$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5596
5597
5598$as_echo "#define _MINIX 1" >>confdefs.h
5599
5600 fi
5601
5602
5603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5604$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005605if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005606 $as_echo_n "(cached) " >&6
5607else
5608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5609/* end confdefs.h. */
5610
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005611# define __EXTENSIONS__ 1
5612 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005613int
5614main ()
5615{
5616
5617 ;
5618 return 0;
5619}
5620_ACEOF
5621if ac_fn_c_try_compile "$LINENO"; then :
5622 ac_cv_safe_to_define___extensions__=yes
5623else
5624 ac_cv_safe_to_define___extensions__=no
5625fi
5626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5627fi
5628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5629$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5630 test $ac_cv_safe_to_define___extensions__ = yes &&
5631 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5632
5633 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5634
5635 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5636
5637 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5638
5639 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5640
5641
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005642
Xavier de Gaye95750b12016-07-09 11:05:42 +02005643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5644$as_echo_n "checking for the Android API level... " >&6; }
5645cat >> conftest.c <<EOF
5646#ifdef __ANDROID__
5647#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005648android_api = __ANDROID_API__
5649arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005650#else
5651#error not Android
5652#endif
5653EOF
5654
5655if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005656 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5657 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5659$as_echo "$ANDROID_API_LEVEL" >&6; }
5660
5661cat >>confdefs.h <<_ACEOF
5662#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5663_ACEOF
5664
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005665
5666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5667$as_echo_n "checking for the Android arm ABI... " >&6; }
5668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5669$as_echo "$_arm_arch" >&6; }
5670 if test "$_arm_arch" = 7; then
5671 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5672 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5673 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005674else
5675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5676$as_echo "not Android" >&6; }
5677fi
5678rm -f conftest.c conftest.out
5679
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680# Check for unsupported systems
5681case $ac_sys_system/$ac_sys_release in
5682atheos*|Linux*/1*)
5683 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5684 echo See README for details.
5685 exit 1;;
5686esac
5687
5688
Matthias Kloseb9621712010-04-24 17:59:49 +00005689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5690$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691
5692# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005693if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694 withval=$with_suffix;
5695 case $withval in
5696 no) EXEEXT=;;
5697 yes) EXEEXT=.exe;;
5698 *) EXEEXT=$withval;;
5699 esac
5700fi
5701
Matthias Kloseb9621712010-04-24 17:59:49 +00005702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5703$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704
5705# Test whether we're running on a non-case-sensitive system, in which
5706# case we give a warning if no ext is given
5707
Matthias Kloseb9621712010-04-24 17:59:49 +00005708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5709$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710if test ! -d CaseSensitiveTestDir; then
5711mkdir CaseSensitiveTestDir
5712fi
5713
5714if test -d casesensitivetestdir
5715then
Matthias Kloseb9621712010-04-24 17:59:49 +00005716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5717$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718 BUILDEXEEXT=.exe
5719else
Matthias Kloseb9621712010-04-24 17:59:49 +00005720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5721$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722 BUILDEXEEXT=$EXEEXT
5723fi
5724rmdir CaseSensitiveTestDir
5725
5726case $MACHDEP in
5727bsdos*)
5728 case $CC in
5729 gcc) CC="$CC -D_HAVE_BSDI";;
5730 esac;;
5731esac
5732
5733case $ac_sys_system in
5734hp*|HP*)
5735 case $CC in
5736 cc|*/cc) CC="$CC -Ae";;
5737 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738esac
5739
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740
Matthias Kloseb9621712010-04-24 17:59:49 +00005741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5742$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743if test -z "$LIBRARY"
5744then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005745 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5748$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749
5750# LDLIBRARY is the name of the library to link against (as opposed to the
5751# name of the library into which to insert object files). BLDLIBRARY is also
5752# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5753# is blank as the main program is not linked directly against LDLIBRARY.
5754# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5755# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5756# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5757# DLLLIBRARY is the shared (i.e., DLL) library.
5758#
5759# RUNSHARED is used to run shared python without installed libraries
5760#
5761# INSTSONAME is the name of the shared library that will be use to install
5762# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005763#
5764# LDVERSION is the shared library version number, normally the Python version
5765# with the ABI build flags appended.
5766
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005767
5768
5769
5770
5771
5772
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005773
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774LDLIBRARY="$LIBRARY"
5775BLDLIBRARY='$(LDLIBRARY)'
5776INSTSONAME='$(LDLIBRARY)'
5777DLLLIBRARY=''
5778LDLIBRARYDIR=''
5779RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005780LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781
5782# LINKCC is the command that links the python executable -- default is $(CC).
5783# If CXX is set, and if it is needed to link a main function that was
5784# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5785# python might then depend on the C++ runtime
5786# This is altered for AIX in order to build the export list before
5787# linking.
5788
Matthias Kloseb9621712010-04-24 17:59:49 +00005789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5790$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791if test -z "$LINKCC"
5792then
5793 LINKCC='$(PURIFY) $(MAINCC)'
5794 case $ac_sys_system in
5795 AIX*)
5796 exp_extra="\"\""
5797 if test $ac_sys_release -ge 5 -o \
5798 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5799 exp_extra="."
5800 fi
5801 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802 QNX*)
5803 # qcc must be used because the other compilers do not
5804 # support -N.
5805 LINKCC=qcc;;
5806 esac
5807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5809$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810
5811# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5812# make sure we default having it set to "no": this is used by
5813# distutils.unixccompiler to know if it should add --enable-new-dtags
5814# to linker command lines, and failing to detect GNU ld simply results
5815# in the same bahaviour as before.
5816
Matthias Kloseb9621712010-04-24 17:59:49 +00005817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5818$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819ac_prog=ld
5820if test "$GCC" = yes; then
5821 ac_prog=`$CC -print-prog-name=ld`
5822fi
5823case `"$ac_prog" -V 2>&1 < /dev/null` in
5824 *GNU*)
5825 GNULD=yes;;
5826 *)
5827 GNULD=no;;
5828esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5830$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831
Matthias Kloseb9621712010-04-24 17:59:49 +00005832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5833$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005835if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836 enableval=$enable_shared;
5837fi
5838
5839
5840if test -z "$enable_shared"
5841then
5842 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005843 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844 enable_shared="yes";;
5845 *)
5846 enable_shared="no";;
5847 esac
5848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5850$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851
Matthias Kloseb9621712010-04-24 17:59:49 +00005852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5853$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005855if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005856 enableval=$enable_profiling;
5857fi
5858
5859if test "x$enable_profiling" = xyes; then
5860 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005861 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863/* end confdefs.h. */
5864int main() { return 0; }
5865_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005866if ac_fn_c_try_link "$LINENO"; then :
5867
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005869 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005871rm -f core conftest.err conftest.$ac_objext \
5872 conftest$ac_exeext conftest.$ac_ext
5873 CC="$ac_save_cc"
5874else
5875 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5878$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879
doko@ubuntu.comba015832012-06-30 16:52:05 +02005880if test "x$enable_profiling" = xyes; then
5881 BASECFLAGS="-pg $BASECFLAGS"
5882 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883fi
5884
Matthias Kloseb9621712010-04-24 17:59:49 +00005885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5886$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887
5888# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5889# library that we build, but we do not want to link against it (we
5890# will find it with a -framework option). For this reason there is an
5891# extra variable BLDLIBRARY against which Python and the extension
5892# modules are linked, BLDLIBRARY. This is normally the same as
5893# LDLIBRARY, but empty for MacOSX framework builds.
5894if test "$enable_framework"
5895then
5896 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005897 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898 BLDLIBRARY=''
5899else
5900 BLDLIBRARY='$(LDLIBRARY)'
5901fi
5902
5903# Other platforms follow
5904if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005905 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906
Matthias Kloseb9621712010-04-24 17:59:49 +00005907$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908
5909 case $ac_sys_system in
5910 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005911 LDLIBRARY='libpython$(LDVERSION).dll.a'
5912 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913 ;;
5914 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005915 LDLIBRARY='libpython$(LDVERSION).so'
5916 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005917 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005919 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005920 then
5921 PY3LIBRARY=libpython3.so
5922 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005924 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005925 LDLIBRARY='libpython$(LDVERSION).so'
5926 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005927 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005929 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005930 then
5931 PY3LIBRARY=libpython3.so
5932 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933 ;;
5934 hp*|HP*)
5935 case `uname -m` in
5936 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005937 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938 ;;
5939 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005940 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941 ;;
5942 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005943 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005944 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005947 LDLIBRARY='libpython$(LDVERSION).dylib'
5948 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005949 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005951 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005952 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005953 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005954 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955
5956 esac
5957else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005958 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959 case $ac_sys_system in
5960 CYGWIN*)
5961 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005962 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963 ;;
5964 esac
5965fi
5966
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005967if test "$cross_compiling" = yes; then
5968 RUNSHARED=
5969fi
5970
Matthias Kloseb9621712010-04-24 17:59:49 +00005971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5972$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973
5974if test -n "$ac_tool_prefix"; then
5975 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5976set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5978$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005979if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005980 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981else
5982 if test -n "$RANLIB"; then
5983 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5984else
5985as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5986for as_dir in $PATH
5987do
5988 IFS=$as_save_IFS
5989 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005990 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005991 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994 break 2
5995 fi
5996done
Matthias Kloseb9621712010-04-24 17:59:49 +00005997 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998IFS=$as_save_IFS
5999
6000fi
6001fi
6002RANLIB=$ac_cv_prog_RANLIB
6003if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6005$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006006else
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6008$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009fi
6010
6011
6012fi
6013if test -z "$ac_cv_prog_RANLIB"; then
6014 ac_ct_RANLIB=$RANLIB
6015 # Extract the first word of "ranlib", so it can be a program name with args.
6016set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6018$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006019if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006020 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021else
6022 if test -n "$ac_ct_RANLIB"; then
6023 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6024else
6025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6026for as_dir in $PATH
6027do
6028 IFS=$as_save_IFS
6029 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006030 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006031 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006033 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034 break 2
6035 fi
6036done
Matthias Kloseb9621712010-04-24 17:59:49 +00006037 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006038IFS=$as_save_IFS
6039
6040fi
6041fi
6042ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6043if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6045$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046else
Matthias Kloseb9621712010-04-24 17:59:49 +00006047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6048$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006049fi
6050
6051 if test "x$ac_ct_RANLIB" = x; then
6052 RANLIB=":"
6053 else
6054 case $cross_compiling:$ac_tool_warned in
6055yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006056{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6057$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058ac_tool_warned=yes ;;
6059esac
6060 RANLIB=$ac_ct_RANLIB
6061 fi
6062else
6063 RANLIB="$ac_cv_prog_RANLIB"
6064fi
6065
6066
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006067if test -n "$ac_tool_prefix"; then
6068 for ac_prog in ar aal
6069 do
6070 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6071set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6073$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006074if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006075 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006076else
6077 if test -n "$AR"; then
6078 ac_cv_prog_AR="$AR" # Let the user override the test.
6079else
6080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6081for as_dir in $PATH
6082do
6083 IFS=$as_save_IFS
6084 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006085 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006086 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006087 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006088 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006089 break 2
6090 fi
6091done
Matthias Kloseb9621712010-04-24 17:59:49 +00006092 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093IFS=$as_save_IFS
6094
6095fi
6096fi
6097AR=$ac_cv_prog_AR
6098if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6100$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006101else
Matthias Kloseb9621712010-04-24 17:59:49 +00006102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6103$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006104fi
6105
6106
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006107 test -n "$AR" && break
6108 done
6109fi
6110if test -z "$AR"; then
6111 ac_ct_AR=$AR
6112 for ac_prog in ar aal
6113do
6114 # Extract the first word of "$ac_prog", so it can be a program name with args.
6115set dummy $ac_prog; ac_word=$2
6116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6117$as_echo_n "checking for $ac_word... " >&6; }
6118if ${ac_cv_prog_ac_ct_AR+:} false; then :
6119 $as_echo_n "(cached) " >&6
6120else
6121 if test -n "$ac_ct_AR"; then
6122 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6123else
6124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6125for as_dir in $PATH
6126do
6127 IFS=$as_save_IFS
6128 test -z "$as_dir" && as_dir=.
6129 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006130 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006131 ac_cv_prog_ac_ct_AR="$ac_prog"
6132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6133 break 2
6134 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006135done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006136 done
6137IFS=$as_save_IFS
6138
6139fi
6140fi
6141ac_ct_AR=$ac_cv_prog_ac_ct_AR
6142if test -n "$ac_ct_AR"; then
6143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6144$as_echo "$ac_ct_AR" >&6; }
6145else
6146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6147$as_echo "no" >&6; }
6148fi
6149
6150
6151 test -n "$ac_ct_AR" && break
6152done
6153
6154 if test "x$ac_ct_AR" = x; then
6155 AR="ar"
6156 else
6157 case $cross_compiling:$ac_tool_warned in
6158yes:)
6159{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6160$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6161ac_tool_warned=yes ;;
6162esac
6163 AR=$ac_ct_AR
6164 fi
6165fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006166
6167
6168# tweak ARFLAGS only if the user didn't set it on the command line
6169
6170if test -z "$ARFLAGS"
6171then
6172 ARFLAGS="rc"
6173fi
6174
doko@ubuntu.com58844492012-06-30 18:25:32 +02006175if test -n "$ac_tool_prefix"; then
6176 for ac_prog in readelf
6177 do
6178 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6179set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6181$as_echo_n "checking for $ac_word... " >&6; }
6182if ${ac_cv_prog_READELF+:} false; then :
6183 $as_echo_n "(cached) " >&6
6184else
6185 if test -n "$READELF"; then
6186 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6187else
6188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6189for as_dir in $PATH
6190do
6191 IFS=$as_save_IFS
6192 test -z "$as_dir" && as_dir=.
6193 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006194 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006195 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6196 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6197 break 2
6198 fi
6199done
6200 done
6201IFS=$as_save_IFS
6202
6203fi
6204fi
6205READELF=$ac_cv_prog_READELF
6206if test -n "$READELF"; then
6207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6208$as_echo "$READELF" >&6; }
6209else
6210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6211$as_echo "no" >&6; }
6212fi
6213
6214
6215 test -n "$READELF" && break
6216 done
6217fi
6218if test -z "$READELF"; then
6219 ac_ct_READELF=$READELF
6220 for ac_prog in readelf
6221do
6222 # Extract the first word of "$ac_prog", so it can be a program name with args.
6223set dummy $ac_prog; ac_word=$2
6224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6225$as_echo_n "checking for $ac_word... " >&6; }
6226if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6227 $as_echo_n "(cached) " >&6
6228else
6229 if test -n "$ac_ct_READELF"; then
6230 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6231else
6232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6233for as_dir in $PATH
6234do
6235 IFS=$as_save_IFS
6236 test -z "$as_dir" && as_dir=.
6237 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006238 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006239 ac_cv_prog_ac_ct_READELF="$ac_prog"
6240 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6241 break 2
6242 fi
6243done
6244 done
6245IFS=$as_save_IFS
6246
6247fi
6248fi
6249ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6250if test -n "$ac_ct_READELF"; then
6251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6252$as_echo "$ac_ct_READELF" >&6; }
6253else
6254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6255$as_echo "no" >&6; }
6256fi
6257
6258
6259 test -n "$ac_ct_READELF" && break
6260done
6261
6262 if test "x$ac_ct_READELF" = x; then
6263 READELF=":"
6264 else
6265 case $cross_compiling:$ac_tool_warned in
6266yes:)
6267{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6268$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6269ac_tool_warned=yes ;;
6270esac
6271 READELF=$ac_ct_READELF
6272 fi
6273fi
6274
6275if test "$cross_compiling" = yes; then
6276 case "$READELF" in
6277 readelf|:)
6278 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6279 ;;
6280 esac
6281fi
6282
6283
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006284
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006285case $MACHDEP in
6286bsdos*|hp*|HP*)
6287 # install -d does not work on BSDI or HP-UX
6288 if test -z "$INSTALL"
6289 then
6290 INSTALL="${srcdir}/install-sh -c"
6291 fi
6292esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006293# Find a good install program. We prefer a C program (faster),
6294# so one script is as good as another. But avoid the broken or
6295# incompatible versions:
6296# SysV /etc/install, /usr/sbin/install
6297# SunOS /usr/etc/install
6298# IRIX /sbin/install
6299# AIX /bin/install
6300# AmigaOS /C/install, which installs bootblocks on floppy discs
6301# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6302# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6303# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6304# OS/2's system install, which has a completely different semantic
6305# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006306# Reject install programs that cannot install multiple files.
6307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6308$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006310if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006311 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006312else
6313 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6314for as_dir in $PATH
6315do
6316 IFS=$as_save_IFS
6317 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006318 # Account for people who put trailing slashes in PATH elements.
6319case $as_dir/ in #((
6320 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006322 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006323 /usr/ucb/* ) ;;
6324 *)
6325 # OSF1 and SCO ODT 3.0 have their own names for install.
6326 # Don't use installbsd from OSF since it installs stuff as root
6327 # by default.
6328 for ac_prog in ginstall scoinst install; do
6329 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006330 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006331 if test $ac_prog = install &&
6332 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6333 # AIX install. It has an incompatible calling convention.
6334 :
6335 elif test $ac_prog = install &&
6336 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6337 # program-specific install script used by HP pwplus--don't use.
6338 :
6339 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006340 rm -rf conftest.one conftest.two conftest.dir
6341 echo one > conftest.one
6342 echo two > conftest.two
6343 mkdir conftest.dir
6344 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6345 test -s conftest.one && test -s conftest.two &&
6346 test -s conftest.dir/conftest.one &&
6347 test -s conftest.dir/conftest.two
6348 then
6349 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6350 break 3
6351 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006352 fi
6353 fi
6354 done
6355 done
6356 ;;
6357esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006358
6359 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006360IFS=$as_save_IFS
6361
Matthias Kloseb9621712010-04-24 17:59:49 +00006362rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006363
6364fi
6365 if test "${ac_cv_path_install+set}" = set; then
6366 INSTALL=$ac_cv_path_install
6367 else
6368 # As a last resort, use the slow shell script. Don't cache a
6369 # value for INSTALL within a source directory, because that will
6370 # break other packages using the cache if that directory is
6371 # removed, or if the value is a relative name.
6372 INSTALL=$ac_install_sh
6373 fi
6374fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6376$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006377
6378# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6379# It thinks the first close brace ends the variable substitution.
6380test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6381
6382test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6383
6384test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6385
Matthias Klose93a0ef12012-03-15 18:08:34 +01006386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6387$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6388if test -z "$MKDIR_P"; then
6389 if ${ac_cv_path_mkdir+:} false; then :
6390 $as_echo_n "(cached) " >&6
6391else
6392 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6393for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6394do
6395 IFS=$as_save_IFS
6396 test -z "$as_dir" && as_dir=.
6397 for ac_prog in mkdir gmkdir; do
6398 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006399 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006400 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6401 'mkdir (GNU coreutils) '* | \
6402 'mkdir (coreutils) '* | \
6403 'mkdir (fileutils) '4.1*)
6404 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6405 break 3;;
6406 esac
6407 done
6408 done
6409 done
6410IFS=$as_save_IFS
6411
6412fi
6413
6414 test -d ./--version && rmdir ./--version
6415 if test "${ac_cv_path_mkdir+set}" = set; then
6416 MKDIR_P="$ac_cv_path_mkdir -p"
6417 else
6418 # As a last resort, use the slow shell script. Don't cache a
6419 # value for MKDIR_P within a source directory, because that will
6420 # break other packages using the cache if that directory is
6421 # removed, or if the value is a relative name.
6422 MKDIR_P="$ac_install_sh -d"
6423 fi
6424fi
6425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6426$as_echo "$MKDIR_P" >&6; }
6427
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006428
6429# Not every filesystem supports hard links
6430
6431if test -z "$LN" ; then
6432 case $ac_sys_system in
6433 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006434 *) LN=ln;;
6435 esac
6436fi
6437
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006438# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006439
6440ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006441
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006442# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6444$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006445
6446# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006447if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006448 withval=$with_pydebug;
6449if test "$withval" != no
6450then
6451
Matthias Kloseb9621712010-04-24 17:59:49 +00006452$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006453
Matthias Kloseb9621712010-04-24 17:59:49 +00006454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6455$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006456 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006457 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006458else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6459$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006460fi
6461else
Matthias Kloseb9621712010-04-24 17:59:49 +00006462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6463$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006464fi
6465
6466
Brett Cannon63d98bc2016-09-06 17:12:40 -07006467# Enable optimization flags
6468
6469
6470Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6472$as_echo_n "checking for --enable-optimizations... " >&6; }
6473# Check whether --enable-optimizations was given.
6474if test "${enable_optimizations+set}" = set; then :
6475 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006476if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006477then
6478 Py_OPT='true'
6479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6480$as_echo "yes" >&6; };
6481else
6482 Py_OPT='false'
6483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6484$as_echo "no" >&6; };
6485fi
6486else
6487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6488$as_echo "no" >&6; }
6489fi
6490
6491if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006492 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6493 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006494 # 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 +00006495 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006496 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006497 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006498 DEF_MAKE_RULE="build_all"
6499else
6500 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006501 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006502 DEF_MAKE_RULE="all"
6503fi
6504
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006505# Enable LTO flags
6506
6507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6508$as_echo_n "checking for --with-lto... " >&6; }
6509
6510# Check whether --with-lto was given.
6511if test "${with_lto+set}" = set; then :
6512 withval=$with_lto;
6513if test "$withval" != no
6514then
6515 Py_LTO='true'
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6517$as_echo "yes" >&6; };
6518else
6519 Py_LTO='false'
6520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6521$as_echo "no" >&6; };
6522fi
6523else
6524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6525$as_echo "no" >&6; }
6526fi
6527
6528if test "$Py_LTO" = 'true' ; then
6529 case $CC in
6530 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006531 case $ac_sys_system in
6532 Darwin*)
6533 # Any changes made here should be reflected in the GCC+Darwin case below
6534 LTOFLAGS="-flto -Wl,-export_dynamic"
6535 ;;
6536 *)
6537 LTOFLAGS="-flto"
6538 ;;
6539 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006540 ;;
6541 *gcc*)
6542 case $ac_sys_system in
6543 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006544 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006545 ;;
6546 *)
6547 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6548 ;;
6549 esac
6550 ;;
6551 esac
6552fi
6553
Brett Cannon7188a3e2015-09-18 15:13:44 -07006554# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006555
6556
6557
6558
6559
Gregory P. Smith799520c2016-09-07 16:10:00 -07006560# Make this work on systems where llvm tools are not installed with their
6561# normal names in the default $PATH (ie: Ubuntu). They exist under the
6562# non-suffixed name in their versioned llvm directory.
6563llvm_bin_dir=''
6564llvm_path="${PATH}"
6565if test "${CC}" = "clang"
6566then
6567 clang_bin=`which clang`
6568 # Some systems install clang elsewhere as a symlink to the real path
6569 # which is where the related llvm tools are located.
6570 if test -L "${clang_bin}"
6571 then
6572 clang_dir=`dirname "${clang_bin}"`
6573 clang_bin=`readlink "${clang_bin}"`
6574 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6575 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6576 fi
6577fi
Zachary Ware5af85642015-12-21 12:09:17 -06006578
Gregory P. Smith799520c2016-09-07 16:10:00 -07006579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6580$as_echo_n "checking target system type... " >&6; }
6581if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006582 $as_echo_n "(cached) " >&6
6583else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006584 if test "x$target_alias" = x; then
6585 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006586else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006587 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6588 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6589fi
6590
6591fi
6592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6593$as_echo "$ac_cv_target" >&6; }
6594case $ac_cv_target in
6595*-*-*) ;;
6596*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6597esac
6598target=$ac_cv_target
6599ac_save_IFS=$IFS; IFS='-'
6600set x $ac_cv_target
6601shift
6602target_cpu=$1
6603target_vendor=$2
6604shift; shift
6605# Remember, the first character of IFS is used to create $*,
6606# except with old shells:
6607target_os=$*
6608IFS=$ac_save_IFS
6609case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6610
6611
6612# The aliases save the names the user supplied, while $host etc.
6613# will get canonicalized.
6614test -n "$target_alias" &&
6615 test "$program_prefix$program_suffix$program_transform_name" = \
6616 NONENONEs,x,x, &&
6617 program_prefix=${target_alias}-
6618# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6619set dummy $target_alias-llvm-profdata; ac_word=$2
6620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6621$as_echo_n "checking for $ac_word... " >&6; }
6622if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6623 $as_echo_n "(cached) " >&6
6624else
6625 case $LLVM_PROFDATA in
6626 [\\/]* | ?:[\\/]*)
6627 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6628 ;;
6629 *)
6630 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6631for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006632do
6633 IFS=$as_save_IFS
6634 test -z "$as_dir" && as_dir=.
6635 for ac_exec_ext in '' $ac_executable_extensions; do
6636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006637 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006638 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6639 break 2
6640 fi
6641done
6642 done
6643IFS=$as_save_IFS
6644
Gregory P. Smith799520c2016-09-07 16:10:00 -07006645 ;;
6646esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006647fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006648LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6649if test -n "$LLVM_PROFDATA"; then
6650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6651$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006652else
6653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6654$as_echo "no" >&6; }
6655fi
6656
6657
Gregory P. Smith799520c2016-09-07 16:10:00 -07006658if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6659 if test "$build" = "$target"; then
6660 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6661 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6662set dummy llvm-profdata; ac_word=$2
6663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6664$as_echo_n "checking for $ac_word... " >&6; }
6665if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6666 $as_echo_n "(cached) " >&6
6667else
6668 case $ac_pt_LLVM_PROFDATA in
6669 [\\/]* | ?:[\\/]*)
6670 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6671 ;;
6672 *)
6673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6674for as_dir in ${llvm_path}
6675do
6676 IFS=$as_save_IFS
6677 test -z "$as_dir" && as_dir=.
6678 for ac_exec_ext in '' $ac_executable_extensions; do
6679 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6680 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6682 break 2
6683 fi
6684done
6685 done
6686IFS=$as_save_IFS
6687
6688 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6689 ;;
6690esac
6691fi
6692ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6693if test -n "$ac_pt_LLVM_PROFDATA"; then
6694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6695$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6696else
6697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6698$as_echo "no" >&6; }
6699fi
6700
6701 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6702 else
6703 LLVM_PROFDATA="''"
6704 fi
6705else
6706 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6707fi
6708
6709
6710if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6711then
6712 LLVM_PROF_FOUND="found"
6713else
6714 LLVM_PROF_FOUND="not-found"
6715fi
6716if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6717then
6718 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6719 if test -n "${found_llvm_profdata}"
6720 then
6721 # llvm-profdata isn't directly in $PATH in some cases.
6722 # https://apple.stackexchange.com/questions/197053/
6723 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6724 LLVM_PROF_FOUND=found
6725 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6726$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6727 fi
6728fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006729LLVM_PROF_ERR=no
6730case $CC in
6731 *clang*)
6732 # Any changes made here should be reflected in the GCC+Darwin case below
6733 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6734 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006735 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006736 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6737 if test $LLVM_PROF_FOUND = not-found
6738 then
6739 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006740 if test "${REQUIRE_PGO}" = "yes"
6741 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006742 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 -07006743 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006744 fi
6745 ;;
6746 *gcc*)
6747 case $ac_sys_system in
6748 Darwin*)
6749 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6750 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006751 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006752 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006753 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006754 then
6755 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006756 if test "${REQUIRE_PGO}" = "yes"
6757 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006758 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006759 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006760 fi
6761 ;;
6762 *)
6763 PGO_PROF_GEN_FLAG="-fprofile-generate"
6764 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6765 LLVM_PROF_MERGER="true"
6766 LLVM_PROF_FILE=""
6767 ;;
6768 esac
6769 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006770 *icc*)
6771 PGO_PROF_GEN_FLAG="-prof-gen"
6772 PGO_PROF_USE_FLAG="-prof-use"
6773 LLVM_PROF_MERGER="true"
6774 LLVM_PROF_FILE=""
6775 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006776esac
6777
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006778# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6779# merged with this chunk of code?
6780
6781# Optimizer/debugger flags
6782# ------------------------
6783# (The following bit of code is complicated enough - please keep things
6784# indented properly. Just pretend you're editing Python code. ;-)
6785
6786# There are two parallel sets of case statements below, one that checks to
6787# see if OPT was set and one that does BASECFLAGS setting based upon
6788# compiler and platform. BASECFLAGS tweaks need to be made even if the
6789# user set OPT.
6790
6791# tweak OPT based on compiler and platform, only if the user didn't set
6792# it on the command line
6793
Victor Stinner9ed34a82017-05-02 22:35:58 +02006794
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006795if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006796then
6797 case $GCC in
6798 yes)
6799 if test "$CC" != 'g++' ; then
6800 STRICT_PROTO="-Wstrict-prototypes"
6801 fi
6802 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6803 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6804 WRAP="-fwrapv"
6805 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006806
Stefan Krahaf04ff22011-12-08 22:20:31 +01006807 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006808 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006809 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006810 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006811 *)
6812 if $CC --version 2>&1 | grep -q clang
6813 then
6814 cc_is_clang=1
6815 else
6816 cc_is_clang=
6817 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006818 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006819
Victor Stinner35f3d242017-04-21 12:35:24 +02006820 if test -n "${cc_is_clang}"
6821 then
6822 # Clang also needs -fwrapv
6823 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006824 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6825 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006826 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006827 fi
6828
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006829 case $ac_cv_prog_cc_g in
6830 yes)
6831 if test "$Py_DEBUG" = 'true' ; then
6832 # Optimization messes up debuggers, so turn it off for
6833 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006834 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006835 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006836 else
Victor Stinner28205b22017-04-21 11:24:34 +02006837 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006838 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006839 else
Victor Stinner28205b22017-04-21 11:24:34 +02006840 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006841 fi
6842 ;;
6843 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006844 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845 ;;
6846 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006847
Victor Stinner826f83f2017-04-28 15:07:10 +02006848 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006849
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006850 case $ac_sys_system in
6851 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6852 ;;
6853 esac
6854 ;;
6855
6856 *)
6857 OPT="-O"
6858 ;;
6859 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860fi
6861
6862
6863
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006864
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006865# The -arch flags for universal builds on OSX
6866UNIVERSAL_ARCH_FLAGS=
6867
6868
6869# tweak BASECFLAGS based on compiler and platform
6870case $GCC in
6871yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006872 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006873
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6875$as_echo_n "checking for -Wextra... " >&6; }
6876 ac_save_cc="$CC"
6877 CC="$CC -Wextra -Werror"
6878 if ${ac_cv_extra_warnings+:} false; then :
6879 $as_echo_n "(cached) " >&6
6880else
6881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6882/* end confdefs.h. */
6883
6884
6885int
6886main ()
6887{
6888
6889 ;
6890 return 0;
6891}
6892
6893_ACEOF
6894if ac_fn_c_try_compile "$LINENO"; then :
6895
6896 ac_cv_extra_warnings=yes
6897
6898else
6899
6900 ac_cv_extra_warnings=no
6901
6902fi
6903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6904fi
6905
6906 CC="$ac_save_cc"
6907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6908$as_echo "$ac_cv_extra_warnings" >&6; }
6909
6910 if test $ac_cv_extra_warnings = yes
6911 then
6912 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6913 fi
6914
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006915 # Python doesn't violate C99 aliasing rules, but older versions of
6916 # GCC produce warnings for legal Python code. Enable
6917 # -fno-strict-aliasing on versions of GCC that support but produce
6918 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6920$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006921 ac_save_cc="$CC"
6922 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006923 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006924 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006925 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006926else
Matthias Kloseb9621712010-04-24 17:59:49 +00006927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006928/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006929
Matthias Kloseb159a552010-04-25 21:00:44 +00006930
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006931int
6932main ()
6933{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006934
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006935 ;
6936 return 0;
6937}
Matthias Kloseb159a552010-04-25 21:00:44 +00006938
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006940if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006941
6942 CC="$ac_save_cc -fstrict-aliasing"
6943 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006945/* end confdefs.h. */
6946
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006947 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006948int
6949main ()
6950{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006951double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006952 ;
6953 return 0;
6954}
Matthias Kloseb159a552010-04-25 21:00:44 +00006955
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006957if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006958
6959 ac_cv_no_strict_aliasing=no
6960
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006961else
Matthias Kloseb159a552010-04-25 21:00:44 +00006962
6963 ac_cv_no_strict_aliasing=yes
6964
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006965fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006967
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006968else
Matthias Kloseb159a552010-04-25 21:00:44 +00006969
6970 ac_cv_no_strict_aliasing=no
6971
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006972fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006974fi
6975
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006976 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006977 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6979$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006980 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006981 then
6982 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6983 fi
6984
Zachary Ware5af85642015-12-21 12:09:17 -06006985 # ICC doesn't recognize the option, but only emits a warning
6986 ## XXX does it emit an unused result warning and can it be disabled?
6987 case "$CC" in
6988 *icc*)
6989 ac_cv_disable_unused_result_warning=no
6990 ;;
6991 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6993$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6994 ac_save_cc="$CC"
6995 CC="$CC -Wunused-result -Werror"
6996 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006997 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006998 $as_echo_n "(cached) " >&6
6999else
7000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7001/* end confdefs.h. */
7002
7003
7004int
7005main ()
7006{
7007
7008 ;
7009 return 0;
7010}
7011
7012_ACEOF
7013if ac_fn_c_try_compile "$LINENO"; then :
7014
7015 ac_cv_disable_unused_result_warning=yes
7016
7017else
7018
7019 ac_cv_disable_unused_result_warning=no
7020
7021fi
7022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7023fi
7024
7025 CFLAGS="$save_CFLAGS"
7026 CC="$ac_save_cc"
7027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7028$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007029 ;;
7030 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007031
7032 if test $ac_cv_disable_unused_result_warning = yes
7033 then
7034 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007035 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7036 fi
7037
7038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7039$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7040 ac_save_cc="$CC"
7041 CC="$CC -Wunused-parameter -Werror"
7042 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7043 $as_echo_n "(cached) " >&6
7044else
7045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7046/* end confdefs.h. */
7047
7048
7049int
7050main ()
7051{
7052
7053 ;
7054 return 0;
7055}
7056
7057_ACEOF
7058if ac_fn_c_try_compile "$LINENO"; then :
7059
7060 ac_cv_disable_unused_parameter_warning=yes
7061
7062else
7063
7064 ac_cv_disable_unused_parameter_warning=no
7065
7066fi
7067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7068fi
7069
7070 CC="$ac_save_cc"
7071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7072$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7073
7074 if test $ac_cv_disable_unused_parameter_warning = yes
7075 then
7076 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7077 fi
7078
7079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7080$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7081 ac_save_cc="$CC"
7082 CC="$CC -Wmissing-field-initializers -Werror"
7083 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7084 $as_echo_n "(cached) " >&6
7085else
7086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7087/* end confdefs.h. */
7088
7089
7090int
7091main ()
7092{
7093
7094 ;
7095 return 0;
7096}
7097
7098_ACEOF
7099if ac_fn_c_try_compile "$LINENO"; then :
7100
7101 ac_cv_disable_missing_field_initializers=yes
7102
7103else
7104
7105 ac_cv_disable_missing_field_initializers=no
7106
7107fi
7108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7109fi
7110
7111 CC="$ac_save_cc"
7112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7113$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7114
7115 if test $ac_cv_disable_missing_field_initializers = yes
7116 then
7117 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007118 fi
7119
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7121$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7122 ac_save_cc="$CC"
7123 CC="$CC -Wsign-compare"
7124 save_CFLAGS="$CFLAGS"
7125 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7126 $as_echo_n "(cached) " >&6
7127else
7128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7129/* end confdefs.h. */
7130
7131
7132int
7133main ()
7134{
7135
7136 ;
7137 return 0;
7138}
7139
7140_ACEOF
7141if ac_fn_c_try_compile "$LINENO"; then :
7142
7143 ac_cv_enable_sign_compare_warning=yes
7144
7145else
7146
7147 ac_cv_enable_sign_compare_warning=no
7148
7149fi
7150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7151fi
7152
7153 CFLAGS="$save_CFLAGS"
7154 CC="$ac_save_cc"
7155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7156$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7157
7158 if test $ac_cv_enable_sign_compare_warning = yes
7159 then
7160 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7161 fi
7162
7163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7164$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7165 ac_save_cc="$CC"
7166 CC="$CC -Wunreachable-code"
7167 save_CFLAGS="$CFLAGS"
7168 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7169 $as_echo_n "(cached) " >&6
7170else
7171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7172/* end confdefs.h. */
7173
7174
7175int
7176main ()
7177{
7178
7179 ;
7180 return 0;
7181}
7182
7183_ACEOF
7184if ac_fn_c_try_compile "$LINENO"; then :
7185
7186 ac_cv_enable_unreachable_code_warning=yes
7187
7188else
7189
7190 ac_cv_enable_unreachable_code_warning=no
7191
7192fi
7193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7194fi
7195
7196 CFLAGS="$save_CFLAGS"
7197 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007198
7199 # Don't enable unreachable code warning in debug mode, since it usually
7200 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007201 # Issue #24324: Unfortunately, the unreachable code warning does not work
7202 # correctly on gcc and has been silently removed from the compiler.
7203 # It is supported on clang but on OS X systems gcc may be an alias
7204 # for clang. Try to determine if the compiler is not really gcc and,
7205 # if so, only then enable the warning.
7206 if test $ac_cv_enable_unreachable_code_warning = yes && \
7207 test "$Py_DEBUG" != "true" && \
7208 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007209 then
7210 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007211 else
7212 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007213 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7215$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007216
Victor Stinner193ee0a2017-02-06 14:24:00 +01007217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7218$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7219 ac_save_cc="$CC"
7220 CC="$CC -Werror=implicit-function-declaration"
7221 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7222 $as_echo_n "(cached) " >&6
7223else
7224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7225/* end confdefs.h. */
7226
7227
7228int
7229main ()
7230{
7231
7232 ;
7233 return 0;
7234}
7235
7236_ACEOF
7237if ac_fn_c_try_compile "$LINENO"; then :
7238
7239 ac_cv_enable_implicit_function_declaration_error=yes
7240
7241else
7242
7243 ac_cv_enable_implicit_function_declaration_error=no
7244
7245fi
7246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7247fi
7248
7249 CC="$ac_save_cc"
7250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7251$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7252
7253 if test $ac_cv_enable_implicit_function_declaration_error = yes
7254 then
7255 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7256 fi
7257
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007258 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7259 # support. Without this, treatment of subnormals doesn't follow
7260 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007261 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007262 alpha*)
7263 BASECFLAGS="$BASECFLAGS -mieee"
7264 ;;
7265 esac
7266
7267 case $ac_sys_system in
7268 SCO_SV*)
7269 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7270 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007271
7272 # is there any other compiler on Darwin besides gcc?
7273 Darwin*)
7274 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7275 # used to be here, but non-Apple gcc doesn't accept them.
7276 if test "${CC}" = gcc
7277 then
7278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007279$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007280 case "${UNIVERSALSDK}" in
7281 */MacOSX10.4u.sdk)
7282 # Build using 10.4 SDK, force usage of gcc when the
7283 # compiler is gcc, otherwise the user will get very
7284 # confusing error messages when building on OSX 10.6
7285 CC=gcc-4.0
7286 CPP=cpp-4.0
7287 ;;
7288 esac
7289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007290$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007291 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007292
Ned Deily87adb6e2013-10-18 21:09:56 -07007293 if test "${enable_universalsdk}"
7294 then
7295 case "$UNIVERSAL_ARCHS" in
7296 32-bit)
7297 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7298 LIPO_32BIT_FLAGS=""
7299 ARCH_RUN_32BIT=""
7300 ;;
7301 64-bit)
7302 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7303 LIPO_32BIT_FLAGS=""
7304 ARCH_RUN_32BIT="true"
7305 ;;
7306 all)
7307 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7308 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7309 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7310 ;;
7311 intel)
7312 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7313 LIPO_32BIT_FLAGS="-extract i386"
7314 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7315 ;;
7316 intel-32)
7317 UNIVERSAL_ARCH_FLAGS="-arch i386"
7318 LIPO_32BIT_FLAGS=""
7319 ARCH_RUN_32BIT=""
7320 ;;
7321 3-way)
7322 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7323 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7324 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7325 ;;
7326 *)
7327 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7328 ;;
7329 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007330
Ned Deily87adb6e2013-10-18 21:09:56 -07007331 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7332 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7333 if test "${UNIVERSALSDK}" != "/"
7334 then
7335 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7336 fi
7337 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007338
Ned Deily87adb6e2013-10-18 21:09:56 -07007339 # Calculate an appropriate deployment target for this build:
7340 # The deployment target value is used explicitly to enable certain
7341 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007342 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007343 # component of the string returned by distutils.get_platform().
7344 #
7345 # Use the value from:
7346 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7347 # 2. the operating system version of the build machine if >= 10.6
7348 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7349 # below to pick either 10.3, 10.4, or 10.5 as the target.
7350 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007351
Ned Deily87adb6e2013-10-18 21:09:56 -07007352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7353$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007354 cur_target_major=`sw_vers -productVersion | \
7355 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7356 cur_target_minor=`sw_vers -productVersion | \
7357 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7358 cur_target="${cur_target_major}.${cur_target_minor}"
7359 if test ${cur_target_major} -eq 10 && \
7360 test ${cur_target_minor} -ge 3 && \
7361 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007362 then
Ned Deily36820b62014-06-25 13:44:22 -07007363 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007364 cur_target=10.3
7365 if test ${enable_universalsdk}
7366 then
7367 case "$UNIVERSAL_ARCHS" in
7368 all|3-way|intel|64-bit)
7369 # These configurations were first supported in 10.5
7370 cur_target='10.5'
7371 ;;
7372 esac
7373 else
7374 if test `/usr/bin/arch` = "i386"
7375 then
7376 # 10.4 was the first release to support Intel archs
7377 cur_target="10.4"
7378 fi
7379 fi
7380 fi
7381 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007382
Ned Deily87adb6e2013-10-18 21:09:56 -07007383 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7384 # environment with a value that is the same as what we'll use
7385 # in the Makefile to ensure that we'll get the same compiler
7386 # environment during configure and build time.
7387 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7388 export MACOSX_DEPLOYMENT_TARGET
7389 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7391$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007392
Ned Deily87adb6e2013-10-18 21:09:56 -07007393 # end of Darwin* tests
7394 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007395 esac
7396 ;;
7397
7398*)
7399 case $ac_sys_system in
7400 OpenUNIX*|UnixWare*)
7401 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7402 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007403 SCO_SV*)
7404 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7405 ;;
7406 esac
7407 ;;
7408esac
7409
Zachary Ware5af85642015-12-21 12:09:17 -06007410# ICC needs -fp-model strict or floats behave badly
7411case "$CC" in
7412*icc*)
7413 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7414 ;;
7415esac
7416
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007417if test "$Py_DEBUG" = 'true'; then
7418 :
7419else
7420 OPT="-DNDEBUG $OPT"
7421fi
7422
7423if test "$ac_arch_flags"
7424then
7425 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7426fi
7427
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007428# On some compilers, pthreads are available without further options
7429# (e.g. MacOS X). On some of these systems, the compiler will not
7430# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7431# So we have to see first whether pthreads are available without
7432# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7434$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007435if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007436 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007437else
Matthias Kloseb9621712010-04-24 17:59:49 +00007438 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007439 ac_cv_pthread_is_default=no
7440else
Matthias Kloseb9621712010-04-24 17:59:49 +00007441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007442/* end confdefs.h. */
7443
Stefan Krah7dba5942012-11-22 22:49:11 +01007444#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007445#include <pthread.h>
7446
7447void* routine(void* p){return NULL;}
7448
7449int main(){
7450 pthread_t p;
7451 if(pthread_create(&p,NULL,routine,NULL)!=0)
7452 return 1;
7453 (void)pthread_detach(p);
7454 return 0;
7455}
7456
7457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007458if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007459
7460 ac_cv_pthread_is_default=yes
7461 ac_cv_kthread=no
7462 ac_cv_pthread=no
7463
7464else
Matthias Kloseb9621712010-04-24 17:59:49 +00007465 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007466fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007467rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7468 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007469fi
7470
7471
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007472fi
7473
Matthias Kloseb9621712010-04-24 17:59:49 +00007474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7475$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007476
7477
7478if test $ac_cv_pthread_is_default = yes
7479then
7480 ac_cv_kpthread=no
7481else
7482# -Kpthread, if available, provides the right #defines
7483# and linker options to make pthread_create available
7484# Some compilers won't report that they do not support -Kpthread,
7485# so we need to run a program to see whether it really made the
7486# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7488$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007489if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007490 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007491else
7492 ac_save_cc="$CC"
7493CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007494if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495 ac_cv_kpthread=no
7496else
Matthias Kloseb9621712010-04-24 17:59:49 +00007497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007498/* end confdefs.h. */
7499
Stefan Krah7dba5942012-11-22 22:49:11 +01007500#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007501#include <pthread.h>
7502
7503void* routine(void* p){return NULL;}
7504
7505int main(){
7506 pthread_t p;
7507 if(pthread_create(&p,NULL,routine,NULL)!=0)
7508 return 1;
7509 (void)pthread_detach(p);
7510 return 0;
7511}
7512
7513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007514if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007515 ac_cv_kpthread=yes
7516else
Matthias Kloseb9621712010-04-24 17:59:49 +00007517 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007518fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007519rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7520 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007521fi
7522
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007523CC="$ac_save_cc"
7524fi
7525
Matthias Kloseb9621712010-04-24 17:59:49 +00007526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7527$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007528fi
7529
7530if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7531then
7532# -Kthread, if available, provides the right #defines
7533# and linker options to make pthread_create available
7534# Some compilers won't report that they do not support -Kthread,
7535# so we need to run a program to see whether it really made the
7536# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7538$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007539if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007540 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007541else
7542 ac_save_cc="$CC"
7543CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007544if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007545 ac_cv_kthread=no
7546else
Matthias Kloseb9621712010-04-24 17:59:49 +00007547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007548/* end confdefs.h. */
7549
Stefan Krah7dba5942012-11-22 22:49:11 +01007550#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007551#include <pthread.h>
7552
7553void* routine(void* p){return NULL;}
7554
7555int main(){
7556 pthread_t p;
7557 if(pthread_create(&p,NULL,routine,NULL)!=0)
7558 return 1;
7559 (void)pthread_detach(p);
7560 return 0;
7561}
7562
7563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007564if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007565 ac_cv_kthread=yes
7566else
Matthias Kloseb9621712010-04-24 17:59:49 +00007567 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007569rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7570 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007571fi
7572
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007573CC="$ac_save_cc"
7574fi
7575
Matthias Kloseb9621712010-04-24 17:59:49 +00007576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7577$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007578fi
7579
7580if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7581then
7582# -pthread, if available, provides the right #defines
7583# and linker options to make pthread_create available
7584# Some compilers won't report that they do not support -pthread,
7585# so we need to run a program to see whether it really made the
7586# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7588$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007589if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007590 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007591else
7592 ac_save_cc="$CC"
7593CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007594if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007595 ac_cv_pthread=no
7596else
Matthias Kloseb9621712010-04-24 17:59:49 +00007597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007598/* end confdefs.h. */
7599
Stefan Krah7dba5942012-11-22 22:49:11 +01007600#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007601#include <pthread.h>
7602
7603void* routine(void* p){return NULL;}
7604
7605int main(){
7606 pthread_t p;
7607 if(pthread_create(&p,NULL,routine,NULL)!=0)
7608 return 1;
7609 (void)pthread_detach(p);
7610 return 0;
7611}
7612
7613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007614if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007615 ac_cv_pthread=yes
7616else
Matthias Kloseb9621712010-04-24 17:59:49 +00007617 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007619rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7620 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007621fi
7622
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007623CC="$ac_save_cc"
7624fi
7625
Matthias Kloseb9621712010-04-24 17:59:49 +00007626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7627$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007628fi
7629
7630# If we have set a CC compiler flag for thread support then
7631# check if it works for CXX, too.
7632ac_cv_cxx_thread=no
7633if test ! -z "$CXX"
7634then
Matthias Kloseb9621712010-04-24 17:59:49 +00007635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7636$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007637ac_save_cxx="$CXX"
7638
7639if test "$ac_cv_kpthread" = "yes"
7640then
7641 CXX="$CXX -Kpthread"
7642 ac_cv_cxx_thread=yes
7643elif test "$ac_cv_kthread" = "yes"
7644then
7645 CXX="$CXX -Kthread"
7646 ac_cv_cxx_thread=yes
7647elif test "$ac_cv_pthread" = "yes"
7648then
7649 CXX="$CXX -pthread"
7650 ac_cv_cxx_thread=yes
7651fi
7652
7653if test $ac_cv_cxx_thread = yes
7654then
7655 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7656 $CXX -c conftest.$ac_ext 2>&5
7657 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7658 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7659 then
7660 ac_cv_cxx_thread=yes
7661 else
7662 ac_cv_cxx_thread=no
7663 fi
7664 rm -fr conftest*
7665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7667$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007668fi
7669CXX="$ac_save_cxx"
7670
7671
7672# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7674$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007675if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007676 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007677else
Matthias Kloseb9621712010-04-24 17:59:49 +00007678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007679/* end confdefs.h. */
7680#include <stdlib.h>
7681#include <stdarg.h>
7682#include <string.h>
7683#include <float.h>
7684
7685int
7686main ()
7687{
7688
7689 ;
7690 return 0;
7691}
7692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007693if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007694 ac_cv_header_stdc=yes
7695else
Matthias Kloseb9621712010-04-24 17:59:49 +00007696 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007697fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7699
7700if test $ac_cv_header_stdc = yes; then
7701 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007703/* end confdefs.h. */
7704#include <string.h>
7705
7706_ACEOF
7707if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007708 $EGREP "memchr" >/dev/null 2>&1; then :
7709
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007710else
7711 ac_cv_header_stdc=no
7712fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007713rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007714
7715fi
7716
7717if test $ac_cv_header_stdc = yes; then
7718 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007720/* end confdefs.h. */
7721#include <stdlib.h>
7722
7723_ACEOF
7724if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007725 $EGREP "free" >/dev/null 2>&1; then :
7726
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007727else
7728 ac_cv_header_stdc=no
7729fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007730rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007731
7732fi
7733
7734if test $ac_cv_header_stdc = yes; then
7735 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007736 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007737 :
7738else
Matthias Kloseb9621712010-04-24 17:59:49 +00007739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007740/* end confdefs.h. */
7741#include <ctype.h>
7742#include <stdlib.h>
7743#if ((' ' & 0x0FF) == 0x020)
7744# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7745# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7746#else
7747# define ISLOWER(c) \
7748 (('a' <= (c) && (c) <= 'i') \
7749 || ('j' <= (c) && (c) <= 'r') \
7750 || ('s' <= (c) && (c) <= 'z'))
7751# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7752#endif
7753
7754#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7755int
7756main ()
7757{
7758 int i;
7759 for (i = 0; i < 256; i++)
7760 if (XOR (islower (i), ISLOWER (i))
7761 || toupper (i) != TOUPPER (i))
7762 return 2;
7763 return 0;
7764}
7765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007766if ac_fn_c_try_run "$LINENO"; then :
7767
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007768else
Matthias Kloseb9621712010-04-24 17:59:49 +00007769 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007771rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7772 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007773fi
7774
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007775fi
7776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7778$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007779if test $ac_cv_header_stdc = yes; then
7780
Matthias Kloseb9621712010-04-24 17:59:49 +00007781$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007782
7783fi
7784
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007785for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007786fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007787ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007788sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007789unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007790poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007791sys/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 +01007792sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007793sys/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 +01007794sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007795sys/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 -07007796libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007797linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007798sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007799do :
7800 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7801ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007802if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007803 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007804#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007805_ACEOF
7806
7807fi
7808
Guido van Rossum627b2d71993-12-24 10:39:16 +00007809done
7810
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007811ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007812for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007813 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7815$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007816if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007817 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007818else
Matthias Kloseb9621712010-04-24 17:59:49 +00007819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007820/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007821#include <sys/types.h>
7822#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007823
Martin v. Löwis11437992002-04-12 09:54:03 +00007824int
7825main ()
7826{
7827if ((DIR *) 0)
7828return 0;
7829 ;
7830 return 0;
7831}
7832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007833if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007834 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007835else
Matthias Kloseb9621712010-04-24 17:59:49 +00007836 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007840eval ac_res=\$$as_ac_Header
7841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7842$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007843if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007844 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007845#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007846_ACEOF
7847
7848ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007849fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007850
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007851done
7852# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7853if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7855$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007856if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007857 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007858else
Martin v. Löwis11437992002-04-12 09:54:03 +00007859 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007862
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007863/* Override any GCC internal prototype to avoid an error.
7864 Use char because int might match the return type of a GCC
7865 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007866#ifdef __cplusplus
7867extern "C"
7868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007869char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007870int
7871main ()
7872{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007873return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007874 ;
7875 return 0;
7876}
7877_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007878for ac_lib in '' dir; do
7879 if test -z "$ac_lib"; then
7880 ac_res="none required"
7881 else
7882 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007883 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007884 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007885 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007886 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007888rm -f core conftest.err conftest.$ac_objext \
7889 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007890 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007891 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007893done
Victor Stinnere0be4232011-10-25 13:06:09 +02007894if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007895
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007896else
7897 ac_cv_search_opendir=no
7898fi
7899rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007900LIBS=$ac_func_search_save_LIBS
7901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7903$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007904ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007905if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007906 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007907
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007908fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007909
Michael W. Hudson54241132001-12-07 15:38:26 +00007910else
Matthias Kloseb9621712010-04-24 17:59:49 +00007911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7912$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007913if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007914 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007915else
7916 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007918/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007920/* Override any GCC internal prototype to avoid an error.
7921 Use char because int might match the return type of a GCC
7922 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007923#ifdef __cplusplus
7924extern "C"
7925#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007926char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007927int
7928main ()
7929{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007930return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007931 ;
7932 return 0;
7933}
7934_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007935for ac_lib in '' x; do
7936 if test -z "$ac_lib"; then
7937 ac_res="none required"
7938 else
7939 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007940 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007941 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007942 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007943 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007945rm -f core conftest.err conftest.$ac_objext \
7946 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007947 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007948 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007950done
Victor Stinnere0be4232011-10-25 13:06:09 +02007951if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007952
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953else
7954 ac_cv_search_opendir=no
7955fi
7956rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007957LIBS=$ac_func_search_save_LIBS
7958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7960$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007961ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007962if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007963 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007964
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007965fi
7966
7967fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007968
Matthias Kloseb9621712010-04-24 17:59:49 +00007969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7970$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007971if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007972 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007973else
Matthias Kloseb9621712010-04-24 17:59:49 +00007974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007975/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007976#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007977int
7978main ()
7979{
7980return makedev(0, 0);
7981 ;
7982 return 0;
7983}
7984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007985if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007986 ac_cv_header_sys_types_h_makedev=yes
7987else
Matthias Kloseb9621712010-04-24 17:59:49 +00007988 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007990rm -f core conftest.err conftest.$ac_objext \
7991 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007992
7993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7995$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007996
7997if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007998ac_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 +02007999if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008000
Matthias Kloseb9621712010-04-24 17:59:49 +00008001$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008002
8003fi
8004
8005
8006
8007 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008008 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 +02008009if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008010
Matthias Kloseb9621712010-04-24 17:59:49 +00008011$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008012
8013fi
8014
8015
8016 fi
8017fi
8018
Michael W. Hudson54241132001-12-07 15:38:26 +00008019
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008020# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8021# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8022SAVE_CFLAGS=$CFLAGS
8023CFLAGS="-std=c99 $CFLAGS"
8024for ac_header in bluetooth/bluetooth.h
8025do :
8026 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8027if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8028 cat >>confdefs.h <<_ACEOF
8029#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8030_ACEOF
8031
8032fi
8033
8034done
8035
8036CFLAGS=$SAVE_CFLAGS
8037
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008038# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8039for ac_header in net/if.h
8040do :
8041 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8042#ifdef STDC_HEADERS
8043# include <stdlib.h>
8044# include <stddef.h>
8045#else
8046# ifdef HAVE_STDLIB_H
8047# include <stdlib.h>
8048# endif
8049#endif
8050#ifdef HAVE_SYS_SOCKET_H
8051# include <sys/socket.h>
8052#endif
8053
8054"
Victor Stinnere0be4232011-10-25 13:06:09 +02008055if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008056 cat >>confdefs.h <<_ACEOF
8057#define HAVE_NET_IF_H 1
8058_ACEOF
8059
8060fi
8061
8062done
8063
8064
Martin v. Löwis11017b12006-01-14 18:12:57 +00008065# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008066for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008067do :
8068 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 +00008069#ifdef HAVE_ASM_TYPES_H
8070#include <asm/types.h>
8071#endif
8072#ifdef HAVE_SYS_SOCKET_H
8073#include <sys/socket.h>
8074#endif
8075
Matthias Kloseb9621712010-04-24 17:59:49 +00008076"
Victor Stinnere0be4232011-10-25 13:06:09 +02008077if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008078 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008079#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008080_ACEOF
8081
8082fi
8083
8084done
8085
8086
Charles-François Natali47413c12011-10-06 19:47:44 +02008087# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008088for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008089do :
8090 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8091ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8092#ifdef HAVE_SYS_SOCKET_H
8093#include <sys/socket.h>
8094#endif
8095
8096"
8097if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8098 cat >>confdefs.h <<_ACEOF
8099#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8100_ACEOF
8101
8102fi
8103
8104done
8105
8106
Guido van Rossum627b2d71993-12-24 10:39:16 +00008107# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008108was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8110$as_echo_n "checking for clock_t in time.h... " >&6; }
8111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008112/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008113#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008114
8115_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008116if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008117 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008118 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008119else
Martin v. Löwis11437992002-04-12 09:54:03 +00008120
8121
Matthias Kloseb9621712010-04-24 17:59:49 +00008122$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008123
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008124
Guido van Rossum627b2d71993-12-24 10:39:16 +00008125fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008126rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008127
Matthias Kloseb9621712010-04-24 17:59:49 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8129$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008130
Matthias Kloseb9621712010-04-24 17:59:49 +00008131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8132$as_echo_n "checking for makedev... " >&6; }
8133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008134/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008135
Jesus Cea740f53a2010-04-28 11:35:30 +00008136#if defined(MAJOR_IN_MKDEV)
8137#include <sys/mkdev.h>
8138#elif defined(MAJOR_IN_SYSMACROS)
8139#include <sys/sysmacros.h>
8140#else
8141#include <sys/types.h>
8142#endif
8143
Neal Norwitz11690112002-07-30 01:08:28 +00008144int
8145main ()
8146{
Jesus Cea740f53a2010-04-28 11:35:30 +00008147
8148 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008149 ;
8150 return 0;
8151}
Matthias Kloseb159a552010-04-25 21:00:44 +00008152
Neal Norwitz11690112002-07-30 01:08:28 +00008153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008154if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008155 ac_cv_has_makedev=yes
8156else
Matthias Kloseb9621712010-04-24 17:59:49 +00008157 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008158fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008159rm -f core conftest.err conftest.$ac_objext \
8160 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8162$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008163if test "$ac_cv_has_makedev" = "yes"; then
8164
Matthias Kloseb9621712010-04-24 17:59:49 +00008165$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008166
8167fi
8168
Christian Heimes985ecdc2013-11-20 11:46:18 +01008169# byte swapping
8170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8171$as_echo_n "checking for le64toh... " >&6; }
8172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8173/* end confdefs.h. */
8174
8175#ifdef HAVE_ENDIAN_H
8176#include <endian.h>
8177#elif defined(HAVE_SYS_ENDIAN_H)
8178#include <sys/endian.h>
8179#endif
8180
8181int
8182main ()
8183{
8184
8185 le64toh(1)
8186 ;
8187 return 0;
8188}
8189
8190_ACEOF
8191if ac_fn_c_try_link "$LINENO"; then :
8192 ac_cv_has_le64toh=yes
8193else
8194 ac_cv_has_le64toh=no
8195fi
8196rm -f core conftest.err conftest.$ac_objext \
8197 conftest$ac_exeext conftest.$ac_ext
8198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8199$as_echo "$ac_cv_has_le64toh" >&6; }
8200if test "$ac_cv_has_le64toh" = "yes"; then
8201
8202$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8203
8204fi
8205
Martin v. Löwis399a6892002-10-04 10:22:02 +00008206# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8207# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8208# defined, but the compiler does not support pragma redefine_extname,
8209# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8210# structures (such as rlimit64) without declaring them. As a
8211# work-around, disable LFS on such configurations
8212
8213use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8215$as_echo_n "checking Solaris LFS bug... " >&6; }
8216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008217/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008218
8219#define _LARGEFILE_SOURCE 1
8220#define _FILE_OFFSET_BITS 64
8221#include <sys/resource.h>
8222
Martin v. Löwis399a6892002-10-04 10:22:02 +00008223int
8224main ()
8225{
8226struct rlimit foo;
8227 ;
8228 return 0;
8229}
8230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008231if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008232 sol_lfs_bug=no
8233else
Matthias Kloseb9621712010-04-24 17:59:49 +00008234 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8238$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008239if test "$sol_lfs_bug" = "yes"; then
8240 use_lfs=no
8241fi
8242
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008243# Don't use largefile support for GNU/Hurd
8244case $ac_sys_system in GNU*)
8245 use_lfs=no
8246esac
8247
Martin v. Löwis399a6892002-10-04 10:22:02 +00008248if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008249# Two defines needed to enable largefile support on various platforms
8250# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008251case $ac_sys_system/$ac_sys_release in
8252AIX*)
8253
8254$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8255
8256 ;;
8257esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008258
Matthias Kloseb9621712010-04-24 17:59:49 +00008259$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008260
8261
Matthias Kloseb9621712010-04-24 17:59:49 +00008262$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008263
Martin v. Löwis399a6892002-10-04 10:22:02 +00008264fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008265
Guido van Rossum84e7b241996-08-19 21:59:00 +00008266# Add some code to confdefs.h so that the test for off_t works on SCO
8267cat >> confdefs.h <<\EOF
8268#if defined(SCO_DS)
8269#undef _OFF_T
8270#endif
8271EOF
8272
Guido van Rossumef2255b2000-03-10 22:30:29 +00008273# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008274ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008275if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008276
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008277else
Martin v. Löwis11437992002-04-12 09:54:03 +00008278
8279cat >>confdefs.h <<_ACEOF
8280#define mode_t int
8281_ACEOF
8282
8283fi
8284
Matthias Kloseb9621712010-04-24 17:59:49 +00008285ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008286if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008287
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008288else
Martin v. Löwis11437992002-04-12 09:54:03 +00008289
8290cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008291#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008292_ACEOF
8293
8294fi
8295
Matthias Kloseb9621712010-04-24 17:59:49 +00008296ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008297if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008298
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008299else
Martin v. Löwis11437992002-04-12 09:54:03 +00008300
8301cat >>confdefs.h <<_ACEOF
8302#define pid_t int
8303_ACEOF
8304
8305fi
8306
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008307
Martin v. Löwis11437992002-04-12 09:54:03 +00008308cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008309#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008310_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008311
Matthias Kloseb9621712010-04-24 17:59:49 +00008312ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008313if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008314
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008315else
Martin v. Löwis11437992002-04-12 09:54:03 +00008316
8317cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008318#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008319_ACEOF
8320
8321fi
8322
Matthias Kloseb9621712010-04-24 17:59:49 +00008323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8324$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008325if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008326 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008327else
Matthias Kloseb9621712010-04-24 17:59:49 +00008328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008329/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008330#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008331
8332_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008333if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008334 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008335 ac_cv_type_uid_t=yes
8336else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008337 ac_cv_type_uid_t=no
8338fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008339rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008340
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008341fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8343$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008344if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008345
Matthias Kloseb9621712010-04-24 17:59:49 +00008346$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008347
8348
Matthias Kloseb9621712010-04-24 17:59:49 +00008349$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008350
8351fi
8352
Mark Dickinson983bc162012-12-02 12:11:38 +00008353
Matthias Kloseb9621712010-04-24 17:59:49 +00008354ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008355if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008356
Matthias Kloseb9621712010-04-24 17:59:49 +00008357$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008358
8359fi
8360
Stefan Krah1919b7e2012-03-21 18:25:23 +01008361ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8362if test "x$ac_cv_type___uint128_t" = xyes; then :
8363
8364$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8365
8366fi
8367
Jack Jansendd19cf82001-12-06 22:36:17 +00008368
Michael W. Hudson54241132001-12-07 15:38:26 +00008369# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008370# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008371# The cast to long int works around a bug in the HP C Compiler
8372# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8373# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8374# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8376$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008377if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008378 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008379else
Matthias Kloseb9621712010-04-24 17:59:49 +00008380 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 +00008381
Martin v. Löwis11437992002-04-12 09:54:03 +00008382else
Matthias Kloseb9621712010-04-24 17:59:49 +00008383 if test "$ac_cv_type_int" = yes; then
8384 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8385$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008386as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008387See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008388 else
8389 ac_cv_sizeof_int=0
8390 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008392
Martin v. Löwis11437992002-04-12 09:54:03 +00008393fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8395$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008396
8397
8398
Martin v. Löwis11437992002-04-12 09:54:03 +00008399cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008400#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008401_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008402
8403
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008404# The cast to long int works around a bug in the HP C Compiler
8405# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8406# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8407# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8409$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008410if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008411 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008412else
Matthias Kloseb9621712010-04-24 17:59:49 +00008413 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 +00008414
Martin v. Löwis11437992002-04-12 09:54:03 +00008415else
Matthias Kloseb9621712010-04-24 17:59:49 +00008416 if test "$ac_cv_type_long" = yes; then
8417 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8418$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008419as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008420See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008421 else
8422 ac_cv_sizeof_long=0
8423 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008424fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008425
Martin v. Löwis11437992002-04-12 09:54:03 +00008426fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8428$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008429
8430
8431
Martin v. Löwis11437992002-04-12 09:54:03 +00008432cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008433#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008434_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008435
8436
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008437# The cast to long int works around a bug in the HP C Compiler
8438# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8439# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8440# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8442$as_echo_n "checking size of long long... " >&6; }
8443if ${ac_cv_sizeof_long_long+:} false; then :
8444 $as_echo_n "(cached) " >&6
8445else
8446 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8447
8448else
8449 if test "$ac_cv_type_long_long" = yes; then
8450 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8451$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8452as_fn_error 77 "cannot compute sizeof (long long)
8453See \`config.log' for more details" "$LINENO" 5; }
8454 else
8455 ac_cv_sizeof_long_long=0
8456 fi
8457fi
8458
8459fi
8460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8461$as_echo "$ac_cv_sizeof_long_long" >&6; }
8462
8463
8464
8465cat >>confdefs.h <<_ACEOF
8466#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8467_ACEOF
8468
8469
8470# The cast to long int works around a bug in the HP C Compiler
8471# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8472# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8473# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8475$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008476if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008477 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008478else
Matthias Kloseb9621712010-04-24 17:59:49 +00008479 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 +00008480
Martin v. Löwis11437992002-04-12 09:54:03 +00008481else
Matthias Kloseb9621712010-04-24 17:59:49 +00008482 if test "$ac_cv_type_void_p" = yes; then
8483 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8484$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008485as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008486See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008487 else
8488 ac_cv_sizeof_void_p=0
8489 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008490fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008491
Martin v. Löwis11437992002-04-12 09:54:03 +00008492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8494$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008495
8496
8497
Martin v. Löwis11437992002-04-12 09:54:03 +00008498cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008499#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008500_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008501
8502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503# The cast to long int works around a bug in the HP C Compiler
8504# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8505# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8506# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8508$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008509if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008510 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008511else
Matthias Kloseb9621712010-04-24 17:59:49 +00008512 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 +00008513
Martin v. Löwis11437992002-04-12 09:54:03 +00008514else
Matthias Kloseb9621712010-04-24 17:59:49 +00008515 if test "$ac_cv_type_short" = yes; then
8516 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8517$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008518as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008519See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008520 else
8521 ac_cv_sizeof_short=0
8522 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008523fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008524
Martin v. Löwis11437992002-04-12 09:54:03 +00008525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8527$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008528
8529
8530
Martin v. Löwis11437992002-04-12 09:54:03 +00008531cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008532#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008533_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008534
8535
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008536# The cast to long int works around a bug in the HP C Compiler
8537# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8538# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8539# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8541$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008542if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008543 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008544else
Matthias Kloseb9621712010-04-24 17:59:49 +00008545 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 +00008546
Martin v. Löwis11437992002-04-12 09:54:03 +00008547else
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 if test "$ac_cv_type_float" = yes; then
8549 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8550$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008551as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008552See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008553 else
8554 ac_cv_sizeof_float=0
8555 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008556fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008557
Martin v. Löwis11437992002-04-12 09:54:03 +00008558fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8560$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008561
8562
8563
Martin v. Löwis11437992002-04-12 09:54:03 +00008564cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008565#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008566_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008567
8568
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008569# The cast to long int works around a bug in the HP C Compiler
8570# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8571# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8572# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8574$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008575if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008576 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008577else
Matthias Kloseb9621712010-04-24 17:59:49 +00008578 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 +00008579
Martin v. Löwis11437992002-04-12 09:54:03 +00008580else
Matthias Kloseb9621712010-04-24 17:59:49 +00008581 if test "$ac_cv_type_double" = yes; then
8582 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8583$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008584as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008585See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008586 else
8587 ac_cv_sizeof_double=0
8588 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008590
Martin v. Löwis11437992002-04-12 09:54:03 +00008591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8593$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008594
8595
8596
Martin v. Löwis11437992002-04-12 09:54:03 +00008597cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008598#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008599_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008600
8601
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008602# The cast to long int works around a bug in the HP C Compiler
8603# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8604# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8605# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8607$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008608if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008609 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008610else
Matthias Kloseb9621712010-04-24 17:59:49 +00008611 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 +00008612
Martin v. Löwis11437992002-04-12 09:54:03 +00008613else
Matthias Kloseb9621712010-04-24 17:59:49 +00008614 if test "$ac_cv_type_fpos_t" = yes; then
8615 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8616$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008617as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008618See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008619 else
8620 ac_cv_sizeof_fpos_t=0
8621 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008623
Martin v. Löwis11437992002-04-12 09:54:03 +00008624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8626$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008627
8628
8629
Martin v. Löwis11437992002-04-12 09:54:03 +00008630cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008631#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008632_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008633
Michael W. Hudson54241132001-12-07 15:38:26 +00008634
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008635# The cast to long int works around a bug in the HP C Compiler
8636# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8637# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8638# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8640$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008641if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008643else
Matthias Kloseb9621712010-04-24 17:59:49 +00008644 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 +00008645
Martin v. Löwis18e16552006-02-15 17:27:45 +00008646else
Matthias Kloseb9621712010-04-24 17:59:49 +00008647 if test "$ac_cv_type_size_t" = yes; then
8648 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8649$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008650as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008651See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008652 else
8653 ac_cv_sizeof_size_t=0
8654 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008656
Martin v. Löwis18e16552006-02-15 17:27:45 +00008657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8659$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008660
8661
8662
Martin v. Löwis18e16552006-02-15 17:27:45 +00008663cat >>confdefs.h <<_ACEOF
8664#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8665_ACEOF
8666
8667
Christian Heimes400adb02008-02-01 08:12:03 +00008668# The cast to long int works around a bug in the HP C Compiler
8669# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8670# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8671# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8673$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008674if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008675 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008676else
Matthias Kloseb9621712010-04-24 17:59:49 +00008677 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 +00008678
Christian Heimes400adb02008-02-01 08:12:03 +00008679else
Matthias Kloseb9621712010-04-24 17:59:49 +00008680 if test "$ac_cv_type_pid_t" = yes; then
8681 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8682$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008683as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008684See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008685 else
8686 ac_cv_sizeof_pid_t=0
8687 fi
8688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008689
Christian Heimes400adb02008-02-01 08:12:03 +00008690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8692$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008693
8694
8695
8696cat >>confdefs.h <<_ACEOF
8697#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8698_ACEOF
8699
8700
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008701# The cast to long int works around a bug in the HP C Compiler
8702# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8703# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8704# This bug is HP SR number 8606223364.
8705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8706$as_echo_n "checking size of uintptr_t... " >&6; }
8707if ${ac_cv_sizeof_uintptr_t+:} false; then :
8708 $as_echo_n "(cached) " >&6
8709else
8710 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8711
8712else
8713 if test "$ac_cv_type_uintptr_t" = yes; then
8714 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8715$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8716as_fn_error 77 "cannot compute sizeof (uintptr_t)
8717See \`config.log' for more details" "$LINENO" 5; }
8718 else
8719 ac_cv_sizeof_uintptr_t=0
8720 fi
8721fi
8722
8723fi
8724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8725$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8726
8727
8728
8729cat >>confdefs.h <<_ACEOF
8730#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8731_ACEOF
8732
8733
Michael W. Hudson54241132001-12-07 15:38:26 +00008734
Matthias Kloseb9621712010-04-24 17:59:49 +00008735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8736$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008737have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008739/* end confdefs.h. */
8740
8741int
8742main ()
8743{
8744long double x; x = (long double)0;
8745 ;
8746 return 0;
8747}
8748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008749if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008750
8751
Matthias Kloseb9621712010-04-24 17:59:49 +00008752$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008753
8754 have_long_double=yes
8755
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008756fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8759$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008760if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008761# The cast to long int works around a bug in the HP C Compiler
8762# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8763# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8764# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8766$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008767if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008768 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008769else
Matthias Kloseb9621712010-04-24 17:59:49 +00008770 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 +00008771
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008772else
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 if test "$ac_cv_type_long_double" = yes; then
8774 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8775$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008776as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008777See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008778 else
8779 ac_cv_sizeof_long_double=0
8780 fi
8781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008782
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8785$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008786
8787
8788
8789cat >>confdefs.h <<_ACEOF
8790#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8791_ACEOF
8792
8793
8794fi
8795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008796# The cast to long int works around a bug in the HP C Compiler
8797# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8798# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8799# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8801$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008802if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008803 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008804else
Matthias Kloseb9621712010-04-24 17:59:49 +00008805 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 +00008806
Thomas Woutersb2137042007-02-01 18:02:27 +00008807else
Matthias Kloseb9621712010-04-24 17:59:49 +00008808 if test "$ac_cv_type__Bool" = yes; then
8809 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8810$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008811as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008812See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008813 else
8814 ac_cv_sizeof__Bool=0
8815 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008817
Thomas Woutersb2137042007-02-01 18:02:27 +00008818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8820$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008821
8822
8823
Thomas Woutersb2137042007-02-01 18:02:27 +00008824cat >>confdefs.h <<_ACEOF
8825#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8826_ACEOF
8827
8828
Thomas Woutersb2137042007-02-01 18:02:27 +00008829
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008830# The cast to long int works around a bug in the HP C Compiler
8831# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8832# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8833# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8835$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008836if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008838else
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008840#ifdef HAVE_SYS_TYPES_H
8841#include <sys/types.h>
8842#endif
8843
Matthias Kloseb9621712010-04-24 17:59:49 +00008844"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008845
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008846else
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 if test "$ac_cv_type_off_t" = yes; then
8848 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8849$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008850as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008851See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008852 else
8853 ac_cv_sizeof_off_t=0
8854 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008856
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8859$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008860
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008861
8862
Martin v. Löwis11437992002-04-12 09:54:03 +00008863cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008864#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008865_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008866
Michael W. Hudson54241132001-12-07 15:38:26 +00008867
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008868
Matthias Kloseb9621712010-04-24 17:59:49 +00008869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8870$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008871if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008872 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008873
Matthias Kloseb9621712010-04-24 17:59:49 +00008874$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008875
Matthias Kloseb9621712010-04-24 17:59:49 +00008876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8877$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008878else
Matthias Kloseb9621712010-04-24 17:59:49 +00008879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8880$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008881fi
8882
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008883# The cast to long int works around a bug in the HP C Compiler
8884# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8885# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8886# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8888$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008889if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008890 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008891else
Matthias Kloseb9621712010-04-24 17:59:49 +00008892 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008893#ifdef HAVE_SYS_TYPES_H
8894#include <sys/types.h>
8895#endif
8896#ifdef HAVE_TIME_H
8897#include <time.h>
8898#endif
8899
Matthias Kloseb9621712010-04-24 17:59:49 +00008900"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008901
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008902else
Matthias Kloseb9621712010-04-24 17:59:49 +00008903 if test "$ac_cv_type_time_t" = yes; then
8904 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8905$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008906as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008907See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008908 else
8909 ac_cv_sizeof_time_t=0
8910 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008912
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8915$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008916
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008917
8918
Martin v. Löwis11437992002-04-12 09:54:03 +00008919cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008920#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008921_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008922
Michael W. Hudson54241132001-12-07 15:38:26 +00008923
8924
Trent Mick635f6fb2000-08-23 21:33:05 +00008925# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008926ac_save_cc="$CC"
8927if test "$ac_cv_kpthread" = "yes"
8928then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008929elif test "$ac_cv_kthread" = "yes"
8930then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008931elif test "$ac_cv_pthread" = "yes"
8932then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008933fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008934
Matthias Kloseb9621712010-04-24 17:59:49 +00008935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8936$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008937have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008939/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008940
8941 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008942int
8943main ()
8944{
Guido van Rossum12580492000-09-24 16:47:19 +00008945pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008946 ;
8947 return 0;
8948}
Matthias Kloseb159a552010-04-25 21:00:44 +00008949
Martin v. Löwis11437992002-04-12 09:54:03 +00008950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008951if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008952 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8956$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008957if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008959# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8960# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8961# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8963$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008964if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008965 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008966else
Matthias Kloseb9621712010-04-24 17:59:49 +00008967 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008968#ifdef HAVE_PTHREAD_H
8969#include <pthread.h>
8970#endif
8971
Matthias Kloseb9621712010-04-24 17:59:49 +00008972"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008973
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008974else
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 if test "$ac_cv_type_pthread_t" = yes; then
8976 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008978as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008979See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008980 else
8981 ac_cv_sizeof_pthread_t=0
8982 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008984
Trent Mick635f6fb2000-08-23 21:33:05 +00008985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8987$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008988
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008989
8990
Martin v. Löwis11437992002-04-12 09:54:03 +00008991cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008992#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008993_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008994
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008995
Trent Mick635f6fb2000-08-23 21:33:05 +00008996fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008997CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008998
Michael W. Hudson54241132001-12-07 15:38:26 +00008999
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009000case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009001 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009002 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9003 ;;
9004 Darwin/*)
9005 OTHER_LIBTOOL_OPT=""
9006 ;;
9007esac
9008
9009
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009010
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009011case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009012 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009013 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9014 if test "${enable_universalsdk}"; then
9015 :
9016 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009017 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009018 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009019 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009020 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009021 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009022 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009023 if test ${gcc_version} '<' 4.0
9024 then
9025 LIBTOOL_CRUFT="-lcc_dynamic"
9026 else
9027 LIBTOOL_CRUFT=""
9028 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009029 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009030 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009031else
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009033/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009034
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009035 #include <unistd.h>
9036 int main(int argc, char*argv[])
9037 {
9038 if (sizeof(long) == 4) {
9039 return 0;
9040 } else {
9041 return 1;
9042 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009043 }
9044
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009046if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009047 ac_osx_32bit=yes
9048else
Matthias Kloseb9621712010-04-24 17:59:49 +00009049 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009051rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9052 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009053fi
9054
9055
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009056 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009057 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009058 i386)
9059 MACOSX_DEFAULT_ARCH="i386"
9060 ;;
9061 ppc)
9062 MACOSX_DEFAULT_ARCH="ppc"
9063 ;;
9064 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009065 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009066 ;;
9067 esac
9068 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009069 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009070 i386)
9071 MACOSX_DEFAULT_ARCH="x86_64"
9072 ;;
9073 ppc)
9074 MACOSX_DEFAULT_ARCH="ppc64"
9075 ;;
9076 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009077 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009078 ;;
9079 esac
9080
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009081 fi
9082
9083 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009084 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009085 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009086esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9088$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009089if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009090then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009091 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009092 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009093 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009094
Matthias Kloseb9621712010-04-24 17:59:49 +00009095$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009096
Matthias Kloseb9621712010-04-24 17:59:49 +00009097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9098$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009099 if test $enable_shared = "yes"
9100 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009101 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 +00009102 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009103else
Matthias Kloseb9621712010-04-24 17:59:49 +00009104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9105$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009106fi
9107
Matthias Kloseb9621712010-04-24 17:59:49 +00009108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9109$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009110case $ac_sys_system/$ac_sys_release in
9111 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009112
Matthias Kloseb9621712010-04-24 17:59:49 +00009113$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009114
Matthias Kloseb9621712010-04-24 17:59:49 +00009115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9116$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009117 ;;
9118 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9120$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009121 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009122esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009123
Guido van Rossum0a516c91994-09-12 10:58:40 +00009124# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009125
Michael W. Hudson54241132001-12-07 15:38:26 +00009126
9127
9128
9129
Benjamin Peterson99f03762010-04-11 22:15:28 +00009130
Thomas Wouters477c8d52006-05-27 19:21:47 +00009131
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009132# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9133# -- usually .so, .sl on HP-UX, .dll on Cygwin
9134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9135$as_echo_n "checking the extension of shared libraries... " >&6; }
9136if test -z "$SHLIB_SUFFIX"; then
9137 case $ac_sys_system in
9138 hp*|HP*)
9139 case `uname -m` in
9140 ia64) SHLIB_SUFFIX=.so;;
9141 *) SHLIB_SUFFIX=.sl;;
9142 esac
9143 ;;
9144 CYGWIN*) SHLIB_SUFFIX=.dll;;
9145 *) SHLIB_SUFFIX=.so;;
9146 esac
9147fi
9148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9149$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009150
Guido van Rossum0a516c91994-09-12 10:58:40 +00009151# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009152# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009153# (Shared libraries in this instance are shared modules to be loaded into
9154# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9156$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009157if test -z "$LDSHARED"
9158then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009159 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009160 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009161 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009162 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009163 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009164 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009165 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009166 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009167 if test "$GCC" = "yes" ; then
9168 LDSHARED='$(CC) -shared'
9169 LDCXXSHARED='$(CXX) -shared'
9170 else
9171 LDSHARED='$(CC) -G'
9172 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009173 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009174 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009175 if test "$GCC" = "yes" ; then
9176 LDSHARED='$(CC) -shared'
9177 LDCXXSHARED='$(CXX) -shared'
9178 else
9179 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009180 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009181 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009182 LDSHARED='$(CC) -bundle'
9183 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009184 if test "$enable_framework" ; then
9185 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009186 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9187 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009188 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009189 else
9190 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009191 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009192 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009193 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009194 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009195 LDSHARED='$(CC) -bundle'
9196 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009197 if test "$enable_framework" ; then
9198 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009199 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9200 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009201 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009202 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009203 # No framework, use the Python app as bundle-loader
9204 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009205 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009206 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009207 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009208 Darwin/*)
9209 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9210 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009211
Ned Deily36820b62014-06-25 13:44:22 -07009212 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9213 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9214 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9215 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9216 if test ${dep_target_major} -eq 10 && \
9217 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009218 then
Ned Deily36820b62014-06-25 13:44:22 -07009219 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009220 LDSHARED='$(CC) -bundle'
9221 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009222 if test "$enable_framework" ; then
9223 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009224 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9225 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009226 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009227 else
9228 # No framework, use the Python app as bundle-loader
9229 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9230 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009231 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009232 fi
Ned Deily36820b62014-06-25 13:44:22 -07009233 else
9234 # building for OS X 10.3 and later
9235 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9236 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9237 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009238 fi
9239 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009240 Linux*|GNU*|QNX*)
9241 LDSHARED='$(CC) -shared'
9242 LDCXXSHARED='$(CXX) -shared';;
9243 BSD/OS*/4*)
9244 LDSHARED="gcc -shared"
9245 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009246 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009247 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009248 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009249 LDSHARED='$(CC) -shared'
9250 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009251 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009252 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009253 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009254 OpenBSD*)
9255 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9256 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009257 LDSHARED='$(CC) -shared $(CCSHARED)'
9258 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009259 else
9260 case `uname -r` in
9261 [01].* | 2.[0-7] | 2.[0-7].*)
9262 LDSHARED="ld -Bshareable ${LDFLAGS}"
9263 ;;
9264 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009265 LDSHARED='$(CC) -shared $(CCSHARED)'
9266 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009267 ;;
9268 esac
9269 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009270 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009271 LDSHARED='$(CC) -shared'
9272 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009273 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009274 if test "$GCC" = "yes" ; then
9275 LDSHARED='$(CC) -shared'
9276 LDCXXSHARED='$(CXX) -shared'
9277 else
9278 LDSHARED='$(CC) -G'
9279 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009280 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009281 SCO_SV*)
9282 LDSHARED='$(CC) -Wl,-G,-Bexport'
9283 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9284 CYGWIN*)
9285 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9286 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009287 *) LDSHARED="ld";;
9288 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009289fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9291$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009292LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009293BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009294# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009295# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9297$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009298if test -z "$CCSHARED"
9299then
Guido van Rossum07397971997-04-29 21:49:50 +00009300 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009301 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009302 then CCSHARED="-fPIC";
9303 elif test `uname -p` = sparc;
9304 then CCSHARED="-xcode=pic32";
9305 else CCSHARED="-Kpic";
9306 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009307 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009308 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009309 else CCSHARED="+z";
9310 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009311 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009312 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009313 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009314 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009315 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009316 if test "$GCC" = "yes"
9317 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009318 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009319 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009320 SCO_SV*)
9321 if test "$GCC" = "yes"
9322 then CCSHARED="-fPIC"
9323 else CCSHARED="-Kpic -belf"
9324 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009325 IRIX*/6*) case $CC in
9326 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009327 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009328 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009329 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9332$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009333# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009334# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9336$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009337if test -z "$LINKFORSHARED"
9338then
Guido van Rossum07397971997-04-29 21:49:50 +00009339 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009340 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009341 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009342 LINKFORSHARED="-Wl,-E -Wl,+s";;
9343# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009344 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009345 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009346 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009347 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009348 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009349 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009350
9351 # Issue #18075: the default maximum stack size (8MBytes) is too
9352 # small for the default recursion limit. Increase the stack size
9353 # to ensure that tests don't crash
9354 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9355
Jack Jansene578a632001-08-15 01:27:14 +00009356 if test "$enable_framework"
9357 then
Jack Jansenda49e192005-01-07 13:08:22 +00009358 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009359 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009360 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009361 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009362 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009363 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009364 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009365 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9366 then
9367 LINKFORSHARED="-Wl,--export-dynamic"
9368 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009369 SunOS/5*) case $CC in
9370 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009371 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009372 then
9373 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009374 fi;;
9375 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009376 CYGWIN*)
9377 if test $enable_shared = "no"
9378 then
9379 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9380 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009381 QNX*)
9382 # -Wl,-E causes the symbols to be added to the dynamic
9383 # symbol table so that they can be found when a module
9384 # is loaded. -N 2048K causes the stack size to be set
9385 # to 2048 kilobytes so that the stack doesn't overflow
9386 # when running test_compile.py.
9387 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009388 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009389fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9391$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009392
Michael W. Hudson54241132001-12-07 15:38:26 +00009393
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009394
Matthias Kloseb9621712010-04-24 17:59:49 +00009395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9396$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009397if test ! "$LIBRARY" = "$LDLIBRARY"
9398then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009399 case $ac_sys_system in
9400 CYGWIN*)
9401 # Cygwin needs CCSHARED when building extension DLLs
9402 # but not when building the interpreter DLL.
9403 CFLAGSFORSHARED='';;
9404 *)
9405 CFLAGSFORSHARED='$(CCSHARED)'
9406 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009407fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9409$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009410
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009411# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9412# library (with --enable-shared).
9413# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009414# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9415# if it is not required, since it creates a dependency of the shared library
9416# to LIBS. This, in turn, means that applications linking the shared libpython
9417# don't need to link LIBS explicitly. The default should be only changed
9418# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009419
Matthias Kloseb9621712010-04-24 17:59:49 +00009420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9421$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009422case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009423 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009424 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009425esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9427$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009428
9429
Guido van Rossum627b2d71993-12-24 10:39:16 +00009430# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9432$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009433if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009434 $as_echo_n "(cached) " >&6
9435else
9436 ac_check_lib_save_LIBS=$LIBS
9437LIBS="-lsendfile $LIBS"
9438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9439/* end confdefs.h. */
9440
9441/* Override any GCC internal prototype to avoid an error.
9442 Use char because int might match the return type of a GCC
9443 builtin and then its argument prototype would still apply. */
9444#ifdef __cplusplus
9445extern "C"
9446#endif
9447char sendfile ();
9448int
9449main ()
9450{
9451return sendfile ();
9452 ;
9453 return 0;
9454}
9455_ACEOF
9456if ac_fn_c_try_link "$LINENO"; then :
9457 ac_cv_lib_sendfile_sendfile=yes
9458else
9459 ac_cv_lib_sendfile_sendfile=no
9460fi
9461rm -f core conftest.err conftest.$ac_objext \
9462 conftest$ac_exeext conftest.$ac_ext
9463LIBS=$ac_check_lib_save_LIBS
9464fi
9465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9466$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009467if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009468 cat >>confdefs.h <<_ACEOF
9469#define HAVE_LIBSENDFILE 1
9470_ACEOF
9471
9472 LIBS="-lsendfile $LIBS"
9473
9474fi
9475
Matthias Kloseb9621712010-04-24 17:59:49 +00009476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9477$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009478if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009479 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009480else
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009482LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009485
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009486/* Override any GCC internal prototype to avoid an error.
9487 Use char because int might match the return type of a GCC
9488 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009489#ifdef __cplusplus
9490extern "C"
9491#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009492char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009493int
9494main ()
9495{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009496return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 ;
9498 return 0;
9499}
9500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009501if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009502 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009503else
Matthias Kloseb9621712010-04-24 17:59:49 +00009504 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009505fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009506rm -f core conftest.err conftest.$ac_objext \
9507 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009508LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009509fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9511$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009512if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 cat >>confdefs.h <<_ACEOF
9514#define HAVE_LIBDL 1
9515_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009516
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009517 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009518
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009519fi
9520 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9522$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009523if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009524 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009525else
Martin v. Löwis11437992002-04-12 09:54:03 +00009526 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009527LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009529/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009530
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009531/* Override any GCC internal prototype to avoid an error.
9532 Use char because int might match the return type of a GCC
9533 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009534#ifdef __cplusplus
9535extern "C"
9536#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009537char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009538int
9539main ()
9540{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009541return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009542 ;
9543 return 0;
9544}
9545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009546if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009547 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009548else
Matthias Kloseb9621712010-04-24 17:59:49 +00009549 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009550fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009551rm -f core conftest.err conftest.$ac_objext \
9552 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009553LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9556$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009557if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009558 cat >>confdefs.h <<_ACEOF
9559#define HAVE_LIBDLD 1
9560_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009561
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009562 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009563
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009564fi
9565 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009566
Georg Brandlb1441c72009-01-03 22:33:39 +00009567# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009568if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9570$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009571if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009572 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009573else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009574 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009576/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009577
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009578/* Override any GCC internal prototype to avoid an error.
9579 Use char because int might match the return type of a GCC
9580 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009581#ifdef __cplusplus
9582extern "C"
9583#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009584char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009585int
9586main ()
9587{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009588return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009589 ;
9590 return 0;
9591}
9592_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009593for ac_lib in '' pthread rt posix4; do
9594 if test -z "$ac_lib"; then
9595 ac_res="none required"
9596 else
9597 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009598 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009599 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009600 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009601 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009603rm -f core conftest.err conftest.$ac_objext \
9604 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009605 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009606 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009608done
Victor Stinnere0be4232011-10-25 13:06:09 +02009609if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009611else
9612 ac_cv_search_sem_init=no
9613fi
9614rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009615LIBS=$ac_func_search_save_LIBS
9616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9618$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009619ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009620if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009621 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009622
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009623fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009624 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009625 # posix4 on Solaris 2.6
9626 # pthread (first!) on Linux
9627fi
9628
Martin v. Löwis19d17342003-06-14 21:03:05 +00009629# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9631$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009632if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009633 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009634else
9635 ac_check_lib_save_LIBS=$LIBS
9636LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009638/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009639
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009640/* Override any GCC internal prototype to avoid an error.
9641 Use char because int might match the return type of a GCC
9642 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009643#ifdef __cplusplus
9644extern "C"
9645#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009646char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009647int
9648main ()
9649{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009650return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009651 ;
9652 return 0;
9653}
9654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009655if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009656 ac_cv_lib_intl_textdomain=yes
9657else
Matthias Kloseb9621712010-04-24 17:59:49 +00009658 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009660rm -f core conftest.err conftest.$ac_objext \
9661 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009662LIBS=$ac_check_lib_save_LIBS
9663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9665$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009666if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009667
Matthias Kloseb9621712010-04-24 17:59:49 +00009668$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009669
Brett Cannonc6d936e2009-06-07 20:09:53 +00009670 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009671fi
9672
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009673
9674# checks for system dependent C++ extensions support
9675case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009676 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9677$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009679/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009680
Georg Brandl59e87bd2011-02-15 19:48:59 +00009681 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009682int
9683main ()
9684{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009685loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009686 ;
9687 return 0;
9688}
Matthias Kloseb159a552010-04-25 21:00:44 +00009689
Martin v. Löwis11437992002-04-12 09:54:03 +00009690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009691if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009692
Matthias Kloseb159a552010-04-25 21:00:44 +00009693
Matthias Kloseb9621712010-04-24 17:59:49 +00009694$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009695
Matthias Kloseb159a552010-04-25 21:00:44 +00009696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009697$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009698
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009699else
Matthias Kloseb159a552010-04-25 21:00:44 +00009700
9701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009702$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009703
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009705rm -f core conftest.err conftest.$ac_objext \
9706 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009707 *) ;;
9708esac
9709
Christian Heimes985ecdc2013-11-20 11:46:18 +01009710# check for systems that require aligned memory access
9711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9712$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009713if ${ac_cv_aligned_required+:} false; then :
9714 $as_echo_n "(cached) " >&6
9715else
9716 if test "$cross_compiling" = yes; then :
9717 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009718else
9719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9720/* end confdefs.h. */
9721
9722int main()
9723{
9724 char s[16];
9725 int i, *p1, *p2;
9726 for (i=0; i < 16; i++)
9727 s[i] = i;
9728 p1 = (int*)(s+1);
9729 p2 = (int*)(s+2);
9730 if (*p1 == *p2)
9731 return 1;
9732 return 0;
9733}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009734_ACEOF
9735if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009736 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009737else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009738 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009739fi
9740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9741 conftest.$ac_objext conftest.beam conftest.$ac_ext
9742fi
9743
9744
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009745fi
9746
9747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9748$as_echo "$ac_cv_aligned_required" >&6; }
9749if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009750
9751$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9752
9753fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009754
9755# str, bytes and memoryview hash algorithm
9756
9757
9758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9759$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9760
9761# Check whether --with-hash_algorithm was given.
9762if test "${with_hash_algorithm+set}" = set; then :
9763 withval=$with_hash_algorithm;
9764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9765$as_echo "$withval" >&6; }
9766case "$withval" in
9767 siphash24)
9768 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9769
9770 ;;
9771 fnv)
9772 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9773
9774 ;;
9775 *)
9776 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9777 ;;
9778esac
9779
9780else
9781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9782$as_echo "default" >&6; }
9783fi
9784
9785
Charles-François Natalid30b0222014-05-08 23:08:51 +01009786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9787$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9788
9789# Check whether --with-address_sanitizer was given.
9790if test "${with_address_sanitizer+set}" = set; then :
9791 withval=$with_address_sanitizer;
9792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9793$as_echo "$withval" >&6; }
9794BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9795LDFLAGS="-fsanitize=address $LDFLAGS"
9796
9797else
9798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9799$as_echo "no" >&6; }
9800fi
9801
9802
Guido van Rossum70c7f481998-03-26 18:44:10 +00009803# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9805$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009806if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009807 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009808else
Martin v. Löwis11437992002-04-12 09:54:03 +00009809 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009810LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009814/* Override any GCC internal prototype to avoid an error.
9815 Use char because int might match the return type of a GCC
9816 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009817#ifdef __cplusplus
9818extern "C"
9819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009820char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009821int
9822main ()
9823{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009824return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009825 ;
9826 return 0;
9827}
9828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009829if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009831else
Matthias Kloseb9621712010-04-24 17:59:49 +00009832 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009834rm -f core conftest.err conftest.$ac_objext \
9835 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009836LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9839$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009840if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009841 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009842fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009843 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9845$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009846if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009847 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009848else
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009850LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009852/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854/* Override any GCC internal prototype to avoid an error.
9855 Use char because int might match the return type of a GCC
9856 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009857#ifdef __cplusplus
9858extern "C"
9859#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009860char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009861int
9862main ()
9863{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009864return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009865 ;
9866 return 0;
9867}
9868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009869if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009870 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009871else
Matthias Kloseb9621712010-04-24 17:59:49 +00009872 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009874rm -f core conftest.err conftest.$ac_objext \
9875 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009876LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9879$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009880if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009881 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009882fi
9883 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009884
Matthias Kloseb9621712010-04-24 17:59:49 +00009885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9886$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009887
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009888# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009889if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009890 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9892$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009893LIBS="$withval $LIBS"
9894
9895else
Matthias Kloseb9621712010-04-24 17:59:49 +00009896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9897$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009898fi
9899
Guido van Rossum7f43da71994-08-01 12:15:30 +00009900
Victor Stinner8291b5e2015-03-20 16:03:14 +01009901
9902
9903
9904
9905
9906
9907
9908if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9909 if test -n "$ac_tool_prefix"; then
9910 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9911set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9913$as_echo_n "checking for $ac_word... " >&6; }
9914if ${ac_cv_path_PKG_CONFIG+:} false; then :
9915 $as_echo_n "(cached) " >&6
9916else
9917 case $PKG_CONFIG in
9918 [\\/]* | ?:[\\/]*)
9919 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9920 ;;
9921 *)
9922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9923for as_dir in $PATH
9924do
9925 IFS=$as_save_IFS
9926 test -z "$as_dir" && as_dir=.
9927 for ac_exec_ext in '' $ac_executable_extensions; do
9928 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9929 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9931 break 2
9932 fi
9933done
9934 done
9935IFS=$as_save_IFS
9936
9937 ;;
9938esac
9939fi
9940PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9941if test -n "$PKG_CONFIG"; then
9942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9943$as_echo "$PKG_CONFIG" >&6; }
9944else
9945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9946$as_echo "no" >&6; }
9947fi
9948
9949
9950fi
9951if test -z "$ac_cv_path_PKG_CONFIG"; then
9952 ac_pt_PKG_CONFIG=$PKG_CONFIG
9953 # Extract the first word of "pkg-config", so it can be a program name with args.
9954set dummy pkg-config; ac_word=$2
9955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9956$as_echo_n "checking for $ac_word... " >&6; }
9957if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9958 $as_echo_n "(cached) " >&6
9959else
9960 case $ac_pt_PKG_CONFIG in
9961 [\\/]* | ?:[\\/]*)
9962 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9963 ;;
9964 *)
9965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9966for as_dir in $PATH
9967do
9968 IFS=$as_save_IFS
9969 test -z "$as_dir" && as_dir=.
9970 for ac_exec_ext in '' $ac_executable_extensions; do
9971 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9972 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9974 break 2
9975 fi
9976done
9977 done
9978IFS=$as_save_IFS
9979
9980 ;;
9981esac
9982fi
9983ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9984if test -n "$ac_pt_PKG_CONFIG"; then
9985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9986$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9987else
9988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9989$as_echo "no" >&6; }
9990fi
9991
9992 if test "x$ac_pt_PKG_CONFIG" = x; then
9993 PKG_CONFIG=""
9994 else
9995 case $cross_compiling:$ac_tool_warned in
9996yes:)
9997{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9998$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9999ac_tool_warned=yes ;;
10000esac
10001 PKG_CONFIG=$ac_pt_PKG_CONFIG
10002 fi
10003else
10004 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10005fi
10006
10007fi
10008if test -n "$PKG_CONFIG"; then
10009 _pkg_min_version=0.9.0
10010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10011$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10012 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10014$as_echo "yes" >&6; }
10015 else
10016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10017$as_echo "no" >&6; }
10018 PKG_CONFIG=""
10019 fi
10020fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010021
10022# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10024$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010025
10026# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010027if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010028 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010029else
10030 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010031fi
10032
10033
Matthias Kloseb9621712010-04-24 17:59:49 +000010034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10035$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010036
10037# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10039$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010040
10041# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010042if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010043 withval=$with_system_ffi;
10044fi
10045
10046
Zachary Waref40d4dd2016-09-17 01:25:24 -050010047if test "$ac_sys_system" = "Darwin"
10048then
10049 case "$with_system_ffi" in
10050 "")
10051 with_system_ffi="no"
10052 ;;
10053 yes|no)
10054 ;;
10055 *)
10056 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10057 ;;
10058 esac
10059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10060$as_echo "$with_system_ffi" >&6; }
10061else
10062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10063$as_echo "yes" >&6; }
10064 if test "$with_system_ffi" != ""
10065 then
10066 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10067$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10068 fi
10069 with_system_ffi="yes"
10070fi
Zachary Ware935043d2016-09-09 17:01:21 -070010071
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010072if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010073 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10074else
10075 LIBFFI_INCLUDEDIR=""
10076fi
10077
10078
Stefan Krah60187b52012-03-23 19:06:27 +010010079# Check for use of the system libmpdec library
10080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10081$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10082
10083# Check whether --with-system_libmpdec was given.
10084if test "${with_system_libmpdec+set}" = set; then :
10085 withval=$with_system_libmpdec;
10086else
10087 with_system_libmpdec="no"
10088fi
10089
10090
10091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10092$as_echo "$with_system_libmpdec" >&6; }
10093
Benjamin Peterson076ed002010-10-31 17:11:02 +000010094# Check for support for loadable sqlite extensions
10095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10096$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10097# Check whether --enable-loadable-sqlite-extensions was given.
10098if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10099 enableval=$enable_loadable_sqlite_extensions;
10100else
10101 enable_loadable_sqlite_extensions="no"
10102fi
10103
10104
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10106$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10107
Ned Deilyd819b932013-09-06 01:07:05 -070010108# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10109
10110
10111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10112$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10113
10114# Check whether --with-tcltk-includes was given.
10115if test "${with_tcltk_includes+set}" = set; then :
10116 withval=$with_tcltk_includes;
10117else
10118 with_tcltk_includes="default"
10119fi
10120
10121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10122$as_echo "$with_tcltk_includes" >&6; }
10123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10124$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10125
10126# Check whether --with-tcltk-libs was given.
10127if test "${with_tcltk_libs+set}" = set; then :
10128 withval=$with_tcltk_libs;
10129else
10130 with_tcltk_libs="default"
10131fi
10132
10133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10134$as_echo "$with_tcltk_libs" >&6; }
10135if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10136then
10137 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10138 then
10139 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10140 fi
10141 TCLTK_INCLUDES=""
10142 TCLTK_LIBS=""
10143else
10144 TCLTK_INCLUDES="$with_tcltk_includes"
10145 TCLTK_LIBS="$with_tcltk_libs"
10146fi
10147
Matthias Klose55708cc2009-04-30 08:06:49 +000010148# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10150$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010151
10152# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010153if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010154 withval=$with_dbmliborder;
10155if test x$with_dbmliborder = xyes
10156then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010157as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010158else
10159 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10160 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10161 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010162 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010163 fi
10164 done
10165fi
10166fi
10167
Matthias Kloseb9621712010-04-24 17:59:49 +000010168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10169$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010170
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010171# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010172
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010173USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010175
Martin v. Löwis11437992002-04-12 09:54:03 +000010176
10177# Templates for things AC_DEFINEd more than once.
10178# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010179
10180
Martin v. Löwis11437992002-04-12 09:54:03 +000010181
Matthias Kloseb9621712010-04-24 17:59:49 +000010182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10183$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010185# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010186if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010187 withval=$with_threads;
10188fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010189
10190
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010191# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010193# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010194if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010195 withval=$with_thread; with_threads=$with_thread
10196fi
10197
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010198
10199if test -z "$with_threads"
10200then with_threads="yes"
10201fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10203$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010204
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010205
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010206if test "$with_threads" = "no"
10207then
10208 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010209elif test "$ac_cv_pthread_is_default" = yes
10210then
Matthias Kloseb9621712010-04-24 17:59:49 +000010211 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010212
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010213 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010214 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010215
10216 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010217 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010218elif test "$ac_cv_kpthread" = "yes"
10219then
10220 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010221 if test "$ac_cv_cxx_thread" = "yes"; then
10222 CXX="$CXX -Kpthread"
10223 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010224 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010225
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010226 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010227 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010228elif test "$ac_cv_kthread" = "yes"
10229then
10230 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010231 if test "$ac_cv_cxx_thread" = "yes"; then
10232 CXX="$CXX -Kthread"
10233 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010234 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010235
10236 posix_threads=yes
10237 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010238elif test "$ac_cv_pthread" = "yes"
10239then
10240 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010241 if test "$ac_cv_cxx_thread" = "yes"; then
10242 CXX="$CXX -pthread"
10243 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010244 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010245
10246 posix_threads=yes
10247 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010248else
10249 if test ! -z "$with_threads" -a -d "$with_threads"
10250 then LDFLAGS="$LDFLAGS -L$with_threads"
10251 fi
10252 if test ! -z "$withval" -a -d "$withval"
10253 then LDFLAGS="$LDFLAGS -L$withval"
10254 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010255
10256 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010257 # define _POSIX_THREADS in unistd.h. Some apparently don't
10258 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10260$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010262/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010263
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010264#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010265#ifdef _POSIX_THREADS
10266yes
10267#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010268
10269_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010270if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010271 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010272 unistd_defines_pthreads=yes
10273else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010274 unistd_defines_pthreads=no
10275fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010276rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010277
Matthias Kloseb9621712010-04-24 17:59:49 +000010278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10279$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010280
Matthias Kloseb9621712010-04-24 17:59:49 +000010281 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010282
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010283 # Just looking for pthread_create in libpthread is not enough:
10284 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10285 # So we really have to include pthread.h, and then link.
10286 _libs=$LIBS
10287 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10289$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010291/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010292
10293#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010294#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010295
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010296void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010297int
10298main ()
10299{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010300
10301pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010302 ;
10303 return 0;
10304}
10305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010306if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010307
Matthias Kloseb9621712010-04-24 17:59:49 +000010308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10309$as_echo "yes" >&6; }
10310 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010311
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010312 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010313 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010314else
Martin v. Löwis11437992002-04-12 09:54:03 +000010315
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010316 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010317 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010318if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010319 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010320
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010321 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010322 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010323else
Guido van Rossumad678af1998-10-02 14:42:15 +000010324
Matthias Kloseb9621712010-04-24 17:59:49 +000010325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10326$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010327if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010328 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010329else
Martin v. Löwis11437992002-04-12 09:54:03 +000010330 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010331LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010334
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010335/* Override any GCC internal prototype to avoid an error.
10336 Use char because int might match the return type of a GCC
10337 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010338#ifdef __cplusplus
10339extern "C"
10340#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010341char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010342int
10343main ()
10344{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010345return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010346 ;
10347 return 0;
10348}
10349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010350if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010351 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010352else
Matthias Kloseb9621712010-04-24 17:59:49 +000010353 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010354fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010355rm -f core conftest.err conftest.$ac_objext \
10356 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010357LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010358fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10360$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010361if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010362 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010363
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010364 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010365 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010366 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010367else
Greg Steinadf63d62000-07-05 10:38:09 +000010368
Matthias Kloseb9621712010-04-24 17:59:49 +000010369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10370$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010371if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010372 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010373else
Martin v. Löwis11437992002-04-12 09:54:03 +000010374 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010375LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010377/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010378
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010379/* Override any GCC internal prototype to avoid an error.
10380 Use char because int might match the return type of a GCC
10381 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010382#ifdef __cplusplus
10383extern "C"
10384#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010385char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010386int
10387main ()
10388{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010389return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010390 ;
10391 return 0;
10392}
10393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010394if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010395 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010396else
Matthias Kloseb9621712010-04-24 17:59:49 +000010397 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010398fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010399rm -f core conftest.err conftest.$ac_objext \
10400 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010401LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010402fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10404$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010405if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010406 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010407
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010408 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010409 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010410 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010411else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010412
Matthias Kloseb9621712010-04-24 17:59:49 +000010413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10414$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010415if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010416 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010417else
Martin v. Löwis11437992002-04-12 09:54:03 +000010418 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010419LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010421/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010422
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010423/* Override any GCC internal prototype to avoid an error.
10424 Use char because int might match the return type of a GCC
10425 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010426#ifdef __cplusplus
10427extern "C"
10428#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010429char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010430int
10431main ()
10432{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010433return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010434 ;
10435 return 0;
10436}
10437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010438if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010439 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010440else
Matthias Kloseb9621712010-04-24 17:59:49 +000010441 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010442fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010443rm -f core conftest.err conftest.$ac_objext \
10444 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010445LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010446fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10448$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010449if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010450 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010451
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010452 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010453 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010454 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010455else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010456
Matthias Kloseb9621712010-04-24 17:59:49 +000010457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10458$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010459if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010460 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010461else
Martin v. Löwis11437992002-04-12 09:54:03 +000010462 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010463LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010465/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010467/* Override any GCC internal prototype to avoid an error.
10468 Use char because int might match the return type of a GCC
10469 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010470#ifdef __cplusplus
10471extern "C"
10472#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010473char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010474int
10475main ()
10476{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010477return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010478 ;
10479 return 0;
10480}
10481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010482if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010483 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010484else
Matthias Kloseb9621712010-04-24 17:59:49 +000010485 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010486fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010487rm -f core conftest.err conftest.$ac_objext \
10488 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010489LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10492$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010493if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010494 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010495
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010496 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010497 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010498 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010499else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010500
Martin v. Löwis130fb172001-07-19 11:00:41 +000010501 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010502fi
10503
Guido van Rossum627b2d71993-12-24 10:39:16 +000010504
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010505fi
10506
Guido van Rossum0be3e491997-05-22 20:33:33 +000010507fi
10508
Guido van Rossum49545951997-12-02 19:28:29 +000010509fi
10510
Guido van Rossumb93a8621998-05-07 13:27:32 +000010511fi
10512
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010513fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010514rm -f core conftest.err conftest.$ac_objext \
10515 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010516
Matthias Kloseb9621712010-04-24 17:59:49 +000010517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10518$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010519if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010520 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010521else
Martin v. Löwis11437992002-04-12 09:54:03 +000010522 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010523LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010525/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010527/* Override any GCC internal prototype to avoid an error.
10528 Use char because int might match the return type of a GCC
10529 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010530#ifdef __cplusplus
10531extern "C"
10532#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010533char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010534int
10535main ()
10536{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010537return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010538 ;
10539 return 0;
10540}
10541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010542if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010543 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010544else
Matthias Kloseb9621712010-04-24 17:59:49 +000010545 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010546fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010547rm -f core conftest.err conftest.$ac_objext \
10548 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010549LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010550fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10552$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010553if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010554 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010555
Martin v. Löwis130fb172001-07-19 11:00:41 +000010556 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010557 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010558 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010559fi
10560
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010561
Neal Norwitza978ab02002-11-02 16:58:05 +000010562 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10564$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010565if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010566 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010567else
Martin v. Löwis11437992002-04-12 09:54:03 +000010568 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010569LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010572
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010573/* Override any GCC internal prototype to avoid an error.
10574 Use char because int might match the return type of a GCC
10575 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010576#ifdef __cplusplus
10577extern "C"
10578#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010579char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010580int
10581main ()
10582{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010583return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010584 ;
10585 return 0;
10586}
10587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010588if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010589 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010590else
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010593rm -f core conftest.err conftest.$ac_objext \
10594 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010595LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010596fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10598$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010599if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010600 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010601
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010602 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010603 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010604 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010605fi
10606
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010607 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010608fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010609
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010610if test "$posix_threads" = "yes"; then
10611 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010612
Matthias Kloseb9621712010-04-24 17:59:49 +000010613$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010614
10615 fi
10616
10617 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10618 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010619 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010620$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010621
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010622 ;;
10623 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010624$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010625
10626 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010627 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010628$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010629
10630 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010631 esac
10632
Matthias Kloseb9621712010-04-24 17:59:49 +000010633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10634$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010635 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010636 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010637else
Matthias Kloseb9621712010-04-24 17:59:49 +000010638 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010639 ac_cv_pthread_system_supported=no
10640else
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010642/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010643
10644 #include <stdio.h>
10645 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010646 void *foo(void *parm) {
10647 return NULL;
10648 }
10649 main() {
10650 pthread_attr_t attr;
10651 pthread_t id;
10652 if (pthread_attr_init(&attr)) exit(-1);
10653 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10654 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10655 exit(0);
10656 }
10657_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010658if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010659 ac_cv_pthread_system_supported=yes
10660else
Matthias Kloseb9621712010-04-24 17:59:49 +000010661 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010662fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010663rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10664 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010665fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010666
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010667
Guido van Rossum627b2d71993-12-24 10:39:16 +000010668fi
10669
Matthias Kloseb9621712010-04-24 17:59:49 +000010670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10671$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010672 if test "$ac_cv_pthread_system_supported" = "yes"; then
10673
Matthias Kloseb9621712010-04-24 17:59:49 +000010674$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010675
10676 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010677 for ac_func in pthread_sigmask
10678do :
10679 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010680if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010681 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010682#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010683_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010684 case $ac_sys_system in
10685 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010686
Matthias Kloseb9621712010-04-24 17:59:49 +000010687$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010688
10689 ;;
10690 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010691fi
10692done
10693
Christian Heimesf77b4b22013-08-21 13:26:05 +020010694 for ac_func in pthread_atfork
10695do :
10696 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10697if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10698 cat >>confdefs.h <<_ACEOF
10699#define HAVE_PTHREAD_ATFORK 1
10700_ACEOF
10701
10702fi
10703done
10704
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010705fi
10706
10707
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010708# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010709
Matthias Kloseb9621712010-04-24 17:59:49 +000010710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10711$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010712# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010713if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010714 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010715 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10717$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010718 ipv6=no
10719 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010720 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10721$as_echo "yes" >&6; }
10722 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010723
10724 ipv6=yes
10725 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010726 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010727else
Martin v. Löwis11437992002-04-12 09:54:03 +000010728
Matthias Kloseb9621712010-04-24 17:59:49 +000010729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010730/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010731 /* AF_INET6 available check */
10732#include <sys/types.h>
10733#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010734int
10735main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010736{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010737int domain = AF_INET6;
10738 ;
10739 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010740}
Martin v. Löwis11437992002-04-12 09:54:03 +000010741_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010742if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010743
Matthias Kloseb9621712010-04-24 17:59:49 +000010744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10745$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010746 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010747
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010748else
Matthias Kloseb159a552010-04-25 21:00:44 +000010749
Matthias Kloseb9621712010-04-24 17:59:49 +000010750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10751$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010752 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010753
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010754fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010756
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010757if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10759$as_echo_n "checking if RFC2553 API is available... " >&6; }
10760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010761/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010762
10763 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010764#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010765int
10766main ()
10767{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010768struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010769 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010770 ;
10771 return 0;
10772}
Matthias Kloseb159a552010-04-25 21:00:44 +000010773
Martin v. Löwis11437992002-04-12 09:54:03 +000010774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010775if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010776
10777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010778$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010779 ipv6=yes
10780
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010781else
Matthias Kloseb159a552010-04-25 21:00:44 +000010782
10783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010784$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010785 ipv6=no
10786
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010789fi
10790
10791if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010792 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010793
10794fi
10795
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010796fi
10797
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010798
10799ipv6type=unknown
10800ipv6lib=none
10801ipv6trylibc=no
10802
10803if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10805$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010806 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10807 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010808 case $i in
10809 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010811/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010812
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010813#include <netinet/in.h>
10814#ifdef IPV6_INRIA_VERSION
10815yes
10816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010817_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010818if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010820 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010821fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010822rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823
10824 ;;
10825 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010827/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010828
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010829#include <netinet/in.h>
10830#ifdef __KAME__
10831yes
10832#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010833_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010834if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010835 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010836 ipv6type=$i;
10837 ipv6lib=inet6
10838 ipv6libdir=/usr/local/v6/lib
10839 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010840fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010841rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010842
10843 ;;
10844 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010846/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010847
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010848#include <features.h>
10849#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10850yes
10851#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010852_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010853if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010854 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010855 ipv6type=$i;
10856 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010857fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010858rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010859
10860 ;;
10861 linux-inet6)
10862 if test -d /usr/inet6; then
10863 ipv6type=$i
10864 ipv6lib=inet6
10865 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010866 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010867 fi
10868 ;;
10869 solaris)
10870 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010871 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010872 ipv6type=$i
10873 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010874 fi
10875 fi
10876 ;;
10877 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010879/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010880
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010881#include <sys/param.h>
10882#ifdef _TOSHIBA_INET6
10883yes
10884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010885_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010886if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010887 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010888 ipv6type=$i;
10889 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010890 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010891fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010892rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010893
10894 ;;
10895 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010897/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010898
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010899#include </usr/local/v6/include/sys/v6config.h>
10900#ifdef __V6D__
10901yes
10902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010903_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010904if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010905 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010906 ipv6type=$i;
10907 ipv6lib=v6;
10908 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010909 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010910fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010911rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010912
10913 ;;
10914 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010916/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010917
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010918#include <sys/param.h>
10919#ifdef _ZETA_MINAMI_INET6
10920yes
10921#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010922_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010923if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010924 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010925 ipv6type=$i;
10926 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010927 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010928fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010929rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010930
10931 ;;
10932 esac
10933 if test "$ipv6type" != "unknown"; then
10934 break
10935 fi
10936 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10938$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010939fi
10940
10941if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10942 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10943 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10944 echo "using lib$ipv6lib"
10945 else
10946 if test $ipv6trylibc = "yes"; then
10947 echo "using libc"
10948 else
10949 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10950 echo "You need to fetch lib$ipv6lib.a from appropriate"
10951 echo 'ipv6 kit and compile beforehand.'
10952 exit 1
10953 fi
10954 fi
10955fi
10956
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10958$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10960/* end confdefs.h. */
10961 /* CAN_RAW_FD_FRAMES available check */
10962#include <linux/can/raw.h>
10963int
10964main ()
10965{
10966int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10967 ;
10968 return 0;
10969}
10970_ACEOF
10971if ac_fn_c_try_compile "$LINENO"; then :
10972
10973
10974$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10975
10976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10977$as_echo "yes" >&6; }
10978
10979else
10980
10981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10982$as_echo "no" >&6; }
10983
10984fi
10985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10986
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010987# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10989$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010991# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010992if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010993 withval=$with_doc_strings;
10994fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010995
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010996
10997if test -z "$with_doc_strings"
10998then with_doc_strings="yes"
10999fi
11000if test "$with_doc_strings" != "no"
11001then
11002
Matthias Kloseb9621712010-04-24 17:59:49 +000011003$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011004
11005fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11007$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011008
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011009# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11011$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011013# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011014if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011015 withval=$with_pymalloc;
11016fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011017
Neil Schemenauera35c6882001-02-27 04:45:05 +000011018
Neil Schemenauer16c22972002-03-22 15:34:49 +000011019if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011020then
11021 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011022fi
11023if test "$with_pymalloc" != "no"
11024then
Martin v. Löwis11437992002-04-12 09:54:03 +000011025
Matthias Kloseb9621712010-04-24 17:59:49 +000011026$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011027
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011028 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011029fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11031$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011032
Benjamin Peterson05159c42009-12-03 03:01:27 +000011033# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11035$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011036
11037# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011038if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011039 withval=$with_valgrind;
11040else
11041 with_valgrind=no
11042fi
11043
Matthias Kloseb9621712010-04-24 17:59:49 +000011044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11045$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011046if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011047 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 +020011048if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011049
Matthias Kloseb9621712010-04-24 17:59:49 +000011050$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011051
11052else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011053 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011054
11055fi
11056
11057
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011058 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011059fi
11060
Łukasz Langaa785c872016-09-09 17:37:37 -070011061# Check for DTrace support
11062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11063$as_echo_n "checking for --with-dtrace... " >&6; }
11064
11065# Check whether --with-dtrace was given.
11066if test "${with_dtrace+set}" = set; then :
11067 withval=$with_dtrace;
11068else
11069 with_dtrace=no
11070fi
11071
11072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11073$as_echo "$with_dtrace" >&6; }
11074
11075
11076
11077
11078
11079DTRACE=
11080DFLAGS=
11081DTRACE_HEADERS=
11082DTRACE_OBJS=
11083
11084if test "$with_dtrace" = "yes"
11085then
11086 # Extract the first word of "dtrace", so it can be a program name with args.
11087set dummy dtrace; ac_word=$2
11088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11089$as_echo_n "checking for $ac_word... " >&6; }
11090if ${ac_cv_path_DTRACE+:} false; then :
11091 $as_echo_n "(cached) " >&6
11092else
11093 case $DTRACE in
11094 [\\/]* | ?:[\\/]*)
11095 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11096 ;;
11097 *)
11098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11099for as_dir in $PATH
11100do
11101 IFS=$as_save_IFS
11102 test -z "$as_dir" && as_dir=.
11103 for ac_exec_ext in '' $ac_executable_extensions; do
11104 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11105 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11107 break 2
11108 fi
11109done
11110 done
11111IFS=$as_save_IFS
11112
11113 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11114 ;;
11115esac
11116fi
11117DTRACE=$ac_cv_path_DTRACE
11118if test -n "$DTRACE"; then
11119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11120$as_echo "$DTRACE" >&6; }
11121else
11122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11123$as_echo "no" >&6; }
11124fi
11125
11126
11127 if test "$DTRACE" = "not found"; then
11128 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11129 fi
11130
11131$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11132
11133 DTRACE_HEADERS="Include/pydtrace_probes.h"
11134
11135 # On OS X, DTrace providers do not need to be explicitly compiled and
11136 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11137 # generation flag '-G'. We check for presence of this flag, rather than
11138 # hardcoding support by OS, in the interest of robustness.
11139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11140$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11141if ${ac_cv_dtrace_link+:} false; then :
11142 $as_echo_n "(cached) " >&6
11143else
11144 ac_cv_dtrace_link=no
11145 echo 'BEGIN' > conftest.d
11146 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11147 ac_cv_dtrace_link=yes
11148
11149fi
11150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11151$as_echo "$ac_cv_dtrace_link" >&6; }
11152 if test "$ac_cv_dtrace_link" = "yes"; then
11153 DTRACE_OBJS="Python/pydtrace.o"
11154 fi
11155fi
11156
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011157# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011158
Guido van Rossum98935bf2001-09-05 19:13:16 +000011159DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011160
Guido van Rossume97ee181999-12-20 21:27:22 +000011161# the dlopen() function means we might want to use dynload_shlib.o. some
11162# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011163for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011164do :
11165 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011166if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011167 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011168#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011169_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011170
Guido van Rossume97ee181999-12-20 21:27:22 +000011171fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011172done
Guido van Rossume97ee181999-12-20 21:27:22 +000011173
Michael W. Hudson54241132001-12-07 15:38:26 +000011174
Guido van Rossume97ee181999-12-20 21:27:22 +000011175# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11176# loading of modules.
11177
Matthias Kloseb9621712010-04-24 17:59:49 +000011178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11179$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011180if test -z "$DYNLOADFILE"
11181then
11182 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011183 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11184 if test "$ac_cv_func_dlopen" = yes
11185 then DYNLOADFILE="dynload_shlib.o"
11186 else DYNLOADFILE="dynload_aix.o"
11187 fi
11188 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011189 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011190 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11191 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011192 *)
11193 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11194 # out any dynamic loading
11195 if test "$ac_cv_func_dlopen" = yes
11196 then DYNLOADFILE="dynload_shlib.o"
11197 else DYNLOADFILE="dynload_stub.o"
11198 fi
11199 ;;
11200 esac
11201fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11203$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011204if test "$DYNLOADFILE" != "dynload_stub.o"
11205then
Martin v. Löwis11437992002-04-12 09:54:03 +000011206
Matthias Kloseb9621712010-04-24 17:59:49 +000011207$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011208
11209fi
11210
Neil Schemenauer4e425612001-06-19 15:44:15 +000011211# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11212
Michael W. Hudson54241132001-12-07 15:38:26 +000011213
Matthias Kloseb9621712010-04-24 17:59:49 +000011214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11215$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011216if test -z "$MACHDEP_OBJS"
11217then
Jack Jansene578a632001-08-15 01:27:14 +000011218 MACHDEP_OBJS=$extra_machdep_objs
11219else
11220 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011221fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011222if test -z "$MACHDEP_OBJS"; then
11223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11224$as_echo "none" >&6; }
11225else
11226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11227$as_echo "$MACHDEP_OBJS" >&6; }
11228fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011229
Guido van Rossum627b2d71993-12-24 10:39:16 +000011230# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011231for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011232 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011233 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011234 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011235 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011236 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011237 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011238 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011239 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011240 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011241 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011242 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011243 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011244 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011245 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11246 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011247 sigaction sigaltstack siginterrupt sigpending sigrelse \
11248 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011249 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011250 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011251 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011252do :
11253 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11254ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011255if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011256 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011257#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011258_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011259
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011260fi
11261done
11262
Michael W. Hudson54241132001-12-07 15:38:26 +000011263
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011264ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11265 #include <dirent.h>
11266"
11267if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11268
11269$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11270
11271fi
11272
11273
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011274# For some functions, having a definition is not sufficient, since
11275# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11277$as_echo_n "checking for chroot... " >&6; }
11278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011279/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011280#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011281int
11282main ()
11283{
11284void *x=chroot
11285 ;
11286 return 0;
11287}
11288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011289if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011290
Matthias Kloseb9621712010-04-24 17:59:49 +000011291$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011292
Matthias Kloseb159a552010-04-25 21:00:44 +000011293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011294$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011295else
Matthias Kloseb9621712010-04-24 17:59:49 +000011296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11297$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011298
11299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11302$as_echo_n "checking for link... " >&6; }
11303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011304/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011305#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011306int
11307main ()
11308{
11309void *x=link
11310 ;
11311 return 0;
11312}
11313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011314if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011315
Matthias Kloseb9621712010-04-24 17:59:49 +000011316$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011317
Matthias Kloseb159a552010-04-25 21:00:44 +000011318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011319$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011320else
Matthias Kloseb9621712010-04-24 17:59:49 +000011321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11322$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011323
11324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11327$as_echo_n "checking for symlink... " >&6; }
11328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011329/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011330#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011331int
11332main ()
11333{
11334void *x=symlink
11335 ;
11336 return 0;
11337}
11338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011339if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011340
Matthias Kloseb9621712010-04-24 17:59:49 +000011341$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011342
Matthias Kloseb159a552010-04-25 21:00:44 +000011343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011344$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011345else
Matthias Kloseb9621712010-04-24 17:59:49 +000011346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11347$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011348
11349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11352$as_echo_n "checking for fchdir... " >&6; }
11353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011354/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011355#include <unistd.h>
11356int
11357main ()
11358{
11359void *x=fchdir
11360 ;
11361 return 0;
11362}
11363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011364if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011365
Matthias Kloseb9621712010-04-24 17:59:49 +000011366$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011367
Matthias Kloseb159a552010-04-25 21:00:44 +000011368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011369$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011370else
Matthias Kloseb9621712010-04-24 17:59:49 +000011371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11372$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011373
11374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11377$as_echo_n "checking for fsync... " >&6; }
11378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011379/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011380#include <unistd.h>
11381int
11382main ()
11383{
11384void *x=fsync
11385 ;
11386 return 0;
11387}
11388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011389if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011390
Matthias Kloseb9621712010-04-24 17:59:49 +000011391$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011392
Matthias Kloseb159a552010-04-25 21:00:44 +000011393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011394$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011395else
Matthias Kloseb9621712010-04-24 17:59:49 +000011396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11397$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011398
11399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11402$as_echo_n "checking for fdatasync... " >&6; }
11403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011404/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011405#include <unistd.h>
11406int
11407main ()
11408{
11409void *x=fdatasync
11410 ;
11411 return 0;
11412}
11413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011414if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011415
Matthias Kloseb9621712010-04-24 17:59:49 +000011416$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011417
Matthias Kloseb159a552010-04-25 21:00:44 +000011418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011419$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011420else
Matthias Kloseb9621712010-04-24 17:59:49 +000011421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11422$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011423
11424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11427$as_echo_n "checking for epoll... " >&6; }
11428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011429/* end confdefs.h. */
11430#include <sys/epoll.h>
11431int
11432main ()
11433{
11434void *x=epoll_create
11435 ;
11436 return 0;
11437}
11438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011439if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011440
Matthias Kloseb9621712010-04-24 17:59:49 +000011441$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011442
Matthias Kloseb159a552010-04-25 21:00:44 +000011443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011444$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011445else
Matthias Kloseb9621712010-04-24 17:59:49 +000011446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11447$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011448
11449fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11452$as_echo_n "checking for epoll_create1... " >&6; }
11453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11454/* end confdefs.h. */
11455#include <sys/epoll.h>
11456int
11457main ()
11458{
11459void *x=epoll_create1
11460 ;
11461 return 0;
11462}
11463_ACEOF
11464if ac_fn_c_try_compile "$LINENO"; then :
11465
11466$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11467
11468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11469$as_echo "yes" >&6; }
11470else
11471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11472$as_echo "no" >&6; }
11473
11474fi
11475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11477$as_echo_n "checking for kqueue... " >&6; }
11478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011479/* end confdefs.h. */
11480
11481#include <sys/types.h>
11482#include <sys/event.h>
11483
11484int
11485main ()
11486{
11487int x=kqueue()
11488 ;
11489 return 0;
11490}
11491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011492if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011493
Matthias Kloseb9621712010-04-24 17:59:49 +000011494$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011495
Matthias Kloseb159a552010-04-25 21:00:44 +000011496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011497$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011498else
Matthias Kloseb9621712010-04-24 17:59:49 +000011499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11500$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011501
11502fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11505$as_echo_n "checking for prlimit... " >&6; }
11506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11507/* end confdefs.h. */
11508
11509#include <sys/time.h>
11510#include <sys/resource.h>
11511
11512int
11513main ()
11514{
11515void *x=prlimit
11516 ;
11517 return 0;
11518}
11519_ACEOF
11520if ac_fn_c_try_compile "$LINENO"; then :
11521
11522$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11523
11524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11525$as_echo "yes" >&6; }
11526else
11527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11528$as_echo "no" >&6; }
11529
11530fi
11531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11532
Martin v. Löwisd5843682002-11-21 20:41:28 +000011533# On some systems (eg. FreeBSD 5), we would find a definition of the
11534# functions ctermid_r, setgroups in the library, but no prototype
11535# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11536# address to avoid compiler warnings and potential miscompilations
11537# because of the missing prototypes.
11538
Matthias Kloseb9621712010-04-24 17:59:49 +000011539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11540$as_echo_n "checking for ctermid_r... " >&6; }
11541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011542/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011543
Martin v. Löwisd5843682002-11-21 20:41:28 +000011544#include <stdio.h>
11545
Martin v. Löwisd5843682002-11-21 20:41:28 +000011546int
11547main ()
11548{
11549void* p = ctermid_r
11550 ;
11551 return 0;
11552}
11553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011554if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011555
Matthias Kloseb9621712010-04-24 17:59:49 +000011556$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011557
Matthias Kloseb159a552010-04-25 21:00:44 +000011558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011559$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011560else
Matthias Kloseb9621712010-04-24 17:59:49 +000011561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11562$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011563
11564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11566
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11568$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011569if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011570 $as_echo_n "(cached) " >&6
11571else
11572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011573/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011574#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011575int
11576main ()
11577{
11578void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011579
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011580 ;
11581 return 0;
11582}
11583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011584if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011585 ac_cv_flock_decl=yes
11586else
11587 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011588
11589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011591
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011592fi
11593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11594$as_echo "$ac_cv_flock_decl" >&6; }
11595if test "x${ac_cv_flock_decl}" = xyes; then
11596 for ac_func in flock
11597do :
11598 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011599if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011600 cat >>confdefs.h <<_ACEOF
11601#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011602_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011603
Antoine Pitroua3000072010-09-07 14:52:42 +000011604else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011606$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011607if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011608 $as_echo_n "(cached) " >&6
11609else
11610 ac_check_lib_save_LIBS=$LIBS
11611LIBS="-lbsd $LIBS"
11612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11613/* end confdefs.h. */
11614
11615/* Override any GCC internal prototype to avoid an error.
11616 Use char because int might match the return type of a GCC
11617 builtin and then its argument prototype would still apply. */
11618#ifdef __cplusplus
11619extern "C"
11620#endif
11621char flock ();
11622int
11623main ()
11624{
11625return flock ();
11626 ;
11627 return 0;
11628}
11629_ACEOF
11630if ac_fn_c_try_link "$LINENO"; then :
11631 ac_cv_lib_bsd_flock=yes
11632else
11633 ac_cv_lib_bsd_flock=no
11634fi
11635rm -f core conftest.err conftest.$ac_objext \
11636 conftest$ac_exeext conftest.$ac_ext
11637LIBS=$ac_check_lib_save_LIBS
11638fi
11639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11640$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011641if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011642 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011643
11644
11645$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11646
11647
11648fi
11649
11650
11651fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011652done
11653
Antoine Pitroua3000072010-09-07 14:52:42 +000011654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011655
Matthias Kloseb9621712010-04-24 17:59:49 +000011656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11657$as_echo_n "checking for getpagesize... " >&6; }
11658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011659/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011660
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011661#include <unistd.h>
11662
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011663int
11664main ()
11665{
11666void* p = getpagesize
11667 ;
11668 return 0;
11669}
11670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011671if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011672
Matthias Kloseb9621712010-04-24 17:59:49 +000011673$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011674
Matthias Kloseb159a552010-04-25 21:00:44 +000011675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011676$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011677else
Matthias Kloseb9621712010-04-24 17:59:49 +000011678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11679$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011680
11681fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011683
Victor Stinner984890f2011-11-24 13:53:38 +010011684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11685$as_echo_n "checking for broken unsetenv... " >&6; }
11686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11687/* end confdefs.h. */
11688
11689#include <stdlib.h>
11690
11691int
11692main ()
11693{
11694int res = unsetenv("DUMMY")
11695 ;
11696 return 0;
11697}
11698_ACEOF
11699if ac_fn_c_try_compile "$LINENO"; then :
11700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11701$as_echo "no" >&6; }
11702else
11703
11704$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11705
11706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11707$as_echo "yes" >&6; }
11708
11709fi
11710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11711
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011712for ac_prog in true
11713do
11714 # Extract the first word of "$ac_prog", so it can be a program name with args.
11715set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11717$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011718if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011719 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011720else
11721 if test -n "$TRUE"; then
11722 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11723else
11724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11725for as_dir in $PATH
11726do
11727 IFS=$as_save_IFS
11728 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011729 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011731 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011732 $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 +000011733 break 2
11734 fi
11735done
Matthias Kloseb9621712010-04-24 17:59:49 +000011736 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011737IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011738
11739fi
11740fi
11741TRUE=$ac_cv_prog_TRUE
11742if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11744$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011745else
Matthias Kloseb9621712010-04-24 17:59:49 +000011746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11747$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011748fi
11749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011750
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011751 test -n "$TRUE" && break
11752done
11753test -n "$TRUE" || TRUE="/bin/true"
11754
11755
Matthias Kloseb9621712010-04-24 17:59:49 +000011756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11757$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011758if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011759 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011760else
11761 ac_check_lib_save_LIBS=$LIBS
11762LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011764/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011765
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011766/* Override any GCC internal prototype to avoid an error.
11767 Use char because int might match the return type of a GCC
11768 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011769#ifdef __cplusplus
11770extern "C"
11771#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011772char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011773int
11774main ()
11775{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011776return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011777 ;
11778 return 0;
11779}
11780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011781if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011782 ac_cv_lib_c_inet_aton=yes
11783else
Matthias Kloseb9621712010-04-24 17:59:49 +000011784 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011786rm -f core conftest.err conftest.$ac_objext \
11787 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011788LIBS=$ac_check_lib_save_LIBS
11789fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11791$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011792if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011793 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011794else
Matthias Kloseb9621712010-04-24 17:59:49 +000011795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11796$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011797if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011798 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011799else
11800 ac_check_lib_save_LIBS=$LIBS
11801LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011803/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011804
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011805/* Override any GCC internal prototype to avoid an error.
11806 Use char because int might match the return type of a GCC
11807 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011808#ifdef __cplusplus
11809extern "C"
11810#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011811char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011812int
11813main ()
11814{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011815return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011816 ;
11817 return 0;
11818}
11819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011820if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011821 ac_cv_lib_resolv_inet_aton=yes
11822else
Matthias Kloseb9621712010-04-24 17:59:49 +000011823 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011824fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011825rm -f core conftest.err conftest.$ac_objext \
11826 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011827LIBS=$ac_check_lib_save_LIBS
11828fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11830$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011831if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011832 cat >>confdefs.h <<_ACEOF
11833#define HAVE_LIBRESOLV 1
11834_ACEOF
11835
11836 LIBS="-lresolv $LIBS"
11837
11838fi
11839
11840
11841fi
11842
11843
Christian Heimesd0764e22007-12-04 15:00:33 +000011844# On Tru64, chflags seems to be present, but calling it will
11845# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11847$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011848if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011849 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011850else
Matthias Kloseb9621712010-04-24 17:59:49 +000011851 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011852 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011853else
Matthias Kloseb9621712010-04-24 17:59:49 +000011854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011855/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011856
Christian Heimesd0764e22007-12-04 15:00:33 +000011857#include <sys/stat.h>
11858#include <unistd.h>
11859int main(int argc, char*argv[])
11860{
11861 if(chflags(argv[0], 0) != 0)
11862 return 1;
11863 return 0;
11864}
Ned Deily3eb67d52011-06-28 00:00:28 -070011865
Christian Heimesd0764e22007-12-04 15:00:33 +000011866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011867if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011868 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011869else
Matthias Kloseb9621712010-04-24 17:59:49 +000011870 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011871fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11873 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011874fi
11875
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011876
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011877fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11879$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011880if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011881 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011882if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011883 ac_cv_have_chflags="yes"
11884else
11885 ac_cv_have_chflags="no"
11886fi
11887
11888fi
11889if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011890
Matthias Kloseb9621712010-04-24 17:59:49 +000011891$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011892
11893fi
11894
Matthias Kloseb9621712010-04-24 17:59:49 +000011895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11896$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011897if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011898 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011899else
Matthias Kloseb9621712010-04-24 17:59:49 +000011900 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011901 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011902else
Matthias Kloseb9621712010-04-24 17:59:49 +000011903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011904/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011905
Christian Heimesd0764e22007-12-04 15:00:33 +000011906#include <sys/stat.h>
11907#include <unistd.h>
11908int main(int argc, char*argv[])
11909{
11910 if(lchflags(argv[0], 0) != 0)
11911 return 1;
11912 return 0;
11913}
Ned Deily3eb67d52011-06-28 00:00:28 -070011914
Christian Heimesd0764e22007-12-04 15:00:33 +000011915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011916if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011917 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011918else
Matthias Kloseb9621712010-04-24 17:59:49 +000011919 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011920fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011921rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11922 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011923fi
11924
11925
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011926fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11928$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011929if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011930 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011931if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011932 ac_cv_have_lchflags="yes"
11933else
11934 ac_cv_have_lchflags="no"
11935fi
11936
11937fi
11938if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011939
Matthias Kloseb9621712010-04-24 17:59:49 +000011940$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011941
11942fi
11943
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011944case $ac_sys_system/$ac_sys_release in
11945Darwin/*)
11946 _CUR_CFLAGS="${CFLAGS}"
11947 _CUR_LDFLAGS="${LDFLAGS}"
11948 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11949 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11950 ;;
11951esac
11952
Matthias Kloseb9621712010-04-24 17:59:49 +000011953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11954$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011955if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011956 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011957else
11958 ac_check_lib_save_LIBS=$LIBS
11959LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011961/* end confdefs.h. */
11962
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011963/* Override any GCC internal prototype to avoid an error.
11964 Use char because int might match the return type of a GCC
11965 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011966#ifdef __cplusplus
11967extern "C"
11968#endif
11969char inflateCopy ();
11970int
11971main ()
11972{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011973return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011974 ;
11975 return 0;
11976}
11977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011978if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011979 ac_cv_lib_z_inflateCopy=yes
11980else
Matthias Kloseb9621712010-04-24 17:59:49 +000011981 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011982fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011983rm -f core conftest.err conftest.$ac_objext \
11984 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011985LIBS=$ac_check_lib_save_LIBS
11986fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11988$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011989if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011990
Matthias Kloseb9621712010-04-24 17:59:49 +000011991$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011992
11993fi
11994
11995
11996case $ac_sys_system/$ac_sys_release in
11997Darwin/*)
11998 CFLAGS="${_CUR_CFLAGS}"
11999 LDFLAGS="${_CUR_LDFLAGS}"
12000 ;;
12001esac
12002
Matthias Kloseb9621712010-04-24 17:59:49 +000012003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12004$as_echo_n "checking for hstrerror... " >&6; }
12005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012006/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012007
Martin v. Löwise9416172003-05-03 10:12:45 +000012008#include <netdb.h>
12009
Martin v. Löwise9416172003-05-03 10:12:45 +000012010int
12011main ()
12012{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012013void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012014 ;
12015 return 0;
12016}
12017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012018if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012019
Matthias Kloseb9621712010-04-24 17:59:49 +000012020$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012021
Matthias Kloseb159a552010-04-25 21:00:44 +000012022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012023$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012024else
Matthias Kloseb9621712010-04-24 17:59:49 +000012025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12026$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012027
12028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012029rm -f core conftest.err conftest.$ac_objext \
12030 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012031
Matthias Kloseb9621712010-04-24 17:59:49 +000012032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12033$as_echo_n "checking for inet_aton... " >&6; }
12034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012035/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012036
Martin v. Löwis86d66262006-02-17 08:40:11 +000012037#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012038#include <sys/socket.h>
12039#include <netinet/in.h>
12040#include <arpa/inet.h>
12041
Martin v. Löwise9416172003-05-03 10:12:45 +000012042int
12043main ()
12044{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012045void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012046 ;
12047 return 0;
12048}
12049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012050if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012051
Matthias Kloseb9621712010-04-24 17:59:49 +000012052$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012053
Matthias Kloseb159a552010-04-25 21:00:44 +000012054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012055$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012056else
Matthias Kloseb9621712010-04-24 17:59:49 +000012057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12058$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012059
12060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012061rm -f core conftest.err conftest.$ac_objext \
12062 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012063
Matthias Kloseb9621712010-04-24 17:59:49 +000012064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12065$as_echo_n "checking for inet_pton... " >&6; }
12066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012067/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012068
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012069#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012070#include <sys/socket.h>
12071#include <netinet/in.h>
12072#include <arpa/inet.h>
12073
Martin v. Löwise9416172003-05-03 10:12:45 +000012074int
12075main ()
12076{
12077void* p = inet_pton
12078 ;
12079 return 0;
12080}
12081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012082if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012083
Matthias Kloseb9621712010-04-24 17:59:49 +000012084$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012085
Matthias Kloseb159a552010-04-25 21:00:44 +000012086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012087$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012088else
Matthias Kloseb9621712010-04-24 17:59:49 +000012089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12090$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012091
12092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012094
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012095# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12097$as_echo_n "checking for setgroups... " >&6; }
12098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012099/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012100
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012101#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012102#ifdef HAVE_GRP_H
12103#include <grp.h>
12104#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012105
Martin v. Löwisd5843682002-11-21 20:41:28 +000012106int
12107main ()
12108{
12109void* p = setgroups
12110 ;
12111 return 0;
12112}
12113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012114if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012115
Matthias Kloseb9621712010-04-24 17:59:49 +000012116$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012117
Matthias Kloseb159a552010-04-25 21:00:44 +000012118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012119$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012120else
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12122$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012123
12124fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012126
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012127# check for openpty and forkpty
12128
12129for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012130do :
12131 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012132if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012133 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012134#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012135_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012136
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012137else
Matthias Kloseb9621712010-04-24 17:59:49 +000012138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12139$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012140if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012141 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012142else
Martin v. Löwis11437992002-04-12 09:54:03 +000012143 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012144LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012146/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012148/* Override any GCC internal prototype to avoid an error.
12149 Use char because int might match the return type of a GCC
12150 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012151#ifdef __cplusplus
12152extern "C"
12153#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012154char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012155int
12156main ()
12157{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012158return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012159 ;
12160 return 0;
12161}
12162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012163if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012164 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012165else
Matthias Kloseb9621712010-04-24 17:59:49 +000012166 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012168rm -f core conftest.err conftest.$ac_objext \
12169 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012170LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12173$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012174if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012175 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012176 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012177else
Matthias Kloseb9621712010-04-24 17:59:49 +000012178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12179$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012180if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012182else
12183 ac_check_lib_save_LIBS=$LIBS
12184LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012186/* end confdefs.h. */
12187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012188/* Override any GCC internal prototype to avoid an error.
12189 Use char because int might match the return type of a GCC
12190 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012191#ifdef __cplusplus
12192extern "C"
12193#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012194char openpty ();
12195int
12196main ()
12197{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012198return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012199 ;
12200 return 0;
12201}
12202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012203if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012204 ac_cv_lib_bsd_openpty=yes
12205else
Matthias Kloseb9621712010-04-24 17:59:49 +000012206 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012208rm -f core conftest.err conftest.$ac_objext \
12209 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012210LIBS=$ac_check_lib_save_LIBS
12211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12213$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012214if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012215 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012216 LIBS="$LIBS -lbsd"
12217fi
12218
12219
12220fi
12221
Fred Drake8cef4cf2000-06-28 16:40:38 +000012222
12223fi
12224done
12225
12226for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012227do :
12228 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012229if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012230 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012231#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012232_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012233
Fred Drake8cef4cf2000-06-28 16:40:38 +000012234else
Matthias Kloseb9621712010-04-24 17:59:49 +000012235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12236$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012237if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012238 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012239else
Martin v. Löwis11437992002-04-12 09:54:03 +000012240 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012241LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012243/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012244
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012245/* Override any GCC internal prototype to avoid an error.
12246 Use char because int might match the return type of a GCC
12247 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012248#ifdef __cplusplus
12249extern "C"
12250#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012251char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012252int
12253main ()
12254{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012255return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012256 ;
12257 return 0;
12258}
12259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012260if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012261 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012262else
Matthias Kloseb9621712010-04-24 17:59:49 +000012263 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012265rm -f core conftest.err conftest.$ac_objext \
12266 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012267LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012268fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12270$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012271if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012272 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012273 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012274else
Matthias Kloseb9621712010-04-24 17:59:49 +000012275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12276$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012277if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012278 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012279else
12280 ac_check_lib_save_LIBS=$LIBS
12281LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012283/* end confdefs.h. */
12284
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012285/* Override any GCC internal prototype to avoid an error.
12286 Use char because int might match the return type of a GCC
12287 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012288#ifdef __cplusplus
12289extern "C"
12290#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012291char forkpty ();
12292int
12293main ()
12294{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012295return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012296 ;
12297 return 0;
12298}
12299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012300if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012301 ac_cv_lib_bsd_forkpty=yes
12302else
Matthias Kloseb9621712010-04-24 17:59:49 +000012303 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012304fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012305rm -f core conftest.err conftest.$ac_objext \
12306 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012307LIBS=$ac_check_lib_save_LIBS
12308fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12310$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012311if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012312 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012313 LIBS="$LIBS -lbsd"
12314fi
12315
12316
12317fi
12318
Fred Drake8cef4cf2000-06-28 16:40:38 +000012319
12320fi
12321done
12322
Jack Jansendd19cf82001-12-06 22:36:17 +000012323
Christian Heimesb186d002008-03-18 15:15:01 +000012324# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012325for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012326do :
12327 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012328if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012329 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012330#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012331_ACEOF
12332
12333fi
12334done
12335
12336
Michael W. Hudson54241132001-12-07 15:38:26 +000012337# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012338for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012339do :
12340 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12341ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012342if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012343 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012344#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012345_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012346
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012347fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012348done
12349
Michael W. Hudson54241132001-12-07 15:38:26 +000012350
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012351ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012352if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012353 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012354
Martin v. Löwis1142de32002-03-29 16:28:31 +000012355else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012356 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012357 *" dup2.$ac_objext "* ) ;;
12358 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012359 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012360esac
12361
Martin v. Löwis1142de32002-03-29 16:28:31 +000012362fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012363
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012364ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012365if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012366 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12367
12368else
12369 case " $LIBOBJS " in
12370 *" strdup.$ac_objext "* ) ;;
12371 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12372 ;;
12373esac
12374
12375fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012376
12377
12378for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012379do :
12380 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012381if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012382 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012383#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012386/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012387#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012388int
12389main ()
12390{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012391getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012392 ;
12393 return 0;
12394}
12395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012396if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012397
Matthias Kloseb9621712010-04-24 17:59:49 +000012398$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012399
Guido van Rossum627b2d71993-12-24 10:39:16 +000012400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012402
Guido van Rossum627b2d71993-12-24 10:39:16 +000012403fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012404done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012405
Jack Jansen150753c2003-03-29 22:07:47 +000012406for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012407do :
12408 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012409if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012410 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012411#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012414/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012415#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012416int
12417main ()
12418{
12419setpgrp(0,0);
12420 ;
12421 return 0;
12422}
12423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012424if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012425
Matthias Kloseb9621712010-04-24 17:59:49 +000012426$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012427
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012430
12431fi
12432done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012433
Thomas Wouters3a584202000-08-05 23:28:51 +000012434for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012435do :
12436 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012437if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012438 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012439#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012442/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012443#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012444int
12445main ()
12446{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012447gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012448 ;
12449 return 0;
12450}
12451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012452if ac_fn_c_try_compile "$LINENO"; then :
12453
Guido van Rossum627b2d71993-12-24 10:39:16 +000012454else
Skip Montanaro6dead952003-09-25 14:50:04 +000012455
Matthias Kloseb9621712010-04-24 17:59:49 +000012456$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012457
Martin v. Löwis11437992002-04-12 09:54:03 +000012458
Guido van Rossum627b2d71993-12-24 10:39:16 +000012459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012461
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012462fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012463done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012464
Michael W. Hudson54241132001-12-07 15:38:26 +000012465
Victor Stinnere0be4232011-10-25 13:06:09 +020012466for ac_func in clock_gettime
12467do :
12468 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12469if test "x$ac_cv_func_clock_gettime" = xyes; then :
12470 cat >>confdefs.h <<_ACEOF
12471#define HAVE_CLOCK_GETTIME 1
12472_ACEOF
12473
12474else
12475
12476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12477$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12478if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12479 $as_echo_n "(cached) " >&6
12480else
12481 ac_check_lib_save_LIBS=$LIBS
12482LIBS="-lrt $LIBS"
12483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12484/* end confdefs.h. */
12485
12486/* Override any GCC internal prototype to avoid an error.
12487 Use char because int might match the return type of a GCC
12488 builtin and then its argument prototype would still apply. */
12489#ifdef __cplusplus
12490extern "C"
12491#endif
12492char clock_gettime ();
12493int
12494main ()
12495{
12496return clock_gettime ();
12497 ;
12498 return 0;
12499}
12500_ACEOF
12501if ac_fn_c_try_link "$LINENO"; then :
12502 ac_cv_lib_rt_clock_gettime=yes
12503else
12504 ac_cv_lib_rt_clock_gettime=no
12505fi
12506rm -f core conftest.err conftest.$ac_objext \
12507 conftest$ac_exeext conftest.$ac_ext
12508LIBS=$ac_check_lib_save_LIBS
12509fi
12510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12511$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12512if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12513
Victor Stinner7efb8332014-08-29 15:41:08 +020012514 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012515 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12516
12517
12518$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12519
12520
12521fi
12522
12523
12524fi
12525done
12526
12527
12528for ac_func in clock_getres
12529do :
12530 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12531if test "x$ac_cv_func_clock_getres" = xyes; then :
12532 cat >>confdefs.h <<_ACEOF
12533#define HAVE_CLOCK_GETRES 1
12534_ACEOF
12535
12536else
12537
12538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12539$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12540if ${ac_cv_lib_rt_clock_getres+:} false; then :
12541 $as_echo_n "(cached) " >&6
12542else
12543 ac_check_lib_save_LIBS=$LIBS
12544LIBS="-lrt $LIBS"
12545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12546/* end confdefs.h. */
12547
12548/* Override any GCC internal prototype to avoid an error.
12549 Use char because int might match the return type of a GCC
12550 builtin and then its argument prototype would still apply. */
12551#ifdef __cplusplus
12552extern "C"
12553#endif
12554char clock_getres ();
12555int
12556main ()
12557{
12558return clock_getres ();
12559 ;
12560 return 0;
12561}
12562_ACEOF
12563if ac_fn_c_try_link "$LINENO"; then :
12564 ac_cv_lib_rt_clock_getres=yes
12565else
12566 ac_cv_lib_rt_clock_getres=no
12567fi
12568rm -f core conftest.err conftest.$ac_objext \
12569 conftest$ac_exeext conftest.$ac_ext
12570LIBS=$ac_check_lib_save_LIBS
12571fi
12572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12573$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12574if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12575
12576 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12577
12578
12579fi
12580
12581
12582fi
12583done
12584
12585
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012586for ac_func in clock_settime
12587do :
12588 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12589if test "x$ac_cv_func_clock_settime" = xyes; then :
12590 cat >>confdefs.h <<_ACEOF
12591#define HAVE_CLOCK_SETTIME 1
12592_ACEOF
12593
12594else
12595
12596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12597$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12598if ${ac_cv_lib_rt_clock_settime+:} false; then :
12599 $as_echo_n "(cached) " >&6
12600else
12601 ac_check_lib_save_LIBS=$LIBS
12602LIBS="-lrt $LIBS"
12603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12604/* end confdefs.h. */
12605
12606/* Override any GCC internal prototype to avoid an error.
12607 Use char because int might match the return type of a GCC
12608 builtin and then its argument prototype would still apply. */
12609#ifdef __cplusplus
12610extern "C"
12611#endif
12612char clock_settime ();
12613int
12614main ()
12615{
12616return clock_settime ();
12617 ;
12618 return 0;
12619}
12620_ACEOF
12621if ac_fn_c_try_link "$LINENO"; then :
12622 ac_cv_lib_rt_clock_settime=yes
12623else
12624 ac_cv_lib_rt_clock_settime=no
12625fi
12626rm -f core conftest.err conftest.$ac_objext \
12627 conftest$ac_exeext conftest.$ac_ext
12628LIBS=$ac_check_lib_save_LIBS
12629fi
12630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12631$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12632if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12633
12634 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12635
12636
12637fi
12638
12639
12640fi
12641done
12642
12643
Matthias Kloseb9621712010-04-24 17:59:49 +000012644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12645$as_echo_n "checking for major... " >&6; }
12646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012647/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012648
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012649#if defined(MAJOR_IN_MKDEV)
12650#include <sys/mkdev.h>
12651#elif defined(MAJOR_IN_SYSMACROS)
12652#include <sys/sysmacros.h>
12653#else
12654#include <sys/types.h>
12655#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012656
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012657int
12658main ()
12659{
12660
12661 makedev(major(0),minor(0));
12662
12663 ;
12664 return 0;
12665}
12666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012667if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012668
12669
Matthias Kloseb9621712010-04-24 17:59:49 +000012670$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012671
Matthias Kloseb9621712010-04-24 17:59:49 +000012672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12673$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012674
12675else
Skip Montanaro6dead952003-09-25 14:50:04 +000012676
Matthias Kloseb9621712010-04-24 17:59:49 +000012677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12678$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012679
12680fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012681rm -f core conftest.err conftest.$ac_objext \
12682 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012683
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012684# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12685# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12687$as_echo_n "checking for if_nameindex... " >&6; }
12688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12689/* end confdefs.h. */
12690
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012691#include <stdio.h>
12692#ifdef STDC_HEADERS
12693# include <stdlib.h>
12694# include <stddef.h>
12695#else
12696# ifdef HAVE_STDLIB_H
12697# include <stdlib.h>
12698# endif
12699#endif
12700#ifdef HAVE_SYS_SOCKET_H
12701# include <sys/socket.h>
12702#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012703#ifdef HAVE_NET_IF_H
12704# include <net/if.h>
12705#endif
12706
12707int
12708main ()
12709{
12710struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12711 ;
12712 return 0;
12713}
12714_ACEOF
12715if ac_fn_c_try_link "$LINENO"; then :
12716
12717$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12718
12719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12720$as_echo "yes" >&6; }
12721else
12722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12723$as_echo "no" >&6; }
12724
12725fi
12726rm -f core conftest.err conftest.$ac_objext \
12727 conftest$ac_exeext conftest.$ac_ext
12728
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012729# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12730# macro is not defined in android-ndk-r13.
12731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12732$as_echo_n "checking for lockf... " >&6; }
12733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12734/* end confdefs.h. */
12735#include <unistd.h>
12736int
12737main ()
12738{
12739lockf(0, F_LOCK, 0);
12740 ;
12741 return 0;
12742}
12743_ACEOF
12744if ac_fn_c_try_link "$LINENO"; then :
12745
12746$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12747
12748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12749$as_echo "yes" >&6; }
12750else
12751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12752$as_echo "no" >&6; }
12753
12754fi
12755rm -f core conftest.err conftest.$ac_objext \
12756 conftest$ac_exeext conftest.$ac_ext
12757
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012758# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012759# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12761$as_echo_n "checking for getaddrinfo... " >&6; }
12762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012763/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012764
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012765#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012766#include <sys/socket.h>
12767#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012768#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012769
Martin v. Löwis11437992002-04-12 09:54:03 +000012770int
12771main ()
12772{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012773getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012774 ;
12775 return 0;
12776}
12777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012778if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012779 have_getaddrinfo=yes
12780else
Matthias Kloseb9621712010-04-24 17:59:49 +000012781 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012782fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012783rm -f core conftest.err conftest.$ac_objext \
12784 conftest$ac_exeext conftest.$ac_ext
12785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12786$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012787if test $have_getaddrinfo = yes
12788then
Matthias Kloseb9621712010-04-24 17:59:49 +000012789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12790$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012791 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012792 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012793else
Matthias Kloseb9621712010-04-24 17:59:49 +000012794 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012795
12796if test "${enable_ipv6+set}" = set; then
12797 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12798else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012799 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012800fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012801else
Matthias Kloseb9621712010-04-24 17:59:49 +000012802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012803/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012804
Stefan Krah19c21392012-11-22 23:47:32 +010012805#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012806#include <sys/types.h>
12807#include <netdb.h>
12808#include <string.h>
12809#include <sys/socket.h>
12810#include <netinet/in.h>
12811
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012812int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012813{
12814 int passive, gaierr, inet4 = 0, inet6 = 0;
12815 struct addrinfo hints, *ai, *aitop;
12816 char straddr[INET6_ADDRSTRLEN], strport[16];
12817
12818 for (passive = 0; passive <= 1; passive++) {
12819 memset(&hints, 0, sizeof(hints));
12820 hints.ai_family = AF_UNSPEC;
12821 hints.ai_flags = passive ? AI_PASSIVE : 0;
12822 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012823 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012824 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12825 (void)gai_strerror(gaierr);
12826 goto bad;
12827 }
12828 for (ai = aitop; ai; ai = ai->ai_next) {
12829 if (ai->ai_addr == NULL ||
12830 ai->ai_addrlen == 0 ||
12831 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12832 straddr, sizeof(straddr), strport, sizeof(strport),
12833 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12834 goto bad;
12835 }
12836 switch (ai->ai_family) {
12837 case AF_INET:
12838 if (strcmp(strport, "54321") != 0) {
12839 goto bad;
12840 }
12841 if (passive) {
12842 if (strcmp(straddr, "0.0.0.0") != 0) {
12843 goto bad;
12844 }
12845 } else {
12846 if (strcmp(straddr, "127.0.0.1") != 0) {
12847 goto bad;
12848 }
12849 }
12850 inet4++;
12851 break;
12852 case AF_INET6:
12853 if (strcmp(strport, "54321") != 0) {
12854 goto bad;
12855 }
12856 if (passive) {
12857 if (strcmp(straddr, "::") != 0) {
12858 goto bad;
12859 }
12860 } else {
12861 if (strcmp(straddr, "::1") != 0) {
12862 goto bad;
12863 }
12864 }
12865 inet6++;
12866 break;
12867 case AF_UNSPEC:
12868 goto bad;
12869 break;
12870 default:
12871 /* another family support? */
12872 break;
12873 }
12874 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012875 freeaddrinfo(aitop);
12876 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012877 }
12878
12879 if (!(inet4 == 0 || inet4 == 2))
12880 goto bad;
12881 if (!(inet6 == 0 || inet6 == 2))
12882 goto bad;
12883
12884 if (aitop)
12885 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012886 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012887
12888 bad:
12889 if (aitop)
12890 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012891 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012892}
12893
Martin v. Löwis11437992002-04-12 09:54:03 +000012894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012895if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012896 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012897else
Matthias Kloseb9621712010-04-24 17:59:49 +000012898 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12901 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012902fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012903
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012904fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012905
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012907
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12909$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12910
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012911if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012912then
12913 if test $ipv6 = yes
12914 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012915 echo 'Fatal: You must get working getaddrinfo() function.'
12916 echo ' or you can specify "--disable-ipv6"'.
12917 exit 1
12918 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012919else
Martin v. Löwis11437992002-04-12 09:54:03 +000012920
Matthias Kloseb9621712010-04-24 17:59:49 +000012921$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012922
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012923fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012924
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012925for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012926do :
12927 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012928if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012929 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012930#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012931_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012932
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012933fi
12934done
12935
Michael W. Hudson54241132001-12-07 15:38:26 +000012936
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012937# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12939$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012940if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012941 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012942else
Matthias Kloseb9621712010-04-24 17:59:49 +000012943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012944/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012945#include <sys/types.h>
12946#include <sys/time.h>
12947#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012948
Martin v. Löwis11437992002-04-12 09:54:03 +000012949int
12950main ()
12951{
12952if ((struct tm *) 0)
12953return 0;
12954 ;
12955 return 0;
12956}
12957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012958if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012959 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012960else
Matthias Kloseb9621712010-04-24 17:59:49 +000012961 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012964fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12966$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012967if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012968
Matthias Kloseb9621712010-04-24 17:59:49 +000012969$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012970
12971fi
12972
Matthias Kloseb9621712010-04-24 17:59:49 +000012973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12974$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012975if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012976 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012977else
Matthias Kloseb9621712010-04-24 17:59:49 +000012978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012979/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012980#include <sys/types.h>
12981#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012982
Martin v. Löwis11437992002-04-12 09:54:03 +000012983int
12984main ()
12985{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012986struct tm tm;
12987 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012988 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012989 ;
12990 return 0;
12991}
12992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012993if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012994 ac_cv_struct_tm=time.h
12995else
Matthias Kloseb9621712010-04-24 17:59:49 +000012996 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012999fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13001$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013002if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013003
Matthias Kloseb9621712010-04-24 17:59:49 +000013004$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013005
13006fi
13007
Matthias Kloseb9621712010-04-24 17:59:49 +000013008ac_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 +000013009#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013010
Matthias Kloseb9621712010-04-24 17:59:49 +000013011"
Victor Stinnere0be4232011-10-25 13:06:09 +020013012if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013013
13014cat >>confdefs.h <<_ACEOF
13015#define HAVE_STRUCT_TM_TM_ZONE 1
13016_ACEOF
13017
13018
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013019fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013020
Martin v. Löwis11437992002-04-12 09:54:03 +000013021if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13022
Matthias Kloseb9621712010-04-24 17:59:49 +000013023$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013024
13025else
Matthias Kloseb9621712010-04-24 17:59:49 +000013026 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13027"
Victor Stinnere0be4232011-10-25 13:06:09 +020013028if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013029 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013030else
Matthias Kloseb9621712010-04-24 17:59:49 +000013031 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013032fi
13033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013034cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013035#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013036_ACEOF
13037
Matthias Kloseb9621712010-04-24 17:59:49 +000013038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13039$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013040if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013041 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013042else
Matthias Kloseb9621712010-04-24 17:59:49 +000013043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013044/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013045#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013046#if !HAVE_DECL_TZNAME
13047extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013048#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013049
Martin v. Löwis11437992002-04-12 09:54:03 +000013050int
13051main ()
13052{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013053return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013054 ;
13055 return 0;
13056}
13057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013058if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013059 ac_cv_var_tzname=yes
13060else
Matthias Kloseb9621712010-04-24 17:59:49 +000013061 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013062fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013063rm -f core conftest.err conftest.$ac_objext \
13064 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013065fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13067$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013068 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013069
Matthias Kloseb9621712010-04-24 17:59:49 +000013070$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013071
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013072 fi
13073fi
13074
Matthias Kloseb9621712010-04-24 17:59:49 +000013075ac_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 +020013076if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013077
13078cat >>confdefs.h <<_ACEOF
13079#define HAVE_STRUCT_STAT_ST_RDEV 1
13080_ACEOF
13081
13082
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013083fi
13084
Matthias Kloseb9621712010-04-24 17:59:49 +000013085ac_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 +020013086if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013087
Martin v. Löwis11437992002-04-12 09:54:03 +000013088cat >>confdefs.h <<_ACEOF
13089#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13090_ACEOF
13091
13092
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013093fi
13094
Matthias Kloseb9621712010-04-24 17:59:49 +000013095ac_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 +020013096if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013097
13098cat >>confdefs.h <<_ACEOF
13099#define HAVE_STRUCT_STAT_ST_FLAGS 1
13100_ACEOF
13101
13102
13103fi
13104
Matthias Kloseb9621712010-04-24 17:59:49 +000013105ac_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 +020013106if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013107
13108cat >>confdefs.h <<_ACEOF
13109#define HAVE_STRUCT_STAT_ST_GEN 1
13110_ACEOF
13111
13112
13113fi
13114
Matthias Kloseb9621712010-04-24 17:59:49 +000013115ac_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 +020013116if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013117
13118cat >>confdefs.h <<_ACEOF
13119#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13120_ACEOF
13121
13122
13123fi
13124
Matthias Kloseb9621712010-04-24 17:59:49 +000013125ac_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 +020013126if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013127
Martin v. Löwis11437992002-04-12 09:54:03 +000013128cat >>confdefs.h <<_ACEOF
13129#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13130_ACEOF
13131
13132
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013133fi
13134
Stefan Krah267b6392016-04-26 01:09:18 +020013135ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13136 #include <sys/types.h>
13137 #include <pwd.h>
13138
13139"
13140if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13141
13142cat >>confdefs.h <<_ACEOF
13143#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13144_ACEOF
13145
13146
13147fi
13148ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13149 #include <sys/types.h>
13150 #include <pwd.h>
13151
13152"
13153if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13154
13155cat >>confdefs.h <<_ACEOF
13156#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13157_ACEOF
13158
13159
13160fi
13161
Zachary Ware6a6967e2016-10-01 00:47:27 -050013162# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13163ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13164"
13165if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13166
13167cat >>confdefs.h <<_ACEOF
13168#define HAVE_SIGINFO_T_SI_BAND 1
13169_ACEOF
13170
13171
13172fi
13173
Michael W. Hudson54241132001-12-07 15:38:26 +000013174
Matthias Kloseb9621712010-04-24 17:59:49 +000013175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13176$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013177if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013178 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013179else
Matthias Kloseb159a552010-04-25 21:00:44 +000013180
Matthias Kloseb9621712010-04-24 17:59:49 +000013181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013182/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013183#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013184int
13185main ()
13186{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013187return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013188 ;
13189 return 0;
13190}
13191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013192if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013193 ac_cv_header_time_altzone=yes
13194else
Matthias Kloseb9621712010-04-24 17:59:49 +000013195 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013199fi
13200
Matthias Kloseb9621712010-04-24 17:59:49 +000013201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13202$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013203if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013204
Matthias Kloseb9621712010-04-24 17:59:49 +000013205$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013206
13207fi
13208
Guido van Rossumda88dad1995-01-26 00:46:29 +000013209was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13211$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013213/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013214
13215#include <sys/types.h>
13216#include <sys/select.h>
13217#include <sys/time.h>
13218
Martin v. Löwis11437992002-04-12 09:54:03 +000013219int
13220main ()
13221{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013222;
Martin v. Löwis11437992002-04-12 09:54:03 +000013223 ;
13224 return 0;
13225}
13226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013227if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013228
13229
Matthias Kloseb9621712010-04-24 17:59:49 +000013230$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013231
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013232 was_it_defined=yes
13233
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13237$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013238
Matthias Kloseb9621712010-04-24 17:59:49 +000013239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13240$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013241if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013242 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013243else
Matthias Kloseb9621712010-04-24 17:59:49 +000013244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013245/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013246#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013247int
13248main ()
13249{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013250struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013251 ;
13252 return 0;
13253}
13254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013255if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013256 ac_cv_struct_addrinfo=yes
13257else
Matthias Kloseb9621712010-04-24 17:59:49 +000013258 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13261fi
13262
Matthias Kloseb9621712010-04-24 17:59:49 +000013263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13264$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013265if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013266
Matthias Kloseb9621712010-04-24 17:59:49 +000013267$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013268
13269fi
13270
Matthias Kloseb9621712010-04-24 17:59:49 +000013271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13272$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013273if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013274 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013275else
Matthias Kloseb9621712010-04-24 17:59:49 +000013276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013277/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013278
13279# include <sys/types.h>
13280# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013281int
13282main ()
13283{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013284struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013285 ;
13286 return 0;
13287}
13288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013289if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013290 ac_cv_struct_sockaddr_storage=yes
13291else
Matthias Kloseb9621712010-04-24 17:59:49 +000013292 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13295fi
13296
Matthias Kloseb9621712010-04-24 17:59:49 +000013297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13298$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013299if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013300
Matthias Kloseb9621712010-04-24 17:59:49 +000013301$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013302
13303fi
13304
Christian Heimesdffa3942016-09-05 23:54:41 +020013305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13306$as_echo_n "checking for sockaddr_alg... " >&6; }
13307if ${ac_cv_struct_sockaddr_alg+:} false; then :
13308 $as_echo_n "(cached) " >&6
13309else
13310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13311/* end confdefs.h. */
13312
13313# include <sys/types.h>
13314# include <sys/socket.h>
13315# include <linux/if_alg.h>
13316int
13317main ()
13318{
13319struct sockaddr_alg s
13320 ;
13321 return 0;
13322}
13323_ACEOF
13324if ac_fn_c_try_compile "$LINENO"; then :
13325 ac_cv_struct_sockaddr_alg=yes
13326else
13327 ac_cv_struct_sockaddr_alg=no
13328fi
13329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13330fi
13331
13332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13333$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13334if test $ac_cv_struct_sockaddr_alg = yes; then
13335
13336$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13337
13338fi
13339
Guido van Rossum627b2d71993-12-24 10:39:16 +000013340# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013341
Matthias Kloseb9621712010-04-24 17:59:49 +000013342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13343$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013344if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013346else
Matthias Kloseb9621712010-04-24 17:59:49 +000013347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013348/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013349$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013350int
13351main ()
13352{
13353static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013354test_array [0] = 0;
13355return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013356
13357 ;
13358 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013359}
Martin v. Löwis11437992002-04-12 09:54:03 +000013360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013361if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013362 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013363else
Matthias Kloseb9621712010-04-24 17:59:49 +000013364 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013367fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13369$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013370if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013371 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013372
13373fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013374
Matthias Kloseb9621712010-04-24 17:59:49 +000013375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13376$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013377if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013378 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013379else
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013381/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013382
Martin v. Löwis11437992002-04-12 09:54:03 +000013383int
13384main ()
13385{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013386
Martin v. Löwis11437992002-04-12 09:54:03 +000013387#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013388 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013389 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013390 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013391 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013392 char const *const *pcpcc;
13393 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013394 /* NEC SVR4.0.2 mips cc rejects this. */
13395 struct point {int x, y;};
13396 static struct point const zero = {0,0};
13397 /* AIX XL C 1.02.0.0 rejects this.
13398 It does not let you subtract one const X* pointer from another in
13399 an arm of an if-expression whose if-part is not a constant
13400 expression */
13401 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013402 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013403 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013404 ++pcpcc;
13405 ppc = (char**) pcpcc;
13406 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013407 { /* SCO 3.2v4 cc rejects this sort of thing. */
13408 char tx;
13409 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013410 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013411
Martin v. Löwis11437992002-04-12 09:54:03 +000013412 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013413 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013414 }
13415 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13416 int x[] = {25, 17};
13417 const int *foo = &x[0];
13418 ++foo;
13419 }
13420 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13421 typedef const int *iptr;
13422 iptr p = 0;
13423 ++p;
13424 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013425 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013426 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013427 struct s { int j; const int *ap[3]; } bx;
13428 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013429 }
13430 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13431 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013432 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013433 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013434 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013435#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013436
Martin v. Löwis11437992002-04-12 09:54:03 +000013437 ;
13438 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013439}
Martin v. Löwis11437992002-04-12 09:54:03 +000013440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013441if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013442 ac_cv_c_const=yes
13443else
Matthias Kloseb9621712010-04-24 17:59:49 +000013444 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13449$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013450if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013451
Matthias Kloseb9621712010-04-24 17:59:49 +000013452$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013453
13454fi
13455
Michael W. Hudson54241132001-12-07 15:38:26 +000013456
Guido van Rossumda88dad1995-01-26 00:46:29 +000013457works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13459$as_echo_n "checking for working volatile... " >&6; }
13460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013461/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013462
Martin v. Löwis11437992002-04-12 09:54:03 +000013463int
13464main ()
13465{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013466volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013467 ;
13468 return 0;
13469}
13470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013471if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013472 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013473else
Skip Montanaro6dead952003-09-25 14:50:04 +000013474
Matthias Kloseb9621712010-04-24 17:59:49 +000013475$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013476
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013477
Guido van Rossum627b2d71993-12-24 10:39:16 +000013478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13481$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +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
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015142# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000015143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
15144$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015145if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015146 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015147else
15148 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015149LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015151/* end confdefs.h. */
15152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015153/* Override any GCC internal prototype to avoid an error.
15154 Use char because int might match the return type of a GCC
15155 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015156#ifdef __cplusplus
15157extern "C"
15158#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015159char rl_callback_handler_install ();
15160int
15161main ()
15162{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015163return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015164 ;
15165 return 0;
15166}
15167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015168if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015169 ac_cv_lib_readline_rl_callback_handler_install=yes
15170else
Matthias Kloseb9621712010-04-24 17:59:49 +000015171 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015173rm -f core conftest.err conftest.$ac_objext \
15174 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015175LIBS=$ac_check_lib_save_LIBS
15176fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
15178$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015179if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015180
Matthias Kloseb9621712010-04-24 17:59:49 +000015181$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015182
15183fi
15184
15185
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015186# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015188/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015189#include <readline/readline.h>
15190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015191if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015192 have_readline=yes
15193else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015194 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015195
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015196fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015197rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015198if test $have_readline = yes
15199then
Matthias Kloseb9621712010-04-24 17:59:49 +000015200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015201/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015202#include <readline/readline.h>
15203
15204_ACEOF
15205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015206 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015207
Matthias Kloseb9621712010-04-24 17:59:49 +000015208$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015209
15210fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015211rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015212
Matthias Kloseb9621712010-04-24 17:59:49 +000015213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015214/* end confdefs.h. */
15215#include <readline/readline.h>
15216
15217_ACEOF
15218if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015219 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015220
Matthias Kloseb9621712010-04-24 17:59:49 +000015221$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015222
15223fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015224rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015225
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015226fi
15227
Martin v. Löwis0daad592001-09-30 21:09:59 +000015228# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15230$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015231if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015232 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015233else
Martin v. Löwis11437992002-04-12 09:54:03 +000015234 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
Skip Montanaro6dead952003-09-25 14:50:04 +000015237/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015239/* 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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015242#ifdef __cplusplus
15243extern "C"
15244#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015245char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015246int
15247main ()
15248{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015249return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015250 ;
15251 return 0;
15252}
15253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015254if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015255 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015256else
Matthias Kloseb9621712010-04-24 17:59:49 +000015257 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015258fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015259rm -f core conftest.err conftest.$ac_objext \
15260 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +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_pre_input_hook" >&5
15264$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015265if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015266
Matthias Kloseb9621712010-04-24 17:59:49 +000015267$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015268
Martin v. Löwis0daad592001-09-30 21:09:59 +000015269fi
15270
Michael W. Hudson54241132001-12-07 15:38:26 +000015271
Thomas Wouters89d996e2007-09-08 17:39:28 +000015272# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15274$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015275if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015276 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015277else
15278 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015279LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015281/* 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_completion_display_matches_hook ();
15290int
15291main ()
15292{
15293return rl_completion_display_matches_hook ();
15294 ;
15295 return 0;
15296}
15297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015298if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015299 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15300else
Matthias Kloseb9621712010-04-24 17:59:49 +000015301 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015302fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015303rm -f core conftest.err conftest.$ac_objext \
15304 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015305LIBS=$ac_check_lib_save_LIBS
15306fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15308$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015309if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015310
Matthias Kloseb9621712010-04-24 17:59:49 +000015311$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015312
15313fi
15314
15315
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015316# also in 4.0, but not in editline
15317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15318$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15319if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15320 $as_echo_n "(cached) " >&6
15321else
15322 ac_check_lib_save_LIBS=$LIBS
15323LIBS="-lreadline $READLINE_LIBS $LIBS"
15324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15325/* end confdefs.h. */
15326
15327/* 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. */
15330#ifdef __cplusplus
15331extern "C"
15332#endif
15333char rl_resize_terminal ();
15334int
15335main ()
15336{
15337return rl_resize_terminal ();
15338 ;
15339 return 0;
15340}
15341_ACEOF
15342if ac_fn_c_try_link "$LINENO"; then :
15343 ac_cv_lib_readline_rl_resize_terminal=yes
15344else
15345 ac_cv_lib_readline_rl_resize_terminal=no
15346fi
15347rm -f core conftest.err conftest.$ac_objext \
15348 conftest$ac_exeext conftest.$ac_ext
15349LIBS=$ac_check_lib_save_LIBS
15350fi
15351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15352$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15353if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15354
15355$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15356
15357fi
15358
15359
Martin v. Löwis0daad592001-09-30 21:09:59 +000015360# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15362$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015363if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015364 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015365else
Martin v. Löwis11437992002-04-12 09:54:03 +000015366 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015367LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015369/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015371/* Override any GCC internal prototype to avoid an error.
15372 Use char because int might match the return type of a GCC
15373 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015374#ifdef __cplusplus
15375extern "C"
15376#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015377char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015378int
15379main ()
15380{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015381return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015382 ;
15383 return 0;
15384}
15385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015386if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015387 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015388else
Matthias Kloseb9621712010-04-24 17:59:49 +000015389 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015390fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015391rm -f core conftest.err conftest.$ac_objext \
15392 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015393LIBS=$ac_check_lib_save_LIBS
15394fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15396$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015397if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015398
Matthias Kloseb9621712010-04-24 17:59:49 +000015399$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015400
Guido van Rossum353ae582001-07-10 16:45:32 +000015401fi
15402
Jack Jansendd19cf82001-12-06 22:36:17 +000015403
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015404# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015406/* end confdefs.h. */
15407#include <readline/readline.h>
15408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015409if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015410 have_readline=yes
15411else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015412 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015413
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015414fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015415rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015416if test $have_readline = yes
15417then
Matthias Kloseb9621712010-04-24 17:59:49 +000015418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015419/* end confdefs.h. */
15420#include <readline/readline.h>
15421
15422_ACEOF
15423if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015424 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015425
Matthias Kloseb9621712010-04-24 17:59:49 +000015426$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015427
15428fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015429rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015430
15431fi
15432
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15434$as_echo_n "checking for append_history in -lreadline... " >&6; }
15435if ${ac_cv_lib_readline_append_history+:} false; then :
15436 $as_echo_n "(cached) " >&6
15437else
15438 ac_check_lib_save_LIBS=$LIBS
15439LIBS="-lreadline $READLINE_LIBS $LIBS"
15440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15441/* end confdefs.h. */
15442
15443/* Override any GCC internal prototype to avoid an error.
15444 Use char because int might match the return type of a GCC
15445 builtin and then its argument prototype would still apply. */
15446#ifdef __cplusplus
15447extern "C"
15448#endif
15449char append_history ();
15450int
15451main ()
15452{
15453return append_history ();
15454 ;
15455 return 0;
15456}
15457_ACEOF
15458if ac_fn_c_try_link "$LINENO"; then :
15459 ac_cv_lib_readline_append_history=yes
15460else
15461 ac_cv_lib_readline_append_history=no
15462fi
15463rm -f core conftest.err conftest.$ac_objext \
15464 conftest$ac_exeext conftest.$ac_ext
15465LIBS=$ac_check_lib_save_LIBS
15466fi
15467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15468$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15469if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15470
15471$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15472
15473fi
15474
15475
Martin v. Löwis82bca632006-02-10 20:49:30 +000015476# End of readline checks: restore LIBS
15477LIBS=$LIBS_no_readline
15478
Matthias Kloseb9621712010-04-24 17:59:49 +000015479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15480$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015481if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015482 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015483else
Martin v. Löwis11437992002-04-12 09:54:03 +000015484
Matthias Kloseb9621712010-04-24 17:59:49 +000015485if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015486 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015487else
Matthias Kloseb9621712010-04-24 17:59:49 +000015488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015489/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015490
15491int main()
15492{
15493 int val1 = nice(1);
15494 if (val1 != -1 && val1 == nice(2))
15495 exit(0);
15496 exit(1);
15497}
15498
Martin v. Löwis11437992002-04-12 09:54:03 +000015499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015500if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015501 ac_cv_broken_nice=yes
15502else
Matthias Kloseb9621712010-04-24 17:59:49 +000015503 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015504fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15506 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015507fi
15508
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015509fi
15510
Matthias Kloseb9621712010-04-24 17:59:49 +000015511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15512$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015513if test "$ac_cv_broken_nice" = yes
15514then
Martin v. Löwis11437992002-04-12 09:54:03 +000015515
Matthias Kloseb9621712010-04-24 17:59:49 +000015516$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015517
15518fi
15519
Matthias Kloseb9621712010-04-24 17:59:49 +000015520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15521$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015522if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015523 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015524else
Matthias Kloseb9621712010-04-24 17:59:49 +000015525 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015526 ac_cv_broken_poll=no
15527else
Matthias Kloseb9621712010-04-24 17:59:49 +000015528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015529/* end confdefs.h. */
15530
15531#include <poll.h>
15532
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015533int main()
15534{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015535 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015536 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015537
15538 close (42);
15539
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015540 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015541 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015542 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015543 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015544 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015545 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015546 return 1;
15547}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015548
15549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015550if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015551 ac_cv_broken_poll=yes
15552else
Matthias Kloseb9621712010-04-24 17:59:49 +000015553 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15556 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015558
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015559fi
15560
Matthias Kloseb9621712010-04-24 17:59:49 +000015561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15562$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015563if test "$ac_cv_broken_poll" = yes
15564then
15565
Matthias Kloseb9621712010-04-24 17:59:49 +000015566$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015567
15568fi
15569
Brett Cannon43802422005-02-10 20:48:03 +000015570# 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 +000015571# (which is not required by ISO C or UNIX spec) and/or if we support
15572# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015573ac_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 +000015574#include <$ac_cv_struct_tm>
15575
Matthias Kloseb9621712010-04-24 17:59:49 +000015576"
Victor Stinnere0be4232011-10-25 13:06:09 +020015577if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015578
15579cat >>confdefs.h <<_ACEOF
15580#define HAVE_STRUCT_TM_TM_ZONE 1
15581_ACEOF
15582
15583
15584fi
15585
15586if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15587
Matthias Kloseb9621712010-04-24 17:59:49 +000015588$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015589
15590else
Matthias Kloseb9621712010-04-24 17:59:49 +000015591 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15592"
Victor Stinnere0be4232011-10-25 13:06:09 +020015593if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015594 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015595else
Matthias Kloseb9621712010-04-24 17:59:49 +000015596 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015597fi
15598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015599cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015600#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015601_ACEOF
15602
Matthias Kloseb9621712010-04-24 17:59:49 +000015603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15604$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015605if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015606 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015607else
Matthias Kloseb9621712010-04-24 17:59:49 +000015608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015609/* end confdefs.h. */
15610#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015611#if !HAVE_DECL_TZNAME
15612extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015613#endif
15614
15615int
15616main ()
15617{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015618return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015619 ;
15620 return 0;
15621}
15622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015623if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015624 ac_cv_var_tzname=yes
15625else
Matthias Kloseb9621712010-04-24 17:59:49 +000015626 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015627fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015628rm -f core conftest.err conftest.$ac_objext \
15629 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015630fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15632$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015633 if test $ac_cv_var_tzname = yes; then
15634
Matthias Kloseb9621712010-04-24 17:59:49 +000015635$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015636
15637 fi
15638fi
15639
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015640
Martin v. Löwis1d459062005-03-14 21:23:33 +000015641# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15643$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015644if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015645 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015646else
15647
Matthias Kloseb9621712010-04-24 17:59:49 +000015648if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015649 ac_cv_working_tzset=no
15650else
Matthias Kloseb9621712010-04-24 17:59:49 +000015651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015652/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015653
15654#include <stdlib.h>
15655#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015656#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015657
15658#if HAVE_TZNAME
15659extern char *tzname[];
15660#endif
15661
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015662int main()
15663{
Brett Cannon18367812003-09-19 00:59:16 +000015664 /* Note that we need to ensure that not only does tzset(3)
15665 do 'something' with localtime, but it works as documented
15666 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015667 This includes making sure that tzname is set properly if
15668 tm->tm_zone does not exist since it is the alternative way
15669 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015670
15671 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015672 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015673 */
15674
Martin v. Löwis1d459062005-03-14 21:23:33 +000015675 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015676 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15677
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015678 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015679 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015680 if (localtime(&groundhogday)->tm_hour != 0)
15681 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015682#if HAVE_TZNAME
15683 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15684 if (strcmp(tzname[0], "UTC") ||
15685 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15686 exit(1);
15687#endif
Brett Cannon18367812003-09-19 00:59:16 +000015688
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015689 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015690 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015691 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015692 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015693#if HAVE_TZNAME
15694 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15695 exit(1);
15696#endif
Brett Cannon18367812003-09-19 00:59:16 +000015697
15698 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15699 tzset();
15700 if (localtime(&groundhogday)->tm_hour != 11)
15701 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015702#if HAVE_TZNAME
15703 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15704 exit(1);
15705#endif
15706
15707#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015708 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15709 exit(1);
15710 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15711 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015712#endif
Brett Cannon18367812003-09-19 00:59:16 +000015713
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015714 exit(0);
15715}
15716
15717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015718if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015719 ac_cv_working_tzset=yes
15720else
Matthias Kloseb9621712010-04-24 17:59:49 +000015721 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015722fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015723rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15724 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015725fi
15726
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015727fi
15728
Matthias Kloseb9621712010-04-24 17:59:49 +000015729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15730$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015731if test "$ac_cv_working_tzset" = yes
15732then
15733
Matthias Kloseb9621712010-04-24 17:59:49 +000015734$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015735
15736fi
15737
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015738# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15740$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015741if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015742 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015743else
Matthias Kloseb9621712010-04-24 17:59:49 +000015744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015745/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015746#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015747int
15748main ()
15749{
15750
15751struct stat st;
15752st.st_mtim.tv_nsec = 1;
15753
15754 ;
15755 return 0;
15756}
15757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015758if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015759 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015760else
Matthias Kloseb9621712010-04-24 17:59:49 +000015761 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15764fi
15765
Matthias Kloseb9621712010-04-24 17:59:49 +000015766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15767$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015768if test "$ac_cv_stat_tv_nsec" = yes
15769then
15770
Matthias Kloseb9621712010-04-24 17:59:49 +000015771$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015772
15773fi
15774
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015775# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15777$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015778if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015779 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015780else
Matthias Kloseb9621712010-04-24 17:59:49 +000015781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015782/* end confdefs.h. */
15783#include <sys/stat.h>
15784int
15785main ()
15786{
15787
15788struct stat st;
15789st.st_mtimespec.tv_nsec = 1;
15790
15791 ;
15792 return 0;
15793}
15794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015795if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015796 ac_cv_stat_tv_nsec2=yes
15797else
Matthias Kloseb9621712010-04-24 17:59:49 +000015798 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015799fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15801fi
15802
Matthias Kloseb9621712010-04-24 17:59:49 +000015803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15804$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015805if test "$ac_cv_stat_tv_nsec2" = yes
15806then
15807
Matthias Kloseb9621712010-04-24 17:59:49 +000015808$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015809
15810fi
15811
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015812# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015813ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015814if test "$cross_compiling" = no; then
15815 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15816fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015817
15818for ac_header in curses.h ncurses.h
15819do :
15820 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15821ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15822if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15823 cat >>confdefs.h <<_ACEOF
15824#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15825_ACEOF
15826
15827fi
15828
15829done
15830
15831
15832# On Solaris, term.h requires curses.h
15833for ac_header in term.h
15834do :
15835 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15836#ifdef HAVE_CURSES_H
15837#include <curses.h>
15838#endif
15839
15840"
15841if test "x$ac_cv_header_term_h" = xyes; then :
15842 cat >>confdefs.h <<_ACEOF
15843#define HAVE_TERM_H 1
15844_ACEOF
15845
15846fi
15847
15848done
15849
15850
Jack Jansen666b1e72001-10-31 12:11:48 +000015851# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15853$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015854if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015855 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015856else
Matthias Kloseb9621712010-04-24 17:59:49 +000015857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015858/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015859#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015860int
15861main ()
15862{
Jack Jansen666b1e72001-10-31 12:11:48 +000015863
15864 int rtn;
15865 rtn = mvwdelch(0,0,0);
15866
Martin v. Löwis11437992002-04-12 09:54:03 +000015867 ;
15868 return 0;
15869}
15870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015871if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015872 ac_cv_mvwdelch_is_expression=yes
15873else
Matthias Kloseb9621712010-04-24 17:59:49 +000015874 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15877fi
15878
Matthias Kloseb9621712010-04-24 17:59:49 +000015879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15880$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015881
15882if test "$ac_cv_mvwdelch_is_expression" = yes
15883then
Martin v. Löwis11437992002-04-12 09:54:03 +000015884
Matthias Kloseb9621712010-04-24 17:59:49 +000015885$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015886
15887fi
15888
Matthias Kloseb9621712010-04-24 17:59:49 +000015889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15890$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015891if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015892 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015893else
Matthias Kloseb9621712010-04-24 17:59:49 +000015894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015895/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015896#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015897int
15898main ()
15899{
Jack Jansen666b1e72001-10-31 12:11:48 +000015900
15901 WINDOW *w;
15902 w->_flags = 0;
15903
Martin v. Löwis11437992002-04-12 09:54:03 +000015904 ;
15905 return 0;
15906}
15907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015908if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015909 ac_cv_window_has_flags=yes
15910else
Matthias Kloseb9621712010-04-24 17:59:49 +000015911 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15914fi
15915
Matthias Kloseb9621712010-04-24 17:59:49 +000015916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15917$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015918
Jack Jansen666b1e72001-10-31 12:11:48 +000015919
15920if test "$ac_cv_window_has_flags" = yes
15921then
Martin v. Löwis11437992002-04-12 09:54:03 +000015922
Matthias Kloseb9621712010-04-24 17:59:49 +000015923$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015924
15925fi
15926
Matthias Kloseb9621712010-04-24 17:59:49 +000015927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15928$as_echo_n "checking for is_term_resized... " >&6; }
15929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015930/* end confdefs.h. */
15931#include <curses.h>
15932int
15933main ()
15934{
15935void *x=is_term_resized
15936 ;
15937 return 0;
15938}
15939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015940if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015941
Matthias Kloseb9621712010-04-24 17:59:49 +000015942$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015943
Matthias Kloseb159a552010-04-25 21:00:44 +000015944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015945$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015946else
Matthias Kloseb9621712010-04-24 17:59:49 +000015947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15948$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015949
15950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15952
Matthias Kloseb9621712010-04-24 17:59:49 +000015953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15954$as_echo_n "checking for resize_term... " >&6; }
15955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015956/* end confdefs.h. */
15957#include <curses.h>
15958int
15959main ()
15960{
15961void *x=resize_term
15962 ;
15963 return 0;
15964}
15965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015966if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015967
Matthias Kloseb9621712010-04-24 17:59:49 +000015968$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015969
Matthias Kloseb159a552010-04-25 21:00:44 +000015970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015971$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015972else
Matthias Kloseb9621712010-04-24 17:59:49 +000015973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15974$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015975
15976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15978
Matthias Kloseb9621712010-04-24 17:59:49 +000015979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15980$as_echo_n "checking for resizeterm... " >&6; }
15981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015982/* end confdefs.h. */
15983#include <curses.h>
15984int
15985main ()
15986{
15987void *x=resizeterm
15988 ;
15989 return 0;
15990}
15991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015992if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015993
Matthias Kloseb9621712010-04-24 17:59:49 +000015994$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015995
Matthias Kloseb159a552010-04-25 21:00:44 +000015996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015997$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015998else
Matthias Kloseb9621712010-04-24 17:59:49 +000015999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16000$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016001
16002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016004# last curses configure check
16005CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016006
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16008$as_echo "$as_me: checking for device files" >&6;}
16009
16010if test "x$cross_compiling" = xyes; then
16011 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16013$as_echo_n "checking for /dev/ptmx... " >&6; }
16014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16015$as_echo "not set" >&6; }
16016 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16017 fi
16018 if test "${ac_cv_file__dev_ptc+set}" != set; then
16019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16020$as_echo_n "checking for /dev/ptc... " >&6; }
16021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16022$as_echo "not set" >&6; }
16023 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16024 fi
16025fi
16026
Matthias Kloseb9621712010-04-24 17:59:49 +000016027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16028$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016029if ${ac_cv_file__dev_ptmx+:} false; then :
16030 $as_echo_n "(cached) " >&6
16031else
16032 test "$cross_compiling" = yes &&
16033 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16034if test -r "/dev/ptmx"; then
16035 ac_cv_file__dev_ptmx=yes
16036else
16037 ac_cv_file__dev_ptmx=no
16038fi
16039fi
16040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16041$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16042if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016043
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016044fi
16045
16046if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016047
Matthias Kloseb9621712010-04-24 17:59:49 +000016048$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016049
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016050fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16052$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016053if ${ac_cv_file__dev_ptc+:} false; then :
16054 $as_echo_n "(cached) " >&6
16055else
16056 test "$cross_compiling" = yes &&
16057 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16058if test -r "/dev/ptc"; then
16059 ac_cv_file__dev_ptc=yes
16060else
16061 ac_cv_file__dev_ptc=no
16062fi
16063fi
16064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16065$as_echo "$ac_cv_file__dev_ptc" >&6; }
16066if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016067
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016068fi
16069
16070if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016071
Matthias Kloseb9621712010-04-24 17:59:49 +000016072$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016073
Neal Norwitz865400f2003-03-21 01:42:58 +000016074fi
16075
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016076if test $ac_sys_system = Darwin
16077then
16078 LIBS="$LIBS -framework CoreFoundation"
16079fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016080
Matthias Kloseb9621712010-04-24 17:59:49 +000016081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16082$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016083if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016084 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016085else
Matthias Kloseb9621712010-04-24 17:59:49 +000016086 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016087 ac_cv_have_size_t_format="cross -- assuming yes"
16088
Thomas Wouters477c8d52006-05-27 19:21:47 +000016089else
Matthias Kloseb9621712010-04-24 17:59:49 +000016090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016091/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016092
Thomas Wouters477c8d52006-05-27 19:21:47 +000016093#include <stdio.h>
16094#include <stddef.h>
16095#include <string.h>
16096
Christian Heimes2c181612007-12-17 20:04:13 +000016097#ifdef HAVE_SYS_TYPES_H
16098#include <sys/types.h>
16099#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016100
16101#ifdef HAVE_SSIZE_T
16102typedef ssize_t Py_ssize_t;
16103#elif SIZEOF_VOID_P == SIZEOF_LONG
16104typedef long Py_ssize_t;
16105#else
16106typedef int Py_ssize_t;
16107#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016108
Christian Heimes2c181612007-12-17 20:04:13 +000016109int main()
16110{
16111 char buffer[256];
16112
Thomas Wouters477c8d52006-05-27 19:21:47 +000016113 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16114 return 1;
16115
Thomas Wouters89f507f2006-12-13 04:49:30 +000016116 if (strcmp(buffer, "123"))
16117 return 1;
16118
16119 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16120 return 1;
16121
16122 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016123 return 1;
16124
16125 return 0;
16126}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016127
Thomas Wouters477c8d52006-05-27 19:21:47 +000016128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016129if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016130 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016131else
Matthias Kloseb9621712010-04-24 17:59:49 +000016132 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016134rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16135 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016136fi
16137
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16140$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016141if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016142
Matthias Kloseb9621712010-04-24 17:59:49 +000016143$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016144
16145fi
16146
Matthias Kloseb9621712010-04-24 17:59:49 +000016147ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016148#ifdef HAVE_SYS_TYPES_H
16149#include <sys/types.h>
16150#endif
16151#ifdef HAVE_SYS_SOCKET_H
16152#include <sys/socket.h>
16153#endif
16154
Matthias Kloseb9621712010-04-24 17:59:49 +000016155"
Victor Stinnere0be4232011-10-25 13:06:09 +020016156if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016157
Martin v. Löwis11437992002-04-12 09:54:03 +000016158else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016159
Matthias Kloseb9621712010-04-24 17:59:49 +000016160$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016161
16162fi
16163
Michael W. Hudson54241132001-12-07 15:38:26 +000016164
Matthias Kloseb9621712010-04-24 17:59:49 +000016165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16166$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016167if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016168 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016169else
Matthias Kloseb9621712010-04-24 17:59:49 +000016170 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016171 ac_cv_broken_mbstowcs=no
16172else
Matthias Kloseb9621712010-04-24 17:59:49 +000016173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016174/* end confdefs.h. */
16175
Stefan Krah19c21392012-11-22 23:47:32 +010016176#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016177#include<stdlib.h>
16178int main() {
16179 size_t len = -1;
16180 const char *str = "text";
16181 len = mbstowcs(NULL, str, 0);
16182 return (len != 4);
16183}
16184
16185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016186if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016187 ac_cv_broken_mbstowcs=no
16188else
Matthias Kloseb9621712010-04-24 17:59:49 +000016189 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016190fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016191rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16192 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016193fi
16194
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016195fi
16196
Matthias Kloseb9621712010-04-24 17:59:49 +000016197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16198$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016199if test "$ac_cv_broken_mbstowcs" = yes
16200then
16201
Matthias Kloseb9621712010-04-24 17:59:49 +000016202$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016203
16204fi
16205
Antoine Pitroub52ec782009-01-25 16:34:23 +000016206# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16208$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016209
16210# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016211if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016212 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016213if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016214then
16215
Matthias Kloseb9621712010-04-24 17:59:49 +000016216$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016217
Matthias Kloseb9621712010-04-24 17:59:49 +000016218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16219$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016220fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016221if test "$withval" = no
16222then
16223
16224$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16225
Matthias Kloseb9621712010-04-24 17:59:49 +000016226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16227$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016228fi
16229
Antoine Pitrou042b1282010-08-13 21:15:58 +000016230else
16231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16232$as_echo "no value specified" >&6; }
16233fi
16234
Antoine Pitroub52ec782009-01-25 16:34:23 +000016235
Matthias Kloseb17289e2012-03-15 19:51:34 +010016236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16237$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16238if ${ac_cv_computed_gotos+:} false; then :
16239 $as_echo_n "(cached) " >&6
16240else
16241 if test "$cross_compiling" = yes; then :
16242 if test "${with_computed_gotos+set}" = set; then
16243 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16244 else
16245 ac_cv_computed_gotos=no
16246 fi
16247else
16248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16249/* end confdefs.h. */
16250
16251int main(int argc, char **argv)
16252{
16253 static void *targets[1] = { &&LABEL1 };
16254 goto LABEL2;
16255LABEL1:
16256 return 0;
16257LABEL2:
16258 goto *targets[0];
16259 return 1;
16260}
16261
16262_ACEOF
16263if ac_fn_c_try_run "$LINENO"; then :
16264 ac_cv_computed_gotos=yes
16265else
16266 ac_cv_computed_gotos=no
16267fi
16268rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16269 conftest.$ac_objext conftest.beam conftest.$ac_ext
16270fi
16271
16272fi
16273
16274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16275$as_echo "$ac_cv_computed_gotos" >&6; }
16276case "$ac_cv_computed_gotos" in yes*)
16277
16278$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16279
16280esac
16281
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016282case $ac_sys_system in
16283AIX*)
16284
16285$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16286 ;;
16287esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016288
Michael W. Hudson54241132001-12-07 15:38:26 +000016289
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016290
16291
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016292for h in `(cd $srcdir;echo Python/thread_*.h)`
16293do
16294 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16295done
16296
Michael W. Hudson54241132001-12-07 15:38:26 +000016297
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016298SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16300$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016301for dir in $SRCDIRS; do
16302 if test ! -d $dir; then
16303 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016304 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016305done
Matthias Kloseb9621712010-04-24 17:59:49 +000016306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16307$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016308
Stefan Krah1919b7e2012-03-21 18:25:23 +010016309# Availability of -O2:
16310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16311$as_echo_n "checking for -O2... " >&6; }
16312saved_cflags="$CFLAGS"
16313CFLAGS="-O2"
16314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16315/* end confdefs.h. */
16316
16317int
16318main ()
16319{
16320
16321
16322 ;
16323 return 0;
16324}
16325_ACEOF
16326if ac_fn_c_try_compile "$LINENO"; then :
16327 have_O2=yes
16328else
16329 have_O2=no
16330fi
16331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16333$as_echo "$have_O2" >&6; }
16334CFLAGS="$saved_cflags"
16335
16336# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16337# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16339$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16340saved_cflags="$CFLAGS"
16341CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16342if test "$have_O2" = no; then
16343 CFLAGS=""
16344fi
16345if test "$cross_compiling" = yes; then :
16346 have_glibc_memmove_bug=undefined
16347else
16348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16349/* end confdefs.h. */
16350
16351#include <stdio.h>
16352#include <stdlib.h>
16353#include <string.h>
16354void foo(void *p, void *q) { memmove(p, q, 19); }
16355int main() {
16356 char a[32] = "123456789000000000";
16357 foo(&a[9], a);
16358 if (strcmp(a, "123456789123456789000000000") != 0)
16359 return 1;
16360 foo(a, &a[9]);
16361 if (strcmp(a, "123456789000000000") != 0)
16362 return 1;
16363 return 0;
16364}
16365
16366_ACEOF
16367if ac_fn_c_try_run "$LINENO"; then :
16368 have_glibc_memmove_bug=no
16369else
16370 have_glibc_memmove_bug=yes
16371fi
16372rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16373 conftest.$ac_objext conftest.beam conftest.$ac_ext
16374fi
16375
16376CFLAGS="$saved_cflags"
16377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16378$as_echo "$have_glibc_memmove_bug" >&6; }
16379if test "$have_glibc_memmove_bug" = yes; then
16380
16381$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16382
16383fi
16384
16385if test "$have_gcc_asm_for_x87" = yes; then
16386 # Some versions of gcc miscompile inline asm:
16387 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16388 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16389 case $CC in
16390 *gcc*)
16391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16392$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16393 saved_cflags="$CFLAGS"
16394 CFLAGS="-O2"
16395 if test "$cross_compiling" = yes; then :
16396 have_ipa_pure_const_bug=undefined
16397else
16398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16399/* end confdefs.h. */
16400
16401 __attribute__((noinline)) int
16402 foo(int *p) {
16403 int r;
16404 asm ( "movl \$6, (%1)\n\t"
16405 "xorl %0, %0\n\t"
16406 : "=r" (r) : "r" (p) : "memory"
16407 );
16408 return r;
16409 }
16410 int main() {
16411 int p = 8;
16412 if ((foo(&p) ? : p) != 6)
16413 return 1;
16414 return 0;
16415 }
16416
16417_ACEOF
16418if ac_fn_c_try_run "$LINENO"; then :
16419 have_ipa_pure_const_bug=no
16420else
16421 have_ipa_pure_const_bug=yes
16422fi
16423rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16424 conftest.$ac_objext conftest.beam conftest.$ac_ext
16425fi
16426
16427 CFLAGS="$saved_cflags"
16428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16429$as_echo "$have_ipa_pure_const_bug" >&6; }
16430 if test "$have_ipa_pure_const_bug" = yes; then
16431
16432$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16433
16434 fi
16435 ;;
16436 esac
16437fi
16438
Victor Stinner4f5366e2015-01-09 02:13:19 +010016439# Check for stdatomic.h
16440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16441$as_echo_n "checking for stdatomic.h... " >&6; }
16442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16443/* end confdefs.h. */
16444
16445
16446 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016447 atomic_int value = ATOMIC_VAR_INIT(1);
16448 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016449 int main() {
16450 int loaded_value = atomic_load(&value);
16451 return 0;
16452 }
16453
16454
16455_ACEOF
16456if ac_fn_c_try_link "$LINENO"; then :
16457 have_stdatomic_h=yes
16458else
16459 have_stdatomic_h=no
16460fi
16461rm -f core conftest.err conftest.$ac_objext \
16462 conftest$ac_exeext conftest.$ac_ext
16463
16464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16465$as_echo "$have_stdatomic_h" >&6; }
16466
16467if test "$have_stdatomic_h" = yes; then
16468
16469$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16470
16471fi
16472
16473# Check for GCC >= 4.7 __atomic builtins
16474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16475$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16477/* end confdefs.h. */
16478
16479
16480 volatile int val = 1;
16481 int main() {
16482 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16483 return 0;
16484 }
16485
16486
16487_ACEOF
16488if ac_fn_c_try_link "$LINENO"; then :
16489 have_builtin_atomic=yes
16490else
16491 have_builtin_atomic=no
16492fi
16493rm -f core conftest.err conftest.$ac_objext \
16494 conftest$ac_exeext conftest.$ac_ext
16495
16496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16497$as_echo "$have_builtin_atomic" >&6; }
16498
16499if test "$have_builtin_atomic" = yes; then
16500
16501$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16502
16503fi
16504
Ned Deily322f5ba2013-11-21 23:01:59 -080016505# ensurepip option
16506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16507$as_echo_n "checking for ensurepip... " >&6; }
16508
16509# Check whether --with-ensurepip was given.
16510if test "${with_ensurepip+set}" = set; then :
16511 withval=$with_ensurepip;
16512else
16513 with_ensurepip=upgrade
16514fi
16515
16516case $with_ensurepip in #(
16517 yes|upgrade) :
16518 ENSUREPIP=upgrade ;; #(
16519 install) :
16520 ENSUREPIP=install ;; #(
16521 no) :
16522 ENSUREPIP=no ;; #(
16523 *) :
16524 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16525esac
16526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16527$as_echo "$ENSUREPIP" >&6; }
16528
16529
Victor Stinner35a97c02015-03-08 02:59:09 +010016530# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16532$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16534/* end confdefs.h. */
16535
16536
16537 #include <dirent.h>
16538
16539 int main() {
16540 struct dirent entry;
16541 return entry.d_type == DT_UNKNOWN;
16542 }
16543
16544
16545_ACEOF
16546if ac_fn_c_try_link "$LINENO"; then :
16547 have_dirent_d_type=yes
16548else
16549 have_dirent_d_type=no
16550fi
16551rm -f core conftest.err conftest.$ac_objext \
16552 conftest$ac_exeext conftest.$ac_ext
16553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16554$as_echo "$have_dirent_d_type" >&6; }
16555
16556if test "$have_dirent_d_type" = yes; then
16557
16558$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16559
16560fi
16561
Victor Stinner9eb57c52015-03-19 22:21:49 +010016562# check if the Linux getrandom() syscall is available
16563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16564$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16566/* end confdefs.h. */
16567
16568
Victor Stinner1b80b242016-04-12 22:34:58 +020016569 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016570 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016571 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016572
16573 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016574 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016575 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016576 const int flags = GRND_NONBLOCK;
16577 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016578 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016579 return 0;
16580 }
16581
16582
16583_ACEOF
16584if ac_fn_c_try_link "$LINENO"; then :
16585 have_getrandom_syscall=yes
16586else
16587 have_getrandom_syscall=no
16588fi
16589rm -f core conftest.err conftest.$ac_objext \
16590 conftest$ac_exeext conftest.$ac_ext
16591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16592$as_echo "$have_getrandom_syscall" >&6; }
16593
16594if test "$have_getrandom_syscall" = yes; then
16595
16596$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16597
16598fi
16599
Victor Stinner3abf44e2015-09-18 15:38:37 +020016600# check if the getrandom() function is available
16601# the test was written for the Solaris function of <sys/random.h>
16602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16603$as_echo_n "checking for the getrandom() function... " >&6; }
16604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16605/* end confdefs.h. */
16606
16607
16608 #include <sys/random.h>
16609
16610 int main() {
16611 char buffer[1];
16612 const size_t buflen = sizeof(buffer);
16613 const int flags = 0;
16614 /* ignore the result, Python checks for ENOSYS at runtime */
16615 (void)getrandom(buffer, buflen, flags);
16616 return 0;
16617 }
16618
16619
16620_ACEOF
16621if ac_fn_c_try_link "$LINENO"; then :
16622 have_getrandom=yes
16623else
16624 have_getrandom=no
16625fi
16626rm -f core conftest.err conftest.$ac_objext \
16627 conftest$ac_exeext conftest.$ac_ext
16628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16629$as_echo "$have_getrandom" >&6; }
16630
16631if test "$have_getrandom" = yes; then
16632
16633$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16634
16635fi
16636
Guido van Rossum627b2d71993-12-24 10:39:16 +000016637# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016638ac_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 +000016639
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016640ac_config_files="$ac_config_files Modules/ld_so_aix"
16641
Martin v. Löwis11437992002-04-12 09:54:03 +000016642cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016643# This file is a shell script that caches the results of configure
16644# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016645# scripts and configure runs, see configure's option --config-cache.
16646# It is not useful on other systems. If it contains results you don't
16647# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016648#
Martin v. Löwis11437992002-04-12 09:54:03 +000016649# config.status only pays attention to the cache file if you give it
16650# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016651#
Skip Montanaro6dead952003-09-25 14:50:04 +000016652# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016653# loading this file, other *unset* `ac_cv_foo' will be assigned the
16654# following values.
16655
16656_ACEOF
16657
Guido van Rossumf78abae1997-01-21 22:02:36 +000016658# The following way of writing the cache mishandles newlines in values,
16659# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016660# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016661# Ultrix sh set writes to stderr and can't be redirected directly,
16662# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016663(
16664 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16665 eval ac_val=\$$ac_var
16666 case $ac_val in #(
16667 *${as_nl}*)
16668 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016669 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16670$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016671 esac
16672 case $ac_var in #(
16673 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016674 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16675 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016676 esac ;;
16677 esac
16678 done
16679
Martin v. Löwis11437992002-04-12 09:54:03 +000016680 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016681 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16682 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016683 # `set' does not quote correctly, so add quotes: double-quote
16684 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016685 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016686 "s/'/'\\\\''/g;
16687 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016688 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016689 *)
16690 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016691 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016692 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016693 esac |
16694 sort
16695) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016696 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016697 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016698 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016699 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016700 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16701 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016702 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16703 :end' >>confcache
16704if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16705 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016706 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016707 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16708$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016709 if test ! -f "$cache_file" || test -h "$cache_file"; then
16710 cat confcache >"$cache_file"
16711 else
16712 case $cache_file in #(
16713 */* | ?:*)
16714 mv -f confcache "$cache_file"$$ &&
16715 mv -f "$cache_file"$$ "$cache_file" ;; #(
16716 *)
16717 mv -f confcache "$cache_file" ;;
16718 esac
16719 fi
16720 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016721 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016722 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16723$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016725fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016726rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016727
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016728test "x$prefix" = xNONE && prefix=$ac_default_prefix
16729# Let make expand exec_prefix.
16730test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016731
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016732DEFS=-DHAVE_CONFIG_H
16733
Skip Montanaro6dead952003-09-25 14:50:04 +000016734ac_libobjs=
16735ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016736U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016737for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16738 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016739 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016740 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016741 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16742 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016743 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16744 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016745done
16746LIBOBJS=$ac_libobjs
16747
16748LTLIBOBJS=$ac_ltlibobjs
16749
16750
Martin v. Löwis11437992002-04-12 09:54:03 +000016751
Matthias Kloseb9621712010-04-24 17:59:49 +000016752
Victor Stinnere0be4232011-10-25 13:06:09 +020016753: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016754ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016755ac_clean_files_save=$ac_clean_files
16756ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016757{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16758$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16759as_write_fail=0
16760cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016761#! $SHELL
16762# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016763# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016764# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016765# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016766
Martin v. Löwis11437992002-04-12 09:54:03 +000016767debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016768ac_cs_recheck=false
16769ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016770
Matthias Kloseb9621712010-04-24 17:59:49 +000016771SHELL=\${CONFIG_SHELL-$SHELL}
16772export SHELL
16773_ASEOF
16774cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16775## -------------------- ##
16776## M4sh Initialization. ##
16777## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016778
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016779# Be more Bourne compatible
16780DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016781if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016782 emulate sh
16783 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016784 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016785 # is contrary to our usage. Disable this feature.
16786 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016787 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016788else
Matthias Kloseb9621712010-04-24 17:59:49 +000016789 case `(set -o) 2>/dev/null` in #(
16790 *posix*) :
16791 set -o posix ;; #(
16792 *) :
16793 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016794esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016795fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016796
16797
Matthias Kloseb9621712010-04-24 17:59:49 +000016798as_nl='
16799'
16800export as_nl
16801# Printing a long string crashes Solaris 7 /usr/bin/printf.
16802as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16803as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16804as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16805# Prefer a ksh shell builtin over an external printf program on Solaris,
16806# but without wasting forks for bash or zsh.
16807if test -z "$BASH_VERSION$ZSH_VERSION" \
16808 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16809 as_echo='print -r --'
16810 as_echo_n='print -rn --'
16811elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16812 as_echo='printf %s\n'
16813 as_echo_n='printf %s'
16814else
16815 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16816 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16817 as_echo_n='/usr/ucb/echo -n'
16818 else
16819 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16820 as_echo_n_body='eval
16821 arg=$1;
16822 case $arg in #(
16823 *"$as_nl"*)
16824 expr "X$arg" : "X\\(.*\\)$as_nl";
16825 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16826 esac;
16827 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16828 '
16829 export as_echo_n_body
16830 as_echo_n='sh -c $as_echo_n_body as_echo'
16831 fi
16832 export as_echo_body
16833 as_echo='sh -c $as_echo_body as_echo'
16834fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016835
16836# The user is always right.
16837if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016838 PATH_SEPARATOR=:
16839 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16840 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16841 PATH_SEPARATOR=';'
16842 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016843fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016845
16846# IFS
16847# We need space, tab and new line, in precisely that order. Quoting is
16848# there to prevent editors from complaining about space-tab.
16849# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16850# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016851IFS=" "" $as_nl"
16852
16853# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016854as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016855case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016856 *[\\/]* ) as_myself=$0 ;;
16857 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016858for as_dir in $PATH
16859do
16860 IFS=$as_save_IFS
16861 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016862 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16863 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016864IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016866 ;;
16867esac
16868# We did not find ourselves, most probably we were run as `sh COMMAND'
16869# in which case we are not to be found in the path.
16870if test "x$as_myself" = x; then
16871 as_myself=$0
16872fi
16873if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016874 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16875 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016876fi
16877
Matthias Kloseb9621712010-04-24 17:59:49 +000016878# Unset variables that we do not need and which cause bugs (e.g. in
16879# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16880# suppresses any "Segmentation fault" message there. '((' could
16881# trigger a bug in pdksh 5.2.14.
16882for as_var in BASH_ENV ENV MAIL MAILPATH
16883do eval test x\${$as_var+set} = xset \
16884 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016885done
16886PS1='$ '
16887PS2='> '
16888PS4='+ '
16889
16890# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016891LC_ALL=C
16892export LC_ALL
16893LANGUAGE=C
16894export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016895
Matthias Kloseb9621712010-04-24 17:59:49 +000016896# CDPATH.
16897(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16898
16899
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016900# as_fn_error STATUS ERROR [LINENO LOG_FD]
16901# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016902# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16903# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016904# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016905as_fn_error ()
16906{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016907 as_status=$1; test $as_status -eq 0 && as_status=1
16908 if test "$4"; then
16909 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16910 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016911 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016912 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016913 as_fn_exit $as_status
16914} # as_fn_error
16915
16916
16917# as_fn_set_status STATUS
16918# -----------------------
16919# Set $? to STATUS, without forking.
16920as_fn_set_status ()
16921{
16922 return $1
16923} # as_fn_set_status
16924
16925# as_fn_exit STATUS
16926# -----------------
16927# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16928as_fn_exit ()
16929{
16930 set +e
16931 as_fn_set_status $1
16932 exit $1
16933} # as_fn_exit
16934
16935# as_fn_unset VAR
16936# ---------------
16937# Portably unset VAR.
16938as_fn_unset ()
16939{
16940 { eval $1=; unset $1;}
16941}
16942as_unset=as_fn_unset
16943# as_fn_append VAR VALUE
16944# ----------------------
16945# Append the text in VALUE to the end of the definition contained in VAR. Take
16946# advantage of any shell optimizations that allow amortized linear growth over
16947# repeated appends, instead of the typical quadratic growth present in naive
16948# implementations.
16949if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16950 eval 'as_fn_append ()
16951 {
16952 eval $1+=\$2
16953 }'
16954else
16955 as_fn_append ()
16956 {
16957 eval $1=\$$1\$2
16958 }
16959fi # as_fn_append
16960
16961# as_fn_arith ARG...
16962# ------------------
16963# Perform arithmetic evaluation on the ARGs, and store the result in the
16964# global $as_val. Take advantage of shells that can avoid forks. The arguments
16965# must be portable across $(()) and expr.
16966if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16967 eval 'as_fn_arith ()
16968 {
16969 as_val=$(( $* ))
16970 }'
16971else
16972 as_fn_arith ()
16973 {
16974 as_val=`expr "$@" || test $? -eq 1`
16975 }
16976fi # as_fn_arith
16977
16978
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016979if expr a : '\(a\)' >/dev/null 2>&1 &&
16980 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16981 as_expr=expr
16982else
16983 as_expr=false
16984fi
16985
16986if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16987 as_basename=basename
16988else
16989 as_basename=false
16990fi
16991
Matthias Kloseb9621712010-04-24 17:59:49 +000016992if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16993 as_dirname=dirname
16994else
16995 as_dirname=false
16996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016998as_me=`$as_basename -- "$0" ||
16999$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17000 X"$0" : 'X\(//\)$' \| \
17001 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017002$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017003 sed '/^.*\/\([^/][^/]*\)\/*$/{
17004 s//\1/
17005 q
17006 }
17007 /^X\/\(\/\/\)$/{
17008 s//\1/
17009 q
17010 }
17011 /^X\/\(\/\).*/{
17012 s//\1/
17013 q
17014 }
17015 s/.*/./; q'`
17016
Matthias Kloseb9621712010-04-24 17:59:49 +000017017# Avoid depending upon Character Ranges.
17018as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17019as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17020as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17021as_cr_digits='0123456789'
17022as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017023
17024ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017025case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017026-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017027 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017028 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017029 xy) ECHO_C='\c';;
17030 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17031 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017032 esac;;
17033*)
17034 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017035esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017036
Martin v. Löwis11437992002-04-12 09:54:03 +000017037rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017038if test -d conf$$.dir; then
17039 rm -f conf$$.dir/conf$$.file
17040else
17041 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017042 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017044if (echo >conf$$.file) 2>/dev/null; then
17045 if ln -s conf$$.file conf$$ 2>/dev/null; then
17046 as_ln_s='ln -s'
17047 # ... but there are two gotchas:
17048 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17049 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017050 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017051 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017052 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017053 elif ln conf$$.file conf$$ 2>/dev/null; then
17054 as_ln_s=ln
17055 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017056 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017057 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017058else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017059 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017061rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17062rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017063
Matthias Kloseb9621712010-04-24 17:59:49 +000017064
17065# as_fn_mkdir_p
17066# -------------
17067# Create "$as_dir" as a directory, including parents if necessary.
17068as_fn_mkdir_p ()
17069{
17070
17071 case $as_dir in #(
17072 -*) as_dir=./$as_dir;;
17073 esac
17074 test -d "$as_dir" || eval $as_mkdir_p || {
17075 as_dirs=
17076 while :; do
17077 case $as_dir in #(
17078 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17079 *) as_qdir=$as_dir;;
17080 esac
17081 as_dirs="'$as_qdir' $as_dirs"
17082 as_dir=`$as_dirname -- "$as_dir" ||
17083$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17084 X"$as_dir" : 'X\(//\)[^/]' \| \
17085 X"$as_dir" : 'X\(//\)$' \| \
17086 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17087$as_echo X"$as_dir" |
17088 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17089 s//\1/
17090 q
17091 }
17092 /^X\(\/\/\)[^/].*/{
17093 s//\1/
17094 q
17095 }
17096 /^X\(\/\/\)$/{
17097 s//\1/
17098 q
17099 }
17100 /^X\(\/\).*/{
17101 s//\1/
17102 q
17103 }
17104 s/.*/./; q'`
17105 test -d "$as_dir" && break
17106 done
17107 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017108 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017109
17110
17111} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017112if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017113 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017114else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017115 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017116 as_mkdir_p=false
17117fi
17118
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017119
17120# as_fn_executable_p FILE
17121# -----------------------
17122# Test if FILE is an executable regular file.
17123as_fn_executable_p ()
17124{
17125 test -f "$1" && test -x "$1"
17126} # as_fn_executable_p
17127as_test_x='test -x'
17128as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017129
17130# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017131as_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 +000017132
17133# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017134as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017135
17136
Martin v. Löwis11437992002-04-12 09:54:03 +000017137exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017138## ----------------------------------- ##
17139## Main body of $CONFIG_STATUS script. ##
17140## ----------------------------------- ##
17141_ASEOF
17142test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017143
Matthias Kloseb9621712010-04-24 17:59:49 +000017144cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17145# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017146# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017147# values after options handling.
17148ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017149This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017150generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017151
17152 CONFIG_FILES = $CONFIG_FILES
17153 CONFIG_HEADERS = $CONFIG_HEADERS
17154 CONFIG_LINKS = $CONFIG_LINKS
17155 CONFIG_COMMANDS = $CONFIG_COMMANDS
17156 $ $0 $@
17157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017158on `(hostname || uname -n) 2>/dev/null | sed 1q`
17159"
17160
Martin v. Löwis11437992002-04-12 09:54:03 +000017161_ACEOF
17162
Matthias Kloseb9621712010-04-24 17:59:49 +000017163case $ac_config_files in *"
17164"*) set x $ac_config_files; shift; ac_config_files=$*;;
17165esac
17166
17167case $ac_config_headers in *"
17168"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17169esac
17170
17171
17172cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017173# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017174config_files="$ac_config_files"
17175config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017177_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017178
Matthias Kloseb9621712010-04-24 17:59:49 +000017179cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017180ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017181\`$as_me' instantiates files and other configuration actions
17182from templates according to the current configuration. Unless the files
17183and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017184
Matthias Kloseb9621712010-04-24 17:59:49 +000017185Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017186
17187 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017188 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017189 --config print configuration, then exit
17190 -q, --quiet, --silent
17191 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017192 -d, --debug don't remove temporary files
17193 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017194 --file=FILE[:TEMPLATE]
17195 instantiate the configuration file FILE
17196 --header=FILE[:TEMPLATE]
17197 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017198
17199Configuration files:
17200$config_files
17201
17202Configuration headers:
17203$config_headers
17204
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017205Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017208cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17209ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017210ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017211python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017212configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017213 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017214
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017215Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017216This config.status script is free software; the Free Software Foundation
17217gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017218
17219ac_pwd='$ac_pwd'
17220srcdir='$srcdir'
17221INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017222MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017223test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017224_ACEOF
17225
Matthias Kloseb9621712010-04-24 17:59:49 +000017226cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17227# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017228ac_need_defaults=:
17229while test $# != 0
17230do
17231 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017232 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017233 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17234 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017235 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017236 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017237 --*=)
17238 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17239 ac_optarg=
17240 ac_shift=:
17241 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017242 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017243 ac_option=$1
17244 ac_optarg=$2
17245 ac_shift=shift
17246 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017247 esac
17248
Skip Montanaro6dead952003-09-25 14:50:04 +000017249 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017250 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017251 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17252 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017253 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017254 $as_echo "$ac_cs_version"; exit ;;
17255 --config | --confi | --conf | --con | --co | --c )
17256 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017257 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017258 debug=: ;;
17259 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017260 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017261 case $ac_optarg in
17262 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017263 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017264 esac
17265 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017266 ac_need_defaults=false;;
17267 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017268 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017269 case $ac_optarg in
17270 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17271 esac
17272 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017273 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017274 --he | --h)
17275 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017276 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017277Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017278 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017279 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017280 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17281 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17282 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017283
17284 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017285 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017286Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017287
Matthias Kloseb9621712010-04-24 17:59:49 +000017288 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017289 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017290
17291 esac
17292 shift
17293done
17294
Skip Montanaro6dead952003-09-25 14:50:04 +000017295ac_configure_extra_args=
17296
17297if $ac_cs_silent; then
17298 exec 6>/dev/null
17299 ac_configure_extra_args="$ac_configure_extra_args --silent"
17300fi
17301
17302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017303cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017304if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017305 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017306 shift
17307 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17308 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017309 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017310 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017311fi
17312
Martin v. Löwis11437992002-04-12 09:54:03 +000017313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017314cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017315exec 5>>config.log
17316{
17317 echo
17318 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17319## Running $as_me. ##
17320_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017321 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017322} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017323
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017325cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017326_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017327
Matthias Kloseb9621712010-04-24 17:59:49 +000017328cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017329
17330# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017331for ac_config_target in $ac_config_targets
17332do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017333 case $ac_config_target in
17334 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17335 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17336 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017337 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17338 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017339 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17340 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017341 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017342 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017343 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017344
Victor Stinnere0be4232011-10-25 13:06:09 +020017345 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017346 esac
17347done
17348
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017349
Martin v. Löwis11437992002-04-12 09:54:03 +000017350# If the user did not use the arguments to specify the items to instantiate,
17351# then the envvar interface is used. Set only those that are not.
17352# We use the long form for the default assignment because of an extremely
17353# bizarre bug on SunOS 4.1.3.
17354if $ac_need_defaults; then
17355 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17356 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17357fi
17358
Skip Montanaro6dead952003-09-25 14:50:04 +000017359# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017360# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017361# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017362# Hook for its removal unless debugging.
17363# Note that there is a small window in which the directory will not be cleaned:
17364# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017365$debug ||
17366{
Victor Stinnere0be4232011-10-25 13:06:09 +020017367 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017368 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017369 : "${ac_tmp:=$tmp}"
17370 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017371' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017372 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017373}
Martin v. Löwis11437992002-04-12 09:54:03 +000017374# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017375
Martin v. Löwis11437992002-04-12 09:54:03 +000017376{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017377 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017378 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017379} ||
17380{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017381 tmp=./conf$$-$RANDOM
17382 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017383} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017384ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017385
Matthias Kloseb9621712010-04-24 17:59:49 +000017386# Set up the scripts for CONFIG_FILES section.
17387# No need to generate them if there are no CONFIG_FILES.
17388# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017389if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017390
Matthias Kloseb9621712010-04-24 17:59:49 +000017391
17392ac_cr=`echo X | tr X '\015'`
17393# On cygwin, bash can eat \r inside `` if the user requested igncr.
17394# But we know of no other shell where ac_cr would be empty at this
17395# point, so we can use a bashism as a fallback.
17396if test "x$ac_cr" = x; then
17397 eval ac_cr=\$\'\\r\'
17398fi
17399ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17400if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017401 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017402else
17403 ac_cs_awk_cr=$ac_cr
17404fi
17405
Victor Stinnere0be4232011-10-25 13:06:09 +020017406echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017407_ACEOF
17408
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017409
Matthias Kloseb9621712010-04-24 17:59:49 +000017410{
17411 echo "cat >conf$$subs.awk <<_ACEOF" &&
17412 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17413 echo "_ACEOF"
17414} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017415 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17416ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017417ac_delim='%!_!# '
17418for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017419 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017420 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017421
Matthias Kloseb9621712010-04-24 17:59:49 +000017422 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17423 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017424 break
17425 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017426 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017427 else
17428 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017429 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017430done
Matthias Kloseb9621712010-04-24 17:59:49 +000017431rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017432
Matthias Kloseb9621712010-04-24 17:59:49 +000017433cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017434cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017436sed -n '
17437h
17438s/^/S["/; s/!.*/"]=/
17439p
17440g
17441s/^[^!]*!//
17442:repl
17443t repl
17444s/'"$ac_delim"'$//
17445t delim
17446:nl
17447h
17448s/\(.\{148\}\)..*/\1/
17449t more1
17450s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17451p
17452n
17453b repl
17454:more1
17455s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17456p
17457g
17458s/.\{148\}//
17459t nl
17460:delim
17461h
17462s/\(.\{148\}\)..*/\1/
17463t more2
17464s/["\\]/\\&/g; s/^/"/; s/$/"/
17465p
17466b
17467:more2
17468s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17469p
17470g
17471s/.\{148\}//
17472t delim
17473' <conf$$subs.awk | sed '
17474/^[^""]/{
17475 N
17476 s/\n//
17477}
17478' >>$CONFIG_STATUS || ac_write_fail=1
17479rm -f conf$$subs.awk
17480cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17481_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017482cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017483 for (key in S) S_is_set[key] = 1
17484 FS = ""
17485
17486}
17487{
17488 line = $ 0
17489 nfields = split(line, field, "@")
17490 substed = 0
17491 len = length(field[1])
17492 for (i = 2; i < nfields; i++) {
17493 key = field[i]
17494 keylen = length(key)
17495 if (S_is_set[key]) {
17496 value = S[key]
17497 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17498 len += length(value) + length(field[++i])
17499 substed = 1
17500 } else
17501 len += 1 + keylen
17502 }
17503
17504 print line
17505}
17506
17507_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017509cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17510if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17511 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17512else
17513 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017514fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017515 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017516_ACEOF
17517
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017518# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17519# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017520# trailing colons and then remove the whole line if VPATH becomes empty
17521# (actually we leave an empty line to preserve line numbers).
17522if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017523 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17524h
17525s///
17526s/^/:/
17527s/[ ]*$/:/
17528s/:\$(srcdir):/:/g
17529s/:\${srcdir}:/:/g
17530s/:@srcdir@:/:/g
17531s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017532s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017533x
17534s/\(=[ ]*\).*/\1/
17535G
17536s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017537s/^[^=]*=[ ]*$//
17538}'
17539fi
17540
Matthias Kloseb9621712010-04-24 17:59:49 +000017541cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017542fi # test -n "$CONFIG_FILES"
17543
Matthias Kloseb9621712010-04-24 17:59:49 +000017544# Set up the scripts for CONFIG_HEADERS section.
17545# No need to generate them if there are no CONFIG_HEADERS.
17546# This happens for instance with `./config.status Makefile'.
17547if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017548cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017549BEGIN {
17550_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017551
Matthias Kloseb9621712010-04-24 17:59:49 +000017552# Transform confdefs.h into an awk script `defines.awk', embedded as
17553# here-document in config.status, that substitutes the proper values into
17554# config.h.in to produce config.h.
17555
17556# Create a delimiter string that does not exist in confdefs.h, to ease
17557# handling of long lines.
17558ac_delim='%!_!# '
17559for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017560 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17561 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017562 break
17563 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017564 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017565 else
17566 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17567 fi
17568done
17569
17570# For the awk script, D is an array of macro values keyed by name,
17571# likewise P contains macro parameters if any. Preserve backslash
17572# newline sequences.
17573
17574ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17575sed -n '
17576s/.\{148\}/&'"$ac_delim"'/g
17577t rset
17578:rset
17579s/^[ ]*#[ ]*define[ ][ ]*/ /
17580t def
17581d
17582:def
17583s/\\$//
17584t bsnl
17585s/["\\]/\\&/g
17586s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17587D["\1"]=" \3"/p
17588s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17589d
17590:bsnl
17591s/["\\]/\\&/g
17592s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17593D["\1"]=" \3\\\\\\n"\\/p
17594t cont
17595s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17596t cont
17597d
17598:cont
17599n
17600s/.\{148\}/&'"$ac_delim"'/g
17601t clear
17602:clear
17603s/\\$//
17604t bsnlc
17605s/["\\]/\\&/g; s/^/"/; s/$/"/p
17606d
17607:bsnlc
17608s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17609b cont
17610' <confdefs.h | sed '
17611s/'"$ac_delim"'/"\\\
17612"/g' >>$CONFIG_STATUS || ac_write_fail=1
17613
17614cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17615 for (key in D) D_is_set[key] = 1
17616 FS = ""
17617}
17618/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17619 line = \$ 0
17620 split(line, arg, " ")
17621 if (arg[1] == "#") {
17622 defundef = arg[2]
17623 mac1 = arg[3]
17624 } else {
17625 defundef = substr(arg[1], 2)
17626 mac1 = arg[2]
17627 }
17628 split(mac1, mac2, "(") #)
17629 macro = mac2[1]
17630 prefix = substr(line, 1, index(line, defundef) - 1)
17631 if (D_is_set[macro]) {
17632 # Preserve the white space surrounding the "#".
17633 print prefix "define", macro P[macro] D[macro]
17634 next
17635 } else {
17636 # Replace #undef with comments. This is necessary, for example,
17637 # in the case of _POSIX_SOURCE, which is predefined and required
17638 # on some systems where configure will not decide to define it.
17639 if (defundef == "undef") {
17640 print "/*", prefix defundef, macro, "*/"
17641 next
17642 }
17643 }
17644}
17645{ print }
17646_ACAWK
17647_ACEOF
17648cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017649 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017650fi # test -n "$CONFIG_HEADERS"
17651
17652
17653eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17654shift
17655for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017656do
17657 case $ac_tag in
17658 :[FHLC]) ac_mode=$ac_tag; continue;;
17659 esac
17660 case $ac_mode$ac_tag in
17661 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017662 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017663 :[FH]-) ac_tag=-:-;;
17664 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17665 esac
17666 ac_save_IFS=$IFS
17667 IFS=:
17668 set x $ac_tag
17669 IFS=$ac_save_IFS
17670 shift
17671 ac_file=$1
17672 shift
17673
17674 case $ac_mode in
17675 :L) ac_source=$1;;
17676 :[FH])
17677 ac_file_inputs=
17678 for ac_f
17679 do
17680 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017681 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017682 *) # Look for the file first in the build tree, then in the source tree
17683 # (if the path is not absolute). The absolute path cannot be DOS-style,
17684 # because $ac_f cannot contain `:'.
17685 test -f "$ac_f" ||
17686 case $ac_f in
17687 [\\/$]*) false;;
17688 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17689 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017690 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017691 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017692 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17693 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017694 done
17695
17696 # Let's still pretend it is `configure' which instantiates (i.e., don't
17697 # use $as_me), people would be surprised to read:
17698 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017699 configure_input='Generated from '`
17700 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17701 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017702 if test x"$ac_file" != x-; then
17703 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017704 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17705$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017706 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017707 # Neutralize special characters interpreted by sed in replacement strings.
17708 case $configure_input in #(
17709 *\&* | *\|* | *\\* )
17710 ac_sed_conf_input=`$as_echo "$configure_input" |
17711 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17712 *) ac_sed_conf_input=$configure_input;;
17713 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017714
17715 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017716 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17717 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017718 esac
17719 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017720 esac
17721
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017723$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017724 X"$ac_file" : 'X\(//\)[^/]' \| \
17725 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017726 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017727$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017728 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17729 s//\1/
17730 q
17731 }
17732 /^X\(\/\/\)[^/].*/{
17733 s//\1/
17734 q
17735 }
17736 /^X\(\/\/\)$/{
17737 s//\1/
17738 q
17739 }
17740 /^X\(\/\).*/{
17741 s//\1/
17742 q
17743 }
17744 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017745 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017746 ac_builddir=.
17747
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017748case "$ac_dir" in
17749.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17750*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017751 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017752 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017753 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017754 case $ac_top_builddir_sub in
17755 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17756 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17757 esac ;;
17758esac
17759ac_abs_top_builddir=$ac_pwd
17760ac_abs_builddir=$ac_pwd$ac_dir_suffix
17761# for backward compatibility:
17762ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017763
17764case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017765 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017766 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017767 ac_top_srcdir=$ac_top_builddir_sub
17768 ac_abs_top_srcdir=$ac_pwd ;;
17769 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017770 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017771 ac_top_srcdir=$srcdir
17772 ac_abs_top_srcdir=$srcdir ;;
17773 *) # Relative name.
17774 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17775 ac_top_srcdir=$ac_top_build_prefix$srcdir
17776 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017777esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017778ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017779
Martin v. Löwis11437992002-04-12 09:54:03 +000017780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017781 case $ac_mode in
17782 :F)
17783 #
17784 # CONFIG_FILE
17785 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017786
17787 case $INSTALL in
17788 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017789 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017790 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017791 ac_MKDIR_P=$MKDIR_P
17792 case $MKDIR_P in
17793 [\\/$]* | ?:[\\/]* ) ;;
17794 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17795 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017796_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017797
Matthias Kloseb9621712010-04-24 17:59:49 +000017798cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017799# If the template does not know about datarootdir, expand it.
17800# FIXME: This hack should be removed a few years after 2.60.
17801ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017802ac_sed_dataroot='
17803/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017804 p
17805 q
17806}
17807/@datadir@/p
17808/@docdir@/p
17809/@infodir@/p
17810/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017811/@mandir@/p'
17812case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017813*datarootdir*) ac_datarootdir_seen=yes;;
17814*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17816$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017818cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017819 ac_datarootdir_hack='
17820 s&@datadir@&$datadir&g
17821 s&@docdir@&$docdir&g
17822 s&@infodir@&$infodir&g
17823 s&@localedir@&$localedir&g
17824 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017825 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017826esac
17827_ACEOF
17828
17829# Neutralize VPATH when `$srcdir' = `.'.
17830# Shell code in configure.ac might set extrasub.
17831# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017832cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17833ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017834$extrasub
17835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017836cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017837:t
17838/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017839s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017840s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017841s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017842s&@srcdir@&$ac_srcdir&;t t
17843s&@abs_srcdir@&$ac_abs_srcdir&;t t
17844s&@top_srcdir@&$ac_top_srcdir&;t t
17845s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17846s&@builddir@&$ac_builddir&;t t
17847s&@abs_builddir@&$ac_abs_builddir&;t t
17848s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17849s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017850s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017851$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017852"
Victor Stinnere0be4232011-10-25 13:06:09 +020017853eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17854 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017855
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017856test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017857 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17858 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17859 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017860 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017861which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017862$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017863which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017864
Victor Stinnere0be4232011-10-25 13:06:09 +020017865 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017866 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017867 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17868 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017869 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017870 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017871 ;;
17872 :H)
17873 #
17874 # CONFIG_HEADER
17875 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017876 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017877 {
17878 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017879 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17880 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017881 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017882 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017883 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17884$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017885 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017886 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017887 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017888 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017889 fi
17890 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017891 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017892 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017893 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017894 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017895 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017896
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017897
17898 esac
17899
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017900
17901 case $ac_file$ac_mode in
17902 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17903
17904 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017905done # for ac_tag
17906
Guido van Rossum627b2d71993-12-24 10:39:16 +000017907
Matthias Kloseb9621712010-04-24 17:59:49 +000017908as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017909_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017910ac_clean_files=$ac_clean_files_save
17911
Matthias Kloseb9621712010-04-24 17:59:49 +000017912test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017913 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017914
Martin v. Löwis11437992002-04-12 09:54:03 +000017915
17916# configure is writing to config.log, and then calls config.status.
17917# config.status does its own redirection, appending to config.log.
17918# Unfortunately, on DOS this fails, as config.log is still kept open
17919# by configure, so config.status won't be able to write to it; its
17920# output is simply discarded. So we exec the FD to /dev/null,
17921# effectively closing config.log, so it can be properly (re)opened and
17922# appended to by config.status. When coming back to configure, we
17923# need to make the FD available again.
17924if test "$no_create" != yes; then
17925 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017926 ac_config_status_args=
17927 test "$silent" = yes &&
17928 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017929 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017930 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017931 exec 5>>config.log
17932 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17933 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017934 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017935fi
17936if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17937 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17938$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017939fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017940
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017941
Christian Heimes75ed8902013-11-20 01:11:18 +010017942echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017943if test ! -f Modules/Setup
17944then
17945 cp $srcdir/Modules/Setup.dist Modules/Setup
17946fi
17947
Christian Heimes75ed8902013-11-20 01:11:18 +010017948echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017949if test ! -f Modules/Setup.local
17950then
17951 echo "# Edit this file for local setup changes" >Modules/Setup.local
17952fi
17953
Christian Heimes75ed8902013-11-20 01:11:18 +010017954echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017955$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17956 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017957 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017958mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017959
17960if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17961 echo "" >&6
17962 echo "" >&6
Christian Heimes938da642016-09-24 12:34:25 +020017963 echo "If you want a release build with all optimizations active (LTO, PGO, etc)," >&6
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +000017964 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017965 echo "" >&6
17966 echo "" >&6
17967fi
17968