blob: 1c90d3101c897743a29610c4269a2f902dde90c9 [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
671OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700672LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700673target_os
674target_vendor
675target_cpu
676target
677LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_ERR
679LLVM_PROF_FILE
680LLVM_PROF_MERGER
681PGO_PROF_USE_FLAG
682PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700683LTOFLAGS
Brett Cannon63d98bc2016-09-06 17:12:40 -0700684DEF_MAKE_RULE
685DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000686ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000687LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100688MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000689INSTALL_DATA
690INSTALL_SCRIPT
691INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200692ac_ct_READELF
693READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000694ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200695ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000696AR
697RANLIB
698GNULD
699LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000700LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000701RUNSHARED
702INSTSONAME
703LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000704PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000705BLDLIBRARY
706DLLLIBRARY
707LDLIBRARY
708LIBRARY
709BUILDEXEEXT
710EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200711NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200712MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200713PLATFORM_TRIPLET
714MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200715ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000716MAINCC
717CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700718SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200719GREP
720CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000721OBJEXT
722EXEEXT
723ac_ct_CC
724CPPFLAGS
725LDFLAGS
726CFLAGS
727CC
728EXPORT_MACOSX_DEPLOYMENT_TARGET
729CONFIGURE_MACOSX_DEPLOYMENT_TARGET
730SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200731_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000732MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000733FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000734FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800735FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000736FRAMEWORKALTINSTALLLAST
737FRAMEWORKALTINSTALLFIRST
738FRAMEWORKINSTALLLAST
739FRAMEWORKINSTALLFIRST
740PYTHONFRAMEWORKINSTALLDIR
741PYTHONFRAMEWORKPREFIX
742PYTHONFRAMEWORKDIR
743PYTHONFRAMEWORKIDENTIFIER
744PYTHONFRAMEWORK
745LIPO_32BIT_FLAGS
746ARCH_RUN_32BIT
747UNIVERSALSDK
748CONFIG_ARGS
749SOVERSION
750VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000751GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200752PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200753PYTHON_FOR_GEN
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
Ned Deily5c4b0d02017-03-04 00:19:55 -05002712if test -e $srcdir/.git/HEAD
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; }
2882if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2883 $as_echo_n "(cached) " >&6
2884else
2885 if test -n "$PYTHON_FOR_GEN"; then
2886 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2887else
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
2895 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
2896 $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
2905PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
2906if test -n "$PYTHON_FOR_GEN"; then
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
2908$as_echo "$PYTHON_FOR_GEN" >&6; }
2909else
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2911$as_echo "no" >&6; }
2912fi
2913
2914
2915 test -n "$PYTHON_FOR_GEN" && break
2916done
2917test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
2918
2919if test "$PYTHON_FOR_GEN" = not-found; then
2920 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
2921 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
2922 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
2923fi
2924
2925
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002926if test "$cross_compiling" = yes; then
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2928$as_echo_n "checking for python interpreter for cross build... " >&6; }
2929 if test -z "$PYTHON_FOR_BUILD"; then
2930 for interp in python$PACKAGE_VERSION python3 python; do
2931 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002932 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 +02002933 break
2934 fi
2935 interp=
2936 done
2937 if test x$interp = x; then
2938 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2939 fi
2940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2941$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002942 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 +02002943 fi
Martin Panter43a94a72016-07-29 05:52:32 +00002944 # Used to comment out stuff for rebuilding generated files
2945 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01002946elif test "$cross_compiling" = maybe; then
2947 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002948else
2949 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00002950 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002951fi
2952
2953
Martin v. Löwis11437992002-04-12 09:54:03 +00002954
Martin Pantereac67be2016-07-28 01:28:27 +00002955
Benjamin Petersond23f8222009-04-05 19:13:16 +00002956if test "$prefix" != "/"; then
2957 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2958fi
2959
2960
Martin v. Löwis11437992002-04-12 09:54:03 +00002961
2962
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002963# We don't use PACKAGE_ variables, and they cause conflicts
2964# with other autoconf-based packages that include Python.h
2965grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2966rm confdefs.h
2967mv confdefs.h.new confdefs.h
2968
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002969
Ned Deily4829bc62016-09-12 17:29:04 -04002970VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002971
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002972# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002973
2974SOVERSION=1.0
2975
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002976# The later defininition of _XOPEN_SOURCE disables certain features
2977# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2978
Matthias Kloseb9621712010-04-24 17:59:49 +00002979$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002980
2981
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002982# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2983# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2984# them.
2985
Matthias Kloseb9621712010-04-24 17:59:49 +00002986$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002987
2988
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002989# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2990# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2991# them.
2992
Matthias Kloseb9621712010-04-24 17:59:49 +00002993$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002994
2995
Martin v. Löwisd6320502004-08-12 13:45:08 +00002996# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2997# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2998
Matthias Kloseb9621712010-04-24 17:59:49 +00002999$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003000
3001
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003002# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3003# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3004# them.
3005
Matthias Kloseb9621712010-04-24 17:59:49 +00003006$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003007
3008
3009
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003010define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003011
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003012# Arguments passed to configure.
3013
3014CONFIG_ARGS="$ac_configure_args"
3015
Matthias Kloseb9621712010-04-24 17:59:49 +00003016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3017$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003018# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003019if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003020 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003021 case $enableval in
3022 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003023 # Locate the best usable SDK, see Mac/README.txt for more
3024 # information
3025 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003026 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003027 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003028 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3029 if test ! -d "${enableval}"
3030 then
3031 enableval=/
3032 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003033 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003034 ;;
3035 esac
3036 case $enableval in
3037 no)
3038 UNIVERSALSDK=
3039 enable_universalsdk=
3040 ;;
3041 *)
3042 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003043 if test ! -d "${UNIVERSALSDK}"
3044 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003045 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003046 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003047 ;;
3048 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003049
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003050
Thomas Wouters477c8d52006-05-27 19:21:47 +00003051else
3052
3053 UNIVERSALSDK=
3054 enable_universalsdk=
3055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003056fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003057
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003058if test -n "${UNIVERSALSDK}"
3059then
Matthias Kloseb9621712010-04-24 17:59:49 +00003060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3061$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003062else
Matthias Kloseb9621712010-04-24 17:59:49 +00003063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3064$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003065fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003067
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003068
Ned Deily87adb6e2013-10-18 21:09:56 -07003069ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003070
Ned Deilycbfb9a52012-06-23 16:02:19 -07003071# For backward compatibility reasons we prefer to select '32-bit' if available,
3072# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003073UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003074if test "`uname -s`" = "Darwin"
3075then
3076 if test -n "${UNIVERSALSDK}"
3077 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003078 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003079 then
3080 UNIVERSAL_ARCHS="intel"
3081 fi
3082 fi
3083fi
3084
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003085
Matthias Kloseb9621712010-04-24 17:59:49 +00003086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3087$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003088
3089# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003090if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003091 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003092 UNIVERSAL_ARCHS="$withval"
3093
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003094fi
3095
Ned Deily87adb6e2013-10-18 21:09:56 -07003096if test -n "${UNIVERSALSDK}"
3097then
3098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3099$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3100else
3101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3102$as_echo "no" >&6; }
3103fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003104
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003105
3106# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003107if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003108 withval=$with_framework_name;
3109 PYTHONFRAMEWORK=${withval}
3110 PYTHONFRAMEWORKDIR=${withval}.framework
3111 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3112
3113else
3114
3115 PYTHONFRAMEWORK=Python
3116 PYTHONFRAMEWORKDIR=Python.framework
3117 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3118
3119fi
3120
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003121# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003122if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003123 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003124 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003125 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003126 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003127 esac
3128 case $enableval in
3129 no)
3130 PYTHONFRAMEWORK=
3131 PYTHONFRAMEWORKDIR=no-framework
3132 PYTHONFRAMEWORKPREFIX=
3133 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003134 FRAMEWORKINSTALLFIRST=
3135 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003136 FRAMEWORKALTINSTALLFIRST=
3137 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003138 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003139 if test "x${prefix}" = "xNONE"; then
3140 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3141 else
3142 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3143 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003144 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003145 ;;
3146 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003147 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003148 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003149 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003150 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003151 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3152 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003153 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003154 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003155
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003156 if test "x${prefix}" = "xNONE" ; then
3157 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003158
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003159 else
3160 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3161 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003162
3163 case "${enableval}" in
3164 /System*)
3165 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3166 if test "${prefix}" = "NONE" ; then
3167 # See below
3168 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3169 fi
3170 ;;
3171
3172 /Library*)
3173 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3174 ;;
3175
3176 */Library/Frameworks)
3177 MDIR="`dirname "${enableval}"`"
3178 MDIR="`dirname "${MDIR}"`"
3179 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3180
3181 if test "${prefix}" = "NONE"; then
3182 # User hasn't specified the
3183 # --prefix option, but wants to install
3184 # the framework in a non-default location,
3185 # ensure that the compatibility links get
3186 # installed relative to that prefix as well
3187 # instead of in /usr/local.
3188 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3189 fi
3190 ;;
3191
3192 *)
3193 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3194 ;;
3195 esac
3196
Jack Jansen127e56e2001-09-11 14:41:54 +00003197 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003198
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003199 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003200 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003202
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003204
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003205 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3206
3207 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3208
Jack Jansene578a632001-08-15 01:27:14 +00003209 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003210
Guido van Rossum563e7081996-09-10 18:20:48 +00003211else
Martin v. Löwis11437992002-04-12 09:54:03 +00003212
Jack Jansene578a632001-08-15 01:27:14 +00003213 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003214 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003215 PYTHONFRAMEWORKPREFIX=
3216 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003217 FRAMEWORKINSTALLFIRST=
3218 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003219 FRAMEWORKALTINSTALLFIRST=
3220 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003221 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003222 if test "x${prefix}" = "xNONE" ; then
3223 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3224 else
3225 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3226 fi
Jack Jansene578a632001-08-15 01:27:14 +00003227 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003228
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003229
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003230fi
3231
Thomas Wouters477c8d52006-05-27 19:21:47 +00003232
3233
Michael W. Hudson54241132001-12-07 15:38:26 +00003234
3235
3236
3237
Jack Jansene578a632001-08-15 01:27:14 +00003238
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003239
3240
3241
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003242
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003243
Ned Deilyb8f944f2013-11-21 22:42:25 -08003244
Jack Jansene578a632001-08-15 01:27:14 +00003245##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003246## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003247## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003248##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003249# Set name for machine-dependent library files
3250
Matthias Kloseb9621712010-04-24 17:59:49 +00003251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3252$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003253if test -z "$MACHDEP"
3254then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003255 # avoid using uname for cross builds
3256 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003257 # ac_sys_system and ac_sys_release are used for setting
3258 # a lot of different things including 'define_xopen_source'
3259 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003260 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003261 *-*-linux-android*)
3262 ac_sys_system=Linux-android
3263 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003264 *-*-linux*)
3265 ac_sys_system=Linux
3266 ;;
3267 *-*-cygwin*)
3268 ac_sys_system=Cygwin
3269 ;;
3270 *)
3271 # for now, limit cross builds to known configurations
3272 MACHDEP="unknown"
3273 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3274 esac
3275 ac_sys_release=
3276 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003277 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003278 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003279 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003280 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003281 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003282 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003283 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003284 fi
3285 ac_md_system=`echo $ac_sys_system |
3286 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3287 ac_md_release=`echo $ac_sys_release |
3288 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3289 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003290
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003292 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003293 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003294 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003295 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003296 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003297 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003298fi
Guido van Rossum91922671997-10-09 20:24:13 +00003299
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003300
3301if test "$cross_compiling" = yes; then
3302 case "$host" in
3303 *-*-linux*)
3304 case "$host_cpu" in
3305 arm*)
3306 _host_cpu=arm
3307 ;;
3308 *)
3309 _host_cpu=$host_cpu
3310 esac
3311 ;;
3312 *-*-cygwin*)
3313 _host_cpu=
3314 ;;
3315 *)
3316 # for now, limit cross builds to known configurations
3317 MACHDEP="unknown"
3318 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3319 esac
3320 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3321fi
3322
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003323# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3324# disable features if it is defined, without any means to access these
3325# features as extensions. For these systems, we skip the definition of
3326# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3327# some feature, make sure there is no alternative way to access this
3328# feature. Also, when using wildcards, make sure you have verified the
3329# need for not defining _XOPEN_SOURCE on all systems matching the
3330# wildcard, and that the wildcard does not include future systems
3331# (which may remove their limitations).
3332case $ac_sys_system/$ac_sys_release in
3333 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3334 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003335 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003336 # In addition, Stefan Krah confirms that issue #1244610 exists through
3337 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003338 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003339 define_xopen_source=no
3340 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3341 # also defined. This can be overridden by defining _BSD_SOURCE
3342 # As this has a different meaning on Linux, only define it on OpenBSD
3343
Matthias Kloseb9621712010-04-24 17:59:49 +00003344$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003345
3346 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003347 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003348 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3349 # also defined. This can be overridden by defining _BSD_SOURCE
3350 # As this has a different meaning on Linux, only define it on OpenBSD
3351
Matthias Kloseb9621712010-04-24 17:59:49 +00003352$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003353
3354 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003355 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3356 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3357 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003358 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 +00003359 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003360 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3361 # request to enable features supported by the standard as a request
3362 # to disable features not supported by the standard. The best way
3363 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3364 # entirely and define __EXTENSIONS__ instead.
3365 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003366 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003367 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3368 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003369 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003370 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003371 define_xopen_source=no;;
3372 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003373 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003374 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003375 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003376 # On FreeBSD 4, the math functions C89 does not cover are never defined
3377 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3378 FreeBSD/4.*)
3379 define_xopen_source=no;;
3380 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3381 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3382 # identifies itself as Darwin/7.*
3383 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3384 # disables platform specific features beyond repair.
3385 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3386 # has no effect, don't bother defining them
3387 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003388 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003389 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003390 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003391 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3392 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3393 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003394 AIX/4)
3395 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003396 AIX/5)
3397 if test `uname -r` -eq 1; then
3398 define_xopen_source=no
3399 fi
3400 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003401 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3402 # defining NI_NUMERICHOST.
3403 QNX/6.3.2)
3404 define_xopen_source=no
3405 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003406
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003407esac
3408
3409if test $define_xopen_source = yes
3410then
Victor Stinner14d098d2011-09-07 22:29:43 +02003411 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003412
Victor Stinner14d098d2011-09-07 22:29:43 +02003413$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003414
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003415
3416 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3417 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3418 # several APIs are not declared. Since this is also needed in some
3419 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003420
Matthias Kloseb9621712010-04-24 17:59:49 +00003421$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003422
3423
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003424
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003425$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003426
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003427fi
3428
Christian Heimes647cd872013-12-07 23:39:33 +01003429# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3430case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003431 hp*|HP*)
3432 define_stdc_a1=yes;;
3433 *)
3434 define_stdc_a1=no;;
3435esac
3436
3437if test $define_stdc_a1 = yes
3438then
Christian Heimes647cd872013-12-07 23:39:33 +01003439
3440$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3441
Christian Heimesb02bcae2013-12-08 15:21:08 +01003442fi
Christian Heimes647cd872013-12-07 23:39:33 +01003443
Guido van Rossum91922671997-10-09 20:24:13 +00003444#
3445# SGI compilers allow the specification of the both the ABI and the
3446# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003447# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003448#
3449# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3450# thus supply support for various ABI/ISA combinations. The MACHDEP
3451# variable is also adjusted.
3452#
3453
3454if test ! -z "$SGI_ABI"
3455then
3456 CC="cc $SGI_ABI"
3457 LDFLAGS="$SGI_ABI $LDFLAGS"
3458 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3459fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3461$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003462
Jack Jansen6b08a402004-06-03 12:41:45 +00003463# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3464# it may influence the way we can build extensions, so distutils
3465# needs to check it
3466
Thomas Wouters477c8d52006-05-27 19:21:47 +00003467
Jack Jansen6b08a402004-06-03 12:41:45 +00003468CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003469EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003470
Guido van Rossum627b2d71993-12-24 10:39:16 +00003471# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003472
3473# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3474# for debug/optimization stuff. BASECFLAGS is for flags that are required
3475# just to get things to compile and link. Users are free to override OPT
3476# when running configure or make. The build should not break if they do.
3477# BASECFLAGS should generally not be messed with, however.
3478
3479# XXX shouldn't some/most/all of this code be merged with the stuff later
3480# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3482$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003485if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003486 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003487 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003488 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003489 without_gcc=yes;;
3490 yes) CC=gcc
3491 without_gcc=no;;
3492 *) CC=$withval
3493 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003494 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003495else
Martin v. Löwis11437992002-04-12 09:54:03 +00003496
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003497 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003498 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003499 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003500 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003501 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003502fi
3503
Matthias Kloseb9621712010-04-24 17:59:49 +00003504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3505$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003506
Zachary Ware5af85642015-12-21 12:09:17 -06003507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3508$as_echo_n "checking for --with-icc... " >&6; }
3509
3510# Check whether --with-icc was given.
3511if test "${with_icc+set}" = set; then :
3512 withval=$with_icc;
3513 case $withval in
3514 no) CC=${CC:-cc}
3515 with_icc=no;;
3516 yes) CC=icc
3517 CXX=icpc
3518 with_icc=yes;;
3519 *) CC=$withval
3520 with_icc=$withval;;
3521 esac
3522else
3523
3524 with_icc=no
3525fi
3526
3527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3528$as_echo "$with_icc" >&6; }
3529
Guido van Rossum8b131c51995-03-09 14:10:13 +00003530# If the user switches compilers, we can't believe the cache
3531if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3532then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003533 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003534(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003535fi
3536
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003537# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3538# when the compiler supports them, but we don't always want -O2, and
3539# we set -g later.
3540if test -z "$CFLAGS"; then
3541 CFLAGS=
3542fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003543
3544if test "$ac_sys_system" = "Darwin"
3545then
3546 # Compiler selection on MacOSX is more complicated than
3547 # AC_PROG_CC can handle, see Mac/README.txt for more
3548 # information
3549 if test -z "${CC}"
3550 then
3551 found_gcc=
3552 found_clang=
3553 as_save_IFS=$IFS; IFS=:
3554 for as_dir in $PATH
3555 do
3556 IFS=$as_save_IFS
3557 if test -x $as_dir/gcc; then
3558 if test -z "${found_gcc}"; then
3559 found_gcc=$as_dir/gcc
3560 fi
3561 fi
3562 if test -x $as_dir/clang; then
3563 if test -z "${found_clang}"; then
3564 found_clang=$as_dir/clang
3565 fi
3566 fi
3567 done
3568 IFS=$as_save_IFS
3569
3570 if test -n "$found_gcc" -a -n "$found_clang"
3571 then
3572 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3573 then
3574 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3575$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3576 CC="$found_clang"
3577 CXX="$found_clang++"
3578 fi
3579
3580
3581 elif test -z "$found_gcc" -a -n "$found_clang"
3582 then
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3584$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3585 CC="$found_clang"
3586 CXX="$found_clang++"
3587
3588 elif test -z "$found_gcc" -a -z "$found_clang"
3589 then
3590 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3591 if test -n "${found_clang}"
3592 then
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3594$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3595 CC="${found_clang}"
3596 CXX="`/usr/bin/xcrun -find clang++`"
3597
3598 # else: use default behaviour
3599 fi
3600 fi
3601 fi
3602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003603ac_ext=c
3604ac_cpp='$CPP $CPPFLAGS'
3605ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3606ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3607ac_compiler_gnu=$ac_cv_c_compiler_gnu
3608if test -n "$ac_tool_prefix"; then
3609 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3610set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3612$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003613if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003615else
3616 if test -n "$CC"; then
3617 ac_cv_prog_CC="$CC" # Let the user override the test.
3618else
Martin v. Löwis11437992002-04-12 09:54:03 +00003619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3620for as_dir in $PATH
3621do
3622 IFS=$as_save_IFS
3623 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003625 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003626 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 $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 +00003628 break 2
3629 fi
3630done
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003633
Jack Jansendd19cf82001-12-06 22:36:17 +00003634fi
3635fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003636CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003637if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3639$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003640else
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3642$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003643fi
3644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645
Martin v. Löwis11437992002-04-12 09:54:03 +00003646fi
3647if test -z "$ac_cv_prog_CC"; then
3648 ac_ct_CC=$CC
3649 # Extract the first word of "gcc", so it can be a program name with args.
3650set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3652$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003653if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003655else
3656 if test -n "$ac_ct_CC"; then
3657 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3658else
3659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3660for as_dir in $PATH
3661do
3662 IFS=$as_save_IFS
3663 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003665 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003666 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 $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 +00003668 break 2
3669 fi
3670done
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003673
3674fi
3675fi
3676ac_ct_CC=$ac_cv_prog_ac_ct_CC
3677if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3679$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003680else
Matthias Kloseb9621712010-04-24 17:59:49 +00003681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3682$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003683fi
3684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685 if test "x$ac_ct_CC" = x; then
3686 CC=""
3687 else
3688 case $cross_compiling:$ac_tool_warned in
3689yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003690{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3691$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692ac_tool_warned=yes ;;
3693esac
3694 CC=$ac_ct_CC
3695 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003696else
3697 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003698fi
3699
Jack Jansendd19cf82001-12-06 22:36:17 +00003700if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701 if test -n "$ac_tool_prefix"; then
3702 # 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 +00003703set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3705$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003706if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003708else
3709 if test -n "$CC"; then
3710 ac_cv_prog_CC="$CC" # Let the user override the test.
3711else
Martin v. Löwis11437992002-04-12 09:54:03 +00003712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3713for as_dir in $PATH
3714do
3715 IFS=$as_save_IFS
3716 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003721 break 2
3722 fi
3723done
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003726
3727fi
3728fi
3729CC=$ac_cv_prog_CC
3730if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3732$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003733else
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3735$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003736fi
3737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003740fi
3741if test -z "$CC"; then
3742 # Extract the first word of "cc", so it can be a program name with args.
3743set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3745$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003746if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003748else
3749 if test -n "$CC"; then
3750 ac_cv_prog_CC="$CC" # Let the user override the test.
3751else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3754for as_dir in $PATH
3755do
3756 IFS=$as_save_IFS
3757 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003759 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003760 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3761 ac_prog_rejected=yes
3762 continue
3763 fi
3764 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 $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 +00003766 break 2
3767 fi
3768done
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003771
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003772if test $ac_prog_rejected = yes; then
3773 # We found a bogon in the path, so make sure we never use it.
3774 set dummy $ac_cv_prog_CC
3775 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003777 # We chose a different compiler from the bogus one.
3778 # However, it has the same basename, so the bogon will be chosen
3779 # first if we set CC to just the basename; use the full file name.
3780 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003781 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003782 fi
3783fi
3784fi
3785fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003786CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003787if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3789$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003790else
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3792$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003793fi
3794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795
Martin v. Löwis11437992002-04-12 09:54:03 +00003796fi
3797if test -z "$CC"; then
3798 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003800 do
3801 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3802set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3804$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003805if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003807else
3808 if test -n "$CC"; then
3809 ac_cv_prog_CC="$CC" # Let the user override the test.
3810else
Martin v. Löwis11437992002-04-12 09:54:03 +00003811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3812for as_dir in $PATH
3813do
3814 IFS=$as_save_IFS
3815 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003817 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 $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 +00003820 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003821 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003822done
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003825
3826fi
3827fi
3828CC=$ac_cv_prog_CC
3829if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3831$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003832else
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3834$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003835fi
3836
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837
Martin v. Löwis11437992002-04-12 09:54:03 +00003838 test -n "$CC" && break
3839 done
3840fi
3841if test -z "$CC"; then
3842 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003844do
3845 # Extract the first word of "$ac_prog", so it can be a program name with args.
3846set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3848$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003849if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003851else
3852 if test -n "$ac_ct_CC"; then
3853 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3854else
3855as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3856for as_dir in $PATH
3857do
3858 IFS=$as_save_IFS
3859 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003860 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003861 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 $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 +00003864 break 2
3865 fi
3866done
Matthias Kloseb9621712010-04-24 17:59:49 +00003867 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003869
Martin v. Löwis11437992002-04-12 09:54:03 +00003870fi
3871fi
3872ac_ct_CC=$ac_cv_prog_ac_ct_CC
3873if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3875$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003876else
Matthias Kloseb9621712010-04-24 17:59:49 +00003877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3878$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003879fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003881
Martin v. Löwis11437992002-04-12 09:54:03 +00003882 test -n "$ac_ct_CC" && break
3883done
Michael W. Hudson54241132001-12-07 15:38:26 +00003884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885 if test "x$ac_ct_CC" = x; then
3886 CC=""
3887 else
3888 case $cross_compiling:$ac_tool_warned in
3889yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003890{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3891$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003892ac_tool_warned=yes ;;
3893esac
3894 CC=$ac_ct_CC
3895 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003896fi
3897
3898fi
3899
3900
Matthias Kloseb9621712010-04-24 17:59:49 +00003901test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3902$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003903as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003904See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003905
3906# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003907$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3908set X $ac_compile
3909ac_compiler=$2
3910for ac_option in --version -v -V -qversion; do
3911 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912case "(($ac_try" in
3913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3914 *) ac_try_echo=$ac_try;;
3915esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003916eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3917$as_echo "$ac_try_echo"; } >&5
3918 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003919 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003920 if test -s conftest.err; then
3921 sed '10a\
3922... rest of stderr output deleted ...
3923 10q' conftest.err >conftest.er1
3924 cat conftest.er1 >&5
3925 fi
3926 rm -f conftest.er1 conftest.err
3927 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3928 test $ac_status = 0; }
3929done
Martin v. Löwis11437992002-04-12 09:54:03 +00003930
Matthias Kloseb9621712010-04-24 17:59:49 +00003931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003932/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003933
Martin v. Löwis11437992002-04-12 09:54:03 +00003934int
3935main ()
3936{
3937
3938 ;
3939 return 0;
3940}
3941_ACEOF
3942ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003943ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003944# Try to create an executable without -o first, disregard a.out.
3945# It will help us diagnose broken compilers, and finding out an intuition
3946# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3948$as_echo_n "checking whether the C compiler works... " >&6; }
3949ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3950
3951# The possible output files:
3952ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954ac_rmfiles=
3955for ac_file in $ac_files
3956do
3957 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003958 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3960 esac
3961done
3962rm -f $ac_rmfiles
3963
Matthias Kloseb9621712010-04-24 17:59:49 +00003964if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965case "(($ac_try" in
3966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3967 *) ac_try_echo=$ac_try;;
3968esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3970$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3974 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3976# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3977# in a Makefile. We should not override ac_cv_exeext if it was cached,
3978# so that the user can short-circuit this test for compilers unknown to
3979# Autoconf.
3980for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003981do
3982 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003983 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003984 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003985 ;;
3986 [ab].out )
3987 # We found the default executable, but exeext='' is most
3988 # certainly right.
3989 break;;
3990 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003991 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992 then :; else
3993 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3994 fi
3995 # We set ac_cv_exeext here because the later test for it is not
3996 # safe: cross compilers may not add the suffix if given an `-o'
3997 # argument, so we may need to know it at that point already.
3998 # Even if this section looks crufty: it has the advantage of
3999 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004000 break;;
4001 * )
4002 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004003 esac
4004done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005test "$ac_cv_exeext" = no && ac_cv_exeext=
4006
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004007else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008 ac_file=''
4009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004010if test -z "$ac_file"; then :
4011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4012$as_echo "no" >&6; }
4013$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004014sed 's/^/| /' conftest.$ac_ext >&5
4015
Matthias Kloseb9621712010-04-24 17:59:49 +00004016{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004018as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004019See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004020else
4021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4022$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4025$as_echo_n "checking for C compiler default output file name... " >&6; }
4026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4027$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004028ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004029
Matthias Kloseb9621712010-04-24 17:59:49 +00004030rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004031ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4033$as_echo_n "checking for suffix of executables... " >&6; }
4034if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004035case "(($ac_try" in
4036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037 *) ac_try_echo=$ac_try;;
4038esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004039eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4040$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004041 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004042 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004043 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4044 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4046# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4047# work properly (i.e., refer to `conftest.exe'), while it won't with
4048# `rm'.
4049for ac_file in conftest.exe conftest conftest.*; do
4050 test -f "$ac_file" || continue
4051 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004052 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004053 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4054 break;;
4055 * ) break;;
4056 esac
4057done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004058else
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4060$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004061as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004062See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004064rm -f conftest conftest$ac_cv_exeext
4065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4066$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004067
4068rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004069EXEEXT=$ac_cv_exeext
4070ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4072/* end confdefs.h. */
4073#include <stdio.h>
4074int
4075main ()
4076{
4077FILE *f = fopen ("conftest.out", "w");
4078 return ferror (f) || fclose (f) != 0;
4079
4080 ;
4081 return 0;
4082}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004084ac_clean_files="$ac_clean_files conftest.out"
4085# Check that the compiler produces executables we can run. If not, either
4086# the compiler is broken, or we cross compile.
4087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4088$as_echo_n "checking whether we are cross compiling... " >&6; }
4089if test "$cross_compiling" != yes; then
4090 { { ac_try="$ac_link"
4091case "(($ac_try" in
4092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4093 *) ac_try_echo=$ac_try;;
4094esac
4095eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4096$as_echo "$ac_try_echo"; } >&5
4097 (eval "$ac_link") 2>&5
4098 ac_status=$?
4099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4100 test $ac_status = 0; }
4101 if { ac_try='./conftest$ac_cv_exeext'
4102 { { case "(($ac_try" in
4103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4104 *) ac_try_echo=$ac_try;;
4105esac
4106eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4107$as_echo "$ac_try_echo"; } >&5
4108 (eval "$ac_try") 2>&5
4109 ac_status=$?
4110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4111 test $ac_status = 0; }; }; then
4112 cross_compiling=no
4113 else
4114 if test "$cross_compiling" = maybe; then
4115 cross_compiling=yes
4116 else
4117 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4118$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004119as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004120If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004121See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 fi
4123 fi
4124fi
4125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4126$as_echo "$cross_compiling" >&6; }
4127
4128rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4129ac_clean_files=$ac_clean_files_save
4130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4131$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004132if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004133 $as_echo_n "(cached) " >&6
4134else
4135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004136/* end confdefs.h. */
4137
4138int
4139main ()
4140{
4141
4142 ;
4143 return 0;
4144}
4145_ACEOF
4146rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004147if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004148case "(($ac_try" in
4149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4150 *) ac_try_echo=$ac_try;;
4151esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004152eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4153$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004154 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004155 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4157 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158 for ac_file in conftest.o conftest.obj conftest.*; do
4159 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004160 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004162 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4163 break;;
4164 esac
4165done
4166else
Matthias Kloseb9621712010-04-24 17:59:49 +00004167 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004168sed 's/^/| /' conftest.$ac_ext >&5
4169
Matthias Kloseb9621712010-04-24 17:59:49 +00004170{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4171$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004172as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004173See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004174fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004175rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4178$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004179OBJEXT=$ac_cv_objext
4180ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4182$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004183if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004185else
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004188
Martin v. Löwis11437992002-04-12 09:54:03 +00004189int
4190main ()
4191{
4192#ifndef __GNUC__
4193 choke me
4194#endif
4195
4196 ;
4197 return 0;
4198}
4199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004200if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004201 ac_compiler_gnu=yes
4202else
Matthias Kloseb9621712010-04-24 17:59:49 +00004203 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004206ac_cv_c_compiler_gnu=$ac_compiler_gnu
4207
4208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4210$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4211if test $ac_compiler_gnu = yes; then
4212 GCC=yes
4213else
4214 GCC=
4215fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004216ac_test_CFLAGS=${CFLAGS+set}
4217ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4219$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004220if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004221 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004222else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223 ac_save_c_werror_flag=$ac_c_werror_flag
4224 ac_c_werror_flag=yes
4225 ac_cv_prog_cc_g=no
4226 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004229
Martin v. Löwis11437992002-04-12 09:54:03 +00004230int
4231main ()
4232{
4233
4234 ;
4235 return 0;
4236}
4237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004238if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004239 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004240else
Matthias Kloseb9621712010-04-24 17:59:49 +00004241 CFLAGS=""
4242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243/* end confdefs.h. */
4244
4245int
4246main ()
4247{
4248
4249 ;
4250 return 0;
4251}
4252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004253if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254
Matthias Kloseb9621712010-04-24 17:59:49 +00004255else
4256 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259/* end confdefs.h. */
4260
4261int
4262main ()
4263{
4264
4265 ;
4266 return 0;
4267}
4268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004269if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4277 ac_c_werror_flag=$ac_save_c_werror_flag
4278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4280$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004281if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004282 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004283elif test $ac_cv_prog_cc_g = yes; then
4284 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004285 CFLAGS="-g -O2"
4286 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004287 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288 fi
4289else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004290 if test "$GCC" = yes; then
4291 CFLAGS="-O2"
4292 else
4293 CFLAGS=
4294 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4297$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004298if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004299 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004300else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004302ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004304/* end confdefs.h. */
4305#include <stdarg.h>
4306#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004307struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004308/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4309struct buf { int x; };
4310FILE * (*rcsopen) (struct buf *, struct stat *, int);
4311static char *e (p, i)
4312 char **p;
4313 int i;
4314{
4315 return p[i];
4316}
4317static char *f (char * (*g) (char **, int), char **p, ...)
4318{
4319 char *s;
4320 va_list v;
4321 va_start (v,p);
4322 s = g (p, va_arg (v,int));
4323 va_end (v);
4324 return s;
4325}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004326
4327/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4328 function prototypes and stuff, but not '\xHH' hex character constants.
4329 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004331 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4332 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004334int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4337 inside strings and character constants. */
4338#define FOO(x) 'x'
4339int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4340
Skip Montanaro6dead952003-09-25 14:50:04 +00004341int test (int i, double x);
4342struct s1 {int (*f) (int a);};
4343struct s2 {int (*f) (double a);};
4344int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4345int argc;
4346char **argv;
4347int
4348main ()
4349{
4350return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4351 ;
4352 return 0;
4353}
4354_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4356 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004357do
4358 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362rm -f core conftest.err conftest.$ac_objext
4363 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004364done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004366CC=$ac_save_CC
4367
4368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369# AC_CACHE_VAL
4370case "x$ac_cv_prog_cc_c89" in
4371 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4373$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004374 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4376$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004377 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4380$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004381esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004382if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004383
Matthias Kloseb9621712010-04-24 17:59:49 +00004384fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004385
Martin v. Löwis11437992002-04-12 09:54:03 +00004386ac_ext=c
4387ac_cpp='$CPP $CPPFLAGS'
4388ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4389ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4390ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004391
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004392ac_ext=c
4393ac_cpp='$CPP $CPPFLAGS'
4394ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4395ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4396ac_compiler_gnu=$ac_cv_c_compiler_gnu
4397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4398$as_echo_n "checking how to run the C preprocessor... " >&6; }
4399# On Suns, sometimes $CPP names a directory.
4400if test -n "$CPP" && test -d "$CPP"; then
4401 CPP=
4402fi
4403if test -z "$CPP"; then
4404 if ${ac_cv_prog_CPP+:} false; then :
4405 $as_echo_n "(cached) " >&6
4406else
4407 # Double quotes because CPP needs to be expanded
4408 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4409 do
4410 ac_preproc_ok=false
4411for ac_c_preproc_warn_flag in '' yes
4412do
4413 # Use a header file that comes with gcc, so configuring glibc
4414 # with a fresh cross-compiler works.
4415 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4416 # <limits.h> exists even on freestanding compilers.
4417 # On the NeXT, cc -E runs the code through the compiler's parser,
4418 # not just through cpp. "Syntax error" is here to catch this case.
4419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4420/* end confdefs.h. */
4421#ifdef __STDC__
4422# include <limits.h>
4423#else
4424# include <assert.h>
4425#endif
4426 Syntax error
4427_ACEOF
4428if ac_fn_c_try_cpp "$LINENO"; then :
4429
4430else
4431 # Broken: fails on valid input.
4432continue
4433fi
4434rm -f conftest.err conftest.i conftest.$ac_ext
4435
4436 # OK, works on sane cases. Now check whether nonexistent headers
4437 # can be detected and how.
4438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4439/* end confdefs.h. */
4440#include <ac_nonexistent.h>
4441_ACEOF
4442if ac_fn_c_try_cpp "$LINENO"; then :
4443 # Broken: success on invalid input.
4444continue
4445else
4446 # Passes both tests.
4447ac_preproc_ok=:
4448break
4449fi
4450rm -f conftest.err conftest.i conftest.$ac_ext
4451
4452done
4453# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4454rm -f conftest.i conftest.err conftest.$ac_ext
4455if $ac_preproc_ok; then :
4456 break
4457fi
4458
4459 done
4460 ac_cv_prog_CPP=$CPP
4461
4462fi
4463 CPP=$ac_cv_prog_CPP
4464else
4465 ac_cv_prog_CPP=$CPP
4466fi
4467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4468$as_echo "$CPP" >&6; }
4469ac_preproc_ok=false
4470for ac_c_preproc_warn_flag in '' yes
4471do
4472 # Use a header file that comes with gcc, so configuring glibc
4473 # with a fresh cross-compiler works.
4474 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4475 # <limits.h> exists even on freestanding compilers.
4476 # On the NeXT, cc -E runs the code through the compiler's parser,
4477 # not just through cpp. "Syntax error" is here to catch this case.
4478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4479/* end confdefs.h. */
4480#ifdef __STDC__
4481# include <limits.h>
4482#else
4483# include <assert.h>
4484#endif
4485 Syntax error
4486_ACEOF
4487if ac_fn_c_try_cpp "$LINENO"; then :
4488
4489else
4490 # Broken: fails on valid input.
4491continue
4492fi
4493rm -f conftest.err conftest.i conftest.$ac_ext
4494
4495 # OK, works on sane cases. Now check whether nonexistent headers
4496 # can be detected and how.
4497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4498/* end confdefs.h. */
4499#include <ac_nonexistent.h>
4500_ACEOF
4501if ac_fn_c_try_cpp "$LINENO"; then :
4502 # Broken: success on invalid input.
4503continue
4504else
4505 # Passes both tests.
4506ac_preproc_ok=:
4507break
4508fi
4509rm -f conftest.err conftest.i conftest.$ac_ext
4510
4511done
4512# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4513rm -f conftest.i conftest.err conftest.$ac_ext
4514if $ac_preproc_ok; then :
4515
4516else
4517 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4518$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4519as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4520See \`config.log' for more details" "$LINENO" 5; }
4521fi
4522
4523ac_ext=c
4524ac_cpp='$CPP $CPPFLAGS'
4525ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4526ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4527ac_compiler_gnu=$ac_cv_c_compiler_gnu
4528
4529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4530$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4531if ${ac_cv_path_GREP+:} false; then :
4532 $as_echo_n "(cached) " >&6
4533else
4534 if test -z "$GREP"; then
4535 ac_path_GREP_found=false
4536 # Loop through the user's path and test for each of PROGNAME-LIST
4537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4538for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4539do
4540 IFS=$as_save_IFS
4541 test -z "$as_dir" && as_dir=.
4542 for ac_prog in grep ggrep; do
4543 for ac_exec_ext in '' $ac_executable_extensions; do
4544 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4545 as_fn_executable_p "$ac_path_GREP" || continue
4546# Check for GNU ac_path_GREP and select it if it is found.
4547 # Check for GNU $ac_path_GREP
4548case `"$ac_path_GREP" --version 2>&1` in
4549*GNU*)
4550 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4551*)
4552 ac_count=0
4553 $as_echo_n 0123456789 >"conftest.in"
4554 while :
4555 do
4556 cat "conftest.in" "conftest.in" >"conftest.tmp"
4557 mv "conftest.tmp" "conftest.in"
4558 cp "conftest.in" "conftest.nl"
4559 $as_echo 'GREP' >> "conftest.nl"
4560 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4561 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4562 as_fn_arith $ac_count + 1 && ac_count=$as_val
4563 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4564 # Best one so far, save it but keep looking for a better one
4565 ac_cv_path_GREP="$ac_path_GREP"
4566 ac_path_GREP_max=$ac_count
4567 fi
4568 # 10*(2^10) chars as input seems more than enough
4569 test $ac_count -gt 10 && break
4570 done
4571 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4572esac
4573
4574 $ac_path_GREP_found && break 3
4575 done
4576 done
4577 done
4578IFS=$as_save_IFS
4579 if test -z "$ac_cv_path_GREP"; then
4580 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4581 fi
4582else
4583 ac_cv_path_GREP=$GREP
4584fi
4585
4586fi
4587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4588$as_echo "$ac_cv_path_GREP" >&6; }
4589 GREP="$ac_cv_path_GREP"
4590
4591
Łukasz Langaa785c872016-09-09 17:37:37 -07004592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4593$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4594if ${ac_cv_path_SED+:} false; then :
4595 $as_echo_n "(cached) " >&6
4596else
4597 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4598 for ac_i in 1 2 3 4 5 6 7; do
4599 ac_script="$ac_script$as_nl$ac_script"
4600 done
4601 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4602 { ac_script=; unset ac_script;}
4603 if test -z "$SED"; then
4604 ac_path_SED_found=false
4605 # Loop through the user's path and test for each of PROGNAME-LIST
4606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4607for as_dir in $PATH
4608do
4609 IFS=$as_save_IFS
4610 test -z "$as_dir" && as_dir=.
4611 for ac_prog in sed gsed; do
4612 for ac_exec_ext in '' $ac_executable_extensions; do
4613 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4614 as_fn_executable_p "$ac_path_SED" || continue
4615# Check for GNU ac_path_SED and select it if it is found.
4616 # Check for GNU $ac_path_SED
4617case `"$ac_path_SED" --version 2>&1` in
4618*GNU*)
4619 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4620*)
4621 ac_count=0
4622 $as_echo_n 0123456789 >"conftest.in"
4623 while :
4624 do
4625 cat "conftest.in" "conftest.in" >"conftest.tmp"
4626 mv "conftest.tmp" "conftest.in"
4627 cp "conftest.in" "conftest.nl"
4628 $as_echo '' >> "conftest.nl"
4629 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4630 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4631 as_fn_arith $ac_count + 1 && ac_count=$as_val
4632 if test $ac_count -gt ${ac_path_SED_max-0}; then
4633 # Best one so far, save it but keep looking for a better one
4634 ac_cv_path_SED="$ac_path_SED"
4635 ac_path_SED_max=$ac_count
4636 fi
4637 # 10*(2^10) chars as input seems more than enough
4638 test $ac_count -gt 10 && break
4639 done
4640 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4641esac
4642
4643 $ac_path_SED_found && break 3
4644 done
4645 done
4646 done
4647IFS=$as_save_IFS
4648 if test -z "$ac_cv_path_SED"; then
4649 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4650 fi
4651else
4652 ac_cv_path_SED=$SED
4653fi
4654
4655fi
4656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4657$as_echo "$ac_cv_path_SED" >&6; }
4658 SED="$ac_cv_path_SED"
4659 rm -f conftest.sed
4660
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004661
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004662
4663
Matthias Kloseb9621712010-04-24 17:59:49 +00004664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4665$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004667# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004668if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004669 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004670
4671 case $withval in
4672 no) with_cxx_main=no
4673 MAINCC='$(CC)';;
4674 yes) with_cxx_main=yes
4675 MAINCC='$(CXX)';;
4676 *) with_cxx_main=yes
4677 MAINCC=$withval
4678 if test -z "$CXX"
4679 then
4680 CXX=$withval
4681 fi;;
4682 esac
4683else
4684
4685 with_cxx_main=no
4686 MAINCC='$(CC)'
4687
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004688fi
4689
Matthias Kloseb9621712010-04-24 17:59:49 +00004690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4691$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004692
4693preset_cxx="$CXX"
4694if test -z "$CXX"
4695then
4696 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004697 gcc) if test -n "$ac_tool_prefix"; then
4698 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4699set dummy ${ac_tool_prefix}g++; ac_word=$2
4700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4701$as_echo_n "checking for $ac_word... " >&6; }
4702if ${ac_cv_path_CXX+:} false; then :
4703 $as_echo_n "(cached) " >&6
4704else
4705 case $CXX in
4706 [\\/]* | ?:[\\/]*)
4707 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4708 ;;
4709 *)
4710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4711for as_dir in notfound
4712do
4713 IFS=$as_save_IFS
4714 test -z "$as_dir" && as_dir=.
4715 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004716 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004717 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4719 break 2
4720 fi
4721done
4722 done
4723IFS=$as_save_IFS
4724
4725 ;;
4726esac
4727fi
4728CXX=$ac_cv_path_CXX
4729if test -n "$CXX"; then
4730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4731$as_echo "$CXX" >&6; }
4732else
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4734$as_echo "no" >&6; }
4735fi
4736
4737
4738fi
4739if test -z "$ac_cv_path_CXX"; then
4740 ac_pt_CXX=$CXX
4741 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004742set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4744$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004745if ${ac_cv_path_ac_pt_CXX+:} false; then :
4746 $as_echo_n "(cached) " >&6
4747else
4748 case $ac_pt_CXX in
4749 [\\/]* | ?:[\\/]*)
4750 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4751 ;;
4752 *)
4753 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4754for as_dir in notfound
4755do
4756 IFS=$as_save_IFS
4757 test -z "$as_dir" && as_dir=.
4758 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004759 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004760 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4761 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4762 break 2
4763 fi
4764done
4765 done
4766IFS=$as_save_IFS
4767
4768 ;;
4769esac
4770fi
4771ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4772if test -n "$ac_pt_CXX"; then
4773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4774$as_echo "$ac_pt_CXX" >&6; }
4775else
4776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4777$as_echo "no" >&6; }
4778fi
4779
4780 if test "x$ac_pt_CXX" = x; then
4781 CXX="g++"
4782 else
4783 case $cross_compiling:$ac_tool_warned in
4784yes:)
4785{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4786$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4787ac_tool_warned=yes ;;
4788esac
4789 CXX=$ac_pt_CXX
4790 fi
4791else
4792 CXX="$ac_cv_path_CXX"
4793fi
4794 ;;
4795 cc) if test -n "$ac_tool_prefix"; then
4796 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4797set dummy ${ac_tool_prefix}c++; ac_word=$2
4798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4799$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004800if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004801 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004802else
4803 case $CXX in
4804 [\\/]* | ?:[\\/]*)
4805 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4806 ;;
4807 *)
4808 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4809for as_dir in notfound
4810do
4811 IFS=$as_save_IFS
4812 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004813 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004815 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004816 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004817 break 2
4818 fi
4819done
Matthias Kloseb9621712010-04-24 17:59:49 +00004820 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004821IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004822
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004823 ;;
4824esac
4825fi
4826CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004827if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4829$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004830else
Matthias Kloseb9621712010-04-24 17:59:49 +00004831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4832$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004834
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004835
4836fi
4837if test -z "$ac_cv_path_CXX"; then
4838 ac_pt_CXX=$CXX
4839 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004840set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4842$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004843if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004844 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004845else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004846 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004848 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 +00004849 ;;
4850 *)
4851 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4852for as_dir in notfound
4853do
4854 IFS=$as_save_IFS
4855 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004856 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004857 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004858 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004859 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004860 break 2
4861 fi
4862done
Matthias Kloseb9621712010-04-24 17:59:49 +00004863 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004864IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004865
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004866 ;;
4867esac
4868fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004869ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4870if test -n "$ac_pt_CXX"; then
4871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4872$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004873else
Matthias Kloseb9621712010-04-24 17:59:49 +00004874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4875$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004877
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004878 if test "x$ac_pt_CXX" = x; then
4879 CXX="c++"
4880 else
4881 case $cross_compiling:$ac_tool_warned in
4882yes:)
4883{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4884$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4885ac_tool_warned=yes ;;
4886esac
4887 CXX=$ac_pt_CXX
4888 fi
4889else
4890 CXX="$ac_cv_path_CXX"
4891fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004892 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004893 clang|*/clang) if test -n "$ac_tool_prefix"; then
4894 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4895set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4897$as_echo_n "checking for $ac_word... " >&6; }
4898if ${ac_cv_path_CXX+:} false; then :
4899 $as_echo_n "(cached) " >&6
4900else
4901 case $CXX in
4902 [\\/]* | ?:[\\/]*)
4903 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4904 ;;
4905 *)
4906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4907for as_dir in notfound
4908do
4909 IFS=$as_save_IFS
4910 test -z "$as_dir" && as_dir=.
4911 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004912 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004913 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4915 break 2
4916 fi
4917done
4918 done
4919IFS=$as_save_IFS
4920
Ned Deilycbfb9a52012-06-23 16:02:19 -07004921 ;;
4922esac
4923fi
4924CXX=$ac_cv_path_CXX
4925if test -n "$CXX"; then
4926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4927$as_echo "$CXX" >&6; }
4928else
4929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4930$as_echo "no" >&6; }
4931fi
4932
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004933
4934fi
4935if test -z "$ac_cv_path_CXX"; then
4936 ac_pt_CXX=$CXX
4937 # Extract the first word of "clang++", so it can be a program name with args.
4938set dummy clang++; ac_word=$2
4939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4940$as_echo_n "checking for $ac_word... " >&6; }
4941if ${ac_cv_path_ac_pt_CXX+:} false; then :
4942 $as_echo_n "(cached) " >&6
4943else
4944 case $ac_pt_CXX in
4945 [\\/]* | ?:[\\/]*)
4946 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4947 ;;
4948 *)
4949 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4950for as_dir in notfound
4951do
4952 IFS=$as_save_IFS
4953 test -z "$as_dir" && as_dir=.
4954 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004955 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004956 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4957 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4958 break 2
4959 fi
4960done
4961 done
4962IFS=$as_save_IFS
4963
4964 ;;
4965esac
4966fi
4967ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4968if test -n "$ac_pt_CXX"; then
4969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4970$as_echo "$ac_pt_CXX" >&6; }
4971else
4972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4973$as_echo "no" >&6; }
4974fi
4975
4976 if test "x$ac_pt_CXX" = x; then
4977 CXX="clang++"
4978 else
4979 case $cross_compiling:$ac_tool_warned in
4980yes:)
4981{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4982$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4983ac_tool_warned=yes ;;
4984esac
4985 CXX=$ac_pt_CXX
4986 fi
4987else
4988 CXX="$ac_cv_path_CXX"
4989fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004990 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004991 icc|*/icc) if test -n "$ac_tool_prefix"; then
4992 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4993set dummy ${ac_tool_prefix}icpc; ac_word=$2
4994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4995$as_echo_n "checking for $ac_word... " >&6; }
4996if ${ac_cv_path_CXX+:} false; then :
4997 $as_echo_n "(cached) " >&6
4998else
4999 case $CXX in
5000 [\\/]* | ?:[\\/]*)
5001 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5002 ;;
5003 *)
5004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5005for as_dir in notfound
5006do
5007 IFS=$as_save_IFS
5008 test -z "$as_dir" && as_dir=.
5009 for ac_exec_ext in '' $ac_executable_extensions; do
5010 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5011 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5012 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5013 break 2
5014 fi
5015done
5016 done
5017IFS=$as_save_IFS
5018
5019 ;;
5020esac
5021fi
5022CXX=$ac_cv_path_CXX
5023if test -n "$CXX"; then
5024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5025$as_echo "$CXX" >&6; }
5026else
5027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5028$as_echo "no" >&6; }
5029fi
5030
5031
5032fi
5033if test -z "$ac_cv_path_CXX"; then
5034 ac_pt_CXX=$CXX
5035 # Extract the first word of "icpc", so it can be a program name with args.
5036set dummy icpc; ac_word=$2
5037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5038$as_echo_n "checking for $ac_word... " >&6; }
5039if ${ac_cv_path_ac_pt_CXX+:} false; then :
5040 $as_echo_n "(cached) " >&6
5041else
5042 case $ac_pt_CXX in
5043 [\\/]* | ?:[\\/]*)
5044 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5045 ;;
5046 *)
5047 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5048for as_dir in notfound
5049do
5050 IFS=$as_save_IFS
5051 test -z "$as_dir" && as_dir=.
5052 for ac_exec_ext in '' $ac_executable_extensions; do
5053 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5054 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5055 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5056 break 2
5057 fi
5058done
5059 done
5060IFS=$as_save_IFS
5061
5062 ;;
5063esac
5064fi
5065ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5066if test -n "$ac_pt_CXX"; then
5067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5068$as_echo "$ac_pt_CXX" >&6; }
5069else
5070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5071$as_echo "no" >&6; }
5072fi
5073
5074 if test "x$ac_pt_CXX" = x; then
5075 CXX="icpc"
5076 else
5077 case $cross_compiling:$ac_tool_warned in
5078yes:)
5079{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5080$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5081ac_tool_warned=yes ;;
5082esac
5083 CXX=$ac_pt_CXX
5084 fi
5085else
5086 CXX="$ac_cv_path_CXX"
5087fi
5088 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005089 esac
5090 if test "$CXX" = "notfound"
5091 then
5092 CXX=""
5093 fi
5094fi
5095if test -z "$CXX"
5096then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005097 if test -n "$ac_tool_prefix"; then
5098 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5099 do
5100 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5101set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5103$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005104if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005105 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005106else
5107 if test -n "$CXX"; then
5108 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5109else
5110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5111for as_dir in $PATH
5112do
5113 IFS=$as_save_IFS
5114 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005116 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005117 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005119 break 2
5120 fi
5121done
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005123IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005124
5125fi
5126fi
5127CXX=$ac_cv_prog_CXX
5128if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5130$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005131else
Matthias Kloseb9621712010-04-24 17:59:49 +00005132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5133$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005134fi
5135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005136
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005137 test -n "$CXX" && break
5138 done
5139fi
5140if test -z "$CXX"; then
5141 ac_ct_CXX=$CXX
5142 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5143do
5144 # Extract the first word of "$ac_prog", so it can be a program name with args.
5145set dummy $ac_prog; ac_word=$2
5146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5147$as_echo_n "checking for $ac_word... " >&6; }
5148if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5149 $as_echo_n "(cached) " >&6
5150else
5151 if test -n "$ac_ct_CXX"; then
5152 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5153else
5154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5155for as_dir in $PATH
5156do
5157 IFS=$as_save_IFS
5158 test -z "$as_dir" && as_dir=.
5159 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005160 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005161 ac_cv_prog_ac_ct_CXX="$ac_prog"
5162 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5163 break 2
5164 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005165done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005166 done
5167IFS=$as_save_IFS
5168
5169fi
5170fi
5171ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5172if test -n "$ac_ct_CXX"; then
5173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5174$as_echo "$ac_ct_CXX" >&6; }
5175else
5176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5177$as_echo "no" >&6; }
5178fi
5179
5180
5181 test -n "$ac_ct_CXX" && break
5182done
5183
5184 if test "x$ac_ct_CXX" = x; then
5185 CXX="notfound"
5186 else
5187 case $cross_compiling:$ac_tool_warned in
5188yes:)
5189{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5190$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5191ac_tool_warned=yes ;;
5192esac
5193 CXX=$ac_ct_CXX
5194 fi
5195fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005196
5197 if test "$CXX" = "notfound"
5198 then
5199 CXX=""
5200 fi
5201fi
5202if test "$preset_cxx" != "$CXX"
5203then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005204 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005205
5206 By default, distutils will build C++ extension modules with \"$CXX\".
5207 If this is not intended, then set CXX on the configure command line.
5208 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005209$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005210
5211 By default, distutils will build C++ extension modules with \"$CXX\".
5212 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005213 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005214fi
5215
5216
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005217MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5218
5219
5220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5221$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5222cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005223#undef bfin
5224#undef cris
5225#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005226#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005227#undef hppa
5228#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005229#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005230#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005231#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005232#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005233#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005234#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005235 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005236#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005237# if defined(__x86_64__) && defined(__LP64__)
5238 x86_64-linux-gnu
5239# elif defined(__x86_64__) && defined(__ILP32__)
5240 x86_64-linux-gnux32
5241# elif defined(__i386__)
5242 i386-linux-gnu
5243# elif defined(__aarch64__) && defined(__AARCH64EL__)
5244# if defined(__ILP32__)
5245 aarch64_ilp32-linux-gnu
5246# else
5247 aarch64-linux-gnu
5248# endif
5249# elif defined(__aarch64__) && defined(__AARCH64EB__)
5250# if defined(__ILP32__)
5251 aarch64_be_ilp32-linux-gnu
5252# else
5253 aarch64_be-linux-gnu
5254# endif
5255# elif defined(__alpha__)
5256 alpha-linux-gnu
5257# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5258# if defined(__ARMEL__)
5259 arm-linux-gnueabihf
5260# else
5261 armeb-linux-gnueabihf
5262# endif
5263# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5264# if defined(__ARMEL__)
5265 arm-linux-gnueabi
5266# else
5267 armeb-linux-gnueabi
5268# endif
5269# elif defined(__hppa__)
5270 hppa-linux-gnu
5271# elif defined(__ia64__)
5272 ia64-linux-gnu
5273# elif defined(__m68k__) && !defined(__mcoldfire__)
5274 m68k-linux-gnu
5275# elif defined(__mips_hard_float) && defined(_MIPSEL)
5276# if _MIPS_SIM == _ABIO32
5277 mipsel-linux-gnu
5278# elif _MIPS_SIM == _ABIN32
5279 mips64el-linux-gnuabin32
5280# elif _MIPS_SIM == _ABI64
5281 mips64el-linux-gnuabi64
5282# else
5283# error unknown platform triplet
5284# endif
5285# elif defined(__mips_hard_float)
5286# if _MIPS_SIM == _ABIO32
5287 mips-linux-gnu
5288# elif _MIPS_SIM == _ABIN32
5289 mips64-linux-gnuabin32
5290# elif _MIPS_SIM == _ABI64
5291 mips64-linux-gnuabi64
5292# else
5293# error unknown platform triplet
5294# endif
5295# elif defined(__or1k__)
5296 or1k-linux-gnu
5297# elif defined(__powerpc__) && defined(__SPE__)
5298 powerpc-linux-gnuspe
5299# elif defined(__powerpc64__)
5300# if defined(__LITTLE_ENDIAN__)
5301 powerpc64le-linux-gnu
5302# else
5303 powerpc64-linux-gnu
5304# endif
5305# elif defined(__powerpc__)
5306 powerpc-linux-gnu
5307# elif defined(__s390x__)
5308 s390x-linux-gnu
5309# elif defined(__s390__)
5310 s390-linux-gnu
5311# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5312 sh4-linux-gnu
5313# elif defined(__sparc__) && defined(__arch64__)
5314 sparc64-linux-gnu
5315# elif defined(__sparc__)
5316 sparc-linux-gnu
5317# else
5318# error unknown platform triplet
5319# endif
5320#elif defined(__FreeBSD_kernel__)
5321# if defined(__LP64__)
5322 x86_64-kfreebsd-gnu
5323# elif defined(__i386__)
5324 i386-kfreebsd-gnu
5325# else
5326# error unknown platform triplet
5327# endif
5328#elif defined(__gnu_hurd__)
5329 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005330#elif defined(__APPLE__)
5331 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005332#else
5333# error unknown platform triplet
5334#endif
5335
5336EOF
5337
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005338if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005339 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5341$as_echo "$PLATFORM_TRIPLET" >&6; }
5342else
5343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5344$as_echo "none" >&6; }
5345fi
5346rm -f conftest.c conftest.out
5347
5348if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5349 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5350 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5351 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005352elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5353 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005354fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005355
doko@ubuntu.com55532312016-06-14 08:55:19 +02005356if test x$MULTIARCH != x; then
5357 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5358fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005359
5360
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5362$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5363save_LDFLAGS="$LDFLAGS"
5364LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005365
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5367/* end confdefs.h. */
5368
5369int
5370main ()
5371{
5372
5373 ;
5374 return 0;
5375}
5376_ACEOF
5377if ac_fn_c_try_link "$LINENO"; then :
5378 NO_AS_NEEDED="-Wl,--no-as-needed"
5379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5380$as_echo "yes" >&6; }
5381else
5382 NO_AS_NEEDED=""
5383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5384$as_echo "no" >&6; }
5385fi
5386rm -f core conftest.err conftest.$ac_objext \
5387 conftest$ac_exeext conftest.$ac_ext
5388LDFLAGS="$save_LDFLAGS"
5389
5390
5391
5392# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005393
Matthias Kloseb9621712010-04-24 17:59:49 +00005394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5395$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005396if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005397 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005398else
5399 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5400 then ac_cv_path_EGREP="$GREP -E"
5401 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005402 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005403 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 # Loop through the user's path and test for each of PROGNAME-LIST
5405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005406for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5407do
5408 IFS=$as_save_IFS
5409 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 for ac_prog in egrep; do
5411 for ac_exec_ext in '' $ac_executable_extensions; do
5412 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005413 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005414# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005415 # Check for GNU $ac_path_EGREP
5416case `"$ac_path_EGREP" --version 2>&1` in
5417*GNU*)
5418 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5419*)
5420 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005421 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005422 while :
5423 do
5424 cat "conftest.in" "conftest.in" >"conftest.tmp"
5425 mv "conftest.tmp" "conftest.in"
5426 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005427 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005428 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5429 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005430 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005431 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5432 # Best one so far, save it but keep looking for a better one
5433 ac_cv_path_EGREP="$ac_path_EGREP"
5434 ac_path_EGREP_max=$ac_count
5435 fi
5436 # 10*(2^10) chars as input seems more than enough
5437 test $ac_count -gt 10 && break
5438 done
5439 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5440esac
5441
Matthias Kloseb9621712010-04-24 17:59:49 +00005442 $ac_path_EGREP_found && break 3
5443 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005444 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005445 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005446IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005447 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005448 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 +00005449 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005450else
5451 ac_cv_path_EGREP=$EGREP
5452fi
5453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005454 fi
5455fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5457$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005458 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005459
5460
Matthias Kloseb9621712010-04-24 17:59:49 +00005461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5462$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005463if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005464 $as_echo_n "(cached) " >&6
5465else
5466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005467/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005468#include <stdlib.h>
5469#include <stdarg.h>
5470#include <string.h>
5471#include <float.h>
5472
5473int
5474main ()
5475{
5476
5477 ;
5478 return 0;
5479}
5480_ACEOF
5481if ac_fn_c_try_compile "$LINENO"; then :
5482 ac_cv_header_stdc=yes
5483else
5484 ac_cv_header_stdc=no
5485fi
5486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5487
5488if test $ac_cv_header_stdc = yes; then
5489 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5491/* end confdefs.h. */
5492#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005493
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005494_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005496 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005497
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005498else
Matthias Kloseb9621712010-04-24 17:59:49 +00005499 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005500fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005501rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005502
Matthias Kloseb9621712010-04-24 17:59:49 +00005503fi
5504
5505if test $ac_cv_header_stdc = yes; then
5506 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5508/* end confdefs.h. */
5509#include <stdlib.h>
5510
5511_ACEOF
5512if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5513 $EGREP "free" >/dev/null 2>&1; then :
5514
5515else
5516 ac_cv_header_stdc=no
5517fi
5518rm -f conftest*
5519
5520fi
5521
5522if test $ac_cv_header_stdc = yes; then
5523 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5524 if test "$cross_compiling" = yes; then :
5525 :
5526else
5527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5528/* end confdefs.h. */
5529#include <ctype.h>
5530#include <stdlib.h>
5531#if ((' ' & 0x0FF) == 0x020)
5532# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5533# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5534#else
5535# define ISLOWER(c) \
5536 (('a' <= (c) && (c) <= 'i') \
5537 || ('j' <= (c) && (c) <= 'r') \
5538 || ('s' <= (c) && (c) <= 'z'))
5539# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5540#endif
5541
5542#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5543int
5544main ()
5545{
5546 int i;
5547 for (i = 0; i < 256; i++)
5548 if (XOR (islower (i), ISLOWER (i))
5549 || toupper (i) != TOUPPER (i))
5550 return 2;
5551 return 0;
5552}
5553_ACEOF
5554if ac_fn_c_try_run "$LINENO"; then :
5555
5556else
5557 ac_cv_header_stdc=no
5558fi
5559rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5560 conftest.$ac_objext conftest.beam conftest.$ac_ext
5561fi
5562
5563fi
5564fi
5565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5566$as_echo "$ac_cv_header_stdc" >&6; }
5567if test $ac_cv_header_stdc = yes; then
5568
5569$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5570
5571fi
5572
5573# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5574for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5575 inttypes.h stdint.h unistd.h
5576do :
5577 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5578ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5579"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005580if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005581 cat >>confdefs.h <<_ACEOF
5582#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5583_ACEOF
5584
5585fi
5586
5587done
5588
5589
5590
5591 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 +02005592if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005593 MINIX=yes
5594else
5595 MINIX=
5596fi
5597
5598
5599 if test "$MINIX" = yes; then
5600
5601$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5602
5603
5604$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5605
5606
5607$as_echo "#define _MINIX 1" >>confdefs.h
5608
5609 fi
5610
5611
5612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5613$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005614if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005615 $as_echo_n "(cached) " >&6
5616else
5617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5618/* end confdefs.h. */
5619
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005620# define __EXTENSIONS__ 1
5621 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005622int
5623main ()
5624{
5625
5626 ;
5627 return 0;
5628}
5629_ACEOF
5630if ac_fn_c_try_compile "$LINENO"; then :
5631 ac_cv_safe_to_define___extensions__=yes
5632else
5633 ac_cv_safe_to_define___extensions__=no
5634fi
5635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5636fi
5637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5638$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5639 test $ac_cv_safe_to_define___extensions__ = yes &&
5640 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5641
5642 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5643
5644 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5645
5646 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5647
5648 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5649
5650
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651
Xavier de Gaye95750b12016-07-09 11:05:42 +02005652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5653$as_echo_n "checking for the Android API level... " >&6; }
5654cat >> conftest.c <<EOF
5655#ifdef __ANDROID__
5656#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005657android_api = __ANDROID_API__
5658arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005659#else
5660#error not Android
5661#endif
5662EOF
5663
5664if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005665 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5666 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5668$as_echo "$ANDROID_API_LEVEL" >&6; }
5669
5670cat >>confdefs.h <<_ACEOF
5671#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5672_ACEOF
5673
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005674
5675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5676$as_echo_n "checking for the Android arm ABI... " >&6; }
5677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5678$as_echo "$_arm_arch" >&6; }
5679 if test "$_arm_arch" = 7; then
5680 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5681 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5682 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005683else
5684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5685$as_echo "not Android" >&6; }
5686fi
5687rm -f conftest.c conftest.out
5688
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689# Check for unsupported systems
5690case $ac_sys_system/$ac_sys_release in
5691atheos*|Linux*/1*)
5692 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5693 echo See README for details.
5694 exit 1;;
5695esac
5696
5697
Matthias Kloseb9621712010-04-24 17:59:49 +00005698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5699$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700
5701# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005702if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703 withval=$with_suffix;
5704 case $withval in
5705 no) EXEEXT=;;
5706 yes) EXEEXT=.exe;;
5707 *) EXEEXT=$withval;;
5708 esac
5709fi
5710
Matthias Kloseb9621712010-04-24 17:59:49 +00005711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5712$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713
5714# Test whether we're running on a non-case-sensitive system, in which
5715# case we give a warning if no ext is given
5716
Matthias Kloseb9621712010-04-24 17:59:49 +00005717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5718$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719if test ! -d CaseSensitiveTestDir; then
5720mkdir CaseSensitiveTestDir
5721fi
5722
5723if test -d casesensitivetestdir
5724then
Matthias Kloseb9621712010-04-24 17:59:49 +00005725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5726$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727 BUILDEXEEXT=.exe
5728else
Matthias Kloseb9621712010-04-24 17:59:49 +00005729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5730$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731 BUILDEXEEXT=$EXEEXT
5732fi
5733rmdir CaseSensitiveTestDir
5734
5735case $MACHDEP in
5736bsdos*)
5737 case $CC in
5738 gcc) CC="$CC -D_HAVE_BSDI";;
5739 esac;;
5740esac
5741
5742case $ac_sys_system in
5743hp*|HP*)
5744 case $CC in
5745 cc|*/cc) CC="$CC -Ae";;
5746 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747esac
5748
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749
Matthias Kloseb9621712010-04-24 17:59:49 +00005750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5751$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752if test -z "$LIBRARY"
5753then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005754 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5757$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758
5759# LDLIBRARY is the name of the library to link against (as opposed to the
5760# name of the library into which to insert object files). BLDLIBRARY is also
5761# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5762# is blank as the main program is not linked directly against LDLIBRARY.
5763# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5764# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5765# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5766# DLLLIBRARY is the shared (i.e., DLL) library.
5767#
5768# RUNSHARED is used to run shared python without installed libraries
5769#
5770# INSTSONAME is the name of the shared library that will be use to install
5771# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005772#
5773# LDVERSION is the shared library version number, normally the Python version
5774# with the ABI build flags appended.
5775
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776
5777
5778
5779
5780
5781
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005782
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783LDLIBRARY="$LIBRARY"
5784BLDLIBRARY='$(LDLIBRARY)'
5785INSTSONAME='$(LDLIBRARY)'
5786DLLLIBRARY=''
5787LDLIBRARYDIR=''
5788RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005789LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790
5791# LINKCC is the command that links the python executable -- default is $(CC).
5792# If CXX is set, and if it is needed to link a main function that was
5793# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5794# python might then depend on the C++ runtime
5795# This is altered for AIX in order to build the export list before
5796# linking.
5797
Matthias Kloseb9621712010-04-24 17:59:49 +00005798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5799$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800if test -z "$LINKCC"
5801then
5802 LINKCC='$(PURIFY) $(MAINCC)'
5803 case $ac_sys_system in
5804 AIX*)
5805 exp_extra="\"\""
5806 if test $ac_sys_release -ge 5 -o \
5807 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5808 exp_extra="."
5809 fi
5810 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811 QNX*)
5812 # qcc must be used because the other compilers do not
5813 # support -N.
5814 LINKCC=qcc;;
5815 esac
5816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5818$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819
5820# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5821# make sure we default having it set to "no": this is used by
5822# distutils.unixccompiler to know if it should add --enable-new-dtags
5823# to linker command lines, and failing to detect GNU ld simply results
5824# in the same bahaviour as before.
5825
Matthias Kloseb9621712010-04-24 17:59:49 +00005826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5827$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828ac_prog=ld
5829if test "$GCC" = yes; then
5830 ac_prog=`$CC -print-prog-name=ld`
5831fi
5832case `"$ac_prog" -V 2>&1 < /dev/null` in
5833 *GNU*)
5834 GNULD=yes;;
5835 *)
5836 GNULD=no;;
5837esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5839$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840
Matthias Kloseb9621712010-04-24 17:59:49 +00005841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5842$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005844if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845 enableval=$enable_shared;
5846fi
5847
5848
5849if test -z "$enable_shared"
5850then
5851 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005852 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853 enable_shared="yes";;
5854 *)
5855 enable_shared="no";;
5856 esac
5857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5859$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860
Matthias Kloseb9621712010-04-24 17:59:49 +00005861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5862$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005864if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005865 enableval=$enable_profiling;
5866fi
5867
5868if test "x$enable_profiling" = xyes; then
5869 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005870 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872/* end confdefs.h. */
5873int main() { return 0; }
5874_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005875if ac_fn_c_try_link "$LINENO"; then :
5876
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005878 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005880rm -f core conftest.err conftest.$ac_objext \
5881 conftest$ac_exeext conftest.$ac_ext
5882 CC="$ac_save_cc"
5883else
5884 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5887$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888
doko@ubuntu.comba015832012-06-30 16:52:05 +02005889if test "x$enable_profiling" = xyes; then
5890 BASECFLAGS="-pg $BASECFLAGS"
5891 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892fi
5893
Matthias Kloseb9621712010-04-24 17:59:49 +00005894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5895$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896
5897# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5898# library that we build, but we do not want to link against it (we
5899# will find it with a -framework option). For this reason there is an
5900# extra variable BLDLIBRARY against which Python and the extension
5901# modules are linked, BLDLIBRARY. This is normally the same as
5902# LDLIBRARY, but empty for MacOSX framework builds.
5903if test "$enable_framework"
5904then
5905 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005906 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907 BLDLIBRARY=''
5908else
5909 BLDLIBRARY='$(LDLIBRARY)'
5910fi
5911
5912# Other platforms follow
5913if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005914 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915
Matthias Kloseb9621712010-04-24 17:59:49 +00005916$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917
5918 case $ac_sys_system in
5919 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005920 LDLIBRARY='libpython$(LDVERSION).dll.a'
5921 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 ;;
5923 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005924 LDLIBRARY='libpython$(LDVERSION).so'
5925 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005926 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005928 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005929 then
5930 PY3LIBRARY=libpython3.so
5931 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005933 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005934 LDLIBRARY='libpython$(LDVERSION).so'
5935 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005936 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005938 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005939 then
5940 PY3LIBRARY=libpython3.so
5941 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942 ;;
5943 hp*|HP*)
5944 case `uname -m` in
5945 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005946 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947 ;;
5948 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005949 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950 ;;
5951 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005952 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005953 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005956 LDLIBRARY='libpython$(LDVERSION).dylib'
5957 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005958 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005960 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005961 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005962 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005963 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005964
5965 esac
5966else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005967 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968 case $ac_sys_system in
5969 CYGWIN*)
5970 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005971 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972 ;;
5973 esac
5974fi
5975
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005976if test "$cross_compiling" = yes; then
5977 RUNSHARED=
5978fi
5979
Matthias Kloseb9621712010-04-24 17:59:49 +00005980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5981$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982
5983if test -n "$ac_tool_prefix"; then
5984 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5985set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5987$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005988if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005989 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990else
5991 if test -n "$RANLIB"; then
5992 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5993else
5994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5995for as_dir in $PATH
5996do
5997 IFS=$as_save_IFS
5998 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005999 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006000 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003 break 2
6004 fi
6005done
Matthias Kloseb9621712010-04-24 17:59:49 +00006006 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007IFS=$as_save_IFS
6008
6009fi
6010fi
6011RANLIB=$ac_cv_prog_RANLIB
6012if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6014$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015else
Matthias Kloseb9621712010-04-24 17:59:49 +00006016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6017$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006018fi
6019
6020
6021fi
6022if test -z "$ac_cv_prog_RANLIB"; then
6023 ac_ct_RANLIB=$RANLIB
6024 # Extract the first word of "ranlib", so it can be a program name with args.
6025set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6027$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006028if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030else
6031 if test -n "$ac_ct_RANLIB"; then
6032 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6033else
6034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6035for as_dir in $PATH
6036do
6037 IFS=$as_save_IFS
6038 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006039 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006040 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006042 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006043 break 2
6044 fi
6045done
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047IFS=$as_save_IFS
6048
6049fi
6050fi
6051ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6052if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6054$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055else
Matthias Kloseb9621712010-04-24 17:59:49 +00006056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6057$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058fi
6059
6060 if test "x$ac_ct_RANLIB" = x; then
6061 RANLIB=":"
6062 else
6063 case $cross_compiling:$ac_tool_warned in
6064yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006065{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6066$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006067ac_tool_warned=yes ;;
6068esac
6069 RANLIB=$ac_ct_RANLIB
6070 fi
6071else
6072 RANLIB="$ac_cv_prog_RANLIB"
6073fi
6074
6075
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006076if test -n "$ac_tool_prefix"; then
6077 for ac_prog in ar aal
6078 do
6079 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6080set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6082$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006083if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006084 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006085else
6086 if test -n "$AR"; then
6087 ac_cv_prog_AR="$AR" # Let the user override the test.
6088else
6089as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6090for as_dir in $PATH
6091do
6092 IFS=$as_save_IFS
6093 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006094 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006095 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006096 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006097 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006098 break 2
6099 fi
6100done
Matthias Kloseb9621712010-04-24 17:59:49 +00006101 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006102IFS=$as_save_IFS
6103
6104fi
6105fi
6106AR=$ac_cv_prog_AR
6107if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6109$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006110else
Matthias Kloseb9621712010-04-24 17:59:49 +00006111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6112$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006113fi
6114
6115
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006116 test -n "$AR" && break
6117 done
6118fi
6119if test -z "$AR"; then
6120 ac_ct_AR=$AR
6121 for ac_prog in ar aal
6122do
6123 # Extract the first word of "$ac_prog", so it can be a program name with args.
6124set dummy $ac_prog; ac_word=$2
6125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6126$as_echo_n "checking for $ac_word... " >&6; }
6127if ${ac_cv_prog_ac_ct_AR+:} false; then :
6128 $as_echo_n "(cached) " >&6
6129else
6130 if test -n "$ac_ct_AR"; then
6131 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6132else
6133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6134for as_dir in $PATH
6135do
6136 IFS=$as_save_IFS
6137 test -z "$as_dir" && as_dir=.
6138 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006139 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006140 ac_cv_prog_ac_ct_AR="$ac_prog"
6141 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6142 break 2
6143 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006144done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006145 done
6146IFS=$as_save_IFS
6147
6148fi
6149fi
6150ac_ct_AR=$ac_cv_prog_ac_ct_AR
6151if test -n "$ac_ct_AR"; then
6152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6153$as_echo "$ac_ct_AR" >&6; }
6154else
6155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6156$as_echo "no" >&6; }
6157fi
6158
6159
6160 test -n "$ac_ct_AR" && break
6161done
6162
6163 if test "x$ac_ct_AR" = x; then
6164 AR="ar"
6165 else
6166 case $cross_compiling:$ac_tool_warned in
6167yes:)
6168{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6169$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6170ac_tool_warned=yes ;;
6171esac
6172 AR=$ac_ct_AR
6173 fi
6174fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006175
6176
6177# tweak ARFLAGS only if the user didn't set it on the command line
6178
6179if test -z "$ARFLAGS"
6180then
6181 ARFLAGS="rc"
6182fi
6183
doko@ubuntu.com58844492012-06-30 18:25:32 +02006184if test -n "$ac_tool_prefix"; then
6185 for ac_prog in readelf
6186 do
6187 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6188set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6190$as_echo_n "checking for $ac_word... " >&6; }
6191if ${ac_cv_prog_READELF+:} false; then :
6192 $as_echo_n "(cached) " >&6
6193else
6194 if test -n "$READELF"; then
6195 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6196else
6197as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6198for as_dir in $PATH
6199do
6200 IFS=$as_save_IFS
6201 test -z "$as_dir" && as_dir=.
6202 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006203 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006204 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6205 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6206 break 2
6207 fi
6208done
6209 done
6210IFS=$as_save_IFS
6211
6212fi
6213fi
6214READELF=$ac_cv_prog_READELF
6215if test -n "$READELF"; then
6216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6217$as_echo "$READELF" >&6; }
6218else
6219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6220$as_echo "no" >&6; }
6221fi
6222
6223
6224 test -n "$READELF" && break
6225 done
6226fi
6227if test -z "$READELF"; then
6228 ac_ct_READELF=$READELF
6229 for ac_prog in readelf
6230do
6231 # Extract the first word of "$ac_prog", so it can be a program name with args.
6232set dummy $ac_prog; ac_word=$2
6233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6234$as_echo_n "checking for $ac_word... " >&6; }
6235if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6236 $as_echo_n "(cached) " >&6
6237else
6238 if test -n "$ac_ct_READELF"; then
6239 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6240else
6241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6242for as_dir in $PATH
6243do
6244 IFS=$as_save_IFS
6245 test -z "$as_dir" && as_dir=.
6246 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006247 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006248 ac_cv_prog_ac_ct_READELF="$ac_prog"
6249 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6250 break 2
6251 fi
6252done
6253 done
6254IFS=$as_save_IFS
6255
6256fi
6257fi
6258ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6259if test -n "$ac_ct_READELF"; then
6260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6261$as_echo "$ac_ct_READELF" >&6; }
6262else
6263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6264$as_echo "no" >&6; }
6265fi
6266
6267
6268 test -n "$ac_ct_READELF" && break
6269done
6270
6271 if test "x$ac_ct_READELF" = x; then
6272 READELF=":"
6273 else
6274 case $cross_compiling:$ac_tool_warned in
6275yes:)
6276{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6277$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6278ac_tool_warned=yes ;;
6279esac
6280 READELF=$ac_ct_READELF
6281 fi
6282fi
6283
6284if test "$cross_compiling" = yes; then
6285 case "$READELF" in
6286 readelf|:)
6287 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6288 ;;
6289 esac
6290fi
6291
6292
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006293
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006294case $MACHDEP in
6295bsdos*|hp*|HP*)
6296 # install -d does not work on BSDI or HP-UX
6297 if test -z "$INSTALL"
6298 then
6299 INSTALL="${srcdir}/install-sh -c"
6300 fi
6301esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006302# Find a good install program. We prefer a C program (faster),
6303# so one script is as good as another. But avoid the broken or
6304# incompatible versions:
6305# SysV /etc/install, /usr/sbin/install
6306# SunOS /usr/etc/install
6307# IRIX /sbin/install
6308# AIX /bin/install
6309# AmigaOS /C/install, which installs bootblocks on floppy discs
6310# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6311# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6312# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6313# OS/2's system install, which has a completely different semantic
6314# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006315# Reject install programs that cannot install multiple files.
6316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6317$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006318if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006319if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006320 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321else
6322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6323for as_dir in $PATH
6324do
6325 IFS=$as_save_IFS
6326 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006327 # Account for people who put trailing slashes in PATH elements.
6328case $as_dir/ in #((
6329 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006330 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006331 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332 /usr/ucb/* ) ;;
6333 *)
6334 # OSF1 and SCO ODT 3.0 have their own names for install.
6335 # Don't use installbsd from OSF since it installs stuff as root
6336 # by default.
6337 for ac_prog in ginstall scoinst install; do
6338 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006339 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006340 if test $ac_prog = install &&
6341 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6342 # AIX install. It has an incompatible calling convention.
6343 :
6344 elif test $ac_prog = install &&
6345 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6346 # program-specific install script used by HP pwplus--don't use.
6347 :
6348 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006349 rm -rf conftest.one conftest.two conftest.dir
6350 echo one > conftest.one
6351 echo two > conftest.two
6352 mkdir conftest.dir
6353 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6354 test -s conftest.one && test -s conftest.two &&
6355 test -s conftest.dir/conftest.one &&
6356 test -s conftest.dir/conftest.two
6357 then
6358 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6359 break 3
6360 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006361 fi
6362 fi
6363 done
6364 done
6365 ;;
6366esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006367
6368 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006369IFS=$as_save_IFS
6370
Matthias Kloseb9621712010-04-24 17:59:49 +00006371rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006372
6373fi
6374 if test "${ac_cv_path_install+set}" = set; then
6375 INSTALL=$ac_cv_path_install
6376 else
6377 # As a last resort, use the slow shell script. Don't cache a
6378 # value for INSTALL within a source directory, because that will
6379 # break other packages using the cache if that directory is
6380 # removed, or if the value is a relative name.
6381 INSTALL=$ac_install_sh
6382 fi
6383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6385$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006386
6387# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6388# It thinks the first close brace ends the variable substitution.
6389test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6390
6391test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6392
6393test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6394
Matthias Klose93a0ef12012-03-15 18:08:34 +01006395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6396$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6397if test -z "$MKDIR_P"; then
6398 if ${ac_cv_path_mkdir+:} false; then :
6399 $as_echo_n "(cached) " >&6
6400else
6401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6402for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6403do
6404 IFS=$as_save_IFS
6405 test -z "$as_dir" && as_dir=.
6406 for ac_prog in mkdir gmkdir; do
6407 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006408 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006409 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6410 'mkdir (GNU coreutils) '* | \
6411 'mkdir (coreutils) '* | \
6412 'mkdir (fileutils) '4.1*)
6413 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6414 break 3;;
6415 esac
6416 done
6417 done
6418 done
6419IFS=$as_save_IFS
6420
6421fi
6422
6423 test -d ./--version && rmdir ./--version
6424 if test "${ac_cv_path_mkdir+set}" = set; then
6425 MKDIR_P="$ac_cv_path_mkdir -p"
6426 else
6427 # As a last resort, use the slow shell script. Don't cache a
6428 # value for MKDIR_P within a source directory, because that will
6429 # break other packages using the cache if that directory is
6430 # removed, or if the value is a relative name.
6431 MKDIR_P="$ac_install_sh -d"
6432 fi
6433fi
6434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6435$as_echo "$MKDIR_P" >&6; }
6436
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006437
6438# Not every filesystem supports hard links
6439
6440if test -z "$LN" ; then
6441 case $ac_sys_system in
6442 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006443 *) LN=ln;;
6444 esac
6445fi
6446
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006447# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006448
6449ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006450
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006451# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6453$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006454
6455# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006456if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006457 withval=$with_pydebug;
6458if test "$withval" != no
6459then
6460
Matthias Kloseb9621712010-04-24 17:59:49 +00006461$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006462
Matthias Kloseb9621712010-04-24 17:59:49 +00006463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6464$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006465 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006466 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006467else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6468$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006469fi
6470else
Matthias Kloseb9621712010-04-24 17:59:49 +00006471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006473fi
6474
6475
Brett Cannon63d98bc2016-09-06 17:12:40 -07006476# Enable optimization flags
6477
6478
6479Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6481$as_echo_n "checking for --enable-optimizations... " >&6; }
6482# Check whether --enable-optimizations was given.
6483if test "${enable_optimizations+set}" = set; then :
6484 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006485if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006486then
6487 Py_OPT='true'
6488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6489$as_echo "yes" >&6; };
6490else
6491 Py_OPT='false'
6492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6493$as_echo "no" >&6; };
6494fi
6495else
6496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6497$as_echo "no" >&6; }
6498fi
6499
6500if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006501 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6502 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006503 # 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 +00006504 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006505 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006506 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006507 DEF_MAKE_RULE="build_all"
6508else
6509 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006510 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006511 DEF_MAKE_RULE="all"
6512fi
6513
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006514# Enable LTO flags
6515
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6517$as_echo_n "checking for --with-lto... " >&6; }
6518
6519# Check whether --with-lto was given.
6520if test "${with_lto+set}" = set; then :
6521 withval=$with_lto;
6522if test "$withval" != no
6523then
6524 Py_LTO='true'
6525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6526$as_echo "yes" >&6; };
6527else
6528 Py_LTO='false'
6529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6530$as_echo "no" >&6; };
6531fi
6532else
6533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6534$as_echo "no" >&6; }
6535fi
6536
6537if test "$Py_LTO" = 'true' ; then
6538 case $CC in
6539 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006540 case $ac_sys_system in
6541 Darwin*)
6542 # Any changes made here should be reflected in the GCC+Darwin case below
6543 LTOFLAGS="-flto -Wl,-export_dynamic"
6544 ;;
6545 *)
6546 LTOFLAGS="-flto"
6547 ;;
6548 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006549 ;;
6550 *gcc*)
6551 case $ac_sys_system in
6552 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006553 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006554 ;;
6555 *)
6556 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6557 ;;
6558 esac
6559 ;;
6560 esac
6561fi
6562
Brett Cannon7188a3e2015-09-18 15:13:44 -07006563# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006564
6565
6566
6567
6568
Gregory P. Smith799520c2016-09-07 16:10:00 -07006569# Make this work on systems where llvm tools are not installed with their
6570# normal names in the default $PATH (ie: Ubuntu). They exist under the
6571# non-suffixed name in their versioned llvm directory.
6572llvm_bin_dir=''
6573llvm_path="${PATH}"
6574if test "${CC}" = "clang"
6575then
6576 clang_bin=`which clang`
6577 # Some systems install clang elsewhere as a symlink to the real path
6578 # which is where the related llvm tools are located.
6579 if test -L "${clang_bin}"
6580 then
6581 clang_dir=`dirname "${clang_bin}"`
6582 clang_bin=`readlink "${clang_bin}"`
6583 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6584 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6585 fi
6586fi
Zachary Ware5af85642015-12-21 12:09:17 -06006587
Gregory P. Smith799520c2016-09-07 16:10:00 -07006588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6589$as_echo_n "checking target system type... " >&6; }
6590if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006591 $as_echo_n "(cached) " >&6
6592else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006593 if test "x$target_alias" = x; then
6594 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006595else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006596 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6597 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6598fi
6599
6600fi
6601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6602$as_echo "$ac_cv_target" >&6; }
6603case $ac_cv_target in
6604*-*-*) ;;
6605*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6606esac
6607target=$ac_cv_target
6608ac_save_IFS=$IFS; IFS='-'
6609set x $ac_cv_target
6610shift
6611target_cpu=$1
6612target_vendor=$2
6613shift; shift
6614# Remember, the first character of IFS is used to create $*,
6615# except with old shells:
6616target_os=$*
6617IFS=$ac_save_IFS
6618case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6619
6620
6621# The aliases save the names the user supplied, while $host etc.
6622# will get canonicalized.
6623test -n "$target_alias" &&
6624 test "$program_prefix$program_suffix$program_transform_name" = \
6625 NONENONEs,x,x, &&
6626 program_prefix=${target_alias}-
6627# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6628set dummy $target_alias-llvm-profdata; ac_word=$2
6629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6630$as_echo_n "checking for $ac_word... " >&6; }
6631if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6632 $as_echo_n "(cached) " >&6
6633else
6634 case $LLVM_PROFDATA in
6635 [\\/]* | ?:[\\/]*)
6636 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6637 ;;
6638 *)
6639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6640for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006641do
6642 IFS=$as_save_IFS
6643 test -z "$as_dir" && as_dir=.
6644 for ac_exec_ext in '' $ac_executable_extensions; do
6645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006646 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6648 break 2
6649 fi
6650done
6651 done
6652IFS=$as_save_IFS
6653
Gregory P. Smith799520c2016-09-07 16:10:00 -07006654 ;;
6655esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006656fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006657LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6658if test -n "$LLVM_PROFDATA"; then
6659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6660$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006661else
6662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6663$as_echo "no" >&6; }
6664fi
6665
6666
Gregory P. Smith799520c2016-09-07 16:10:00 -07006667if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6668 if test "$build" = "$target"; then
6669 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6670 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6671set dummy llvm-profdata; ac_word=$2
6672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6673$as_echo_n "checking for $ac_word... " >&6; }
6674if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6675 $as_echo_n "(cached) " >&6
6676else
6677 case $ac_pt_LLVM_PROFDATA in
6678 [\\/]* | ?:[\\/]*)
6679 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6680 ;;
6681 *)
6682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6683for as_dir in ${llvm_path}
6684do
6685 IFS=$as_save_IFS
6686 test -z "$as_dir" && as_dir=.
6687 for ac_exec_ext in '' $ac_executable_extensions; do
6688 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6689 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6690 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6691 break 2
6692 fi
6693done
6694 done
6695IFS=$as_save_IFS
6696
6697 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6698 ;;
6699esac
6700fi
6701ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6702if test -n "$ac_pt_LLVM_PROFDATA"; then
6703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6704$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6705else
6706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6707$as_echo "no" >&6; }
6708fi
6709
6710 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6711 else
6712 LLVM_PROFDATA="''"
6713 fi
6714else
6715 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6716fi
6717
6718
6719if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6720then
6721 LLVM_PROF_FOUND="found"
6722else
6723 LLVM_PROF_FOUND="not-found"
6724fi
6725if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6726then
6727 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6728 if test -n "${found_llvm_profdata}"
6729 then
6730 # llvm-profdata isn't directly in $PATH in some cases.
6731 # https://apple.stackexchange.com/questions/197053/
6732 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6733 LLVM_PROF_FOUND=found
6734 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6735$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6736 fi
6737fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006738LLVM_PROF_ERR=no
6739case $CC in
6740 *clang*)
6741 # Any changes made here should be reflected in the GCC+Darwin case below
6742 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6743 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006744 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006745 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6746 if test $LLVM_PROF_FOUND = not-found
6747 then
6748 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006749 if test "${REQUIRE_PGO}" = "yes"
6750 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006751 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 -07006752 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006753 fi
6754 ;;
6755 *gcc*)
6756 case $ac_sys_system in
6757 Darwin*)
6758 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6759 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006760 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006761 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006762 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006763 then
6764 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006765 if test "${REQUIRE_PGO}" = "yes"
6766 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006767 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 -07006768 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006769 fi
6770 ;;
6771 *)
6772 PGO_PROF_GEN_FLAG="-fprofile-generate"
6773 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6774 LLVM_PROF_MERGER="true"
6775 LLVM_PROF_FILE=""
6776 ;;
6777 esac
6778 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006779 *icc*)
6780 PGO_PROF_GEN_FLAG="-prof-gen"
6781 PGO_PROF_USE_FLAG="-prof-use"
6782 LLVM_PROF_MERGER="true"
6783 LLVM_PROF_FILE=""
6784 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006785esac
6786
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006787# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6788# merged with this chunk of code?
6789
6790# Optimizer/debugger flags
6791# ------------------------
6792# (The following bit of code is complicated enough - please keep things
6793# indented properly. Just pretend you're editing Python code. ;-)
6794
6795# There are two parallel sets of case statements below, one that checks to
6796# see if OPT was set and one that does BASECFLAGS setting based upon
6797# compiler and platform. BASECFLAGS tweaks need to be made even if the
6798# user set OPT.
6799
6800# tweak OPT based on compiler and platform, only if the user didn't set
6801# it on the command line
6802
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006803if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006804then
6805 case $GCC in
6806 yes)
6807 if test "$CC" != 'g++' ; then
6808 STRICT_PROTO="-Wstrict-prototypes"
6809 fi
6810 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6811 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6812 WRAP="-fwrapv"
6813 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006814
Stefan Krahaf04ff22011-12-08 22:20:31 +01006815 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006816 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006817 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006818 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006819 *)
6820 if $CC --version 2>&1 | grep -q clang
6821 then
6822 cc_is_clang=1
6823 else
6824 cc_is_clang=
6825 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006826 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006827
Victor Stinner35f3d242017-04-21 12:35:24 +02006828 if test -n "${cc_is_clang}"
6829 then
6830 # Clang also needs -fwrapv
6831 WRAP="-fwrapv"
6832
6833 # bpo-30104: Python/dtoa.c requires to be build with
6834 # -fno-strict-aliasing to fix compiler issue on the
6835 # double/ULong[2] union using clang 4.0 and optimization level
6836 # -O2 or higher
6837 # https://bugs.llvm.org//show_bug.cgi?id=31928
6838 ALIASING="-fno-strict-aliasing"
6839 fi
6840
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006841 case $ac_cv_prog_cc_g in
6842 yes)
6843 if test "$Py_DEBUG" = 'true' ; then
6844 # Optimization messes up debuggers, so turn it off for
6845 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006846 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006847 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006848 else
Victor Stinner28205b22017-04-21 11:24:34 +02006849 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006850 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006851 else
Victor Stinner28205b22017-04-21 11:24:34 +02006852 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006853 fi
6854 ;;
6855 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006856 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006857 ;;
6858 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006859
6860 OPT="$OPT $STRICT_PROTO $ALIASING"
6861
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006862 case $ac_sys_system in
6863 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6864 ;;
6865 esac
6866 ;;
6867
6868 *)
6869 OPT="-O"
6870 ;;
6871 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872fi
6873
6874
6875
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006876
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006877# The -arch flags for universal builds on OSX
6878UNIVERSAL_ARCH_FLAGS=
6879
6880
6881# tweak BASECFLAGS based on compiler and platform
6882case $GCC in
6883yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006884 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006885
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6887$as_echo_n "checking for -Wextra... " >&6; }
6888 ac_save_cc="$CC"
6889 CC="$CC -Wextra -Werror"
6890 if ${ac_cv_extra_warnings+:} false; then :
6891 $as_echo_n "(cached) " >&6
6892else
6893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6894/* end confdefs.h. */
6895
6896
6897int
6898main ()
6899{
6900
6901 ;
6902 return 0;
6903}
6904
6905_ACEOF
6906if ac_fn_c_try_compile "$LINENO"; then :
6907
6908 ac_cv_extra_warnings=yes
6909
6910else
6911
6912 ac_cv_extra_warnings=no
6913
6914fi
6915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6916fi
6917
6918 CC="$ac_save_cc"
6919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6920$as_echo "$ac_cv_extra_warnings" >&6; }
6921
6922 if test $ac_cv_extra_warnings = yes
6923 then
6924 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6925 fi
6926
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006927 # Python doesn't violate C99 aliasing rules, but older versions of
6928 # GCC produce warnings for legal Python code. Enable
6929 # -fno-strict-aliasing on versions of GCC that support but produce
6930 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6932$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006933 ac_save_cc="$CC"
6934 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006935 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006936 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006937 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006938else
Matthias Kloseb9621712010-04-24 17:59:49 +00006939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006940/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006941
Matthias Kloseb159a552010-04-25 21:00:44 +00006942
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006943int
6944main ()
6945{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006946
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006947 ;
6948 return 0;
6949}
Matthias Kloseb159a552010-04-25 21:00:44 +00006950
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006952if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006953
6954 CC="$ac_save_cc -fstrict-aliasing"
6955 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006957/* end confdefs.h. */
6958
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006959 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006960int
6961main ()
6962{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006963double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006964 ;
6965 return 0;
6966}
Matthias Kloseb159a552010-04-25 21:00:44 +00006967
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006969if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006970
6971 ac_cv_no_strict_aliasing=no
6972
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006973else
Matthias Kloseb159a552010-04-25 21:00:44 +00006974
6975 ac_cv_no_strict_aliasing=yes
6976
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006977fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006979
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006980else
Matthias Kloseb159a552010-04-25 21:00:44 +00006981
6982 ac_cv_no_strict_aliasing=no
6983
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006984fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006986fi
6987
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006988 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006989 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6991$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006992 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006993 then
6994 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6995 fi
6996
Zachary Ware5af85642015-12-21 12:09:17 -06006997 # ICC doesn't recognize the option, but only emits a warning
6998 ## XXX does it emit an unused result warning and can it be disabled?
6999 case "$CC" in
7000 *icc*)
7001 ac_cv_disable_unused_result_warning=no
7002 ;;
7003 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7005$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7006 ac_save_cc="$CC"
7007 CC="$CC -Wunused-result -Werror"
7008 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007009 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007010 $as_echo_n "(cached) " >&6
7011else
7012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7013/* end confdefs.h. */
7014
7015
7016int
7017main ()
7018{
7019
7020 ;
7021 return 0;
7022}
7023
7024_ACEOF
7025if ac_fn_c_try_compile "$LINENO"; then :
7026
7027 ac_cv_disable_unused_result_warning=yes
7028
7029else
7030
7031 ac_cv_disable_unused_result_warning=no
7032
7033fi
7034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7035fi
7036
7037 CFLAGS="$save_CFLAGS"
7038 CC="$ac_save_cc"
7039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7040$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007041 ;;
7042 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007043
7044 if test $ac_cv_disable_unused_result_warning = yes
7045 then
7046 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007047 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7048 fi
7049
7050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7051$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7052 ac_save_cc="$CC"
7053 CC="$CC -Wunused-parameter -Werror"
7054 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7055 $as_echo_n "(cached) " >&6
7056else
7057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7058/* end confdefs.h. */
7059
7060
7061int
7062main ()
7063{
7064
7065 ;
7066 return 0;
7067}
7068
7069_ACEOF
7070if ac_fn_c_try_compile "$LINENO"; then :
7071
7072 ac_cv_disable_unused_parameter_warning=yes
7073
7074else
7075
7076 ac_cv_disable_unused_parameter_warning=no
7077
7078fi
7079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7080fi
7081
7082 CC="$ac_save_cc"
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7084$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7085
7086 if test $ac_cv_disable_unused_parameter_warning = yes
7087 then
7088 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7089 fi
7090
7091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7092$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7093 ac_save_cc="$CC"
7094 CC="$CC -Wmissing-field-initializers -Werror"
7095 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7096 $as_echo_n "(cached) " >&6
7097else
7098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7099/* end confdefs.h. */
7100
7101
7102int
7103main ()
7104{
7105
7106 ;
7107 return 0;
7108}
7109
7110_ACEOF
7111if ac_fn_c_try_compile "$LINENO"; then :
7112
7113 ac_cv_disable_missing_field_initializers=yes
7114
7115else
7116
7117 ac_cv_disable_missing_field_initializers=no
7118
7119fi
7120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7121fi
7122
7123 CC="$ac_save_cc"
7124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7125$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7126
7127 if test $ac_cv_disable_missing_field_initializers = yes
7128 then
7129 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007130 fi
7131
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7133$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7134 ac_save_cc="$CC"
7135 CC="$CC -Wsign-compare"
7136 save_CFLAGS="$CFLAGS"
7137 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7138 $as_echo_n "(cached) " >&6
7139else
7140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7141/* end confdefs.h. */
7142
7143
7144int
7145main ()
7146{
7147
7148 ;
7149 return 0;
7150}
7151
7152_ACEOF
7153if ac_fn_c_try_compile "$LINENO"; then :
7154
7155 ac_cv_enable_sign_compare_warning=yes
7156
7157else
7158
7159 ac_cv_enable_sign_compare_warning=no
7160
7161fi
7162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7163fi
7164
7165 CFLAGS="$save_CFLAGS"
7166 CC="$ac_save_cc"
7167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7168$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7169
7170 if test $ac_cv_enable_sign_compare_warning = yes
7171 then
7172 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7173 fi
7174
7175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7176$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7177 ac_save_cc="$CC"
7178 CC="$CC -Wunreachable-code"
7179 save_CFLAGS="$CFLAGS"
7180 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7181 $as_echo_n "(cached) " >&6
7182else
7183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7184/* end confdefs.h. */
7185
7186
7187int
7188main ()
7189{
7190
7191 ;
7192 return 0;
7193}
7194
7195_ACEOF
7196if ac_fn_c_try_compile "$LINENO"; then :
7197
7198 ac_cv_enable_unreachable_code_warning=yes
7199
7200else
7201
7202 ac_cv_enable_unreachable_code_warning=no
7203
7204fi
7205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7206fi
7207
7208 CFLAGS="$save_CFLAGS"
7209 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007210
7211 # Don't enable unreachable code warning in debug mode, since it usually
7212 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007213 # Issue #24324: Unfortunately, the unreachable code warning does not work
7214 # correctly on gcc and has been silently removed from the compiler.
7215 # It is supported on clang but on OS X systems gcc may be an alias
7216 # for clang. Try to determine if the compiler is not really gcc and,
7217 # if so, only then enable the warning.
7218 if test $ac_cv_enable_unreachable_code_warning = yes && \
7219 test "$Py_DEBUG" != "true" && \
7220 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007221 then
7222 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007223 else
7224 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007225 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7227$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007228
Victor Stinner193ee0a2017-02-06 14:24:00 +01007229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7230$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7231 ac_save_cc="$CC"
7232 CC="$CC -Werror=implicit-function-declaration"
7233 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7234 $as_echo_n "(cached) " >&6
7235else
7236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7237/* end confdefs.h. */
7238
7239
7240int
7241main ()
7242{
7243
7244 ;
7245 return 0;
7246}
7247
7248_ACEOF
7249if ac_fn_c_try_compile "$LINENO"; then :
7250
7251 ac_cv_enable_implicit_function_declaration_error=yes
7252
7253else
7254
7255 ac_cv_enable_implicit_function_declaration_error=no
7256
7257fi
7258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7259fi
7260
7261 CC="$ac_save_cc"
7262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7263$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7264
7265 if test $ac_cv_enable_implicit_function_declaration_error = yes
7266 then
7267 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7268 fi
7269
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007270 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7271 # support. Without this, treatment of subnormals doesn't follow
7272 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007273 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007274 alpha*)
7275 BASECFLAGS="$BASECFLAGS -mieee"
7276 ;;
7277 esac
7278
7279 case $ac_sys_system in
7280 SCO_SV*)
7281 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7282 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007283
7284 # is there any other compiler on Darwin besides gcc?
7285 Darwin*)
7286 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7287 # used to be here, but non-Apple gcc doesn't accept them.
7288 if test "${CC}" = gcc
7289 then
7290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007291$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007292 case "${UNIVERSALSDK}" in
7293 */MacOSX10.4u.sdk)
7294 # Build using 10.4 SDK, force usage of gcc when the
7295 # compiler is gcc, otherwise the user will get very
7296 # confusing error messages when building on OSX 10.6
7297 CC=gcc-4.0
7298 CPP=cpp-4.0
7299 ;;
7300 esac
7301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007302$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007303 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007304
Ned Deily87adb6e2013-10-18 21:09:56 -07007305 if test "${enable_universalsdk}"
7306 then
7307 case "$UNIVERSAL_ARCHS" in
7308 32-bit)
7309 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7310 LIPO_32BIT_FLAGS=""
7311 ARCH_RUN_32BIT=""
7312 ;;
7313 64-bit)
7314 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7315 LIPO_32BIT_FLAGS=""
7316 ARCH_RUN_32BIT="true"
7317 ;;
7318 all)
7319 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7320 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7321 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7322 ;;
7323 intel)
7324 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7325 LIPO_32BIT_FLAGS="-extract i386"
7326 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7327 ;;
7328 intel-32)
7329 UNIVERSAL_ARCH_FLAGS="-arch i386"
7330 LIPO_32BIT_FLAGS=""
7331 ARCH_RUN_32BIT=""
7332 ;;
7333 3-way)
7334 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7335 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7336 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7337 ;;
7338 *)
7339 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7340 ;;
7341 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007342
Ned Deily87adb6e2013-10-18 21:09:56 -07007343 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7344 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7345 if test "${UNIVERSALSDK}" != "/"
7346 then
7347 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7348 fi
7349 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007350
Ned Deily87adb6e2013-10-18 21:09:56 -07007351 # Calculate an appropriate deployment target for this build:
7352 # The deployment target value is used explicitly to enable certain
7353 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007354 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007355 # component of the string returned by distutils.get_platform().
7356 #
7357 # Use the value from:
7358 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7359 # 2. the operating system version of the build machine if >= 10.6
7360 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7361 # below to pick either 10.3, 10.4, or 10.5 as the target.
7362 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007363
Ned Deily87adb6e2013-10-18 21:09:56 -07007364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7365$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007366 cur_target_major=`sw_vers -productVersion | \
7367 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7368 cur_target_minor=`sw_vers -productVersion | \
7369 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7370 cur_target="${cur_target_major}.${cur_target_minor}"
7371 if test ${cur_target_major} -eq 10 && \
7372 test ${cur_target_minor} -ge 3 && \
7373 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007374 then
Ned Deily36820b62014-06-25 13:44:22 -07007375 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007376 cur_target=10.3
7377 if test ${enable_universalsdk}
7378 then
7379 case "$UNIVERSAL_ARCHS" in
7380 all|3-way|intel|64-bit)
7381 # These configurations were first supported in 10.5
7382 cur_target='10.5'
7383 ;;
7384 esac
7385 else
7386 if test `/usr/bin/arch` = "i386"
7387 then
7388 # 10.4 was the first release to support Intel archs
7389 cur_target="10.4"
7390 fi
7391 fi
7392 fi
7393 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007394
Ned Deily87adb6e2013-10-18 21:09:56 -07007395 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7396 # environment with a value that is the same as what we'll use
7397 # in the Makefile to ensure that we'll get the same compiler
7398 # environment during configure and build time.
7399 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7400 export MACOSX_DEPLOYMENT_TARGET
7401 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7403$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007404
Ned Deily87adb6e2013-10-18 21:09:56 -07007405 # end of Darwin* tests
7406 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007407 esac
7408 ;;
7409
7410*)
7411 case $ac_sys_system in
7412 OpenUNIX*|UnixWare*)
7413 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7414 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007415 SCO_SV*)
7416 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7417 ;;
7418 esac
7419 ;;
7420esac
7421
Zachary Ware5af85642015-12-21 12:09:17 -06007422# ICC needs -fp-model strict or floats behave badly
7423case "$CC" in
7424*icc*)
7425 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7426 ;;
7427esac
7428
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007429if test "$Py_DEBUG" = 'true'; then
7430 :
7431else
7432 OPT="-DNDEBUG $OPT"
7433fi
7434
7435if test "$ac_arch_flags"
7436then
7437 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7438fi
7439
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007440# On some compilers, pthreads are available without further options
7441# (e.g. MacOS X). On some of these systems, the compiler will not
7442# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7443# So we have to see first whether pthreads are available without
7444# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7446$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007447if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007448 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449else
Matthias Kloseb9621712010-04-24 17:59:49 +00007450 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007451 ac_cv_pthread_is_default=no
7452else
Matthias Kloseb9621712010-04-24 17:59:49 +00007453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007454/* end confdefs.h. */
7455
Stefan Krah7dba5942012-11-22 22:49:11 +01007456#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007457#include <pthread.h>
7458
7459void* routine(void* p){return NULL;}
7460
7461int main(){
7462 pthread_t p;
7463 if(pthread_create(&p,NULL,routine,NULL)!=0)
7464 return 1;
7465 (void)pthread_detach(p);
7466 return 0;
7467}
7468
7469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007470if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007471
7472 ac_cv_pthread_is_default=yes
7473 ac_cv_kthread=no
7474 ac_cv_pthread=no
7475
7476else
Matthias Kloseb9621712010-04-24 17:59:49 +00007477 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7480 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007481fi
7482
7483
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007484fi
7485
Matthias Kloseb9621712010-04-24 17:59:49 +00007486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7487$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007488
7489
7490if test $ac_cv_pthread_is_default = yes
7491then
7492 ac_cv_kpthread=no
7493else
7494# -Kpthread, if available, provides the right #defines
7495# and linker options to make pthread_create available
7496# Some compilers won't report that they do not support -Kpthread,
7497# so we need to run a program to see whether it really made the
7498# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7500$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007501if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007502 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007503else
7504 ac_save_cc="$CC"
7505CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007506if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007507 ac_cv_kpthread=no
7508else
Matthias Kloseb9621712010-04-24 17:59:49 +00007509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007510/* end confdefs.h. */
7511
Stefan Krah7dba5942012-11-22 22:49:11 +01007512#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007513#include <pthread.h>
7514
7515void* routine(void* p){return NULL;}
7516
7517int main(){
7518 pthread_t p;
7519 if(pthread_create(&p,NULL,routine,NULL)!=0)
7520 return 1;
7521 (void)pthread_detach(p);
7522 return 0;
7523}
7524
7525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007526if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007527 ac_cv_kpthread=yes
7528else
Matthias Kloseb9621712010-04-24 17:59:49 +00007529 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007530fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007531rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7532 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007533fi
7534
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007535CC="$ac_save_cc"
7536fi
7537
Matthias Kloseb9621712010-04-24 17:59:49 +00007538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7539$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007540fi
7541
7542if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7543then
7544# -Kthread, if available, provides the right #defines
7545# and linker options to make pthread_create available
7546# Some compilers won't report that they do not support -Kthread,
7547# so we need to run a program to see whether it really made the
7548# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7550$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007551if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007552 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007553else
7554 ac_save_cc="$CC"
7555CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007556if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007557 ac_cv_kthread=no
7558else
Matthias Kloseb9621712010-04-24 17:59:49 +00007559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007560/* end confdefs.h. */
7561
Stefan Krah7dba5942012-11-22 22:49:11 +01007562#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007563#include <pthread.h>
7564
7565void* routine(void* p){return NULL;}
7566
7567int main(){
7568 pthread_t p;
7569 if(pthread_create(&p,NULL,routine,NULL)!=0)
7570 return 1;
7571 (void)pthread_detach(p);
7572 return 0;
7573}
7574
7575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007576if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007577 ac_cv_kthread=yes
7578else
Matthias Kloseb9621712010-04-24 17:59:49 +00007579 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007581rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7582 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583fi
7584
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007585CC="$ac_save_cc"
7586fi
7587
Matthias Kloseb9621712010-04-24 17:59:49 +00007588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7589$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007590fi
7591
7592if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7593then
7594# -pthread, if available, provides the right #defines
7595# and linker options to make pthread_create available
7596# Some compilers won't report that they do not support -pthread,
7597# so we need to run a program to see whether it really made the
7598# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7600$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007601if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007602 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007603else
7604 ac_save_cc="$CC"
7605CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007606if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007607 ac_cv_pthread=no
7608else
Matthias Kloseb9621712010-04-24 17:59:49 +00007609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007610/* end confdefs.h. */
7611
Stefan Krah7dba5942012-11-22 22:49:11 +01007612#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007613#include <pthread.h>
7614
7615void* routine(void* p){return NULL;}
7616
7617int main(){
7618 pthread_t p;
7619 if(pthread_create(&p,NULL,routine,NULL)!=0)
7620 return 1;
7621 (void)pthread_detach(p);
7622 return 0;
7623}
7624
7625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007626if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007627 ac_cv_pthread=yes
7628else
Matthias Kloseb9621712010-04-24 17:59:49 +00007629 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007631rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7632 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007633fi
7634
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007635CC="$ac_save_cc"
7636fi
7637
Matthias Kloseb9621712010-04-24 17:59:49 +00007638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7639$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007640fi
7641
7642# If we have set a CC compiler flag for thread support then
7643# check if it works for CXX, too.
7644ac_cv_cxx_thread=no
7645if test ! -z "$CXX"
7646then
Matthias Kloseb9621712010-04-24 17:59:49 +00007647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7648$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007649ac_save_cxx="$CXX"
7650
7651if test "$ac_cv_kpthread" = "yes"
7652then
7653 CXX="$CXX -Kpthread"
7654 ac_cv_cxx_thread=yes
7655elif test "$ac_cv_kthread" = "yes"
7656then
7657 CXX="$CXX -Kthread"
7658 ac_cv_cxx_thread=yes
7659elif test "$ac_cv_pthread" = "yes"
7660then
7661 CXX="$CXX -pthread"
7662 ac_cv_cxx_thread=yes
7663fi
7664
7665if test $ac_cv_cxx_thread = yes
7666then
7667 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7668 $CXX -c conftest.$ac_ext 2>&5
7669 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7670 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7671 then
7672 ac_cv_cxx_thread=yes
7673 else
7674 ac_cv_cxx_thread=no
7675 fi
7676 rm -fr conftest*
7677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7679$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007680fi
7681CXX="$ac_save_cxx"
7682
7683
7684# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7686$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007687if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007688 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007689else
Matthias Kloseb9621712010-04-24 17:59:49 +00007690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007691/* end confdefs.h. */
7692#include <stdlib.h>
7693#include <stdarg.h>
7694#include <string.h>
7695#include <float.h>
7696
7697int
7698main ()
7699{
7700
7701 ;
7702 return 0;
7703}
7704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007705if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007706 ac_cv_header_stdc=yes
7707else
Matthias Kloseb9621712010-04-24 17:59:49 +00007708 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007709fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7711
7712if test $ac_cv_header_stdc = yes; then
7713 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007715/* end confdefs.h. */
7716#include <string.h>
7717
7718_ACEOF
7719if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007720 $EGREP "memchr" >/dev/null 2>&1; then :
7721
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007722else
7723 ac_cv_header_stdc=no
7724fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007725rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007726
7727fi
7728
7729if test $ac_cv_header_stdc = yes; then
7730 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007732/* end confdefs.h. */
7733#include <stdlib.h>
7734
7735_ACEOF
7736if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007737 $EGREP "free" >/dev/null 2>&1; then :
7738
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007739else
7740 ac_cv_header_stdc=no
7741fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007742rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007743
7744fi
7745
7746if test $ac_cv_header_stdc = yes; then
7747 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007748 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007749 :
7750else
Matthias Kloseb9621712010-04-24 17:59:49 +00007751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007752/* end confdefs.h. */
7753#include <ctype.h>
7754#include <stdlib.h>
7755#if ((' ' & 0x0FF) == 0x020)
7756# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7757# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7758#else
7759# define ISLOWER(c) \
7760 (('a' <= (c) && (c) <= 'i') \
7761 || ('j' <= (c) && (c) <= 'r') \
7762 || ('s' <= (c) && (c) <= 'z'))
7763# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7764#endif
7765
7766#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7767int
7768main ()
7769{
7770 int i;
7771 for (i = 0; i < 256; i++)
7772 if (XOR (islower (i), ISLOWER (i))
7773 || toupper (i) != TOUPPER (i))
7774 return 2;
7775 return 0;
7776}
7777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007778if ac_fn_c_try_run "$LINENO"; then :
7779
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007780else
Matthias Kloseb9621712010-04-24 17:59:49 +00007781 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007783rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7784 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007785fi
7786
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007787fi
7788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7790$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007791if test $ac_cv_header_stdc = yes; then
7792
Matthias Kloseb9621712010-04-24 17:59:49 +00007793$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007794
7795fi
7796
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007797for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007798fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007799ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007800sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007801unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007802poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007803sys/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 +01007804sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007805sys/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 +01007806sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007807sys/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 -07007808libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007809linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007810sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007811do :
7812 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7813ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007814if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007815 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007816#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007817_ACEOF
7818
7819fi
7820
Guido van Rossum627b2d71993-12-24 10:39:16 +00007821done
7822
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007823ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007824for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007825 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7827$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007828if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007829 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007830else
Matthias Kloseb9621712010-04-24 17:59:49 +00007831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007832/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007833#include <sys/types.h>
7834#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007835
Martin v. Löwis11437992002-04-12 09:54:03 +00007836int
7837main ()
7838{
7839if ((DIR *) 0)
7840return 0;
7841 ;
7842 return 0;
7843}
7844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007845if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007846 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007847else
Matthias Kloseb9621712010-04-24 17:59:49 +00007848 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007852eval ac_res=\$$as_ac_Header
7853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7854$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007855if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007856 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007857#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007858_ACEOF
7859
7860ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007861fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007862
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007863done
7864# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7865if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7867$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007868if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007869 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007870else
Martin v. Löwis11437992002-04-12 09:54:03 +00007871 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007874
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007875/* Override any GCC internal prototype to avoid an error.
7876 Use char because int might match the return type of a GCC
7877 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007878#ifdef __cplusplus
7879extern "C"
7880#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007881char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007882int
7883main ()
7884{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007885return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007886 ;
7887 return 0;
7888}
7889_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007890for ac_lib in '' dir; do
7891 if test -z "$ac_lib"; then
7892 ac_res="none required"
7893 else
7894 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007895 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007896 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007897 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007898 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007900rm -f core conftest.err conftest.$ac_objext \
7901 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007902 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007903 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007905done
Victor Stinnere0be4232011-10-25 13:06:09 +02007906if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007908else
7909 ac_cv_search_opendir=no
7910fi
7911rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007912LIBS=$ac_func_search_save_LIBS
7913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7915$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007916ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007917if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007918 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007919
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007920fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007921
Michael W. Hudson54241132001-12-07 15:38:26 +00007922else
Matthias Kloseb9621712010-04-24 17:59:49 +00007923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7924$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007925if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007926 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007927else
7928 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007931
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007932/* Override any GCC internal prototype to avoid an error.
7933 Use char because int might match the return type of a GCC
7934 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007935#ifdef __cplusplus
7936extern "C"
7937#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007938char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007939int
7940main ()
7941{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007943 ;
7944 return 0;
7945}
7946_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007947for ac_lib in '' x; do
7948 if test -z "$ac_lib"; then
7949 ac_res="none required"
7950 else
7951 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007952 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007954 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007955 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007957rm -f core conftest.err conftest.$ac_objext \
7958 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007959 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007960 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007962done
Victor Stinnere0be4232011-10-25 13:06:09 +02007963if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007964
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007965else
7966 ac_cv_search_opendir=no
7967fi
7968rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007969LIBS=$ac_func_search_save_LIBS
7970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7972$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007973ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007974if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007975 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007976
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007977fi
7978
7979fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007980
Matthias Kloseb9621712010-04-24 17:59:49 +00007981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7982$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007983if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007984 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007985else
Matthias Kloseb9621712010-04-24 17:59:49 +00007986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007987/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007988#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007989int
7990main ()
7991{
7992return makedev(0, 0);
7993 ;
7994 return 0;
7995}
7996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007997if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007998 ac_cv_header_sys_types_h_makedev=yes
7999else
Matthias Kloseb9621712010-04-24 17:59:49 +00008000 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008002rm -f core conftest.err conftest.$ac_objext \
8003 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008004
8005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8007$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008008
8009if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008010ac_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 +02008011if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008012
Matthias Kloseb9621712010-04-24 17:59:49 +00008013$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008014
8015fi
8016
8017
8018
8019 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008020 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 +02008021if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008022
Matthias Kloseb9621712010-04-24 17:59:49 +00008023$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008024
8025fi
8026
8027
8028 fi
8029fi
8030
Michael W. Hudson54241132001-12-07 15:38:26 +00008031
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008032# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8033# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8034SAVE_CFLAGS=$CFLAGS
8035CFLAGS="-std=c99 $CFLAGS"
8036for ac_header in bluetooth/bluetooth.h
8037do :
8038 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8039if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8040 cat >>confdefs.h <<_ACEOF
8041#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8042_ACEOF
8043
8044fi
8045
8046done
8047
8048CFLAGS=$SAVE_CFLAGS
8049
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008050# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8051for ac_header in net/if.h
8052do :
8053 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8054#ifdef STDC_HEADERS
8055# include <stdlib.h>
8056# include <stddef.h>
8057#else
8058# ifdef HAVE_STDLIB_H
8059# include <stdlib.h>
8060# endif
8061#endif
8062#ifdef HAVE_SYS_SOCKET_H
8063# include <sys/socket.h>
8064#endif
8065
8066"
Victor Stinnere0be4232011-10-25 13:06:09 +02008067if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008068 cat >>confdefs.h <<_ACEOF
8069#define HAVE_NET_IF_H 1
8070_ACEOF
8071
8072fi
8073
8074done
8075
8076
Martin v. Löwis11017b12006-01-14 18:12:57 +00008077# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008078for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008079do :
8080 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 +00008081#ifdef HAVE_ASM_TYPES_H
8082#include <asm/types.h>
8083#endif
8084#ifdef HAVE_SYS_SOCKET_H
8085#include <sys/socket.h>
8086#endif
8087
Matthias Kloseb9621712010-04-24 17:59:49 +00008088"
Victor Stinnere0be4232011-10-25 13:06:09 +02008089if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008090 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008091#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008092_ACEOF
8093
8094fi
8095
8096done
8097
8098
Charles-François Natali47413c12011-10-06 19:47:44 +02008099# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008100for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008101do :
8102 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8103ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8104#ifdef HAVE_SYS_SOCKET_H
8105#include <sys/socket.h>
8106#endif
8107
8108"
8109if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8110 cat >>confdefs.h <<_ACEOF
8111#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8112_ACEOF
8113
8114fi
8115
8116done
8117
8118
Guido van Rossum627b2d71993-12-24 10:39:16 +00008119# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008120was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8122$as_echo_n "checking for clock_t in time.h... " >&6; }
8123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008124/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008125#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008126
8127_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008128if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008129 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008130 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008131else
Martin v. Löwis11437992002-04-12 09:54:03 +00008132
8133
Matthias Kloseb9621712010-04-24 17:59:49 +00008134$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008135
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008136
Guido van Rossum627b2d71993-12-24 10:39:16 +00008137fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008138rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008139
Matthias Kloseb9621712010-04-24 17:59:49 +00008140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8141$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008142
Matthias Kloseb9621712010-04-24 17:59:49 +00008143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8144$as_echo_n "checking for makedev... " >&6; }
8145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008146/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008147
Jesus Cea740f53a2010-04-28 11:35:30 +00008148#if defined(MAJOR_IN_MKDEV)
8149#include <sys/mkdev.h>
8150#elif defined(MAJOR_IN_SYSMACROS)
8151#include <sys/sysmacros.h>
8152#else
8153#include <sys/types.h>
8154#endif
8155
Neal Norwitz11690112002-07-30 01:08:28 +00008156int
8157main ()
8158{
Jesus Cea740f53a2010-04-28 11:35:30 +00008159
8160 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008161 ;
8162 return 0;
8163}
Matthias Kloseb159a552010-04-25 21:00:44 +00008164
Neal Norwitz11690112002-07-30 01:08:28 +00008165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008166if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008167 ac_cv_has_makedev=yes
8168else
Matthias Kloseb9621712010-04-24 17:59:49 +00008169 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008170fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008171rm -f core conftest.err conftest.$ac_objext \
8172 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8174$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008175if test "$ac_cv_has_makedev" = "yes"; then
8176
Matthias Kloseb9621712010-04-24 17:59:49 +00008177$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008178
8179fi
8180
Christian Heimes985ecdc2013-11-20 11:46:18 +01008181# byte swapping
8182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8183$as_echo_n "checking for le64toh... " >&6; }
8184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8185/* end confdefs.h. */
8186
8187#ifdef HAVE_ENDIAN_H
8188#include <endian.h>
8189#elif defined(HAVE_SYS_ENDIAN_H)
8190#include <sys/endian.h>
8191#endif
8192
8193int
8194main ()
8195{
8196
8197 le64toh(1)
8198 ;
8199 return 0;
8200}
8201
8202_ACEOF
8203if ac_fn_c_try_link "$LINENO"; then :
8204 ac_cv_has_le64toh=yes
8205else
8206 ac_cv_has_le64toh=no
8207fi
8208rm -f core conftest.err conftest.$ac_objext \
8209 conftest$ac_exeext conftest.$ac_ext
8210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8211$as_echo "$ac_cv_has_le64toh" >&6; }
8212if test "$ac_cv_has_le64toh" = "yes"; then
8213
8214$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8215
8216fi
8217
Martin v. Löwis399a6892002-10-04 10:22:02 +00008218# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8219# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8220# defined, but the compiler does not support pragma redefine_extname,
8221# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8222# structures (such as rlimit64) without declaring them. As a
8223# work-around, disable LFS on such configurations
8224
8225use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8227$as_echo_n "checking Solaris LFS bug... " >&6; }
8228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008229/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008230
8231#define _LARGEFILE_SOURCE 1
8232#define _FILE_OFFSET_BITS 64
8233#include <sys/resource.h>
8234
Martin v. Löwis399a6892002-10-04 10:22:02 +00008235int
8236main ()
8237{
8238struct rlimit foo;
8239 ;
8240 return 0;
8241}
8242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008243if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008244 sol_lfs_bug=no
8245else
Matthias Kloseb9621712010-04-24 17:59:49 +00008246 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8250$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008251if test "$sol_lfs_bug" = "yes"; then
8252 use_lfs=no
8253fi
8254
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008255# Don't use largefile support for GNU/Hurd
8256case $ac_sys_system in GNU*)
8257 use_lfs=no
8258esac
8259
Martin v. Löwis399a6892002-10-04 10:22:02 +00008260if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008261# Two defines needed to enable largefile support on various platforms
8262# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008263case $ac_sys_system/$ac_sys_release in
8264AIX*)
8265
8266$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8267
8268 ;;
8269esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008270
Matthias Kloseb9621712010-04-24 17:59:49 +00008271$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008272
8273
Matthias Kloseb9621712010-04-24 17:59:49 +00008274$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008275
Martin v. Löwis399a6892002-10-04 10:22:02 +00008276fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008277
Guido van Rossum84e7b241996-08-19 21:59:00 +00008278# Add some code to confdefs.h so that the test for off_t works on SCO
8279cat >> confdefs.h <<\EOF
8280#if defined(SCO_DS)
8281#undef _OFF_T
8282#endif
8283EOF
8284
Guido van Rossumef2255b2000-03-10 22:30:29 +00008285# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008286ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008287if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008288
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008289else
Martin v. Löwis11437992002-04-12 09:54:03 +00008290
8291cat >>confdefs.h <<_ACEOF
8292#define mode_t int
8293_ACEOF
8294
8295fi
8296
Matthias Kloseb9621712010-04-24 17:59:49 +00008297ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008298if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008299
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008300else
Martin v. Löwis11437992002-04-12 09:54:03 +00008301
8302cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008303#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008304_ACEOF
8305
8306fi
8307
Matthias Kloseb9621712010-04-24 17:59:49 +00008308ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008309if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008310
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008311else
Martin v. Löwis11437992002-04-12 09:54:03 +00008312
8313cat >>confdefs.h <<_ACEOF
8314#define pid_t int
8315_ACEOF
8316
8317fi
8318
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008319
Martin v. Löwis11437992002-04-12 09:54:03 +00008320cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008321#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008322_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008323
Matthias Kloseb9621712010-04-24 17:59:49 +00008324ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008325if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008326
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008327else
Martin v. Löwis11437992002-04-12 09:54:03 +00008328
8329cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008330#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008331_ACEOF
8332
8333fi
8334
Matthias Kloseb9621712010-04-24 17:59:49 +00008335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8336$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008337if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008338 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008339else
Matthias Kloseb9621712010-04-24 17:59:49 +00008340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008341/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008342#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008343
8344_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008345if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008346 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008347 ac_cv_type_uid_t=yes
8348else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008349 ac_cv_type_uid_t=no
8350fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008351rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008352
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008353fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8355$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008356if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008357
Matthias Kloseb9621712010-04-24 17:59:49 +00008358$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008359
8360
Matthias Kloseb9621712010-04-24 17:59:49 +00008361$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008362
8363fi
8364
Mark Dickinson983bc162012-12-02 12:11:38 +00008365
Matthias Kloseb9621712010-04-24 17:59:49 +00008366ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008367if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008368
Matthias Kloseb9621712010-04-24 17:59:49 +00008369$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008370
8371fi
8372
Stefan Krah1919b7e2012-03-21 18:25:23 +01008373ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8374if test "x$ac_cv_type___uint128_t" = xyes; then :
8375
8376$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8377
8378fi
8379
Jack Jansendd19cf82001-12-06 22:36:17 +00008380
Michael W. Hudson54241132001-12-07 15:38:26 +00008381# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008382# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008383# The cast to long int works around a bug in the HP C Compiler
8384# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8385# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8386# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8388$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008389if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008390 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008391else
Matthias Kloseb9621712010-04-24 17:59:49 +00008392 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 +00008393
Martin v. Löwis11437992002-04-12 09:54:03 +00008394else
Matthias Kloseb9621712010-04-24 17:59:49 +00008395 if test "$ac_cv_type_int" = yes; then
8396 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8397$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008398as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008399See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008400 else
8401 ac_cv_sizeof_int=0
8402 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008403fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008404
Martin v. Löwis11437992002-04-12 09:54:03 +00008405fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8407$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008408
8409
8410
Martin v. Löwis11437992002-04-12 09:54:03 +00008411cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008412#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008413_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008414
8415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008416# The cast to long int works around a bug in the HP C Compiler
8417# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8418# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8419# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8421$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008422if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008423 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008424else
Matthias Kloseb9621712010-04-24 17:59:49 +00008425 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 +00008426
Martin v. Löwis11437992002-04-12 09:54:03 +00008427else
Matthias Kloseb9621712010-04-24 17:59:49 +00008428 if test "$ac_cv_type_long" = yes; then
8429 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8430$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008431as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008432See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008433 else
8434 ac_cv_sizeof_long=0
8435 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008436fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008437
Martin v. Löwis11437992002-04-12 09:54:03 +00008438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8440$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008441
8442
8443
Martin v. Löwis11437992002-04-12 09:54:03 +00008444cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008445#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008446_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008447
8448
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008449# The cast to long int works around a bug in the HP C Compiler
8450# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8451# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8452# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8454$as_echo_n "checking size of long long... " >&6; }
8455if ${ac_cv_sizeof_long_long+:} false; then :
8456 $as_echo_n "(cached) " >&6
8457else
8458 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8459
8460else
8461 if test "$ac_cv_type_long_long" = yes; then
8462 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8463$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8464as_fn_error 77 "cannot compute sizeof (long long)
8465See \`config.log' for more details" "$LINENO" 5; }
8466 else
8467 ac_cv_sizeof_long_long=0
8468 fi
8469fi
8470
8471fi
8472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8473$as_echo "$ac_cv_sizeof_long_long" >&6; }
8474
8475
8476
8477cat >>confdefs.h <<_ACEOF
8478#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8479_ACEOF
8480
8481
8482# The cast to long int works around a bug in the HP C Compiler
8483# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8484# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8485# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8487$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008488if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008489 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008490else
Matthias Kloseb9621712010-04-24 17:59:49 +00008491 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 +00008492
Martin v. Löwis11437992002-04-12 09:54:03 +00008493else
Matthias Kloseb9621712010-04-24 17:59:49 +00008494 if test "$ac_cv_type_void_p" = yes; then
8495 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8496$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008497as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008498See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008499 else
8500 ac_cv_sizeof_void_p=0
8501 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008502fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008503
Martin v. Löwis11437992002-04-12 09:54:03 +00008504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8506$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008507
8508
8509
Martin v. Löwis11437992002-04-12 09:54:03 +00008510cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008511#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008512_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008513
8514
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515# The cast to long int works around a bug in the HP C Compiler
8516# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8517# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8518# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8520$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008521if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008522 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008523else
Matthias Kloseb9621712010-04-24 17:59:49 +00008524 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 +00008525
Martin v. Löwis11437992002-04-12 09:54:03 +00008526else
Matthias Kloseb9621712010-04-24 17:59:49 +00008527 if test "$ac_cv_type_short" = yes; then
8528 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8529$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008530as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008531See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008532 else
8533 ac_cv_sizeof_short=0
8534 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008536
Martin v. Löwis11437992002-04-12 09:54:03 +00008537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8539$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008540
8541
8542
Martin v. Löwis11437992002-04-12 09:54:03 +00008543cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008544#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008545_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008546
8547
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548# The cast to long int works around a bug in the HP C Compiler
8549# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8550# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8551# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8553$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008554if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008555 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008556else
Matthias Kloseb9621712010-04-24 17:59:49 +00008557 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 +00008558
Martin v. Löwis11437992002-04-12 09:54:03 +00008559else
Matthias Kloseb9621712010-04-24 17:59:49 +00008560 if test "$ac_cv_type_float" = yes; then
8561 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8562$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008563as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008564See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008565 else
8566 ac_cv_sizeof_float=0
8567 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008569
Martin v. Löwis11437992002-04-12 09:54:03 +00008570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8572$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573
8574
8575
Martin v. Löwis11437992002-04-12 09:54:03 +00008576cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008577#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008578_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008579
8580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581# The cast to long int works around a bug in the HP C Compiler
8582# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8583# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8584# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8586$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008587if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008588 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008589else
Matthias Kloseb9621712010-04-24 17:59:49 +00008590 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 +00008591
Martin v. Löwis11437992002-04-12 09:54:03 +00008592else
Matthias Kloseb9621712010-04-24 17:59:49 +00008593 if test "$ac_cv_type_double" = yes; then
8594 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008596as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008597See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008598 else
8599 ac_cv_sizeof_double=0
8600 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008602
Martin v. Löwis11437992002-04-12 09:54:03 +00008603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8605$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606
8607
8608
Martin v. Löwis11437992002-04-12 09:54:03 +00008609cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008610#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008611_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008612
8613
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008614# The cast to long int works around a bug in the HP C Compiler
8615# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8616# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8617# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8619$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008620if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008621 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008622else
Matthias Kloseb9621712010-04-24 17:59:49 +00008623 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 +00008624
Martin v. Löwis11437992002-04-12 09:54:03 +00008625else
Matthias Kloseb9621712010-04-24 17:59:49 +00008626 if test "$ac_cv_type_fpos_t" = yes; then
8627 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8628$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008629as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008630See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008631 else
8632 ac_cv_sizeof_fpos_t=0
8633 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008635
Martin v. Löwis11437992002-04-12 09:54:03 +00008636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8638$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008639
8640
8641
Martin v. Löwis11437992002-04-12 09:54:03 +00008642cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008643#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008644_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008645
Michael W. Hudson54241132001-12-07 15:38:26 +00008646
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008647# The cast to long int works around a bug in the HP C Compiler
8648# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8649# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8650# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8652$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008653if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008655else
Matthias Kloseb9621712010-04-24 17:59:49 +00008656 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 +00008657
Martin v. Löwis18e16552006-02-15 17:27:45 +00008658else
Matthias Kloseb9621712010-04-24 17:59:49 +00008659 if test "$ac_cv_type_size_t" = yes; then
8660 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8661$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008662as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008663See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008664 else
8665 ac_cv_sizeof_size_t=0
8666 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008668
Martin v. Löwis18e16552006-02-15 17:27:45 +00008669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8671$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008672
8673
8674
Martin v. Löwis18e16552006-02-15 17:27:45 +00008675cat >>confdefs.h <<_ACEOF
8676#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8677_ACEOF
8678
8679
Christian Heimes400adb02008-02-01 08:12:03 +00008680# The cast to long int works around a bug in the HP C Compiler
8681# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8682# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8683# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8685$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008686if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008688else
Matthias Kloseb9621712010-04-24 17:59:49 +00008689 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 +00008690
Christian Heimes400adb02008-02-01 08:12:03 +00008691else
Matthias Kloseb9621712010-04-24 17:59:49 +00008692 if test "$ac_cv_type_pid_t" = yes; then
8693 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8694$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008695as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008696See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008697 else
8698 ac_cv_sizeof_pid_t=0
8699 fi
8700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008701
Christian Heimes400adb02008-02-01 08:12:03 +00008702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8704$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008705
8706
8707
8708cat >>confdefs.h <<_ACEOF
8709#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8710_ACEOF
8711
8712
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008713# The cast to long int works around a bug in the HP C Compiler
8714# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8715# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8716# This bug is HP SR number 8606223364.
8717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8718$as_echo_n "checking size of uintptr_t... " >&6; }
8719if ${ac_cv_sizeof_uintptr_t+:} false; then :
8720 $as_echo_n "(cached) " >&6
8721else
8722 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8723
8724else
8725 if test "$ac_cv_type_uintptr_t" = yes; then
8726 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8727$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8728as_fn_error 77 "cannot compute sizeof (uintptr_t)
8729See \`config.log' for more details" "$LINENO" 5; }
8730 else
8731 ac_cv_sizeof_uintptr_t=0
8732 fi
8733fi
8734
8735fi
8736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8737$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8738
8739
8740
8741cat >>confdefs.h <<_ACEOF
8742#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8743_ACEOF
8744
8745
Michael W. Hudson54241132001-12-07 15:38:26 +00008746
Matthias Kloseb9621712010-04-24 17:59:49 +00008747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8748$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008749have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008751/* end confdefs.h. */
8752
8753int
8754main ()
8755{
8756long double x; x = (long double)0;
8757 ;
8758 return 0;
8759}
8760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008761if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008762
8763
Matthias Kloseb9621712010-04-24 17:59:49 +00008764$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008765
8766 have_long_double=yes
8767
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008768fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8771$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008772if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008773# The cast to long int works around a bug in the HP C Compiler
8774# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8775# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8776# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8778$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008779if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008780 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008781else
Matthias Kloseb9621712010-04-24 17:59:49 +00008782 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 +00008783
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008784else
Matthias Kloseb9621712010-04-24 17:59:49 +00008785 if test "$ac_cv_type_long_double" = yes; then
8786 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008788as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008789See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008790 else
8791 ac_cv_sizeof_long_double=0
8792 fi
8793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008794
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8797$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008798
8799
8800
8801cat >>confdefs.h <<_ACEOF
8802#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8803_ACEOF
8804
8805
8806fi
8807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008808# The cast to long int works around a bug in the HP C Compiler
8809# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8810# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8811# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8813$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008814if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008815 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008816else
Matthias Kloseb9621712010-04-24 17:59:49 +00008817 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 +00008818
Thomas Woutersb2137042007-02-01 18:02:27 +00008819else
Matthias Kloseb9621712010-04-24 17:59:49 +00008820 if test "$ac_cv_type__Bool" = yes; then
8821 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8822$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008823as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008824See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008825 else
8826 ac_cv_sizeof__Bool=0
8827 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008829
Thomas Woutersb2137042007-02-01 18:02:27 +00008830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8832$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008833
8834
8835
Thomas Woutersb2137042007-02-01 18:02:27 +00008836cat >>confdefs.h <<_ACEOF
8837#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8838_ACEOF
8839
8840
Thomas Woutersb2137042007-02-01 18:02:27 +00008841
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008842# The cast to long int works around a bug in the HP C Compiler
8843# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8844# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8845# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8847$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008848if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008849 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008850else
Matthias Kloseb9621712010-04-24 17:59:49 +00008851 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008852#ifdef HAVE_SYS_TYPES_H
8853#include <sys/types.h>
8854#endif
8855
Matthias Kloseb9621712010-04-24 17:59:49 +00008856"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008857
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008858else
Matthias Kloseb9621712010-04-24 17:59:49 +00008859 if test "$ac_cv_type_off_t" = yes; then
8860 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008862as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008863See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008864 else
8865 ac_cv_sizeof_off_t=0
8866 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008868
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8871$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008872
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008873
8874
Martin v. Löwis11437992002-04-12 09:54:03 +00008875cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008876#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008877_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008878
Michael W. Hudson54241132001-12-07 15:38:26 +00008879
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008880
Matthias Kloseb9621712010-04-24 17:59:49 +00008881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8882$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008883if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008884 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008885
Matthias Kloseb9621712010-04-24 17:59:49 +00008886$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008887
Matthias Kloseb9621712010-04-24 17:59:49 +00008888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8889$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008890else
Matthias Kloseb9621712010-04-24 17:59:49 +00008891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8892$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008893fi
8894
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008895# The cast to long int works around a bug in the HP C Compiler
8896# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8897# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8898# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8900$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008901if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008902 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008903else
Matthias Kloseb9621712010-04-24 17:59:49 +00008904 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008905#ifdef HAVE_SYS_TYPES_H
8906#include <sys/types.h>
8907#endif
8908#ifdef HAVE_TIME_H
8909#include <time.h>
8910#endif
8911
Matthias Kloseb9621712010-04-24 17:59:49 +00008912"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008913
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008914else
Matthias Kloseb9621712010-04-24 17:59:49 +00008915 if test "$ac_cv_type_time_t" = yes; then
8916 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8917$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008918as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008919See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008920 else
8921 ac_cv_sizeof_time_t=0
8922 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008924
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8927$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008928
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008929
8930
Martin v. Löwis11437992002-04-12 09:54:03 +00008931cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008932#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008933_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008934
Michael W. Hudson54241132001-12-07 15:38:26 +00008935
8936
Trent Mick635f6fb2000-08-23 21:33:05 +00008937# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008938ac_save_cc="$CC"
8939if test "$ac_cv_kpthread" = "yes"
8940then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008941elif test "$ac_cv_kthread" = "yes"
8942then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008943elif test "$ac_cv_pthread" = "yes"
8944then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008945fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008946
Matthias Kloseb9621712010-04-24 17:59:49 +00008947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8948$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008949have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008951/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008952
8953 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008954int
8955main ()
8956{
Guido van Rossum12580492000-09-24 16:47:19 +00008957pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008958 ;
8959 return 0;
8960}
Matthias Kloseb159a552010-04-25 21:00:44 +00008961
Martin v. Löwis11437992002-04-12 09:54:03 +00008962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008963if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008964 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8968$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008969if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008970 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008971# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8972# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8973# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8975$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008976if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008977 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008978else
Matthias Kloseb9621712010-04-24 17:59:49 +00008979 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008980#ifdef HAVE_PTHREAD_H
8981#include <pthread.h>
8982#endif
8983
Matthias Kloseb9621712010-04-24 17:59:49 +00008984"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008985
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008986else
Matthias Kloseb9621712010-04-24 17:59:49 +00008987 if test "$ac_cv_type_pthread_t" = yes; then
8988 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8989$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008990as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008991See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008992 else
8993 ac_cv_sizeof_pthread_t=0
8994 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008996
Trent Mick635f6fb2000-08-23 21:33:05 +00008997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8999$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009000
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009001
9002
Martin v. Löwis11437992002-04-12 09:54:03 +00009003cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009004#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009005_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009006
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009007
Trent Mick635f6fb2000-08-23 21:33:05 +00009008fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009009CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009010
Michael W. Hudson54241132001-12-07 15:38:26 +00009011
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009012case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009013 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009014 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9015 ;;
9016 Darwin/*)
9017 OTHER_LIBTOOL_OPT=""
9018 ;;
9019esac
9020
9021
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009022
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009023case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009024 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009025 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9026 if test "${enable_universalsdk}"; then
9027 :
9028 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009029 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009030 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009031 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009032 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009033 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009034 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009035 if test ${gcc_version} '<' 4.0
9036 then
9037 LIBTOOL_CRUFT="-lcc_dynamic"
9038 else
9039 LIBTOOL_CRUFT=""
9040 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009041 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009042 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009043else
Matthias Kloseb9621712010-04-24 17:59:49 +00009044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009045/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009046
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009047 #include <unistd.h>
9048 int main(int argc, char*argv[])
9049 {
9050 if (sizeof(long) == 4) {
9051 return 0;
9052 } else {
9053 return 1;
9054 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009055 }
9056
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009058if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009059 ac_osx_32bit=yes
9060else
Matthias Kloseb9621712010-04-24 17:59:49 +00009061 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009062fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009063rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9064 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009065fi
9066
9067
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009068 if test "${ac_osx_32bit}" = "yes"; then
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="i386"
9072 ;;
9073 ppc)
9074 MACOSX_DEFAULT_ARCH="ppc"
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 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009081 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009082 i386)
9083 MACOSX_DEFAULT_ARCH="x86_64"
9084 ;;
9085 ppc)
9086 MACOSX_DEFAULT_ARCH="ppc64"
9087 ;;
9088 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009089 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009090 ;;
9091 esac
9092
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009093 fi
9094
9095 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009096 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009097 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009098esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9100$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009101if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009102then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009103 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009104 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009105 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009106
Matthias Kloseb9621712010-04-24 17:59:49 +00009107$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009108
Matthias Kloseb9621712010-04-24 17:59:49 +00009109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9110$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009111 if test $enable_shared = "yes"
9112 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009113 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 +00009114 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009115else
Matthias Kloseb9621712010-04-24 17:59:49 +00009116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9117$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009118fi
9119
Matthias Kloseb9621712010-04-24 17:59:49 +00009120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9121$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009122case $ac_sys_system/$ac_sys_release in
9123 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009124
Matthias Kloseb9621712010-04-24 17:59:49 +00009125$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009126
Matthias Kloseb9621712010-04-24 17:59:49 +00009127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9128$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009129 ;;
9130 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9132$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009133 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009134esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009135
Guido van Rossum0a516c91994-09-12 10:58:40 +00009136# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009137
Michael W. Hudson54241132001-12-07 15:38:26 +00009138
9139
9140
9141
Benjamin Peterson99f03762010-04-11 22:15:28 +00009142
Thomas Wouters477c8d52006-05-27 19:21:47 +00009143
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009144# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9145# -- usually .so, .sl on HP-UX, .dll on Cygwin
9146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9147$as_echo_n "checking the extension of shared libraries... " >&6; }
9148if test -z "$SHLIB_SUFFIX"; then
9149 case $ac_sys_system in
9150 hp*|HP*)
9151 case `uname -m` in
9152 ia64) SHLIB_SUFFIX=.so;;
9153 *) SHLIB_SUFFIX=.sl;;
9154 esac
9155 ;;
9156 CYGWIN*) SHLIB_SUFFIX=.dll;;
9157 *) SHLIB_SUFFIX=.so;;
9158 esac
9159fi
9160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9161$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009162
Guido van Rossum0a516c91994-09-12 10:58:40 +00009163# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009164# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009165# (Shared libraries in this instance are shared modules to be loaded into
9166# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9168$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009169if test -z "$LDSHARED"
9170then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009171 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009172 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009173 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009174 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009175 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009176 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009177 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009178 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009179 if test "$GCC" = "yes" ; then
9180 LDSHARED='$(CC) -shared'
9181 LDCXXSHARED='$(CXX) -shared'
9182 else
9183 LDSHARED='$(CC) -G'
9184 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009185 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009186 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009187 if test "$GCC" = "yes" ; then
9188 LDSHARED='$(CC) -shared'
9189 LDCXXSHARED='$(CXX) -shared'
9190 else
9191 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009192 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009193 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009194 LDSHARED='$(CC) -bundle'
9195 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009196 if test "$enable_framework" ; then
9197 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009198 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9199 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009200 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009201 else
9202 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009203 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009204 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009205 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009206 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009207 LDSHARED='$(CC) -bundle'
9208 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009209 if test "$enable_framework" ; then
9210 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009211 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9212 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009213 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009214 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009215 # No framework, use the Python app as bundle-loader
9216 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009217 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009218 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009219 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009220 Darwin/*)
9221 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9222 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009223
Ned Deily36820b62014-06-25 13:44:22 -07009224 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9225 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9226 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9227 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9228 if test ${dep_target_major} -eq 10 && \
9229 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009230 then
Ned Deily36820b62014-06-25 13:44:22 -07009231 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009232 LDSHARED='$(CC) -bundle'
9233 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009234 if test "$enable_framework" ; then
9235 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009236 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9237 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009238 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009239 else
9240 # No framework, use the Python app as bundle-loader
9241 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9242 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009243 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009244 fi
Ned Deily36820b62014-06-25 13:44:22 -07009245 else
9246 # building for OS X 10.3 and later
9247 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9248 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9249 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009250 fi
9251 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009252 Linux*|GNU*|QNX*)
9253 LDSHARED='$(CC) -shared'
9254 LDCXXSHARED='$(CXX) -shared';;
9255 BSD/OS*/4*)
9256 LDSHARED="gcc -shared"
9257 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009258 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009259 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009260 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009261 LDSHARED='$(CC) -shared'
9262 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009263 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009264 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009265 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009266 OpenBSD*)
9267 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9268 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009269 LDSHARED='$(CC) -shared $(CCSHARED)'
9270 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009271 else
9272 case `uname -r` in
9273 [01].* | 2.[0-7] | 2.[0-7].*)
9274 LDSHARED="ld -Bshareable ${LDFLAGS}"
9275 ;;
9276 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009277 LDSHARED='$(CC) -shared $(CCSHARED)'
9278 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009279 ;;
9280 esac
9281 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009282 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009283 LDSHARED='$(CC) -shared'
9284 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009285 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009286 if test "$GCC" = "yes" ; then
9287 LDSHARED='$(CC) -shared'
9288 LDCXXSHARED='$(CXX) -shared'
9289 else
9290 LDSHARED='$(CC) -G'
9291 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009292 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009293 SCO_SV*)
9294 LDSHARED='$(CC) -Wl,-G,-Bexport'
9295 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9296 CYGWIN*)
9297 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9298 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009299 *) LDSHARED="ld";;
9300 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009301fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9303$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009304LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009305BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009306# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009307# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9309$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009310if test -z "$CCSHARED"
9311then
Guido van Rossum07397971997-04-29 21:49:50 +00009312 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009313 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009314 then CCSHARED="-fPIC";
9315 elif test `uname -p` = sparc;
9316 then CCSHARED="-xcode=pic32";
9317 else CCSHARED="-Kpic";
9318 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009319 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009320 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009321 else CCSHARED="+z";
9322 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009323 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009324 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009325 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009326 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009327 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009328 if test "$GCC" = "yes"
9329 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009330 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009331 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009332 SCO_SV*)
9333 if test "$GCC" = "yes"
9334 then CCSHARED="-fPIC"
9335 else CCSHARED="-Kpic -belf"
9336 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009337 IRIX*/6*) case $CC in
9338 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009339 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009340 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009341 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009342fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9344$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009345# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009346# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9348$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009349if test -z "$LINKFORSHARED"
9350then
Guido van Rossum07397971997-04-29 21:49:50 +00009351 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009352 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009353 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009354 LINKFORSHARED="-Wl,-E -Wl,+s";;
9355# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009356 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009357 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009358 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009359 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009360 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009361 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009362
9363 # Issue #18075: the default maximum stack size (8MBytes) is too
9364 # small for the default recursion limit. Increase the stack size
9365 # to ensure that tests don't crash
9366 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9367
Jack Jansene578a632001-08-15 01:27:14 +00009368 if test "$enable_framework"
9369 then
Jack Jansenda49e192005-01-07 13:08:22 +00009370 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009371 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009372 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009373 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009374 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009375 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009376 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009377 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9378 then
9379 LINKFORSHARED="-Wl,--export-dynamic"
9380 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009381 SunOS/5*) case $CC in
9382 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009383 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009384 then
9385 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009386 fi;;
9387 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009388 CYGWIN*)
9389 if test $enable_shared = "no"
9390 then
9391 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9392 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009393 QNX*)
9394 # -Wl,-E causes the symbols to be added to the dynamic
9395 # symbol table so that they can be found when a module
9396 # is loaded. -N 2048K causes the stack size to be set
9397 # to 2048 kilobytes so that the stack doesn't overflow
9398 # when running test_compile.py.
9399 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009400 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009401fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9403$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009404
Michael W. Hudson54241132001-12-07 15:38:26 +00009405
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009406
Matthias Kloseb9621712010-04-24 17:59:49 +00009407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9408$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009409if test ! "$LIBRARY" = "$LDLIBRARY"
9410then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009411 case $ac_sys_system in
9412 CYGWIN*)
9413 # Cygwin needs CCSHARED when building extension DLLs
9414 # but not when building the interpreter DLL.
9415 CFLAGSFORSHARED='';;
9416 *)
9417 CFLAGSFORSHARED='$(CCSHARED)'
9418 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009419fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9421$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009422
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009423# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9424# library (with --enable-shared).
9425# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009426# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9427# if it is not required, since it creates a dependency of the shared library
9428# to LIBS. This, in turn, means that applications linking the shared libpython
9429# don't need to link LIBS explicitly. The default should be only changed
9430# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009431
Matthias Kloseb9621712010-04-24 17:59:49 +00009432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9433$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009434case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009435 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009436 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009437esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9439$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009440
9441
Guido van Rossum627b2d71993-12-24 10:39:16 +00009442# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9444$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009445if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009446 $as_echo_n "(cached) " >&6
9447else
9448 ac_check_lib_save_LIBS=$LIBS
9449LIBS="-lsendfile $LIBS"
9450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9451/* end confdefs.h. */
9452
9453/* Override any GCC internal prototype to avoid an error.
9454 Use char because int might match the return type of a GCC
9455 builtin and then its argument prototype would still apply. */
9456#ifdef __cplusplus
9457extern "C"
9458#endif
9459char sendfile ();
9460int
9461main ()
9462{
9463return sendfile ();
9464 ;
9465 return 0;
9466}
9467_ACEOF
9468if ac_fn_c_try_link "$LINENO"; then :
9469 ac_cv_lib_sendfile_sendfile=yes
9470else
9471 ac_cv_lib_sendfile_sendfile=no
9472fi
9473rm -f core conftest.err conftest.$ac_objext \
9474 conftest$ac_exeext conftest.$ac_ext
9475LIBS=$ac_check_lib_save_LIBS
9476fi
9477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9478$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009479if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009480 cat >>confdefs.h <<_ACEOF
9481#define HAVE_LIBSENDFILE 1
9482_ACEOF
9483
9484 LIBS="-lsendfile $LIBS"
9485
9486fi
9487
Matthias Kloseb9621712010-04-24 17:59:49 +00009488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9489$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009490if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009491 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009492else
Martin v. Löwis11437992002-04-12 09:54:03 +00009493 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009494LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009496/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009497
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009498/* Override any GCC internal prototype to avoid an error.
9499 Use char because int might match the return type of a GCC
9500 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009501#ifdef __cplusplus
9502extern "C"
9503#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009504char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009505int
9506main ()
9507{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009508return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 ;
9510 return 0;
9511}
9512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009513if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009514 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009515else
Matthias Kloseb9621712010-04-24 17:59:49 +00009516 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009518rm -f core conftest.err conftest.$ac_objext \
9519 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009520LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9523$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009524if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009525 cat >>confdefs.h <<_ACEOF
9526#define HAVE_LIBDL 1
9527_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009528
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009529 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009530
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009531fi
9532 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9534$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009535if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009536 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009537else
Martin v. Löwis11437992002-04-12 09:54:03 +00009538 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009539LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009541/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009543/* Override any GCC internal prototype to avoid an error.
9544 Use char because int might match the return type of a GCC
9545 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009546#ifdef __cplusplus
9547extern "C"
9548#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009549char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009550int
9551main ()
9552{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009553return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009554 ;
9555 return 0;
9556}
9557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009558if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009559 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009560else
Matthias Kloseb9621712010-04-24 17:59:49 +00009561 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009563rm -f core conftest.err conftest.$ac_objext \
9564 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009565LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9568$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009569if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009570 cat >>confdefs.h <<_ACEOF
9571#define HAVE_LIBDLD 1
9572_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009573
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009574 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009575
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009576fi
9577 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009578
Georg Brandlb1441c72009-01-03 22:33:39 +00009579# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009580if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9582$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009583if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009584 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009585else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009586 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009588/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009589
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009590/* Override any GCC internal prototype to avoid an error.
9591 Use char because int might match the return type of a GCC
9592 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009593#ifdef __cplusplus
9594extern "C"
9595#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009596char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009597int
9598main ()
9599{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009600return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009601 ;
9602 return 0;
9603}
9604_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605for ac_lib in '' pthread rt posix4; do
9606 if test -z "$ac_lib"; then
9607 ac_res="none required"
9608 else
9609 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009610 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009611 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009612 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009613 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009614fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009615rm -f core conftest.err conftest.$ac_objext \
9616 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009617 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009620done
Victor Stinnere0be4232011-10-25 13:06:09 +02009621if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009622
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009623else
9624 ac_cv_search_sem_init=no
9625fi
9626rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009627LIBS=$ac_func_search_save_LIBS
9628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9630$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009631ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009632if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009633 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009634
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009635fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009636 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009637 # posix4 on Solaris 2.6
9638 # pthread (first!) on Linux
9639fi
9640
Martin v. Löwis19d17342003-06-14 21:03:05 +00009641# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9643$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009644if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009645 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009646else
9647 ac_check_lib_save_LIBS=$LIBS
9648LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009650/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009651
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009652/* Override any GCC internal prototype to avoid an error.
9653 Use char because int might match the return type of a GCC
9654 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009655#ifdef __cplusplus
9656extern "C"
9657#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009658char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009659int
9660main ()
9661{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009662return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009663 ;
9664 return 0;
9665}
9666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009667if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009668 ac_cv_lib_intl_textdomain=yes
9669else
Matthias Kloseb9621712010-04-24 17:59:49 +00009670 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009672rm -f core conftest.err conftest.$ac_objext \
9673 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009674LIBS=$ac_check_lib_save_LIBS
9675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9677$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009678if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009679
Matthias Kloseb9621712010-04-24 17:59:49 +00009680$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009681
Brett Cannonc6d936e2009-06-07 20:09:53 +00009682 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009683fi
9684
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009685
9686# checks for system dependent C++ extensions support
9687case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009688 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9689$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009691/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009692
Georg Brandl59e87bd2011-02-15 19:48:59 +00009693 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009694int
9695main ()
9696{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009697loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 ;
9699 return 0;
9700}
Matthias Kloseb159a552010-04-25 21:00:44 +00009701
Martin v. Löwis11437992002-04-12 09:54:03 +00009702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009703if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009704
Matthias Kloseb159a552010-04-25 21:00:44 +00009705
Matthias Kloseb9621712010-04-24 17:59:49 +00009706$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009707
Matthias Kloseb159a552010-04-25 21:00:44 +00009708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009709$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009710
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009711else
Matthias Kloseb159a552010-04-25 21:00:44 +00009712
9713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009714$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009715
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009717rm -f core conftest.err conftest.$ac_objext \
9718 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009719 *) ;;
9720esac
9721
Christian Heimes985ecdc2013-11-20 11:46:18 +01009722# check for systems that require aligned memory access
9723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9724$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009725if ${ac_cv_aligned_required+:} false; then :
9726 $as_echo_n "(cached) " >&6
9727else
9728 if test "$cross_compiling" = yes; then :
9729 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009730else
9731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9732/* end confdefs.h. */
9733
9734int main()
9735{
9736 char s[16];
9737 int i, *p1, *p2;
9738 for (i=0; i < 16; i++)
9739 s[i] = i;
9740 p1 = (int*)(s+1);
9741 p2 = (int*)(s+2);
9742 if (*p1 == *p2)
9743 return 1;
9744 return 0;
9745}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009746_ACEOF
9747if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009748 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009749else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009750 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009751fi
9752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9753 conftest.$ac_objext conftest.beam conftest.$ac_ext
9754fi
9755
9756
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009757fi
9758
9759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9760$as_echo "$ac_cv_aligned_required" >&6; }
9761if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009762
9763$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9764
9765fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009766
9767# str, bytes and memoryview hash algorithm
9768
9769
9770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9771$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9772
9773# Check whether --with-hash_algorithm was given.
9774if test "${with_hash_algorithm+set}" = set; then :
9775 withval=$with_hash_algorithm;
9776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9777$as_echo "$withval" >&6; }
9778case "$withval" in
9779 siphash24)
9780 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9781
9782 ;;
9783 fnv)
9784 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9785
9786 ;;
9787 *)
9788 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9789 ;;
9790esac
9791
9792else
9793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9794$as_echo "default" >&6; }
9795fi
9796
9797
Charles-François Natalid30b0222014-05-08 23:08:51 +01009798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9799$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9800
9801# Check whether --with-address_sanitizer was given.
9802if test "${with_address_sanitizer+set}" = set; then :
9803 withval=$with_address_sanitizer;
9804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9805$as_echo "$withval" >&6; }
9806BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9807LDFLAGS="-fsanitize=address $LDFLAGS"
9808
9809else
9810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9811$as_echo "no" >&6; }
9812fi
9813
9814
Guido van Rossum70c7f481998-03-26 18:44:10 +00009815# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9817$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009818if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009819 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009820else
Martin v. Löwis11437992002-04-12 09:54:03 +00009821 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009822LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009826/* Override any GCC internal prototype to avoid an error.
9827 Use char because int might match the return type of a GCC
9828 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009829#ifdef __cplusplus
9830extern "C"
9831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009832char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009833int
9834main ()
9835{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009836return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009837 ;
9838 return 0;
9839}
9840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009841if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009842 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009843else
Matthias Kloseb9621712010-04-24 17:59:49 +00009844 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009846rm -f core conftest.err conftest.$ac_objext \
9847 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009848LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9851$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009852if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009853 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009854fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009855 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9857$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009858if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009859 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009860else
Martin v. Löwis11437992002-04-12 09:54:03 +00009861 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009862LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009865
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009866/* Override any GCC internal prototype to avoid an error.
9867 Use char because int might match the return type of a GCC
9868 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009869#ifdef __cplusplus
9870extern "C"
9871#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009872char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009873int
9874main ()
9875{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009877 ;
9878 return 0;
9879}
9880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009881if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009883else
Matthias Kloseb9621712010-04-24 17:59:49 +00009884 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009886rm -f core conftest.err conftest.$ac_objext \
9887 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009888LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9891$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009892if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009893 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009894fi
9895 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009896
Matthias Kloseb9621712010-04-24 17:59:49 +00009897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9898$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009899
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009900# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009901if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009902 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9904$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009905LIBS="$withval $LIBS"
9906
9907else
Matthias Kloseb9621712010-04-24 17:59:49 +00009908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9909$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009910fi
9911
Guido van Rossum7f43da71994-08-01 12:15:30 +00009912
Victor Stinner8291b5e2015-03-20 16:03:14 +01009913
9914
9915
9916
9917
9918
9919
9920if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9921 if test -n "$ac_tool_prefix"; then
9922 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9923set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9925$as_echo_n "checking for $ac_word... " >&6; }
9926if ${ac_cv_path_PKG_CONFIG+:} false; then :
9927 $as_echo_n "(cached) " >&6
9928else
9929 case $PKG_CONFIG in
9930 [\\/]* | ?:[\\/]*)
9931 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9932 ;;
9933 *)
9934 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9935for as_dir in $PATH
9936do
9937 IFS=$as_save_IFS
9938 test -z "$as_dir" && as_dir=.
9939 for ac_exec_ext in '' $ac_executable_extensions; do
9940 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9941 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9942 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9943 break 2
9944 fi
9945done
9946 done
9947IFS=$as_save_IFS
9948
9949 ;;
9950esac
9951fi
9952PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9953if test -n "$PKG_CONFIG"; then
9954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9955$as_echo "$PKG_CONFIG" >&6; }
9956else
9957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9958$as_echo "no" >&6; }
9959fi
9960
9961
9962fi
9963if test -z "$ac_cv_path_PKG_CONFIG"; then
9964 ac_pt_PKG_CONFIG=$PKG_CONFIG
9965 # Extract the first word of "pkg-config", so it can be a program name with args.
9966set dummy pkg-config; ac_word=$2
9967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9968$as_echo_n "checking for $ac_word... " >&6; }
9969if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9970 $as_echo_n "(cached) " >&6
9971else
9972 case $ac_pt_PKG_CONFIG in
9973 [\\/]* | ?:[\\/]*)
9974 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9975 ;;
9976 *)
9977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9978for as_dir in $PATH
9979do
9980 IFS=$as_save_IFS
9981 test -z "$as_dir" && as_dir=.
9982 for ac_exec_ext in '' $ac_executable_extensions; do
9983 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9984 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9985 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9986 break 2
9987 fi
9988done
9989 done
9990IFS=$as_save_IFS
9991
9992 ;;
9993esac
9994fi
9995ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9996if test -n "$ac_pt_PKG_CONFIG"; then
9997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9998$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9999else
10000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10001$as_echo "no" >&6; }
10002fi
10003
10004 if test "x$ac_pt_PKG_CONFIG" = x; then
10005 PKG_CONFIG=""
10006 else
10007 case $cross_compiling:$ac_tool_warned in
10008yes:)
10009{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10010$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10011ac_tool_warned=yes ;;
10012esac
10013 PKG_CONFIG=$ac_pt_PKG_CONFIG
10014 fi
10015else
10016 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10017fi
10018
10019fi
10020if test -n "$PKG_CONFIG"; then
10021 _pkg_min_version=0.9.0
10022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10023$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10024 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10026$as_echo "yes" >&6; }
10027 else
10028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10029$as_echo "no" >&6; }
10030 PKG_CONFIG=""
10031 fi
10032fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010033
10034# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10036$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010037
10038# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010039if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010040 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010041else
10042 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010043fi
10044
10045
Matthias Kloseb9621712010-04-24 17:59:49 +000010046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10047$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010048
10049# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10051$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010052
10053# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010054if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010055 withval=$with_system_ffi;
10056fi
10057
10058
Zachary Waref40d4dd2016-09-17 01:25:24 -050010059if test "$ac_sys_system" = "Darwin"
10060then
10061 case "$with_system_ffi" in
10062 "")
10063 with_system_ffi="no"
10064 ;;
10065 yes|no)
10066 ;;
10067 *)
10068 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10069 ;;
10070 esac
10071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10072$as_echo "$with_system_ffi" >&6; }
10073else
10074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10075$as_echo "yes" >&6; }
10076 if test "$with_system_ffi" != ""
10077 then
10078 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10079$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10080 fi
10081 with_system_ffi="yes"
10082fi
Zachary Ware935043d2016-09-09 17:01:21 -070010083
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010084if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010085 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10086else
10087 LIBFFI_INCLUDEDIR=""
10088fi
10089
10090
Stefan Krah60187b52012-03-23 19:06:27 +010010091# Check for use of the system libmpdec library
10092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10093$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10094
10095# Check whether --with-system_libmpdec was given.
10096if test "${with_system_libmpdec+set}" = set; then :
10097 withval=$with_system_libmpdec;
10098else
10099 with_system_libmpdec="no"
10100fi
10101
10102
10103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10104$as_echo "$with_system_libmpdec" >&6; }
10105
Benjamin Peterson076ed002010-10-31 17:11:02 +000010106# Check for support for loadable sqlite extensions
10107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10108$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10109# Check whether --enable-loadable-sqlite-extensions was given.
10110if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10111 enableval=$enable_loadable_sqlite_extensions;
10112else
10113 enable_loadable_sqlite_extensions="no"
10114fi
10115
10116
10117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10118$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10119
Ned Deilyd819b932013-09-06 01:07:05 -070010120# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10121
10122
10123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10124$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10125
10126# Check whether --with-tcltk-includes was given.
10127if test "${with_tcltk_includes+set}" = set; then :
10128 withval=$with_tcltk_includes;
10129else
10130 with_tcltk_includes="default"
10131fi
10132
10133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10134$as_echo "$with_tcltk_includes" >&6; }
10135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10136$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10137
10138# Check whether --with-tcltk-libs was given.
10139if test "${with_tcltk_libs+set}" = set; then :
10140 withval=$with_tcltk_libs;
10141else
10142 with_tcltk_libs="default"
10143fi
10144
10145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10146$as_echo "$with_tcltk_libs" >&6; }
10147if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10148then
10149 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10150 then
10151 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10152 fi
10153 TCLTK_INCLUDES=""
10154 TCLTK_LIBS=""
10155else
10156 TCLTK_INCLUDES="$with_tcltk_includes"
10157 TCLTK_LIBS="$with_tcltk_libs"
10158fi
10159
Matthias Klose55708cc2009-04-30 08:06:49 +000010160# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10162$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010163
10164# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010165if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010166 withval=$with_dbmliborder;
10167if test x$with_dbmliborder = xyes
10168then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010169as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010170else
10171 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10172 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10173 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010174 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010175 fi
10176 done
10177fi
10178fi
10179
Matthias Kloseb9621712010-04-24 17:59:49 +000010180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10181$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010182
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010183# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010184
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010185USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010187
Martin v. Löwis11437992002-04-12 09:54:03 +000010188
10189# Templates for things AC_DEFINEd more than once.
10190# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010191
10192
Martin v. Löwis11437992002-04-12 09:54:03 +000010193
Matthias Kloseb9621712010-04-24 17:59:49 +000010194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10195$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010197# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010198if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010199 withval=$with_threads;
10200fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010201
10202
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010203# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010205# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010206if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010207 withval=$with_thread; with_threads=$with_thread
10208fi
10209
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010210
10211if test -z "$with_threads"
10212then with_threads="yes"
10213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10215$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010216
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010217
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010218if test "$with_threads" = "no"
10219then
10220 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010221elif test "$ac_cv_pthread_is_default" = yes
10222then
Matthias Kloseb9621712010-04-24 17:59:49 +000010223 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010224
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010225 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010226 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010227
10228 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010229 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010230elif test "$ac_cv_kpthread" = "yes"
10231then
10232 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010233 if test "$ac_cv_cxx_thread" = "yes"; then
10234 CXX="$CXX -Kpthread"
10235 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010236 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010237
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010238 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010239 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010240elif test "$ac_cv_kthread" = "yes"
10241then
10242 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010243 if test "$ac_cv_cxx_thread" = "yes"; then
10244 CXX="$CXX -Kthread"
10245 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010246 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010247
10248 posix_threads=yes
10249 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010250elif test "$ac_cv_pthread" = "yes"
10251then
10252 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010253 if test "$ac_cv_cxx_thread" = "yes"; then
10254 CXX="$CXX -pthread"
10255 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010256 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010257
10258 posix_threads=yes
10259 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010260else
10261 if test ! -z "$with_threads" -a -d "$with_threads"
10262 then LDFLAGS="$LDFLAGS -L$with_threads"
10263 fi
10264 if test ! -z "$withval" -a -d "$withval"
10265 then LDFLAGS="$LDFLAGS -L$withval"
10266 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010267
10268 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010269 # define _POSIX_THREADS in unistd.h. Some apparently don't
10270 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10272$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010274/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010275
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010276#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010277#ifdef _POSIX_THREADS
10278yes
10279#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010280
10281_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010282if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010283 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010284 unistd_defines_pthreads=yes
10285else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010286 unistd_defines_pthreads=no
10287fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010288rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010289
Matthias Kloseb9621712010-04-24 17:59:49 +000010290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10291$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010292
Matthias Kloseb9621712010-04-24 17:59:49 +000010293 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010294
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010295 # Just looking for pthread_create in libpthread is not enough:
10296 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10297 # So we really have to include pthread.h, and then link.
10298 _libs=$LIBS
10299 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10301$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010303/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010304
10305#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010306#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010307
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010308void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010309int
10310main ()
10311{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010312
10313pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010314 ;
10315 return 0;
10316}
10317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010318if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010319
Matthias Kloseb9621712010-04-24 17:59:49 +000010320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10321$as_echo "yes" >&6; }
10322 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010323
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010324 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010325 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010326else
Martin v. Löwis11437992002-04-12 09:54:03 +000010327
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010328 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010329 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010330if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010331 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010332
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010333 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010334 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010335else
Guido van Rossumad678af1998-10-02 14:42:15 +000010336
Matthias Kloseb9621712010-04-24 17:59:49 +000010337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10338$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010339if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010340 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010341else
Martin v. Löwis11437992002-04-12 09:54:03 +000010342 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010343LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010345/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010347/* Override any GCC internal prototype to avoid an error.
10348 Use char because int might match the return type of a GCC
10349 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010350#ifdef __cplusplus
10351extern "C"
10352#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010353char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010354int
10355main ()
10356{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010357return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010358 ;
10359 return 0;
10360}
10361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010362if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010363 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010364else
Matthias Kloseb9621712010-04-24 17:59:49 +000010365 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010366fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010367rm -f core conftest.err conftest.$ac_objext \
10368 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010369LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010370fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10372$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010373if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010374 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010375
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010376 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010377 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010378 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010379else
Greg Steinadf63d62000-07-05 10:38:09 +000010380
Matthias Kloseb9621712010-04-24 17:59:49 +000010381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10382$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010383if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010384 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010385else
Martin v. Löwis11437992002-04-12 09:54:03 +000010386 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010387LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010390
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010391/* Override any GCC internal prototype to avoid an error.
10392 Use char because int might match the return type of a GCC
10393 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010394#ifdef __cplusplus
10395extern "C"
10396#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010397char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010398int
10399main ()
10400{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010401return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010402 ;
10403 return 0;
10404}
10405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010406if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010407 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010408else
Matthias Kloseb9621712010-04-24 17:59:49 +000010409 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010410fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010411rm -f core conftest.err conftest.$ac_objext \
10412 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010413LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10416$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010417if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010418 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010419
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010420 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010421 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010422 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010423else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010424
Matthias Kloseb9621712010-04-24 17:59:49 +000010425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10426$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010427if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010428 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010429else
Martin v. Löwis11437992002-04-12 09:54:03 +000010430 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010431LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010433/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010434
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010435/* Override any GCC internal prototype to avoid an error.
10436 Use char because int might match the return type of a GCC
10437 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010438#ifdef __cplusplus
10439extern "C"
10440#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010441char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010442int
10443main ()
10444{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010445return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010446 ;
10447 return 0;
10448}
10449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010450if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010451 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010452else
Matthias Kloseb9621712010-04-24 17:59:49 +000010453 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010454fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010455rm -f core conftest.err conftest.$ac_objext \
10456 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010457LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010458fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10460$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010461if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010462 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010463
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010464 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010465 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010466 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010467else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010468
Matthias Kloseb9621712010-04-24 17:59:49 +000010469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10470$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010471if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010472 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010473else
Martin v. Löwis11437992002-04-12 09:54:03 +000010474 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010475LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010477/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010478
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010479/* Override any GCC internal prototype to avoid an error.
10480 Use char because int might match the return type of a GCC
10481 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010482#ifdef __cplusplus
10483extern "C"
10484#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010485char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010486int
10487main ()
10488{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010489return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010490 ;
10491 return 0;
10492}
10493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010494if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010495 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010496else
Matthias Kloseb9621712010-04-24 17:59:49 +000010497 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010498fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010499rm -f core conftest.err conftest.$ac_objext \
10500 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010501LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010502fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10504$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010505if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010506 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010507
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010508 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010509 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010510 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010511else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010512
Martin v. Löwis130fb172001-07-19 11:00:41 +000010513 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010514fi
10515
Guido van Rossum627b2d71993-12-24 10:39:16 +000010516
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010517fi
10518
Guido van Rossum0be3e491997-05-22 20:33:33 +000010519fi
10520
Guido van Rossum49545951997-12-02 19:28:29 +000010521fi
10522
Guido van Rossumb93a8621998-05-07 13:27:32 +000010523fi
10524
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010525fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010526rm -f core conftest.err conftest.$ac_objext \
10527 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010528
Matthias Kloseb9621712010-04-24 17:59:49 +000010529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10530$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010531if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010532 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010533else
Martin v. Löwis11437992002-04-12 09:54:03 +000010534 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010535LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010537/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010538
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010539/* Override any GCC internal prototype to avoid an error.
10540 Use char because int might match the return type of a GCC
10541 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010542#ifdef __cplusplus
10543extern "C"
10544#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010545char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010546int
10547main ()
10548{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010549return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010550 ;
10551 return 0;
10552}
10553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010554if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010555 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010556else
Matthias Kloseb9621712010-04-24 17:59:49 +000010557 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010558fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010559rm -f core conftest.err conftest.$ac_objext \
10560 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010561LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10564$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010565if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010566 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010567
Martin v. Löwis130fb172001-07-19 11:00:41 +000010568 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010569 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010570 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010571fi
10572
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010573
Neal Norwitza978ab02002-11-02 16:58:05 +000010574 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10576$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010577if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010578 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010579else
Martin v. Löwis11437992002-04-12 09:54:03 +000010580 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010581LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010585/* Override any GCC internal prototype to avoid an error.
10586 Use char because int might match the return type of a GCC
10587 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010588#ifdef __cplusplus
10589extern "C"
10590#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010591char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010592int
10593main ()
10594{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010595return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010596 ;
10597 return 0;
10598}
10599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010600if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010601 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010602else
Matthias Kloseb9621712010-04-24 17:59:49 +000010603 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010605rm -f core conftest.err conftest.$ac_objext \
10606 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010607LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010608fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10610$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010611if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010612 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010613
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010614 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010615 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010616 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010617fi
10618
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010619 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010620fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010621
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010622if test "$posix_threads" = "yes"; then
10623 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010624
Matthias Kloseb9621712010-04-24 17:59:49 +000010625$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010626
10627 fi
10628
10629 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10630 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010631 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010632$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010633
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010634 ;;
10635 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010636$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010637
10638 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010639 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010640$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010641
10642 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010643 esac
10644
Matthias Kloseb9621712010-04-24 17:59:49 +000010645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10646$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010647 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010648 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010649else
Matthias Kloseb9621712010-04-24 17:59:49 +000010650 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010651 ac_cv_pthread_system_supported=no
10652else
Matthias Kloseb9621712010-04-24 17:59:49 +000010653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010654/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010655
10656 #include <stdio.h>
10657 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010658 void *foo(void *parm) {
10659 return NULL;
10660 }
10661 main() {
10662 pthread_attr_t attr;
10663 pthread_t id;
10664 if (pthread_attr_init(&attr)) exit(-1);
10665 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10666 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10667 exit(0);
10668 }
10669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010670if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010671 ac_cv_pthread_system_supported=yes
10672else
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010674fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10676 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010677fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010678
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010679
Guido van Rossum627b2d71993-12-24 10:39:16 +000010680fi
10681
Matthias Kloseb9621712010-04-24 17:59:49 +000010682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10683$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010684 if test "$ac_cv_pthread_system_supported" = "yes"; then
10685
Matthias Kloseb9621712010-04-24 17:59:49 +000010686$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010687
10688 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010689 for ac_func in pthread_sigmask
10690do :
10691 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010692if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010693 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010694#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010695_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010696 case $ac_sys_system in
10697 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010698
Matthias Kloseb9621712010-04-24 17:59:49 +000010699$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010700
10701 ;;
10702 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010703fi
10704done
10705
Christian Heimesf77b4b22013-08-21 13:26:05 +020010706 for ac_func in pthread_atfork
10707do :
10708 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10709if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10710 cat >>confdefs.h <<_ACEOF
10711#define HAVE_PTHREAD_ATFORK 1
10712_ACEOF
10713
10714fi
10715done
10716
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010717fi
10718
10719
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010720# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010721
Matthias Kloseb9621712010-04-24 17:59:49 +000010722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10723$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010724# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010725if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010726 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010727 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10729$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010730 ipv6=no
10731 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010732 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10733$as_echo "yes" >&6; }
10734 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010735
10736 ipv6=yes
10737 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010738 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010739else
Martin v. Löwis11437992002-04-12 09:54:03 +000010740
Matthias Kloseb9621712010-04-24 17:59:49 +000010741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010742/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010743 /* AF_INET6 available check */
10744#include <sys/types.h>
10745#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010746int
10747main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010748{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010749int domain = AF_INET6;
10750 ;
10751 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010752}
Martin v. Löwis11437992002-04-12 09:54:03 +000010753_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010754if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010755
Matthias Kloseb9621712010-04-24 17:59:49 +000010756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10757$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010758 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010759
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010760else
Matthias Kloseb159a552010-04-25 21:00:44 +000010761
Matthias Kloseb9621712010-04-24 17:59:49 +000010762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10763$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010764 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010765
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010766fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010768
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010769if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10771$as_echo_n "checking if RFC2553 API is available... " >&6; }
10772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010773/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010774
10775 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010776#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010777int
10778main ()
10779{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010780struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010781 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010782 ;
10783 return 0;
10784}
Matthias Kloseb159a552010-04-25 21:00:44 +000010785
Martin v. Löwis11437992002-04-12 09:54:03 +000010786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010787if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010788
10789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010790$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010791 ipv6=yes
10792
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010793else
Matthias Kloseb159a552010-04-25 21:00:44 +000010794
10795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010796$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010797 ipv6=no
10798
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010799fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010801fi
10802
10803if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010804 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010805
10806fi
10807
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010808fi
10809
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010810
10811ipv6type=unknown
10812ipv6lib=none
10813ipv6trylibc=no
10814
10815if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10817$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010818 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10819 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010820 case $i in
10821 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010823/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010824
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010825#include <netinet/in.h>
10826#ifdef IPV6_INRIA_VERSION
10827yes
10828#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010829_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010830if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010831 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010832 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010834rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835
10836 ;;
10837 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010839/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010840
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010841#include <netinet/in.h>
10842#ifdef __KAME__
10843yes
10844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010845_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010847 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010848 ipv6type=$i;
10849 ipv6lib=inet6
10850 ipv6libdir=/usr/local/v6/lib
10851 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010852fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010853rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010854
10855 ;;
10856 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010858/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010859
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010860#include <features.h>
10861#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10862yes
10863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010864_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010865if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010866 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010867 ipv6type=$i;
10868 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010869fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010870rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010871
10872 ;;
10873 linux-inet6)
10874 if test -d /usr/inet6; then
10875 ipv6type=$i
10876 ipv6lib=inet6
10877 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010878 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010879 fi
10880 ;;
10881 solaris)
10882 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010883 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010884 ipv6type=$i
10885 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010886 fi
10887 fi
10888 ;;
10889 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010891/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010892
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010893#include <sys/param.h>
10894#ifdef _TOSHIBA_INET6
10895yes
10896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010897_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010898if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010899 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010900 ipv6type=$i;
10901 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010902 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010903fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010904rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010905
10906 ;;
10907 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010909/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010910
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010911#include </usr/local/v6/include/sys/v6config.h>
10912#ifdef __V6D__
10913yes
10914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010915_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010916if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010917 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010918 ipv6type=$i;
10919 ipv6lib=v6;
10920 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010921 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010922fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010923rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010924
10925 ;;
10926 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010928/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010929
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010930#include <sys/param.h>
10931#ifdef _ZETA_MINAMI_INET6
10932yes
10933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010934_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010935if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010936 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010937 ipv6type=$i;
10938 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010939 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010940fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010941rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010942
10943 ;;
10944 esac
10945 if test "$ipv6type" != "unknown"; then
10946 break
10947 fi
10948 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10950$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010951fi
10952
10953if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10954 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10955 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10956 echo "using lib$ipv6lib"
10957 else
10958 if test $ipv6trylibc = "yes"; then
10959 echo "using libc"
10960 else
10961 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10962 echo "You need to fetch lib$ipv6lib.a from appropriate"
10963 echo 'ipv6 kit and compile beforehand.'
10964 exit 1
10965 fi
10966 fi
10967fi
10968
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10970$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10972/* end confdefs.h. */
10973 /* CAN_RAW_FD_FRAMES available check */
10974#include <linux/can/raw.h>
10975int
10976main ()
10977{
10978int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10979 ;
10980 return 0;
10981}
10982_ACEOF
10983if ac_fn_c_try_compile "$LINENO"; then :
10984
10985
10986$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10987
10988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10989$as_echo "yes" >&6; }
10990
10991else
10992
10993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10994$as_echo "no" >&6; }
10995
10996fi
10997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10998
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010999# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11001$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011002
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011003# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011004if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011005 withval=$with_doc_strings;
11006fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011007
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011008
11009if test -z "$with_doc_strings"
11010then with_doc_strings="yes"
11011fi
11012if test "$with_doc_strings" != "no"
11013then
11014
Matthias Kloseb9621712010-04-24 17:59:49 +000011015$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011016
11017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11019$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011020
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011021# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11023$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011025# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011026if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011027 withval=$with_pymalloc;
11028fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011029
Neil Schemenauera35c6882001-02-27 04:45:05 +000011030
Neil Schemenauer16c22972002-03-22 15:34:49 +000011031if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011032then
11033 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011034fi
11035if test "$with_pymalloc" != "no"
11036then
Martin v. Löwis11437992002-04-12 09:54:03 +000011037
Matthias Kloseb9621712010-04-24 17:59:49 +000011038$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011039
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011040 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11043$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011044
Benjamin Peterson05159c42009-12-03 03:01:27 +000011045# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11047$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011048
11049# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011050if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011051 withval=$with_valgrind;
11052else
11053 with_valgrind=no
11054fi
11055
Matthias Kloseb9621712010-04-24 17:59:49 +000011056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11057$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011058if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011059 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 +020011060if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011061
Matthias Kloseb9621712010-04-24 17:59:49 +000011062$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011063
11064else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011065 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011066
11067fi
11068
11069
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011070 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011071fi
11072
Łukasz Langaa785c872016-09-09 17:37:37 -070011073# Check for DTrace support
11074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11075$as_echo_n "checking for --with-dtrace... " >&6; }
11076
11077# Check whether --with-dtrace was given.
11078if test "${with_dtrace+set}" = set; then :
11079 withval=$with_dtrace;
11080else
11081 with_dtrace=no
11082fi
11083
11084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11085$as_echo "$with_dtrace" >&6; }
11086
11087
11088
11089
11090
11091DTRACE=
11092DFLAGS=
11093DTRACE_HEADERS=
11094DTRACE_OBJS=
11095
11096if test "$with_dtrace" = "yes"
11097then
11098 # Extract the first word of "dtrace", so it can be a program name with args.
11099set dummy dtrace; ac_word=$2
11100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11101$as_echo_n "checking for $ac_word... " >&6; }
11102if ${ac_cv_path_DTRACE+:} false; then :
11103 $as_echo_n "(cached) " >&6
11104else
11105 case $DTRACE in
11106 [\\/]* | ?:[\\/]*)
11107 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11108 ;;
11109 *)
11110 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11111for as_dir in $PATH
11112do
11113 IFS=$as_save_IFS
11114 test -z "$as_dir" && as_dir=.
11115 for ac_exec_ext in '' $ac_executable_extensions; do
11116 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11117 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11119 break 2
11120 fi
11121done
11122 done
11123IFS=$as_save_IFS
11124
11125 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11126 ;;
11127esac
11128fi
11129DTRACE=$ac_cv_path_DTRACE
11130if test -n "$DTRACE"; then
11131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11132$as_echo "$DTRACE" >&6; }
11133else
11134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11135$as_echo "no" >&6; }
11136fi
11137
11138
11139 if test "$DTRACE" = "not found"; then
11140 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11141 fi
11142
11143$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11144
11145 DTRACE_HEADERS="Include/pydtrace_probes.h"
11146
11147 # On OS X, DTrace providers do not need to be explicitly compiled and
11148 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11149 # generation flag '-G'. We check for presence of this flag, rather than
11150 # hardcoding support by OS, in the interest of robustness.
11151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11152$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11153if ${ac_cv_dtrace_link+:} false; then :
11154 $as_echo_n "(cached) " >&6
11155else
11156 ac_cv_dtrace_link=no
11157 echo 'BEGIN' > conftest.d
11158 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11159 ac_cv_dtrace_link=yes
11160
11161fi
11162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11163$as_echo "$ac_cv_dtrace_link" >&6; }
11164 if test "$ac_cv_dtrace_link" = "yes"; then
11165 DTRACE_OBJS="Python/pydtrace.o"
11166 fi
11167fi
11168
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011169# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011170
Guido van Rossum98935bf2001-09-05 19:13:16 +000011171DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011172
Guido van Rossume97ee181999-12-20 21:27:22 +000011173# the dlopen() function means we might want to use dynload_shlib.o. some
11174# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011175for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011176do :
11177 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011178if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011179 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011180#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011181_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011182
Guido van Rossume97ee181999-12-20 21:27:22 +000011183fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011184done
Guido van Rossume97ee181999-12-20 21:27:22 +000011185
Michael W. Hudson54241132001-12-07 15:38:26 +000011186
Guido van Rossume97ee181999-12-20 21:27:22 +000011187# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11188# loading of modules.
11189
Matthias Kloseb9621712010-04-24 17:59:49 +000011190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11191$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011192if test -z "$DYNLOADFILE"
11193then
11194 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011195 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11196 if test "$ac_cv_func_dlopen" = yes
11197 then DYNLOADFILE="dynload_shlib.o"
11198 else DYNLOADFILE="dynload_aix.o"
11199 fi
11200 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011201 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011202 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11203 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011204 *)
11205 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11206 # out any dynamic loading
11207 if test "$ac_cv_func_dlopen" = yes
11208 then DYNLOADFILE="dynload_shlib.o"
11209 else DYNLOADFILE="dynload_stub.o"
11210 fi
11211 ;;
11212 esac
11213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11215$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011216if test "$DYNLOADFILE" != "dynload_stub.o"
11217then
Martin v. Löwis11437992002-04-12 09:54:03 +000011218
Matthias Kloseb9621712010-04-24 17:59:49 +000011219$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011220
11221fi
11222
Neil Schemenauer4e425612001-06-19 15:44:15 +000011223# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11224
Michael W. Hudson54241132001-12-07 15:38:26 +000011225
Matthias Kloseb9621712010-04-24 17:59:49 +000011226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11227$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011228if test -z "$MACHDEP_OBJS"
11229then
Jack Jansene578a632001-08-15 01:27:14 +000011230 MACHDEP_OBJS=$extra_machdep_objs
11231else
11232 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011233fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011234if test -z "$MACHDEP_OBJS"; then
11235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11236$as_echo "none" >&6; }
11237else
11238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11239$as_echo "$MACHDEP_OBJS" >&6; }
11240fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011241
Guido van Rossum627b2d71993-12-24 10:39:16 +000011242# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011243for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011244 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011245 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011246 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011247 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011248 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011249 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011250 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011251 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011252 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011253 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011254 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011255 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011256 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011257 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11258 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011259 sigaction sigaltstack siginterrupt sigpending sigrelse \
11260 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011261 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011262 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011263 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011264do :
11265 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11266ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011267if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011268 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011269#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011270_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011271
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011272fi
11273done
11274
Michael W. Hudson54241132001-12-07 15:38:26 +000011275
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011276ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11277 #include <dirent.h>
11278"
11279if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11280
11281$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11282
11283fi
11284
11285
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011286# For some functions, having a definition is not sufficient, since
11287# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11289$as_echo_n "checking for chroot... " >&6; }
11290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011291/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011292#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011293int
11294main ()
11295{
11296void *x=chroot
11297 ;
11298 return 0;
11299}
11300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011301if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011302
Matthias Kloseb9621712010-04-24 17:59:49 +000011303$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011304
Matthias Kloseb159a552010-04-25 21:00:44 +000011305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011306$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011307else
Matthias Kloseb9621712010-04-24 17:59:49 +000011308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11309$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011310
11311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11314$as_echo_n "checking for link... " >&6; }
11315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011316/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011317#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011318int
11319main ()
11320{
11321void *x=link
11322 ;
11323 return 0;
11324}
11325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011326if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011327
Matthias Kloseb9621712010-04-24 17:59:49 +000011328$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011329
Matthias Kloseb159a552010-04-25 21:00:44 +000011330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011331$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011332else
Matthias Kloseb9621712010-04-24 17:59:49 +000011333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11334$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011335
11336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11339$as_echo_n "checking for symlink... " >&6; }
11340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011341/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011342#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011343int
11344main ()
11345{
11346void *x=symlink
11347 ;
11348 return 0;
11349}
11350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011351if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011352
Matthias Kloseb9621712010-04-24 17:59:49 +000011353$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011354
Matthias Kloseb159a552010-04-25 21:00:44 +000011355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011356$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011357else
Matthias Kloseb9621712010-04-24 17:59:49 +000011358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11359$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011360
11361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11364$as_echo_n "checking for fchdir... " >&6; }
11365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011366/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011367#include <unistd.h>
11368int
11369main ()
11370{
11371void *x=fchdir
11372 ;
11373 return 0;
11374}
11375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011376if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011377
Matthias Kloseb9621712010-04-24 17:59:49 +000011378$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011379
Matthias Kloseb159a552010-04-25 21:00:44 +000011380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011381$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011382else
Matthias Kloseb9621712010-04-24 17:59:49 +000011383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11384$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011385
11386fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11389$as_echo_n "checking for fsync... " >&6; }
11390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011391/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011392#include <unistd.h>
11393int
11394main ()
11395{
11396void *x=fsync
11397 ;
11398 return 0;
11399}
11400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011401if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011402
Matthias Kloseb9621712010-04-24 17:59:49 +000011403$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011404
Matthias Kloseb159a552010-04-25 21:00:44 +000011405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011406$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011407else
Matthias Kloseb9621712010-04-24 17:59:49 +000011408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11409$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011410
11411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11414$as_echo_n "checking for fdatasync... " >&6; }
11415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011416/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011417#include <unistd.h>
11418int
11419main ()
11420{
11421void *x=fdatasync
11422 ;
11423 return 0;
11424}
11425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011426if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011427
Matthias Kloseb9621712010-04-24 17:59:49 +000011428$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011429
Matthias Kloseb159a552010-04-25 21:00:44 +000011430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011431$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011432else
Matthias Kloseb9621712010-04-24 17:59:49 +000011433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11434$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011435
11436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11439$as_echo_n "checking for epoll... " >&6; }
11440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011441/* end confdefs.h. */
11442#include <sys/epoll.h>
11443int
11444main ()
11445{
11446void *x=epoll_create
11447 ;
11448 return 0;
11449}
11450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011451if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011452
Matthias Kloseb9621712010-04-24 17:59:49 +000011453$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011454
Matthias Kloseb159a552010-04-25 21:00:44 +000011455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011456$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011457else
Matthias Kloseb9621712010-04-24 17:59:49 +000011458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11459$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011460
11461fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11464$as_echo_n "checking for epoll_create1... " >&6; }
11465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11466/* end confdefs.h. */
11467#include <sys/epoll.h>
11468int
11469main ()
11470{
11471void *x=epoll_create1
11472 ;
11473 return 0;
11474}
11475_ACEOF
11476if ac_fn_c_try_compile "$LINENO"; then :
11477
11478$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11479
11480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11481$as_echo "yes" >&6; }
11482else
11483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11484$as_echo "no" >&6; }
11485
11486fi
11487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11489$as_echo_n "checking for kqueue... " >&6; }
11490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011491/* end confdefs.h. */
11492
11493#include <sys/types.h>
11494#include <sys/event.h>
11495
11496int
11497main ()
11498{
11499int x=kqueue()
11500 ;
11501 return 0;
11502}
11503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011504if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011505
Matthias Kloseb9621712010-04-24 17:59:49 +000011506$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011507
Matthias Kloseb159a552010-04-25 21:00:44 +000011508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011509$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011510else
Matthias Kloseb9621712010-04-24 17:59:49 +000011511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11512$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011513
11514fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11517$as_echo_n "checking for prlimit... " >&6; }
11518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11519/* end confdefs.h. */
11520
11521#include <sys/time.h>
11522#include <sys/resource.h>
11523
11524int
11525main ()
11526{
11527void *x=prlimit
11528 ;
11529 return 0;
11530}
11531_ACEOF
11532if ac_fn_c_try_compile "$LINENO"; then :
11533
11534$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11535
11536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11537$as_echo "yes" >&6; }
11538else
11539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11540$as_echo "no" >&6; }
11541
11542fi
11543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11544
Martin v. Löwisd5843682002-11-21 20:41:28 +000011545# On some systems (eg. FreeBSD 5), we would find a definition of the
11546# functions ctermid_r, setgroups in the library, but no prototype
11547# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11548# address to avoid compiler warnings and potential miscompilations
11549# because of the missing prototypes.
11550
Matthias Kloseb9621712010-04-24 17:59:49 +000011551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11552$as_echo_n "checking for ctermid_r... " >&6; }
11553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011554/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011555
Martin v. Löwisd5843682002-11-21 20:41:28 +000011556#include <stdio.h>
11557
Martin v. Löwisd5843682002-11-21 20:41:28 +000011558int
11559main ()
11560{
11561void* p = ctermid_r
11562 ;
11563 return 0;
11564}
11565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011566if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011567
Matthias Kloseb9621712010-04-24 17:59:49 +000011568$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011569
Matthias Kloseb159a552010-04-25 21:00:44 +000011570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011571$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011572else
Matthias Kloseb9621712010-04-24 17:59:49 +000011573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11574$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011575
11576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11578
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11580$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011581if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011582 $as_echo_n "(cached) " >&6
11583else
11584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011585/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011586#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011587int
11588main ()
11589{
11590void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011591
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011592 ;
11593 return 0;
11594}
11595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011596if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011597 ac_cv_flock_decl=yes
11598else
11599 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011600
11601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011603
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011604fi
11605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11606$as_echo "$ac_cv_flock_decl" >&6; }
11607if test "x${ac_cv_flock_decl}" = xyes; then
11608 for ac_func in flock
11609do :
11610 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011611if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011612 cat >>confdefs.h <<_ACEOF
11613#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011614_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011615
Antoine Pitroua3000072010-09-07 14:52:42 +000011616else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011618$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011619if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011620 $as_echo_n "(cached) " >&6
11621else
11622 ac_check_lib_save_LIBS=$LIBS
11623LIBS="-lbsd $LIBS"
11624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11625/* end confdefs.h. */
11626
11627/* Override any GCC internal prototype to avoid an error.
11628 Use char because int might match the return type of a GCC
11629 builtin and then its argument prototype would still apply. */
11630#ifdef __cplusplus
11631extern "C"
11632#endif
11633char flock ();
11634int
11635main ()
11636{
11637return flock ();
11638 ;
11639 return 0;
11640}
11641_ACEOF
11642if ac_fn_c_try_link "$LINENO"; then :
11643 ac_cv_lib_bsd_flock=yes
11644else
11645 ac_cv_lib_bsd_flock=no
11646fi
11647rm -f core conftest.err conftest.$ac_objext \
11648 conftest$ac_exeext conftest.$ac_ext
11649LIBS=$ac_check_lib_save_LIBS
11650fi
11651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11652$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011653if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011654 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011655
11656
11657$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11658
11659
11660fi
11661
11662
11663fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011664done
11665
Antoine Pitroua3000072010-09-07 14:52:42 +000011666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011667
Matthias Kloseb9621712010-04-24 17:59:49 +000011668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11669$as_echo_n "checking for getpagesize... " >&6; }
11670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011671/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011672
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011673#include <unistd.h>
11674
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011675int
11676main ()
11677{
11678void* p = getpagesize
11679 ;
11680 return 0;
11681}
11682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011683if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011684
Matthias Kloseb9621712010-04-24 17:59:49 +000011685$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011686
Matthias Kloseb159a552010-04-25 21:00:44 +000011687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011688$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011689else
Matthias Kloseb9621712010-04-24 17:59:49 +000011690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11691$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011692
11693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011695
Victor Stinner984890f2011-11-24 13:53:38 +010011696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11697$as_echo_n "checking for broken unsetenv... " >&6; }
11698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11699/* end confdefs.h. */
11700
11701#include <stdlib.h>
11702
11703int
11704main ()
11705{
11706int res = unsetenv("DUMMY")
11707 ;
11708 return 0;
11709}
11710_ACEOF
11711if ac_fn_c_try_compile "$LINENO"; then :
11712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11713$as_echo "no" >&6; }
11714else
11715
11716$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11717
11718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11719$as_echo "yes" >&6; }
11720
11721fi
11722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11723
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011724for ac_prog in true
11725do
11726 # Extract the first word of "$ac_prog", so it can be a program name with args.
11727set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11729$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011730if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011731 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011732else
11733 if test -n "$TRUE"; then
11734 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11735else
11736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11737for as_dir in $PATH
11738do
11739 IFS=$as_save_IFS
11740 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011741 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011742 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011743 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011744 $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 +000011745 break 2
11746 fi
11747done
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011749IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011750
11751fi
11752fi
11753TRUE=$ac_cv_prog_TRUE
11754if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11756$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011757else
Matthias Kloseb9621712010-04-24 17:59:49 +000011758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11759$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011760fi
11761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011762
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011763 test -n "$TRUE" && break
11764done
11765test -n "$TRUE" || TRUE="/bin/true"
11766
11767
Matthias Kloseb9621712010-04-24 17:59:49 +000011768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11769$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011770if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011771 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011772else
11773 ac_check_lib_save_LIBS=$LIBS
11774LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011776/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011777
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011778/* Override any GCC internal prototype to avoid an error.
11779 Use char because int might match the return type of a GCC
11780 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011781#ifdef __cplusplus
11782extern "C"
11783#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011784char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011785int
11786main ()
11787{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011788return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011789 ;
11790 return 0;
11791}
11792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011793if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011794 ac_cv_lib_c_inet_aton=yes
11795else
Matthias Kloseb9621712010-04-24 17:59:49 +000011796 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011798rm -f core conftest.err conftest.$ac_objext \
11799 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011800LIBS=$ac_check_lib_save_LIBS
11801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11803$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011804if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011805 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011806else
Matthias Kloseb9621712010-04-24 17:59:49 +000011807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11808$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011809if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011810 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011811else
11812 ac_check_lib_save_LIBS=$LIBS
11813LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011815/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011816
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011817/* Override any GCC internal prototype to avoid an error.
11818 Use char because int might match the return type of a GCC
11819 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011820#ifdef __cplusplus
11821extern "C"
11822#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011823char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011824int
11825main ()
11826{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011827return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011828 ;
11829 return 0;
11830}
11831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011832if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011833 ac_cv_lib_resolv_inet_aton=yes
11834else
Matthias Kloseb9621712010-04-24 17:59:49 +000011835 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011836fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011837rm -f core conftest.err conftest.$ac_objext \
11838 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011839LIBS=$ac_check_lib_save_LIBS
11840fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11842$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011843if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011844 cat >>confdefs.h <<_ACEOF
11845#define HAVE_LIBRESOLV 1
11846_ACEOF
11847
11848 LIBS="-lresolv $LIBS"
11849
11850fi
11851
11852
11853fi
11854
11855
Christian Heimesd0764e22007-12-04 15:00:33 +000011856# On Tru64, chflags seems to be present, but calling it will
11857# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11859$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011860if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011861 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011862else
Matthias Kloseb9621712010-04-24 17:59:49 +000011863 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011864 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011865else
Matthias Kloseb9621712010-04-24 17:59:49 +000011866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011867/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011868
Christian Heimesd0764e22007-12-04 15:00:33 +000011869#include <sys/stat.h>
11870#include <unistd.h>
11871int main(int argc, char*argv[])
11872{
11873 if(chflags(argv[0], 0) != 0)
11874 return 1;
11875 return 0;
11876}
Ned Deily3eb67d52011-06-28 00:00:28 -070011877
Christian Heimesd0764e22007-12-04 15:00:33 +000011878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011879if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011880 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011881else
Matthias Kloseb9621712010-04-24 17:59:49 +000011882 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011883fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11885 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011886fi
11887
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011888
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11891$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011892if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011893 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011894if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011895 ac_cv_have_chflags="yes"
11896else
11897 ac_cv_have_chflags="no"
11898fi
11899
11900fi
11901if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011902
Matthias Kloseb9621712010-04-24 17:59:49 +000011903$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011904
11905fi
11906
Matthias Kloseb9621712010-04-24 17:59:49 +000011907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11908$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011909if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011910 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011911else
Matthias Kloseb9621712010-04-24 17:59:49 +000011912 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011913 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011914else
Matthias Kloseb9621712010-04-24 17:59:49 +000011915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011916/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011917
Christian Heimesd0764e22007-12-04 15:00:33 +000011918#include <sys/stat.h>
11919#include <unistd.h>
11920int main(int argc, char*argv[])
11921{
11922 if(lchflags(argv[0], 0) != 0)
11923 return 1;
11924 return 0;
11925}
Ned Deily3eb67d52011-06-28 00:00:28 -070011926
Christian Heimesd0764e22007-12-04 15:00:33 +000011927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011928if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011929 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011930else
Matthias Kloseb9621712010-04-24 17:59:49 +000011931 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011933rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11934 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011935fi
11936
11937
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011938fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11940$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011941if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011942 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011943if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011944 ac_cv_have_lchflags="yes"
11945else
11946 ac_cv_have_lchflags="no"
11947fi
11948
11949fi
11950if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011951
Matthias Kloseb9621712010-04-24 17:59:49 +000011952$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011953
11954fi
11955
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011956case $ac_sys_system/$ac_sys_release in
11957Darwin/*)
11958 _CUR_CFLAGS="${CFLAGS}"
11959 _CUR_LDFLAGS="${LDFLAGS}"
11960 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11961 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11962 ;;
11963esac
11964
Matthias Kloseb9621712010-04-24 17:59:49 +000011965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11966$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011967if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011968 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011969else
11970 ac_check_lib_save_LIBS=$LIBS
11971LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011973/* end confdefs.h. */
11974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011975/* Override any GCC internal prototype to avoid an error.
11976 Use char because int might match the return type of a GCC
11977 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011978#ifdef __cplusplus
11979extern "C"
11980#endif
11981char inflateCopy ();
11982int
11983main ()
11984{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011985return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011986 ;
11987 return 0;
11988}
11989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011990if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011991 ac_cv_lib_z_inflateCopy=yes
11992else
Matthias Kloseb9621712010-04-24 17:59:49 +000011993 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011994fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011995rm -f core conftest.err conftest.$ac_objext \
11996 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011997LIBS=$ac_check_lib_save_LIBS
11998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12000$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012001if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012002
Matthias Kloseb9621712010-04-24 17:59:49 +000012003$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012004
12005fi
12006
12007
12008case $ac_sys_system/$ac_sys_release in
12009Darwin/*)
12010 CFLAGS="${_CUR_CFLAGS}"
12011 LDFLAGS="${_CUR_LDFLAGS}"
12012 ;;
12013esac
12014
Matthias Kloseb9621712010-04-24 17:59:49 +000012015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12016$as_echo_n "checking for hstrerror... " >&6; }
12017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012018/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012019
Martin v. Löwise9416172003-05-03 10:12:45 +000012020#include <netdb.h>
12021
Martin v. Löwise9416172003-05-03 10:12:45 +000012022int
12023main ()
12024{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012025void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012026 ;
12027 return 0;
12028}
12029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012030if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012031
Matthias Kloseb9621712010-04-24 17:59:49 +000012032$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012033
Matthias Kloseb159a552010-04-25 21:00:44 +000012034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012035$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012036else
Matthias Kloseb9621712010-04-24 17:59:49 +000012037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12038$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012039
12040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012041rm -f core conftest.err conftest.$ac_objext \
12042 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012043
Matthias Kloseb9621712010-04-24 17:59:49 +000012044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12045$as_echo_n "checking for inet_aton... " >&6; }
12046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012047/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012048
Martin v. Löwis86d66262006-02-17 08:40:11 +000012049#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012050#include <sys/socket.h>
12051#include <netinet/in.h>
12052#include <arpa/inet.h>
12053
Martin v. Löwise9416172003-05-03 10:12:45 +000012054int
12055main ()
12056{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012057void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012058 ;
12059 return 0;
12060}
12061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012062if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012063
Matthias Kloseb9621712010-04-24 17:59:49 +000012064$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012065
Matthias Kloseb159a552010-04-25 21:00:44 +000012066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012067$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012068else
Matthias Kloseb9621712010-04-24 17:59:49 +000012069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12070$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012071
12072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012073rm -f core conftest.err conftest.$ac_objext \
12074 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012075
Matthias Kloseb9621712010-04-24 17:59:49 +000012076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12077$as_echo_n "checking for inet_pton... " >&6; }
12078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012079/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012080
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012081#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012082#include <sys/socket.h>
12083#include <netinet/in.h>
12084#include <arpa/inet.h>
12085
Martin v. Löwise9416172003-05-03 10:12:45 +000012086int
12087main ()
12088{
12089void* p = inet_pton
12090 ;
12091 return 0;
12092}
12093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012094if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012095
Matthias Kloseb9621712010-04-24 17:59:49 +000012096$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012097
Matthias Kloseb159a552010-04-25 21:00:44 +000012098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012099$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012100else
Matthias Kloseb9621712010-04-24 17:59:49 +000012101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12102$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012103
12104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012106
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012107# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12109$as_echo_n "checking for setgroups... " >&6; }
12110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012111/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012112
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012113#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012114#ifdef HAVE_GRP_H
12115#include <grp.h>
12116#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012117
Martin v. Löwisd5843682002-11-21 20:41:28 +000012118int
12119main ()
12120{
12121void* p = setgroups
12122 ;
12123 return 0;
12124}
12125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012126if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012127
Matthias Kloseb9621712010-04-24 17:59:49 +000012128$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012129
Matthias Kloseb159a552010-04-25 21:00:44 +000012130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012131$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012132else
Matthias Kloseb9621712010-04-24 17:59:49 +000012133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12134$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012135
12136fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012138
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012139# check for openpty and forkpty
12140
12141for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012142do :
12143 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012144if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012145 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012146#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012147_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012148
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012149else
Matthias Kloseb9621712010-04-24 17:59:49 +000012150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12151$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012152if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012153 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012154else
Martin v. Löwis11437992002-04-12 09:54:03 +000012155 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012156LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012159
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012160/* Override any GCC internal prototype to avoid an error.
12161 Use char because int might match the return type of a GCC
12162 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012163#ifdef __cplusplus
12164extern "C"
12165#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012166char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012167int
12168main ()
12169{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012170return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012171 ;
12172 return 0;
12173}
12174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012175if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012176 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012177else
Matthias Kloseb9621712010-04-24 17:59:49 +000012178 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012180rm -f core conftest.err conftest.$ac_objext \
12181 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012182LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012183fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12185$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012186if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012187 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012188 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012189else
Matthias Kloseb9621712010-04-24 17:59:49 +000012190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12191$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012192if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012193 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012194else
12195 ac_check_lib_save_LIBS=$LIBS
12196LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012198/* end confdefs.h. */
12199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012200/* Override any GCC internal prototype to avoid an error.
12201 Use char because int might match the return type of a GCC
12202 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012203#ifdef __cplusplus
12204extern "C"
12205#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012206char openpty ();
12207int
12208main ()
12209{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012210return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012211 ;
12212 return 0;
12213}
12214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012215if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012216 ac_cv_lib_bsd_openpty=yes
12217else
Matthias Kloseb9621712010-04-24 17:59:49 +000012218 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012219fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012220rm -f core conftest.err conftest.$ac_objext \
12221 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012222LIBS=$ac_check_lib_save_LIBS
12223fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12225$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012226if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012227 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012228 LIBS="$LIBS -lbsd"
12229fi
12230
12231
12232fi
12233
Fred Drake8cef4cf2000-06-28 16:40:38 +000012234
12235fi
12236done
12237
12238for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012239do :
12240 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012241if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012242 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012243#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012244_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012245
Fred Drake8cef4cf2000-06-28 16:40:38 +000012246else
Matthias Kloseb9621712010-04-24 17:59:49 +000012247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12248$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012249if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012250 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012251else
Martin v. Löwis11437992002-04-12 09:54:03 +000012252 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012253LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012256
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012257/* Override any GCC internal prototype to avoid an error.
12258 Use char because int might match the return type of a GCC
12259 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012260#ifdef __cplusplus
12261extern "C"
12262#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012263char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012264int
12265main ()
12266{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012267return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012268 ;
12269 return 0;
12270}
12271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012272if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012273 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012274else
Matthias Kloseb9621712010-04-24 17:59:49 +000012275 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012277rm -f core conftest.err conftest.$ac_objext \
12278 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012279LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012280fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12282$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012283if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012284 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012285 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012286else
Matthias Kloseb9621712010-04-24 17:59:49 +000012287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12288$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012289if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012290 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012291else
12292 ac_check_lib_save_LIBS=$LIBS
12293LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012295/* end confdefs.h. */
12296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012297/* Override any GCC internal prototype to avoid an error.
12298 Use char because int might match the return type of a GCC
12299 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012300#ifdef __cplusplus
12301extern "C"
12302#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012303char forkpty ();
12304int
12305main ()
12306{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012307return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012308 ;
12309 return 0;
12310}
12311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012312if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012313 ac_cv_lib_bsd_forkpty=yes
12314else
Matthias Kloseb9621712010-04-24 17:59:49 +000012315 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012316fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012317rm -f core conftest.err conftest.$ac_objext \
12318 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012319LIBS=$ac_check_lib_save_LIBS
12320fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12322$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012323if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012324 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012325 LIBS="$LIBS -lbsd"
12326fi
12327
12328
12329fi
12330
Fred Drake8cef4cf2000-06-28 16:40:38 +000012331
12332fi
12333done
12334
Jack Jansendd19cf82001-12-06 22:36:17 +000012335
Christian Heimesb186d002008-03-18 15:15:01 +000012336# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012337for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012338do :
12339 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012340if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012341 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012342#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012343_ACEOF
12344
12345fi
12346done
12347
12348
Michael W. Hudson54241132001-12-07 15:38:26 +000012349# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012350for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012351do :
12352 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12353ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012354if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012355 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012356#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012357_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012358
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012359fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012360done
12361
Michael W. Hudson54241132001-12-07 15:38:26 +000012362
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012363ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012364if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012365 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012366
Martin v. Löwis1142de32002-03-29 16:28:31 +000012367else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012368 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012369 *" dup2.$ac_objext "* ) ;;
12370 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012371 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012372esac
12373
Martin v. Löwis1142de32002-03-29 16:28:31 +000012374fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012375
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012376ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012377if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012378 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12379
12380else
12381 case " $LIBOBJS " in
12382 *" strdup.$ac_objext "* ) ;;
12383 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12384 ;;
12385esac
12386
12387fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012388
12389
12390for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012391do :
12392 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012393if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012394 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012395#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012398/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012399#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012400int
12401main ()
12402{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012403getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012404 ;
12405 return 0;
12406}
12407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012408if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012409
Matthias Kloseb9621712010-04-24 17:59:49 +000012410$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012411
Guido van Rossum627b2d71993-12-24 10:39:16 +000012412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012414
Guido van Rossum627b2d71993-12-24 10:39:16 +000012415fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012416done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012417
Jack Jansen150753c2003-03-29 22:07:47 +000012418for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012419do :
12420 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012421if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012422 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012423#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012426/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012427#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012428int
12429main ()
12430{
12431setpgrp(0,0);
12432 ;
12433 return 0;
12434}
12435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012436if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012437
Matthias Kloseb9621712010-04-24 17:59:49 +000012438$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012439
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012442
12443fi
12444done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012445
Thomas Wouters3a584202000-08-05 23:28:51 +000012446for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012447do :
12448 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012449if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012450 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012451#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012454/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012455#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012456int
12457main ()
12458{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012459gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012460 ;
12461 return 0;
12462}
12463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012464if ac_fn_c_try_compile "$LINENO"; then :
12465
Guido van Rossum627b2d71993-12-24 10:39:16 +000012466else
Skip Montanaro6dead952003-09-25 14:50:04 +000012467
Matthias Kloseb9621712010-04-24 17:59:49 +000012468$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012469
Martin v. Löwis11437992002-04-12 09:54:03 +000012470
Guido van Rossum627b2d71993-12-24 10:39:16 +000012471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012473
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012474fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012475done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012476
Michael W. Hudson54241132001-12-07 15:38:26 +000012477
Victor Stinnere0be4232011-10-25 13:06:09 +020012478for ac_func in clock_gettime
12479do :
12480 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12481if test "x$ac_cv_func_clock_gettime" = xyes; then :
12482 cat >>confdefs.h <<_ACEOF
12483#define HAVE_CLOCK_GETTIME 1
12484_ACEOF
12485
12486else
12487
12488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12489$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12490if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12491 $as_echo_n "(cached) " >&6
12492else
12493 ac_check_lib_save_LIBS=$LIBS
12494LIBS="-lrt $LIBS"
12495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12496/* end confdefs.h. */
12497
12498/* Override any GCC internal prototype to avoid an error.
12499 Use char because int might match the return type of a GCC
12500 builtin and then its argument prototype would still apply. */
12501#ifdef __cplusplus
12502extern "C"
12503#endif
12504char clock_gettime ();
12505int
12506main ()
12507{
12508return clock_gettime ();
12509 ;
12510 return 0;
12511}
12512_ACEOF
12513if ac_fn_c_try_link "$LINENO"; then :
12514 ac_cv_lib_rt_clock_gettime=yes
12515else
12516 ac_cv_lib_rt_clock_gettime=no
12517fi
12518rm -f core conftest.err conftest.$ac_objext \
12519 conftest$ac_exeext conftest.$ac_ext
12520LIBS=$ac_check_lib_save_LIBS
12521fi
12522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12523$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12524if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12525
Victor Stinner7efb8332014-08-29 15:41:08 +020012526 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012527 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12528
12529
12530$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12531
12532
12533fi
12534
12535
12536fi
12537done
12538
12539
12540for ac_func in clock_getres
12541do :
12542 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12543if test "x$ac_cv_func_clock_getres" = xyes; then :
12544 cat >>confdefs.h <<_ACEOF
12545#define HAVE_CLOCK_GETRES 1
12546_ACEOF
12547
12548else
12549
12550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12551$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12552if ${ac_cv_lib_rt_clock_getres+:} false; then :
12553 $as_echo_n "(cached) " >&6
12554else
12555 ac_check_lib_save_LIBS=$LIBS
12556LIBS="-lrt $LIBS"
12557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12558/* end confdefs.h. */
12559
12560/* Override any GCC internal prototype to avoid an error.
12561 Use char because int might match the return type of a GCC
12562 builtin and then its argument prototype would still apply. */
12563#ifdef __cplusplus
12564extern "C"
12565#endif
12566char clock_getres ();
12567int
12568main ()
12569{
12570return clock_getres ();
12571 ;
12572 return 0;
12573}
12574_ACEOF
12575if ac_fn_c_try_link "$LINENO"; then :
12576 ac_cv_lib_rt_clock_getres=yes
12577else
12578 ac_cv_lib_rt_clock_getres=no
12579fi
12580rm -f core conftest.err conftest.$ac_objext \
12581 conftest$ac_exeext conftest.$ac_ext
12582LIBS=$ac_check_lib_save_LIBS
12583fi
12584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12585$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12586if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12587
12588 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12589
12590
12591fi
12592
12593
12594fi
12595done
12596
12597
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012598for ac_func in clock_settime
12599do :
12600 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12601if test "x$ac_cv_func_clock_settime" = xyes; then :
12602 cat >>confdefs.h <<_ACEOF
12603#define HAVE_CLOCK_SETTIME 1
12604_ACEOF
12605
12606else
12607
12608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12609$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12610if ${ac_cv_lib_rt_clock_settime+:} false; then :
12611 $as_echo_n "(cached) " >&6
12612else
12613 ac_check_lib_save_LIBS=$LIBS
12614LIBS="-lrt $LIBS"
12615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12616/* end confdefs.h. */
12617
12618/* Override any GCC internal prototype to avoid an error.
12619 Use char because int might match the return type of a GCC
12620 builtin and then its argument prototype would still apply. */
12621#ifdef __cplusplus
12622extern "C"
12623#endif
12624char clock_settime ();
12625int
12626main ()
12627{
12628return clock_settime ();
12629 ;
12630 return 0;
12631}
12632_ACEOF
12633if ac_fn_c_try_link "$LINENO"; then :
12634 ac_cv_lib_rt_clock_settime=yes
12635else
12636 ac_cv_lib_rt_clock_settime=no
12637fi
12638rm -f core conftest.err conftest.$ac_objext \
12639 conftest$ac_exeext conftest.$ac_ext
12640LIBS=$ac_check_lib_save_LIBS
12641fi
12642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12643$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12644if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12645
12646 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12647
12648
12649fi
12650
12651
12652fi
12653done
12654
12655
Matthias Kloseb9621712010-04-24 17:59:49 +000012656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12657$as_echo_n "checking for major... " >&6; }
12658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012659/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012660
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012661#if defined(MAJOR_IN_MKDEV)
12662#include <sys/mkdev.h>
12663#elif defined(MAJOR_IN_SYSMACROS)
12664#include <sys/sysmacros.h>
12665#else
12666#include <sys/types.h>
12667#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012668
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012669int
12670main ()
12671{
12672
12673 makedev(major(0),minor(0));
12674
12675 ;
12676 return 0;
12677}
12678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012679if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012680
12681
Matthias Kloseb9621712010-04-24 17:59:49 +000012682$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012683
Matthias Kloseb9621712010-04-24 17:59:49 +000012684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12685$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012686
12687else
Skip Montanaro6dead952003-09-25 14:50:04 +000012688
Matthias Kloseb9621712010-04-24 17:59:49 +000012689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12690$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012691
12692fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012693rm -f core conftest.err conftest.$ac_objext \
12694 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012695
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012696# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12697# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12699$as_echo_n "checking for if_nameindex... " >&6; }
12700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12701/* end confdefs.h. */
12702
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012703#include <stdio.h>
12704#ifdef STDC_HEADERS
12705# include <stdlib.h>
12706# include <stddef.h>
12707#else
12708# ifdef HAVE_STDLIB_H
12709# include <stdlib.h>
12710# endif
12711#endif
12712#ifdef HAVE_SYS_SOCKET_H
12713# include <sys/socket.h>
12714#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012715#ifdef HAVE_NET_IF_H
12716# include <net/if.h>
12717#endif
12718
12719int
12720main ()
12721{
12722struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12723 ;
12724 return 0;
12725}
12726_ACEOF
12727if ac_fn_c_try_link "$LINENO"; then :
12728
12729$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12730
12731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12732$as_echo "yes" >&6; }
12733else
12734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12735$as_echo "no" >&6; }
12736
12737fi
12738rm -f core conftest.err conftest.$ac_objext \
12739 conftest$ac_exeext conftest.$ac_ext
12740
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012741# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12742# macro is not defined in android-ndk-r13.
12743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12744$as_echo_n "checking for lockf... " >&6; }
12745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12746/* end confdefs.h. */
12747#include <unistd.h>
12748int
12749main ()
12750{
12751lockf(0, F_LOCK, 0);
12752 ;
12753 return 0;
12754}
12755_ACEOF
12756if ac_fn_c_try_link "$LINENO"; then :
12757
12758$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12759
12760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12761$as_echo "yes" >&6; }
12762else
12763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12764$as_echo "no" >&6; }
12765
12766fi
12767rm -f core conftest.err conftest.$ac_objext \
12768 conftest$ac_exeext conftest.$ac_ext
12769
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012770# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012771# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12773$as_echo_n "checking for getaddrinfo... " >&6; }
12774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012775/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012776
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012777#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012778#include <sys/socket.h>
12779#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012780#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012781
Martin v. Löwis11437992002-04-12 09:54:03 +000012782int
12783main ()
12784{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012785getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012786 ;
12787 return 0;
12788}
12789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012790if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012791 have_getaddrinfo=yes
12792else
Matthias Kloseb9621712010-04-24 17:59:49 +000012793 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012794fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012795rm -f core conftest.err conftest.$ac_objext \
12796 conftest$ac_exeext conftest.$ac_ext
12797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12798$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012799if test $have_getaddrinfo = yes
12800then
Matthias Kloseb9621712010-04-24 17:59:49 +000012801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12802$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012803 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012804 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012805else
Matthias Kloseb9621712010-04-24 17:59:49 +000012806 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012807
12808if test "${enable_ipv6+set}" = set; then
12809 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12810else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012811 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012812fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012813else
Matthias Kloseb9621712010-04-24 17:59:49 +000012814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012815/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012816
Stefan Krah19c21392012-11-22 23:47:32 +010012817#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012818#include <sys/types.h>
12819#include <netdb.h>
12820#include <string.h>
12821#include <sys/socket.h>
12822#include <netinet/in.h>
12823
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012824int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012825{
12826 int passive, gaierr, inet4 = 0, inet6 = 0;
12827 struct addrinfo hints, *ai, *aitop;
12828 char straddr[INET6_ADDRSTRLEN], strport[16];
12829
12830 for (passive = 0; passive <= 1; passive++) {
12831 memset(&hints, 0, sizeof(hints));
12832 hints.ai_family = AF_UNSPEC;
12833 hints.ai_flags = passive ? AI_PASSIVE : 0;
12834 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012835 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012836 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12837 (void)gai_strerror(gaierr);
12838 goto bad;
12839 }
12840 for (ai = aitop; ai; ai = ai->ai_next) {
12841 if (ai->ai_addr == NULL ||
12842 ai->ai_addrlen == 0 ||
12843 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12844 straddr, sizeof(straddr), strport, sizeof(strport),
12845 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12846 goto bad;
12847 }
12848 switch (ai->ai_family) {
12849 case AF_INET:
12850 if (strcmp(strport, "54321") != 0) {
12851 goto bad;
12852 }
12853 if (passive) {
12854 if (strcmp(straddr, "0.0.0.0") != 0) {
12855 goto bad;
12856 }
12857 } else {
12858 if (strcmp(straddr, "127.0.0.1") != 0) {
12859 goto bad;
12860 }
12861 }
12862 inet4++;
12863 break;
12864 case AF_INET6:
12865 if (strcmp(strport, "54321") != 0) {
12866 goto bad;
12867 }
12868 if (passive) {
12869 if (strcmp(straddr, "::") != 0) {
12870 goto bad;
12871 }
12872 } else {
12873 if (strcmp(straddr, "::1") != 0) {
12874 goto bad;
12875 }
12876 }
12877 inet6++;
12878 break;
12879 case AF_UNSPEC:
12880 goto bad;
12881 break;
12882 default:
12883 /* another family support? */
12884 break;
12885 }
12886 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012887 freeaddrinfo(aitop);
12888 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012889 }
12890
12891 if (!(inet4 == 0 || inet4 == 2))
12892 goto bad;
12893 if (!(inet6 == 0 || inet6 == 2))
12894 goto bad;
12895
12896 if (aitop)
12897 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012898 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012899
12900 bad:
12901 if (aitop)
12902 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012903 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012904}
12905
Martin v. Löwis11437992002-04-12 09:54:03 +000012906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012907if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012908 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012909else
Matthias Kloseb9621712010-04-24 17:59:49 +000012910 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012912rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12913 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012915
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012916fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012917
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012919
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12921$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12922
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012923if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012924then
12925 if test $ipv6 = yes
12926 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012927 echo 'Fatal: You must get working getaddrinfo() function.'
12928 echo ' or you can specify "--disable-ipv6"'.
12929 exit 1
12930 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012931else
Martin v. Löwis11437992002-04-12 09:54:03 +000012932
Matthias Kloseb9621712010-04-24 17:59:49 +000012933$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012934
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012935fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012936
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012937for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012938do :
12939 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012940if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012941 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012942#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012943_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012944
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012945fi
12946done
12947
Michael W. Hudson54241132001-12-07 15:38:26 +000012948
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012949# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12951$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012952if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012953 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012954else
Matthias Kloseb9621712010-04-24 17:59:49 +000012955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012956/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012957#include <sys/types.h>
12958#include <sys/time.h>
12959#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012960
Martin v. Löwis11437992002-04-12 09:54:03 +000012961int
12962main ()
12963{
12964if ((struct tm *) 0)
12965return 0;
12966 ;
12967 return 0;
12968}
12969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012970if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012971 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012972else
Matthias Kloseb9621712010-04-24 17:59:49 +000012973 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012976fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12978$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012979if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012980
Matthias Kloseb9621712010-04-24 17:59:49 +000012981$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012982
12983fi
12984
Matthias Kloseb9621712010-04-24 17:59:49 +000012985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12986$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012987if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012988 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012989else
Matthias Kloseb9621712010-04-24 17:59:49 +000012990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012991/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012992#include <sys/types.h>
12993#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012994
Martin v. Löwis11437992002-04-12 09:54:03 +000012995int
12996main ()
12997{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012998struct tm tm;
12999 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013000 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013001 ;
13002 return 0;
13003}
13004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013005if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013006 ac_cv_struct_tm=time.h
13007else
Matthias Kloseb9621712010-04-24 17:59:49 +000013008 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013011fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13013$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013014if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013015
Matthias Kloseb9621712010-04-24 17:59:49 +000013016$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013017
13018fi
13019
Matthias Kloseb9621712010-04-24 17:59:49 +000013020ac_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 +000013021#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013022
Matthias Kloseb9621712010-04-24 17:59:49 +000013023"
Victor Stinnere0be4232011-10-25 13:06:09 +020013024if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013025
13026cat >>confdefs.h <<_ACEOF
13027#define HAVE_STRUCT_TM_TM_ZONE 1
13028_ACEOF
13029
13030
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013031fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013032
Martin v. Löwis11437992002-04-12 09:54:03 +000013033if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13034
Matthias Kloseb9621712010-04-24 17:59:49 +000013035$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013036
13037else
Matthias Kloseb9621712010-04-24 17:59:49 +000013038 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13039"
Victor Stinnere0be4232011-10-25 13:06:09 +020013040if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013041 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013042else
Matthias Kloseb9621712010-04-24 17:59:49 +000013043 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013044fi
13045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013046cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013047#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013048_ACEOF
13049
Matthias Kloseb9621712010-04-24 17:59:49 +000013050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13051$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013052if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013053 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013054else
Matthias Kloseb9621712010-04-24 17:59:49 +000013055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013056/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013057#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013058#if !HAVE_DECL_TZNAME
13059extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013060#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013061
Martin v. Löwis11437992002-04-12 09:54:03 +000013062int
13063main ()
13064{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013065return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013066 ;
13067 return 0;
13068}
13069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013070if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013071 ac_cv_var_tzname=yes
13072else
Matthias Kloseb9621712010-04-24 17:59:49 +000013073 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013075rm -f core conftest.err conftest.$ac_objext \
13076 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013077fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13079$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013080 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013081
Matthias Kloseb9621712010-04-24 17:59:49 +000013082$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013083
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013084 fi
13085fi
13086
Matthias Kloseb9621712010-04-24 17:59:49 +000013087ac_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 +020013088if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013089
13090cat >>confdefs.h <<_ACEOF
13091#define HAVE_STRUCT_STAT_ST_RDEV 1
13092_ACEOF
13093
13094
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013095fi
13096
Matthias Kloseb9621712010-04-24 17:59:49 +000013097ac_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 +020013098if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013099
Martin v. Löwis11437992002-04-12 09:54:03 +000013100cat >>confdefs.h <<_ACEOF
13101#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13102_ACEOF
13103
13104
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013105fi
13106
Matthias Kloseb9621712010-04-24 17:59:49 +000013107ac_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 +020013108if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013109
13110cat >>confdefs.h <<_ACEOF
13111#define HAVE_STRUCT_STAT_ST_FLAGS 1
13112_ACEOF
13113
13114
13115fi
13116
Matthias Kloseb9621712010-04-24 17:59:49 +000013117ac_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 +020013118if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013119
13120cat >>confdefs.h <<_ACEOF
13121#define HAVE_STRUCT_STAT_ST_GEN 1
13122_ACEOF
13123
13124
13125fi
13126
Matthias Kloseb9621712010-04-24 17:59:49 +000013127ac_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 +020013128if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013129
13130cat >>confdefs.h <<_ACEOF
13131#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13132_ACEOF
13133
13134
13135fi
13136
Matthias Kloseb9621712010-04-24 17:59:49 +000013137ac_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 +020013138if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013139
Martin v. Löwis11437992002-04-12 09:54:03 +000013140cat >>confdefs.h <<_ACEOF
13141#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13142_ACEOF
13143
13144
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013145fi
13146
Stefan Krah267b6392016-04-26 01:09:18 +020013147ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13148 #include <sys/types.h>
13149 #include <pwd.h>
13150
13151"
13152if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13153
13154cat >>confdefs.h <<_ACEOF
13155#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13156_ACEOF
13157
13158
13159fi
13160ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13161 #include <sys/types.h>
13162 #include <pwd.h>
13163
13164"
13165if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13166
13167cat >>confdefs.h <<_ACEOF
13168#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13169_ACEOF
13170
13171
13172fi
13173
Zachary Ware6a6967e2016-10-01 00:47:27 -050013174# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13175ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13176"
13177if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13178
13179cat >>confdefs.h <<_ACEOF
13180#define HAVE_SIGINFO_T_SI_BAND 1
13181_ACEOF
13182
13183
13184fi
13185
Michael W. Hudson54241132001-12-07 15:38:26 +000013186
Matthias Kloseb9621712010-04-24 17:59:49 +000013187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13188$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013189if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013190 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013191else
Matthias Kloseb159a552010-04-25 21:00:44 +000013192
Matthias Kloseb9621712010-04-24 17:59:49 +000013193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013194/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013195#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013196int
13197main ()
13198{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013199return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013200 ;
13201 return 0;
13202}
13203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013204if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013205 ac_cv_header_time_altzone=yes
13206else
Matthias Kloseb9621712010-04-24 17:59:49 +000013207 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013210
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013211fi
13212
Matthias Kloseb9621712010-04-24 17:59:49 +000013213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13214$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013215if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013216
Matthias Kloseb9621712010-04-24 17:59:49 +000013217$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013218
13219fi
13220
Guido van Rossumda88dad1995-01-26 00:46:29 +000013221was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13223$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013225/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013226
13227#include <sys/types.h>
13228#include <sys/select.h>
13229#include <sys/time.h>
13230
Martin v. Löwis11437992002-04-12 09:54:03 +000013231int
13232main ()
13233{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013234;
Martin v. Löwis11437992002-04-12 09:54:03 +000013235 ;
13236 return 0;
13237}
13238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013239if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013240
13241
Matthias Kloseb9621712010-04-24 17:59:49 +000013242$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013243
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013244 was_it_defined=yes
13245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13249$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013250
Matthias Kloseb9621712010-04-24 17:59:49 +000013251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13252$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013253if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013254 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013255else
Matthias Kloseb9621712010-04-24 17:59:49 +000013256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013257/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013258#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013259int
13260main ()
13261{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013262struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013263 ;
13264 return 0;
13265}
13266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013267if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013268 ac_cv_struct_addrinfo=yes
13269else
Matthias Kloseb9621712010-04-24 17:59:49 +000013270 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13273fi
13274
Matthias Kloseb9621712010-04-24 17:59:49 +000013275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13276$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013277if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013278
Matthias Kloseb9621712010-04-24 17:59:49 +000013279$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013280
13281fi
13282
Matthias Kloseb9621712010-04-24 17:59:49 +000013283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13284$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013285if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013286 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013287else
Matthias Kloseb9621712010-04-24 17:59:49 +000013288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013289/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013290
13291# include <sys/types.h>
13292# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013293int
13294main ()
13295{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013296struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013297 ;
13298 return 0;
13299}
13300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013301if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013302 ac_cv_struct_sockaddr_storage=yes
13303else
Matthias Kloseb9621712010-04-24 17:59:49 +000013304 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13307fi
13308
Matthias Kloseb9621712010-04-24 17:59:49 +000013309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13310$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013311if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013312
Matthias Kloseb9621712010-04-24 17:59:49 +000013313$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013314
13315fi
13316
Christian Heimesdffa3942016-09-05 23:54:41 +020013317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13318$as_echo_n "checking for sockaddr_alg... " >&6; }
13319if ${ac_cv_struct_sockaddr_alg+:} false; then :
13320 $as_echo_n "(cached) " >&6
13321else
13322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13323/* end confdefs.h. */
13324
13325# include <sys/types.h>
13326# include <sys/socket.h>
13327# include <linux/if_alg.h>
13328int
13329main ()
13330{
13331struct sockaddr_alg s
13332 ;
13333 return 0;
13334}
13335_ACEOF
13336if ac_fn_c_try_compile "$LINENO"; then :
13337 ac_cv_struct_sockaddr_alg=yes
13338else
13339 ac_cv_struct_sockaddr_alg=no
13340fi
13341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13342fi
13343
13344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13345$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13346if test $ac_cv_struct_sockaddr_alg = yes; then
13347
13348$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13349
13350fi
13351
Guido van Rossum627b2d71993-12-24 10:39:16 +000013352# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013353
Matthias Kloseb9621712010-04-24 17:59:49 +000013354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13355$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013356if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013357 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013358else
Matthias Kloseb9621712010-04-24 17:59:49 +000013359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013360/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013361$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013362int
13363main ()
13364{
13365static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013366test_array [0] = 0;
13367return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013368
13369 ;
13370 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013371}
Martin v. Löwis11437992002-04-12 09:54:03 +000013372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013373if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013374 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013375else
Matthias Kloseb9621712010-04-24 17:59:49 +000013376 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13381$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013382if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013383 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013384
13385fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013386
Matthias Kloseb9621712010-04-24 17:59:49 +000013387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13388$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013389if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013390 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013391else
Matthias Kloseb9621712010-04-24 17:59:49 +000013392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013393/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013394
Martin v. Löwis11437992002-04-12 09:54:03 +000013395int
13396main ()
13397{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013398
Martin v. Löwis11437992002-04-12 09:54:03 +000013399#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013400 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013401 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013402 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013403 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013404 char const *const *pcpcc;
13405 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013406 /* NEC SVR4.0.2 mips cc rejects this. */
13407 struct point {int x, y;};
13408 static struct point const zero = {0,0};
13409 /* AIX XL C 1.02.0.0 rejects this.
13410 It does not let you subtract one const X* pointer from another in
13411 an arm of an if-expression whose if-part is not a constant
13412 expression */
13413 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013414 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013415 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013416 ++pcpcc;
13417 ppc = (char**) pcpcc;
13418 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013419 { /* SCO 3.2v4 cc rejects this sort of thing. */
13420 char tx;
13421 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013422 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013423
Martin v. Löwis11437992002-04-12 09:54:03 +000013424 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013425 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013426 }
13427 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13428 int x[] = {25, 17};
13429 const int *foo = &x[0];
13430 ++foo;
13431 }
13432 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13433 typedef const int *iptr;
13434 iptr p = 0;
13435 ++p;
13436 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013437 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013438 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013439 struct s { int j; const int *ap[3]; } bx;
13440 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013441 }
13442 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13443 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013444 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013445 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013446 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013447#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013448
Martin v. Löwis11437992002-04-12 09:54:03 +000013449 ;
13450 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013451}
Martin v. Löwis11437992002-04-12 09:54:03 +000013452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013453if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013454 ac_cv_c_const=yes
13455else
Matthias Kloseb9621712010-04-24 17:59:49 +000013456 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013459fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13461$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013462if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013463
Matthias Kloseb9621712010-04-24 17:59:49 +000013464$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013465
13466fi
13467
Michael W. Hudson54241132001-12-07 15:38:26 +000013468
Guido van Rossumda88dad1995-01-26 00:46:29 +000013469works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13471$as_echo_n "checking for working volatile... " >&6; }
13472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013473/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013474
Martin v. Löwis11437992002-04-12 09:54:03 +000013475int
13476main ()
13477{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013478volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013479 ;
13480 return 0;
13481}
13482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013483if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013484 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013485else
Skip Montanaro6dead952003-09-25 14:50:04 +000013486
Matthias Kloseb9621712010-04-24 17:59:49 +000013487$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013488
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013489
Guido van Rossum627b2d71993-12-24 10:39:16 +000013490fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13493$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013494
Guido van Rossumda88dad1995-01-26 00:46:29 +000013495works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13497$as_echo_n "checking for working signed char... " >&6; }
13498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013499/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013500
Martin v. Löwis11437992002-04-12 09:54:03 +000013501int
13502main ()
13503{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013504signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013505 ;
13506 return 0;
13507}
13508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013509if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013510 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013511else
Skip Montanaro6dead952003-09-25 14:50:04 +000013512
Matthias Kloseb9621712010-04-24 17:59:49 +000013513$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013514
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013515
Guido van Rossum7f43da71994-08-01 12:15:30 +000013516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13519$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013520
Guido van Rossumda88dad1995-01-26 00:46:29 +000013521have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13523$as_echo_n "checking for prototypes... " >&6; }
13524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013525/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013526int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013527int
13528main ()
13529{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013530return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013531 ;
13532 return 0;
13533}
13534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013535if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013536
Matthias Kloseb9621712010-04-24 17:59:49 +000013537$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013538
Matthias Kloseb159a552010-04-25 21:00:44 +000013539 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13543$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013544
Guido van Rossumda88dad1995-01-26 00:46:29 +000013545works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13547$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013549/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013550
13551#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013552int foo(int x, ...) {
13553 va_list va;
13554 va_start(va, x);
13555 va_arg(va, int);
13556 va_arg(va, char *);
13557 va_arg(va, double);
13558 return 0;
13559}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013560
Martin v. Löwis11437992002-04-12 09:54:03 +000013561int
13562main ()
13563{
Guido van Rossum90eea071996-08-30 20:58:57 +000013564return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013565 ;
13566 return 0;
13567}
13568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013569if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013570
13571
Matthias Kloseb9621712010-04-24 17:59:49 +000013572$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013573
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013574 works=yes
13575
Guido van Rossum627b2d71993-12-24 10:39:16 +000013576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13579$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013580
Martin v. Löwisd6320502004-08-12 13:45:08 +000013581# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13583$as_echo_n "checking for socketpair... " >&6; }
13584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013585/* end confdefs.h. */
13586
13587#include <sys/types.h>
13588#include <sys/socket.h>
13589
13590int
13591main ()
13592{
13593void *x=socketpair
13594 ;
13595 return 0;
13596}
13597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013598if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013599
Matthias Kloseb9621712010-04-24 17:59:49 +000013600$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013601
Matthias Kloseb159a552010-04-25 21:00:44 +000013602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013603$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013604else
Matthias Kloseb9621712010-04-24 17:59:49 +000013605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13606$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013607
13608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013610
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013611# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13613$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013615/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013616#include <sys/types.h>
13617#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013618int
13619main ()
13620{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013621struct sockaddr x;
13622x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013623 ;
13624 return 0;
13625}
13626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013627if ac_fn_c_try_compile "$LINENO"; then :
13628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13629$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013630
Matthias Kloseb9621712010-04-24 17:59:49 +000013631$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013632
13633else
Matthias Kloseb9621712010-04-24 17:59:49 +000013634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13635$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013636
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013639
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013640# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013641
13642
Matthias Kloseb9621712010-04-24 17:59:49 +000013643ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013644if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013645
Matthias Kloseb9621712010-04-24 17:59:49 +000013646 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013647
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13649$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013650 OLD_CFLAGS=$CFLAGS
13651 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013653/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013654
13655# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013656
Martin v. Löwis11437992002-04-12 09:54:03 +000013657int
13658main ()
13659{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013660
13661 char *name;
13662 struct hostent *he, *res;
13663 char buffer[2048];
13664 int buflen = 2048;
13665 int h_errnop;
13666
13667 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013668
13669 ;
13670 return 0;
13671}
13672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013673if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013674
Matthias Kloseb9621712010-04-24 17:59:49 +000013675 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013676
Martin v. Löwis11437992002-04-12 09:54:03 +000013677
Matthias Kloseb9621712010-04-24 17:59:49 +000013678$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013679
Matthias Kloseb9621712010-04-24 17:59:49 +000013680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13681$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013682
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013683else
Skip Montanaro6dead952003-09-25 14:50:04 +000013684
Matthias Kloseb9621712010-04-24 17:59:49 +000013685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13686$as_echo "no" >&6; }
13687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13688$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013690/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013691
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013692# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013693
Martin v. Löwis11437992002-04-12 09:54:03 +000013694int
13695main ()
13696{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013697
13698 char *name;
13699 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013700 char buffer[2048];
13701 int buflen = 2048;
13702 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013703
Matthias Kloseb159a552010-04-25 21:00:44 +000013704 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013705
13706 ;
13707 return 0;
13708}
13709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013710if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013711
Matthias Kloseb9621712010-04-24 17:59:49 +000013712 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013713
Martin v. Löwis11437992002-04-12 09:54:03 +000013714
Matthias Kloseb159a552010-04-25 21:00:44 +000013715$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013716
Matthias Kloseb9621712010-04-24 17:59:49 +000013717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13718$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013719
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013720else
Skip Montanaro6dead952003-09-25 14:50:04 +000013721
Matthias Kloseb9621712010-04-24 17:59:49 +000013722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13723$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13725$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13727/* end confdefs.h. */
13728
13729# include <netdb.h>
13730
13731int
13732main ()
13733{
13734
13735 char *name;
13736 struct hostent *he;
13737 struct hostent_data data;
13738
13739 (void) gethostbyname_r(name, he, &data);
13740
13741 ;
13742 return 0;
13743}
13744_ACEOF
13745if ac_fn_c_try_compile "$LINENO"; then :
13746
13747 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13748
13749
13750$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13751
13752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13753$as_echo "yes" >&6; }
13754
13755else
13756
13757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13758$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013759
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013760fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013762
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013765
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013766fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013768 CFLAGS=$OLD_CFLAGS
13769
13770else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013771
Matthias Kloseb9621712010-04-24 17:59:49 +000013772 for ac_func in gethostbyname
13773do :
13774 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013775if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013776 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013777#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013778_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013779
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013780fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013781done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013782
Michael W. Hudson54241132001-12-07 15:38:26 +000013783
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013784fi
13785
Michael W. Hudson54241132001-12-07 15:38:26 +000013786
13787
13788
13789
13790
13791
Guido van Rossum627b2d71993-12-24 10:39:16 +000013792# checks for system services
13793# (none yet)
13794
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013795# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013796ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013797if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013798
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013799else
Matthias Kloseb9621712010-04-24 17:59:49 +000013800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13801$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013802if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013803 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013804else
Martin v. Löwis11437992002-04-12 09:54:03 +000013805 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013806LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013809
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013810/* Override any GCC internal prototype to avoid an error.
13811 Use char because int might match the return type of a GCC
13812 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013813#ifdef __cplusplus
13814extern "C"
13815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013816char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013817int
13818main ()
13819{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013820return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013821 ;
13822 return 0;
13823}
13824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013825if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013826 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013827else
Matthias Kloseb9621712010-04-24 17:59:49 +000013828 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013829fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013830rm -f core conftest.err conftest.$ac_objext \
13831 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013832LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013833fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13835$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013836if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013837 cat >>confdefs.h <<_ACEOF
13838#define HAVE_LIBIEEE 1
13839_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013840
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013841 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013842
Guido van Rossum627b2d71993-12-24 10:39:16 +000013843fi
13844
Michael W. Hudson54241132001-12-07 15:38:26 +000013845
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013846fi
13847
Michael W. Hudson54241132001-12-07 15:38:26 +000013848
Guido van Rossum7f253911997-05-09 02:42:48 +000013849# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13851$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013853# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013854if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013855 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013856if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013857then
13858
Matthias Kloseb9621712010-04-24 17:59:49 +000013859$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013860
Matthias Kloseb9621712010-04-24 17:59:49 +000013861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13862$as_echo "yes" >&6; }
13863else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13864$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013865fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013866else
Matthias Kloseb9621712010-04-24 17:59:49 +000013867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13868$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013869fi
13870
Guido van Rossum7f253911997-05-09 02:42:48 +000013871
Guido van Rossum7f43da71994-08-01 12:15:30 +000013872# check for --with-libm=...
13873
Guido van Rossum563e7081996-09-10 18:20:48 +000013874case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013875Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013876*) LIBM=-lm
13877esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13879$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013881# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013882if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013883 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013884if test "$withval" = no
13885then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13887$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013888elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013889then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13891$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013892else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013893fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013894else
Matthias Kloseb9621712010-04-24 17:59:49 +000013895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13896$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013897fi
13898
Guido van Rossum7f43da71994-08-01 12:15:30 +000013899
13900# check for --with-libc=...
13901
Matthias Kloseb9621712010-04-24 17:59:49 +000013902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13903$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013905# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013906if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013908if test "$withval" = no
13909then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13911$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013912elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013913then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13915$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013916else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013917fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013918else
Matthias Kloseb9621712010-04-24 17:59:49 +000013919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13920$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013921fi
13922
Guido van Rossum7f43da71994-08-01 12:15:30 +000013923
Stefan Krah1919b7e2012-03-21 18:25:23 +010013924# **************************************
13925# * Check for gcc x64 inline assembler *
13926# **************************************
13927
13928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13929$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13931/* end confdefs.h. */
13932
13933int
13934main ()
13935{
13936
13937 __asm__ __volatile__ ("movq %rcx, %rax");
13938
13939 ;
13940 return 0;
13941}
13942_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013943if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013944 have_gcc_asm_for_x64=yes
13945else
13946 have_gcc_asm_for_x64=no
13947fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013948rm -f core conftest.err conftest.$ac_objext \
13949 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13951$as_echo "$have_gcc_asm_for_x64" >&6; }
13952if test "$have_gcc_asm_for_x64" = yes
13953then
13954
13955$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13956
13957fi
13958
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013959# **************************************************
13960# * Check for various properties of floating point *
13961# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013962
Matthias Kloseb9621712010-04-24 17:59:49 +000013963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13964$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013965if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013966 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013967else
13968
Matthias Kloseb9621712010-04-24 17:59:49 +000013969if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013970 ac_cv_little_endian_double=no
13971else
Matthias Kloseb9621712010-04-24 17:59:49 +000013972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013973/* end confdefs.h. */
13974
13975#include <string.h>
13976int main() {
13977 double x = 9006104071832581.0;
13978 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13979 return 0;
13980 else
13981 return 1;
13982}
13983
13984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013985if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013986 ac_cv_little_endian_double=yes
13987else
Matthias Kloseb9621712010-04-24 17:59:49 +000013988 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013989fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013990rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13991 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013992fi
13993
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013994fi
13995
Matthias Kloseb9621712010-04-24 17:59:49 +000013996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13997$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013998if test "$ac_cv_little_endian_double" = yes
13999then
14000
Matthias Kloseb9621712010-04-24 17:59:49 +000014001$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014002
14003fi
14004
Matthias Kloseb9621712010-04-24 17:59:49 +000014005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
14006$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014007if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014008 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014009else
14010
Matthias Kloseb9621712010-04-24 17:59:49 +000014011if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014012 ac_cv_big_endian_double=no
14013else
Matthias Kloseb9621712010-04-24 17:59:49 +000014014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014015/* end confdefs.h. */
14016
14017#include <string.h>
14018int main() {
14019 double x = 9006104071832581.0;
14020 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
14021 return 0;
14022 else
14023 return 1;
14024}
14025
14026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014027if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014028 ac_cv_big_endian_double=yes
14029else
Matthias Kloseb9621712010-04-24 17:59:49 +000014030 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014031fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014032rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14033 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014034fi
14035
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014036fi
14037
Matthias Kloseb9621712010-04-24 17:59:49 +000014038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
14039$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014040if test "$ac_cv_big_endian_double" = yes
14041then
14042
Matthias Kloseb9621712010-04-24 17:59:49 +000014043$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014044
14045fi
14046
14047# Some ARM platforms use a mixed-endian representation for doubles.
14048# While Python doesn't currently have full support for these platforms
14049# (see e.g., issue 1762561), we can at least make sure that float <-> string
14050# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14052$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014053if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014054 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014055else
14056
Matthias Kloseb9621712010-04-24 17:59:49 +000014057if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014058 ac_cv_mixed_endian_double=no
14059else
Matthias Kloseb9621712010-04-24 17:59:49 +000014060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014061/* end confdefs.h. */
14062
14063#include <string.h>
14064int main() {
14065 double x = 9006104071832581.0;
14066 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14067 return 0;
14068 else
14069 return 1;
14070}
14071
14072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014073if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014074 ac_cv_mixed_endian_double=yes
14075else
Matthias Kloseb9621712010-04-24 17:59:49 +000014076 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014077fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14079 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014080fi
14081
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014082fi
14083
Matthias Kloseb9621712010-04-24 17:59:49 +000014084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14085$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014086if test "$ac_cv_mixed_endian_double" = yes
14087then
14088
Matthias Kloseb9621712010-04-24 17:59:49 +000014089$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014090
14091fi
14092
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014093# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014094# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014095# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014096# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014097# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014098# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014099
14100# This inline assembler syntax may also work for suncc and icc,
14101# so we try it on all platforms.
14102
Matthias Kloseb9621712010-04-24 17:59:49 +000014103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14104$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014106/* end confdefs.h. */
14107
14108int
14109main ()
14110{
14111
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014112 unsigned short cw;
14113 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14114 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014115
14116 ;
14117 return 0;
14118}
14119_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014120if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014121 have_gcc_asm_for_x87=yes
14122else
Matthias Kloseb9621712010-04-24 17:59:49 +000014123 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014124fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014125rm -f core conftest.err conftest.$ac_objext \
14126 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14128$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014129if test "$have_gcc_asm_for_x87" = yes
14130then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014131
Matthias Kloseb9621712010-04-24 17:59:49 +000014132$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014133
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014134fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014135
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14137$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14139/* end confdefs.h. */
14140
14141int
14142main ()
14143{
14144
14145 unsigned int fpcr;
14146 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14147 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14148
14149 ;
14150 return 0;
14151}
14152_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014153if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014154 have_gcc_asm_for_mc68881=yes
14155else
14156 have_gcc_asm_for_mc68881=no
14157fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014158rm -f core conftest.err conftest.$ac_objext \
14159 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14161$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14162if test "$have_gcc_asm_for_mc68881" = yes
14163then
14164
14165$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14166
14167fi
14168
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014169# Detect whether system arithmetic is subject to x87-style double
14170# rounding issues. The result of this test has little meaning on non
14171# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14172# mode is round-to-nearest and double rounding issues are present, and
14173# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14175$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014176# $BASECFLAGS may affect the result
14177ac_save_cc="$CC"
14178CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014179if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014180 ac_cv_x87_double_rounding=no
14181else
Matthias Kloseb9621712010-04-24 17:59:49 +000014182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014183/* end confdefs.h. */
14184
14185#include <stdlib.h>
14186#include <math.h>
14187int main() {
14188 volatile double x, y, z;
14189 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14190 x = 0.99999999999999989; /* 1-2**-53 */
14191 y = 1./x;
14192 if (y != 1.)
14193 exit(0);
14194 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14195 x = 1e16;
14196 y = 2.99999;
14197 z = x + y;
14198 if (z != 1e16+4.)
14199 exit(0);
14200 /* both tests show evidence of double rounding */
14201 exit(1);
14202}
14203
14204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014205if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014206 ac_cv_x87_double_rounding=no
14207else
Matthias Kloseb9621712010-04-24 17:59:49 +000014208 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014210rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14211 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014212fi
14213
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014214CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14216$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014217if test "$ac_cv_x87_double_rounding" = yes
14218then
14219
Matthias Kloseb9621712010-04-24 17:59:49 +000014220$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014221
14222fi
14223
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014224# ************************************
14225# * Check for mathematical functions *
14226# ************************************
14227
14228LIBS_SAVE=$LIBS
14229LIBS="$LIBS $LIBM"
14230
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014231for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14232do :
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
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014243for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014244do :
14245 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14246ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014247if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014248 cat >>confdefs.h <<_ACEOF
14249#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14250_ACEOF
14251
14252fi
14253done
14254
14255ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14256"
Victor Stinnere0be4232011-10-25 13:06:09 +020014257if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014258 ac_have_decl=1
14259else
14260 ac_have_decl=0
14261fi
14262
14263cat >>confdefs.h <<_ACEOF
14264#define HAVE_DECL_ISINF $ac_have_decl
14265_ACEOF
14266ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14267"
Victor Stinnere0be4232011-10-25 13:06:09 +020014268if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014269 ac_have_decl=1
14270else
14271 ac_have_decl=0
14272fi
14273
14274cat >>confdefs.h <<_ACEOF
14275#define HAVE_DECL_ISNAN $ac_have_decl
14276_ACEOF
14277ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14278"
Victor Stinnere0be4232011-10-25 13:06:09 +020014279if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014280 ac_have_decl=1
14281else
14282 ac_have_decl=0
14283fi
14284
14285cat >>confdefs.h <<_ACEOF
14286#define HAVE_DECL_ISFINITE $ac_have_decl
14287_ACEOF
14288
14289
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014290# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14291# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14293$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014294if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014295 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014296else
14297
Matthias Kloseb9621712010-04-24 17:59:49 +000014298if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014299 ac_cv_tanh_preserves_zero_sign=no
14300else
Matthias Kloseb9621712010-04-24 17:59:49 +000014301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014302/* end confdefs.h. */
14303
14304#include <math.h>
14305#include <stdlib.h>
14306int main() {
14307 /* return 0 if either negative zeros don't exist
14308 on this platform or if negative zeros exist
14309 and tanh(-0.) == -0. */
14310 if (atan2(0., -1.) == atan2(-0., -1.) ||
14311 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14312 else exit(1);
14313}
14314
14315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014316if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014317 ac_cv_tanh_preserves_zero_sign=yes
14318else
Matthias Kloseb9621712010-04-24 17:59:49 +000014319 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014320fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014321rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14322 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014323fi
14324
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014325fi
14326
Matthias Kloseb9621712010-04-24 17:59:49 +000014327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14328$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014329if test "$ac_cv_tanh_preserves_zero_sign" = yes
14330then
14331
Matthias Kloseb9621712010-04-24 17:59:49 +000014332$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014333
14334fi
14335
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014336if test "$ac_cv_func_log1p" = yes
14337then
14338 # On some versions of AIX, log1p(-0.) returns 0. instead of
14339 # -0. See issue #9920.
14340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14341$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014342 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014343 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014344else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014345
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014346 if test "$cross_compiling" = yes; then :
14347 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014348else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14350/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014351
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014352 #include <math.h>
14353 #include <stdlib.h>
14354 int main() {
14355 /* Fail if the signs of log1p(-0.) and -0. can be
14356 distinguished. */
14357 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14358 return 0;
14359 else
14360 return 1;
14361 }
14362
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014363_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014364if ac_fn_c_try_run "$LINENO"; then :
14365 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014366else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014367 ac_cv_log1p_drops_zero_sign=yes
14368fi
14369rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14370 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014371fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014372
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014373fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014374
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14376$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14377fi
14378if test "$ac_cv_log1p_drops_zero_sign" = yes
14379then
14380
14381$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14382
14383fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014384
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014385LIBS=$LIBS_SAVE
14386
Mark Dickinsona614f042009-11-28 12:48:43 +000014387# For multiprocessing module, check that sem_open
14388# actually works. For FreeBSD versions <= 7.2,
14389# the kernel module that provides POSIX semaphores
14390# isn't loaded by default, so an attempt to call
14391# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14393$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014394if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014395 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014396else
Matthias Kloseb9621712010-04-24 17:59:49 +000014397 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014398 ac_cv_posix_semaphores_enabled=yes
14399else
Matthias Kloseb9621712010-04-24 17:59:49 +000014400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014401/* end confdefs.h. */
14402
14403#include <unistd.h>
14404#include <fcntl.h>
14405#include <stdio.h>
14406#include <semaphore.h>
14407#include <sys/stat.h>
14408
14409int main(void) {
14410 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14411 if (a == SEM_FAILED) {
14412 perror("sem_open");
14413 return 1;
14414 }
14415 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014416 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014417 return 0;
14418}
14419
14420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014421if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014422 ac_cv_posix_semaphores_enabled=yes
14423else
Matthias Kloseb9621712010-04-24 17:59:49 +000014424 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014425fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014426rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14427 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014428fi
14429
14430
Mark Dickinsona614f042009-11-28 12:48:43 +000014431fi
14432
Matthias Kloseb9621712010-04-24 17:59:49 +000014433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14434$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014435if test $ac_cv_posix_semaphores_enabled = no
14436then
14437
Matthias Kloseb9621712010-04-24 17:59:49 +000014438$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014439
14440fi
14441
Mark Dickinson10683072009-04-18 21:18:19 +000014442# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14444$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014445if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014446 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014447else
Matthias Kloseb9621712010-04-24 17:59:49 +000014448 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014449 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014450else
Matthias Kloseb9621712010-04-24 17:59:49 +000014451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014452/* end confdefs.h. */
14453
14454#include <unistd.h>
14455#include <fcntl.h>
14456#include <stdio.h>
14457#include <semaphore.h>
14458#include <sys/stat.h>
14459
14460int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014461 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014462 int count;
14463 int res;
14464 if(a==SEM_FAILED){
14465 perror("sem_open");
14466 return 1;
14467
14468 }
14469 res = sem_getvalue(a, &count);
14470 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014471 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014472 return res==-1 ? 1 : 0;
14473}
14474
Mark Dickinson10683072009-04-18 21:18:19 +000014475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014476if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014477 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014478else
Matthias Kloseb9621712010-04-24 17:59:49 +000014479 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014481rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14482 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014483fi
14484
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014485
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014486fi
14487
Matthias Kloseb9621712010-04-24 17:59:49 +000014488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14489$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014490if test $ac_cv_broken_sem_getvalue = yes
14491then
14492
Matthias Kloseb9621712010-04-24 17:59:49 +000014493$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014494
14495fi
14496
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014497ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14498"
14499if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14500 ac_have_decl=1
14501else
14502 ac_have_decl=0
14503fi
14504
14505cat >>confdefs.h <<_ACEOF
14506#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14507_ACEOF
14508ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14509"
14510if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14511 ac_have_decl=1
14512else
14513 ac_have_decl=0
14514fi
14515
14516cat >>confdefs.h <<_ACEOF
14517#define HAVE_DECL_RTLD_NOW $ac_have_decl
14518_ACEOF
14519ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14520"
14521if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14522 ac_have_decl=1
14523else
14524 ac_have_decl=0
14525fi
14526
14527cat >>confdefs.h <<_ACEOF
14528#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14529_ACEOF
14530ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14531"
14532if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14533 ac_have_decl=1
14534else
14535 ac_have_decl=0
14536fi
14537
14538cat >>confdefs.h <<_ACEOF
14539#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14540_ACEOF
14541ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14542"
14543if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14544 ac_have_decl=1
14545else
14546 ac_have_decl=0
14547fi
14548
14549cat >>confdefs.h <<_ACEOF
14550#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14551_ACEOF
14552ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14553"
14554if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14555 ac_have_decl=1
14556else
14557 ac_have_decl=0
14558fi
14559
14560cat >>confdefs.h <<_ACEOF
14561#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14562_ACEOF
14563ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14564"
14565if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14566 ac_have_decl=1
14567else
14568 ac_have_decl=0
14569fi
14570
14571cat >>confdefs.h <<_ACEOF
14572#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14573_ACEOF
14574
14575
Mark Dickinsonbd792642009-03-18 20:06:12 +000014576# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14578$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014579# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014580if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014581 enableval=$enable_big_digits; case $enable_big_digits in
14582yes)
14583 enable_big_digits=30 ;;
14584no)
14585 enable_big_digits=15 ;;
1458615|30)
14587 ;;
14588*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014589 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 +000014590esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14592$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014593
14594cat >>confdefs.h <<_ACEOF
14595#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14596_ACEOF
14597
14598
14599else
Matthias Kloseb9621712010-04-24 17:59:49 +000014600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14601$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014602fi
14603
14604
Guido van Rossumef2255b2000-03-10 22:30:29 +000014605# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014606ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014607if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014608
14609
Matthias Kloseb9621712010-04-24 17:59:49 +000014610$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014611
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014612 wchar_h="yes"
14613
Guido van Rossumef2255b2000-03-10 22:30:29 +000014614else
Martin v. Löwis11437992002-04-12 09:54:03 +000014615 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014616
14617fi
14618
Michael W. Hudson54241132001-12-07 15:38:26 +000014619
Martin v. Löwis11437992002-04-12 09:54:03 +000014620
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014621# determine wchar_t size
14622if test "$wchar_h" = yes
14623then
Matthias Kloseb9621712010-04-24 17:59:49 +000014624 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014625# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14626# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14627# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14629$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014630if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014631 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014632else
Matthias Kloseb9621712010-04-24 17:59:49 +000014633 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14634"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014635
Martin v. Löwis11437992002-04-12 09:54:03 +000014636else
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 if test "$ac_cv_type_wchar_t" = yes; then
14638 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14639$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014640as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014641See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014642 else
14643 ac_cv_sizeof_wchar_t=0
14644 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014646
Martin v. Löwis11437992002-04-12 09:54:03 +000014647fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14649$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014650
14651
14652
Martin v. Löwis11437992002-04-12 09:54:03 +000014653cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014654#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014655_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014656
Michael W. Hudson54241132001-12-07 15:38:26 +000014657
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014658fi
14659
Matthias Kloseb9621712010-04-24 17:59:49 +000014660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14661$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014662have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014664/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014665
14666#include <tcl.h>
14667#if TCL_UTF_MAX != 6
14668# error "NOT UCS4_TCL"
14669#endif
14670int
14671main ()
14672{
14673
14674 ;
14675 return 0;
14676}
14677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014678if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014679
14680
Matthias Kloseb9621712010-04-24 17:59:49 +000014681$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014682
14683 have_ucs4_tcl=yes
14684
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14688$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014689
Skip Montanaro6dead952003-09-25 14:50:04 +000014690# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014691if test "$wchar_h" = yes
14692then
14693 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14695$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014696 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014697 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014698else
14699
Matthias Kloseb9621712010-04-24 17:59:49 +000014700 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014701 ac_cv_wchar_t_signed=yes
14702else
Matthias Kloseb9621712010-04-24 17:59:49 +000014703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014704/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014705
14706 #include <wchar.h>
14707 int main()
14708 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014709 /* Success: exit code 0 */
14710 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014711 }
14712
14713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014714if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014715 ac_cv_wchar_t_signed=yes
14716else
Matthias Kloseb9621712010-04-24 17:59:49 +000014717 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14720 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014721fi
14722
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014723fi
14724
Matthias Kloseb9621712010-04-24 17:59:49 +000014725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14726$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014727fi
14728
Georg Brandl52d168a2008-01-07 18:10:24 +000014729# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014730if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014731 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014732then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014733 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014734
Matthias Kloseb9621712010-04-24 17:59:49 +000014735$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014736
Georg Brandl52d168a2008-01-07 18:10:24 +000014737else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014738 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014739fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14741$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014742
14743# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14745$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014746if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014747 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014748else
Matthias Kloseb9621712010-04-24 17:59:49 +000014749 ac_cv_c_bigendian=unknown
14750 # See if we're dealing with a universal compiler.
14751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14752/* end confdefs.h. */
14753#ifndef __APPLE_CC__
14754 not a universal capable compiler
14755 #endif
14756 typedef int dummy;
14757
Skip Montanaro6dead952003-09-25 14:50:04 +000014758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014759if ac_fn_c_try_compile "$LINENO"; then :
14760
14761 # Check for potential -arch flags. It is not universal unless
14762 # there are at least two -arch flags with different values.
14763 ac_arch=
14764 ac_prev=
14765 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14766 if test -n "$ac_prev"; then
14767 case $ac_word in
14768 i?86 | x86_64 | ppc | ppc64)
14769 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14770 ac_arch=$ac_word
14771 else
14772 ac_cv_c_bigendian=universal
14773 break
14774 fi
14775 ;;
14776 esac
14777 ac_prev=
14778 elif test "x$ac_word" = "x-arch"; then
14779 ac_prev=arch
14780 fi
14781 done
14782fi
14783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14784 if test $ac_cv_c_bigendian = unknown; then
14785 # See if sys/param.h defines the BYTE_ORDER macro.
14786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014787/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014788#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014789 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014790
Martin v. Löwis11437992002-04-12 09:54:03 +000014791int
14792main ()
14793{
Matthias Kloseb9621712010-04-24 17:59:49 +000014794#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14795 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14796 && LITTLE_ENDIAN)
14797 bogus endian macros
14798 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014799
14800 ;
14801 return 0;
14802}
14803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014804if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014805 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014807/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014808#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014809 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014810
Martin v. Löwis11437992002-04-12 09:54:03 +000014811int
14812main ()
14813{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014814#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014815 not big endian
14816 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014817
14818 ;
14819 return 0;
14820}
14821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014822if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014823 ac_cv_c_bigendian=yes
14824else
Matthias Kloseb9621712010-04-24 17:59:49 +000014825 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014826fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014828fi
14829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14830 fi
14831 if test $ac_cv_c_bigendian = unknown; then
14832 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014834/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014835#include <limits.h>
14836
Martin v. Löwis11437992002-04-12 09:54:03 +000014837int
14838main ()
14839{
Matthias Kloseb9621712010-04-24 17:59:49 +000014840#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14841 bogus endian macros
14842 #endif
14843
Martin v. Löwis11437992002-04-12 09:54:03 +000014844 ;
14845 return 0;
14846}
14847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014848if ac_fn_c_try_compile "$LINENO"; then :
14849 # It does; now see whether it defined to _BIG_ENDIAN or not.
14850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14851/* end confdefs.h. */
14852#include <limits.h>
14853
14854int
14855main ()
14856{
14857#ifndef _BIG_ENDIAN
14858 not big endian
14859 #endif
14860
14861 ;
14862 return 0;
14863}
14864_ACEOF
14865if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014866 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014867else
Matthias Kloseb9621712010-04-24 17:59:49 +000014868 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014869fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14871fi
14872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14873 fi
14874 if test $ac_cv_c_bigendian = unknown; then
14875 # Compile a test program.
14876 if test "$cross_compiling" = yes; then :
14877 # Try to guess by grepping values from an object file.
14878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14879/* end confdefs.h. */
14880short int ascii_mm[] =
14881 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14882 short int ascii_ii[] =
14883 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14884 int use_ascii (int i) {
14885 return ascii_mm[i] + ascii_ii[i];
14886 }
14887 short int ebcdic_ii[] =
14888 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14889 short int ebcdic_mm[] =
14890 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14891 int use_ebcdic (int i) {
14892 return ebcdic_mm[i] + ebcdic_ii[i];
14893 }
14894 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014895
Matthias Kloseb9621712010-04-24 17:59:49 +000014896int
14897main ()
14898{
14899return use_ascii (foo) == use_ebcdic (foo);
14900 ;
14901 return 0;
14902}
14903_ACEOF
14904if ac_fn_c_try_compile "$LINENO"; then :
14905 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14906 ac_cv_c_bigendian=yes
14907 fi
14908 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14909 if test "$ac_cv_c_bigendian" = unknown; then
14910 ac_cv_c_bigendian=no
14911 else
14912 # finding both strings is unlikely to happen, but who knows?
14913 ac_cv_c_bigendian=unknown
14914 fi
14915 fi
14916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014918else
Matthias Kloseb9621712010-04-24 17:59:49 +000014919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014920/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014921$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014922int
14923main ()
14924{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014925
Matthias Kloseb9621712010-04-24 17:59:49 +000014926 /* Are we little or big endian? From Harbison&Steele. */
14927 union
14928 {
14929 long int l;
14930 char c[sizeof (long int)];
14931 } u;
14932 u.l = 1;
14933 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934
14935 ;
14936 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014937}
Martin v. Löwis11437992002-04-12 09:54:03 +000014938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014939if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014940 ac_cv_c_bigendian=no
14941else
Matthias Kloseb9621712010-04-24 17:59:49 +000014942 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014943fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014944rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14945 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947
Matthias Kloseb9621712010-04-24 17:59:49 +000014948 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014949fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14951$as_echo "$ac_cv_c_bigendian" >&6; }
14952 case $ac_cv_c_bigendian in #(
14953 yes)
14954 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14955;; #(
14956 no)
14957 ;; #(
14958 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014959
Matthias Kloseb9621712010-04-24 17:59:49 +000014960$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014961
Matthias Kloseb9621712010-04-24 17:59:49 +000014962 ;; #(
14963 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014964 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014965 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014966 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014967
Michael W. Hudson54241132001-12-07 15:38:26 +000014968
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014969# ABI version string for Python extension modules. This appears between the
14970# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14971# from the following attributes which affect the ABI of this Python build (in
14972# this order):
14973#
14974# * The Python implementation (always 'cpython-' for us)
14975# * The major and minor version numbers
14976# * --with-pydebug (adds a 'd')
14977# * --with-pymalloc (adds a 'm')
14978# * --with-wide-unicode (adds a 'u')
14979#
14980# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014981# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14982# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014983
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14985$as_echo_n "checking ABIFLAGS... " >&6; }
14986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14987$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14989$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014990SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14992$as_echo "$SOABI" >&6; }
14993
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014994
14995case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014996 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014997 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14998 *)
14999 EXT_SUFFIX=${SHLIB_SUFFIX};;
15000esac
15001
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15003$as_echo_n "checking LDVERSION... " >&6; }
15004LDVERSION='$(VERSION)$(ABIFLAGS)'
15005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15006$as_echo "$LDVERSION" >&6; }
15007
doko@python.org87421192013-01-26 11:39:31 +010015008
doko@ubuntu.com55532312016-06-14 08:55:19 +020015009if test x$PLATFORM_TRIPLET = x; then
15010 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15011else
15012 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15013fi
doko@python.org87421192013-01-26 11:39:31 +010015014
15015
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015016# Check whether right shifting a negative integer extends the sign bit
15017# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15019$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015020if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015021 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015022else
Martin v. Löwis11437992002-04-12 09:54:03 +000015023
Matthias Kloseb9621712010-04-24 17:59:49 +000015024if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015025 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015026else
Matthias Kloseb9621712010-04-24 17:59:49 +000015027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015028/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015029
15030int main()
15031{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015032 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015033}
15034
Martin v. Löwis11437992002-04-12 09:54:03 +000015035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015036if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015037 ac_cv_rshift_extends_sign=yes
15038else
Matthias Kloseb9621712010-04-24 17:59:49 +000015039 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015041rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15042 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015043fi
15044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015045fi
15046
Matthias Kloseb9621712010-04-24 17:59:49 +000015047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15048$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015049if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015050then
Martin v. Löwis11437992002-04-12 09:54:03 +000015051
Matthias Kloseb9621712010-04-24 17:59:49 +000015052$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015053
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015054fi
15055
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015056# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15058$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015059if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015060 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015061else
Martin v. Löwis11437992002-04-12 09:54:03 +000015062
Matthias Kloseb9621712010-04-24 17:59:49 +000015063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015064/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015065#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015066int
15067main ()
15068{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015069
15070 FILE *f = fopen("/dev/null", "r");
15071 flockfile(f);
15072 getc_unlocked(f);
15073 funlockfile(f);
15074
Martin v. Löwis11437992002-04-12 09:54:03 +000015075 ;
15076 return 0;
15077}
15078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015079if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015080 ac_cv_have_getc_unlocked=yes
15081else
Matthias Kloseb9621712010-04-24 17:59:49 +000015082 ac_cv_have_getc_unlocked=no
15083fi
15084rm -f core conftest.err conftest.$ac_objext \
15085 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015087
Matthias Kloseb9621712010-04-24 17:59:49 +000015088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15089$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015090if test "$ac_cv_have_getc_unlocked" = yes
15091then
Martin v. Löwis11437992002-04-12 09:54:03 +000015092
Matthias Kloseb9621712010-04-24 17:59:49 +000015093$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015094
15095fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015096
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015097# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015098# save the value of LIBS so we don't actually link Python with readline
15099LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015100
Gregory P. Smith18820942008-09-07 06:24:49 +000015101# On some systems we need to link readline to a termcap compatible
15102# library. NOTE: Keep the precedence of listed libraries synchronised
15103# with setup.py.
15104py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15106$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015107for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015108 if test -z "$py_libtermcap"; then
15109 READLINE_LIBS="-lreadline"
15110 else
15111 READLINE_LIBS="-lreadline -l$py_libtermcap"
15112 fi
15113 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015115/* end confdefs.h. */
15116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015117/* Override any GCC internal prototype to avoid an error.
15118 Use char because int might match the return type of a GCC
15119 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015120#ifdef __cplusplus
15121extern "C"
15122#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015123char readline ();
15124int
15125main ()
15126{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015127return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015128 ;
15129 return 0;
15130}
15131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015132if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015133 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015134fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015135rm -f core conftest.err conftest.$ac_objext \
15136 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015137 if test $py_cv_lib_readline = yes; then
15138 break
15139 fi
15140done
15141# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15142#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015143if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15145$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015146else
Matthias Kloseb9621712010-04-24 17:59:49 +000015147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15148$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015149
Matthias Kloseb9621712010-04-24 17:59:49 +000015150$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015151
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015152fi
15153
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015154# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000015155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
15156$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015157if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015158 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015159else
15160 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015161LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015163/* end confdefs.h. */
15164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015165/* Override any GCC internal prototype to avoid an error.
15166 Use char because int might match the return type of a GCC
15167 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015168#ifdef __cplusplus
15169extern "C"
15170#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015171char rl_callback_handler_install ();
15172int
15173main ()
15174{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015175return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015176 ;
15177 return 0;
15178}
15179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015180if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015181 ac_cv_lib_readline_rl_callback_handler_install=yes
15182else
Matthias Kloseb9621712010-04-24 17:59:49 +000015183 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015185rm -f core conftest.err conftest.$ac_objext \
15186 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015187LIBS=$ac_check_lib_save_LIBS
15188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
15190$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015191if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015192
Matthias Kloseb9621712010-04-24 17:59:49 +000015193$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015194
15195fi
15196
15197
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015198# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015200/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015201#include <readline/readline.h>
15202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015203if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015204 have_readline=yes
15205else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015206 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015207
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015208fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015209rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015210if test $have_readline = yes
15211then
Matthias Kloseb9621712010-04-24 17:59:49 +000015212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015213/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015214#include <readline/readline.h>
15215
15216_ACEOF
15217if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015218 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015219
Matthias Kloseb9621712010-04-24 17:59:49 +000015220$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015221
15222fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015223rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015224
Matthias Kloseb9621712010-04-24 17:59:49 +000015225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015226/* end confdefs.h. */
15227#include <readline/readline.h>
15228
15229_ACEOF
15230if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015231 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015232
Matthias Kloseb9621712010-04-24 17:59:49 +000015233$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015234
15235fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015236rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015237
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015238fi
15239
Martin v. Löwis0daad592001-09-30 21:09:59 +000015240# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15242$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015243if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015244 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015245else
Martin v. Löwis11437992002-04-12 09:54:03 +000015246 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015247LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015251/* Override any GCC internal prototype to avoid an error.
15252 Use char because int might match the return type of a GCC
15253 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015254#ifdef __cplusplus
15255extern "C"
15256#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015257char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015258int
15259main ()
15260{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015261return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015262 ;
15263 return 0;
15264}
15265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015266if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015267 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015268else
Matthias Kloseb9621712010-04-24 17:59:49 +000015269 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015271rm -f core conftest.err conftest.$ac_objext \
15272 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015273LIBS=$ac_check_lib_save_LIBS
15274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15276$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015277if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015278
Matthias Kloseb9621712010-04-24 17:59:49 +000015279$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015280
Martin v. Löwis0daad592001-09-30 21:09:59 +000015281fi
15282
Michael W. Hudson54241132001-12-07 15:38:26 +000015283
Thomas Wouters89d996e2007-09-08 17:39:28 +000015284# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15286$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015287if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015288 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015289else
15290 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015291LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015293/* end confdefs.h. */
15294
15295/* Override any GCC internal prototype to avoid an error.
15296 Use char because int might match the return type of a GCC
15297 builtin and then its argument prototype would still apply. */
15298#ifdef __cplusplus
15299extern "C"
15300#endif
15301char rl_completion_display_matches_hook ();
15302int
15303main ()
15304{
15305return rl_completion_display_matches_hook ();
15306 ;
15307 return 0;
15308}
15309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015310if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015311 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15312else
Matthias Kloseb9621712010-04-24 17:59:49 +000015313 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015314fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015315rm -f core conftest.err conftest.$ac_objext \
15316 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015317LIBS=$ac_check_lib_save_LIBS
15318fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15320$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015321if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015322
Matthias Kloseb9621712010-04-24 17:59:49 +000015323$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015324
15325fi
15326
15327
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015328# also in 4.0, but not in editline
15329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15330$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15331if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15332 $as_echo_n "(cached) " >&6
15333else
15334 ac_check_lib_save_LIBS=$LIBS
15335LIBS="-lreadline $READLINE_LIBS $LIBS"
15336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15337/* end confdefs.h. */
15338
15339/* Override any GCC internal prototype to avoid an error.
15340 Use char because int might match the return type of a GCC
15341 builtin and then its argument prototype would still apply. */
15342#ifdef __cplusplus
15343extern "C"
15344#endif
15345char rl_resize_terminal ();
15346int
15347main ()
15348{
15349return rl_resize_terminal ();
15350 ;
15351 return 0;
15352}
15353_ACEOF
15354if ac_fn_c_try_link "$LINENO"; then :
15355 ac_cv_lib_readline_rl_resize_terminal=yes
15356else
15357 ac_cv_lib_readline_rl_resize_terminal=no
15358fi
15359rm -f core conftest.err conftest.$ac_objext \
15360 conftest$ac_exeext conftest.$ac_ext
15361LIBS=$ac_check_lib_save_LIBS
15362fi
15363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15364$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15365if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15366
15367$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15368
15369fi
15370
15371
Martin v. Löwis0daad592001-09-30 21:09:59 +000015372# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15374$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015375if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015376 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015377else
Martin v. Löwis11437992002-04-12 09:54:03 +000015378 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015379LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015382
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015383/* Override any GCC internal prototype to avoid an error.
15384 Use char because int might match the return type of a GCC
15385 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015386#ifdef __cplusplus
15387extern "C"
15388#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015389char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015390int
15391main ()
15392{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015393return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015394 ;
15395 return 0;
15396}
15397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015398if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015399 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015400else
Matthias Kloseb9621712010-04-24 17:59:49 +000015401 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015402fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015403rm -f core conftest.err conftest.$ac_objext \
15404 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015405LIBS=$ac_check_lib_save_LIBS
15406fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15408$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015409if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015410
Matthias Kloseb9621712010-04-24 17:59:49 +000015411$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015412
Guido van Rossum353ae582001-07-10 16:45:32 +000015413fi
15414
Jack Jansendd19cf82001-12-06 22:36:17 +000015415
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015416# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015418/* end confdefs.h. */
15419#include <readline/readline.h>
15420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015421if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015422 have_readline=yes
15423else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015424 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015425
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015426fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015427rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015428if test $have_readline = yes
15429then
Matthias Kloseb9621712010-04-24 17:59:49 +000015430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015431/* end confdefs.h. */
15432#include <readline/readline.h>
15433
15434_ACEOF
15435if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015436 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015437
Matthias Kloseb9621712010-04-24 17:59:49 +000015438$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015439
15440fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015441rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015442
15443fi
15444
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15446$as_echo_n "checking for append_history in -lreadline... " >&6; }
15447if ${ac_cv_lib_readline_append_history+:} false; then :
15448 $as_echo_n "(cached) " >&6
15449else
15450 ac_check_lib_save_LIBS=$LIBS
15451LIBS="-lreadline $READLINE_LIBS $LIBS"
15452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15453/* end confdefs.h. */
15454
15455/* Override any GCC internal prototype to avoid an error.
15456 Use char because int might match the return type of a GCC
15457 builtin and then its argument prototype would still apply. */
15458#ifdef __cplusplus
15459extern "C"
15460#endif
15461char append_history ();
15462int
15463main ()
15464{
15465return append_history ();
15466 ;
15467 return 0;
15468}
15469_ACEOF
15470if ac_fn_c_try_link "$LINENO"; then :
15471 ac_cv_lib_readline_append_history=yes
15472else
15473 ac_cv_lib_readline_append_history=no
15474fi
15475rm -f core conftest.err conftest.$ac_objext \
15476 conftest$ac_exeext conftest.$ac_ext
15477LIBS=$ac_check_lib_save_LIBS
15478fi
15479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15480$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15481if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15482
15483$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15484
15485fi
15486
15487
Martin v. Löwis82bca632006-02-10 20:49:30 +000015488# End of readline checks: restore LIBS
15489LIBS=$LIBS_no_readline
15490
Matthias Kloseb9621712010-04-24 17:59:49 +000015491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15492$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015493if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015494 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015495else
Martin v. Löwis11437992002-04-12 09:54:03 +000015496
Matthias Kloseb9621712010-04-24 17:59:49 +000015497if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015498 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015499else
Matthias Kloseb9621712010-04-24 17:59:49 +000015500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015501/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015502
15503int main()
15504{
15505 int val1 = nice(1);
15506 if (val1 != -1 && val1 == nice(2))
15507 exit(0);
15508 exit(1);
15509}
15510
Martin v. Löwis11437992002-04-12 09:54:03 +000015511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015512if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015513 ac_cv_broken_nice=yes
15514else
Matthias Kloseb9621712010-04-24 17:59:49 +000015515 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015516fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15518 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015519fi
15520
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015521fi
15522
Matthias Kloseb9621712010-04-24 17:59:49 +000015523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15524$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015525if test "$ac_cv_broken_nice" = yes
15526then
Martin v. Löwis11437992002-04-12 09:54:03 +000015527
Matthias Kloseb9621712010-04-24 17:59:49 +000015528$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015529
15530fi
15531
Matthias Kloseb9621712010-04-24 17:59:49 +000015532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15533$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015534if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015535 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015536else
Matthias Kloseb9621712010-04-24 17:59:49 +000015537 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015538 ac_cv_broken_poll=no
15539else
Matthias Kloseb9621712010-04-24 17:59:49 +000015540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015541/* end confdefs.h. */
15542
15543#include <poll.h>
15544
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015545int main()
15546{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015547 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015548 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015549
15550 close (42);
15551
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015552 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015553 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015554 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015555 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015556 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015557 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015558 return 1;
15559}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015560
15561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015562if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015563 ac_cv_broken_poll=yes
15564else
Matthias Kloseb9621712010-04-24 17:59:49 +000015565 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015566fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015567rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15568 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015570
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015571fi
15572
Matthias Kloseb9621712010-04-24 17:59:49 +000015573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15574$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015575if test "$ac_cv_broken_poll" = yes
15576then
15577
Matthias Kloseb9621712010-04-24 17:59:49 +000015578$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015579
15580fi
15581
Brett Cannon43802422005-02-10 20:48:03 +000015582# 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 +000015583# (which is not required by ISO C or UNIX spec) and/or if we support
15584# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015585ac_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 +000015586#include <$ac_cv_struct_tm>
15587
Matthias Kloseb9621712010-04-24 17:59:49 +000015588"
Victor Stinnere0be4232011-10-25 13:06:09 +020015589if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015590
15591cat >>confdefs.h <<_ACEOF
15592#define HAVE_STRUCT_TM_TM_ZONE 1
15593_ACEOF
15594
15595
15596fi
15597
15598if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15599
Matthias Kloseb9621712010-04-24 17:59:49 +000015600$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015601
15602else
Matthias Kloseb9621712010-04-24 17:59:49 +000015603 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15604"
Victor Stinnere0be4232011-10-25 13:06:09 +020015605if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015606 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015607else
Matthias Kloseb9621712010-04-24 17:59:49 +000015608 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015609fi
15610
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015611cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015612#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015613_ACEOF
15614
Matthias Kloseb9621712010-04-24 17:59:49 +000015615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15616$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015617if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015618 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015619else
Matthias Kloseb9621712010-04-24 17:59:49 +000015620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015621/* end confdefs.h. */
15622#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015623#if !HAVE_DECL_TZNAME
15624extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015625#endif
15626
15627int
15628main ()
15629{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015630return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015631 ;
15632 return 0;
15633}
15634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015635if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015636 ac_cv_var_tzname=yes
15637else
Matthias Kloseb9621712010-04-24 17:59:49 +000015638 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015640rm -f core conftest.err conftest.$ac_objext \
15641 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15644$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015645 if test $ac_cv_var_tzname = yes; then
15646
Matthias Kloseb9621712010-04-24 17:59:49 +000015647$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015648
15649 fi
15650fi
15651
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015652
Martin v. Löwis1d459062005-03-14 21:23:33 +000015653# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15655$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015656if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015657 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015658else
15659
Matthias Kloseb9621712010-04-24 17:59:49 +000015660if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015661 ac_cv_working_tzset=no
15662else
Matthias Kloseb9621712010-04-24 17:59:49 +000015663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015664/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015665
15666#include <stdlib.h>
15667#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015668#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015669
15670#if HAVE_TZNAME
15671extern char *tzname[];
15672#endif
15673
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015674int main()
15675{
Brett Cannon18367812003-09-19 00:59:16 +000015676 /* Note that we need to ensure that not only does tzset(3)
15677 do 'something' with localtime, but it works as documented
15678 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015679 This includes making sure that tzname is set properly if
15680 tm->tm_zone does not exist since it is the alternative way
15681 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015682
15683 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015684 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015685 */
15686
Martin v. Löwis1d459062005-03-14 21:23:33 +000015687 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015688 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15689
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015690 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015691 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015692 if (localtime(&groundhogday)->tm_hour != 0)
15693 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015694#if HAVE_TZNAME
15695 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15696 if (strcmp(tzname[0], "UTC") ||
15697 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15698 exit(1);
15699#endif
Brett Cannon18367812003-09-19 00:59:16 +000015700
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015701 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015702 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015703 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015704 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015705#if HAVE_TZNAME
15706 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15707 exit(1);
15708#endif
Brett Cannon18367812003-09-19 00:59:16 +000015709
15710 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15711 tzset();
15712 if (localtime(&groundhogday)->tm_hour != 11)
15713 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015714#if HAVE_TZNAME
15715 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15716 exit(1);
15717#endif
15718
15719#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015720 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15721 exit(1);
15722 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15723 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015724#endif
Brett Cannon18367812003-09-19 00:59:16 +000015725
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015726 exit(0);
15727}
15728
15729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015730if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015731 ac_cv_working_tzset=yes
15732else
Matthias Kloseb9621712010-04-24 17:59:49 +000015733 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015734fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015735rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15736 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015737fi
15738
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015739fi
15740
Matthias Kloseb9621712010-04-24 17:59:49 +000015741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15742$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015743if test "$ac_cv_working_tzset" = yes
15744then
15745
Matthias Kloseb9621712010-04-24 17:59:49 +000015746$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015747
15748fi
15749
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015750# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15752$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015753if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015754 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015755else
Matthias Kloseb9621712010-04-24 17:59:49 +000015756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015757/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015758#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015759int
15760main ()
15761{
15762
15763struct stat st;
15764st.st_mtim.tv_nsec = 1;
15765
15766 ;
15767 return 0;
15768}
15769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015770if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015771 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015772else
Matthias Kloseb9621712010-04-24 17:59:49 +000015773 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15776fi
15777
Matthias Kloseb9621712010-04-24 17:59:49 +000015778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15779$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015780if test "$ac_cv_stat_tv_nsec" = yes
15781then
15782
Matthias Kloseb9621712010-04-24 17:59:49 +000015783$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015784
15785fi
15786
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015787# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15789$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015790if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015791 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015792else
Matthias Kloseb9621712010-04-24 17:59:49 +000015793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015794/* end confdefs.h. */
15795#include <sys/stat.h>
15796int
15797main ()
15798{
15799
15800struct stat st;
15801st.st_mtimespec.tv_nsec = 1;
15802
15803 ;
15804 return 0;
15805}
15806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015807if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015808 ac_cv_stat_tv_nsec2=yes
15809else
Matthias Kloseb9621712010-04-24 17:59:49 +000015810 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15813fi
15814
Matthias Kloseb9621712010-04-24 17:59:49 +000015815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15816$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015817if test "$ac_cv_stat_tv_nsec2" = yes
15818then
15819
Matthias Kloseb9621712010-04-24 17:59:49 +000015820$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015821
15822fi
15823
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015824# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015825ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015826if test "$cross_compiling" = no; then
15827 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15828fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015829
15830for ac_header in curses.h ncurses.h
15831do :
15832 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15833ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15834if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15835 cat >>confdefs.h <<_ACEOF
15836#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15837_ACEOF
15838
15839fi
15840
15841done
15842
15843
15844# On Solaris, term.h requires curses.h
15845for ac_header in term.h
15846do :
15847 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15848#ifdef HAVE_CURSES_H
15849#include <curses.h>
15850#endif
15851
15852"
15853if test "x$ac_cv_header_term_h" = xyes; then :
15854 cat >>confdefs.h <<_ACEOF
15855#define HAVE_TERM_H 1
15856_ACEOF
15857
15858fi
15859
15860done
15861
15862
Jack Jansen666b1e72001-10-31 12:11:48 +000015863# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15865$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015866if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015867 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015868else
Matthias Kloseb9621712010-04-24 17:59:49 +000015869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015870/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015871#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015872int
15873main ()
15874{
Jack Jansen666b1e72001-10-31 12:11:48 +000015875
15876 int rtn;
15877 rtn = mvwdelch(0,0,0);
15878
Martin v. Löwis11437992002-04-12 09:54:03 +000015879 ;
15880 return 0;
15881}
15882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015883if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015884 ac_cv_mvwdelch_is_expression=yes
15885else
Matthias Kloseb9621712010-04-24 17:59:49 +000015886 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15889fi
15890
Matthias Kloseb9621712010-04-24 17:59:49 +000015891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15892$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015893
15894if test "$ac_cv_mvwdelch_is_expression" = yes
15895then
Martin v. Löwis11437992002-04-12 09:54:03 +000015896
Matthias Kloseb9621712010-04-24 17:59:49 +000015897$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015898
15899fi
15900
Matthias Kloseb9621712010-04-24 17:59:49 +000015901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15902$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015903if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015904 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015905else
Matthias Kloseb9621712010-04-24 17:59:49 +000015906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015907/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015908#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015909int
15910main ()
15911{
Jack Jansen666b1e72001-10-31 12:11:48 +000015912
15913 WINDOW *w;
15914 w->_flags = 0;
15915
Martin v. Löwis11437992002-04-12 09:54:03 +000015916 ;
15917 return 0;
15918}
15919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015920if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015921 ac_cv_window_has_flags=yes
15922else
Matthias Kloseb9621712010-04-24 17:59:49 +000015923 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15926fi
15927
Matthias Kloseb9621712010-04-24 17:59:49 +000015928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15929$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015930
Jack Jansen666b1e72001-10-31 12:11:48 +000015931
15932if test "$ac_cv_window_has_flags" = yes
15933then
Martin v. Löwis11437992002-04-12 09:54:03 +000015934
Matthias Kloseb9621712010-04-24 17:59:49 +000015935$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015936
15937fi
15938
Matthias Kloseb9621712010-04-24 17:59:49 +000015939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15940$as_echo_n "checking for is_term_resized... " >&6; }
15941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015942/* end confdefs.h. */
15943#include <curses.h>
15944int
15945main ()
15946{
15947void *x=is_term_resized
15948 ;
15949 return 0;
15950}
15951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015952if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015953
Matthias Kloseb9621712010-04-24 17:59:49 +000015954$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015955
Matthias Kloseb159a552010-04-25 21:00:44 +000015956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015957$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015958else
Matthias Kloseb9621712010-04-24 17:59:49 +000015959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15960$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015961
15962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15964
Matthias Kloseb9621712010-04-24 17:59:49 +000015965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15966$as_echo_n "checking for resize_term... " >&6; }
15967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015968/* end confdefs.h. */
15969#include <curses.h>
15970int
15971main ()
15972{
15973void *x=resize_term
15974 ;
15975 return 0;
15976}
15977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015978if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015979
Matthias Kloseb9621712010-04-24 17:59:49 +000015980$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015981
Matthias Kloseb159a552010-04-25 21:00:44 +000015982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015983$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015984else
Matthias Kloseb9621712010-04-24 17:59:49 +000015985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15986$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015987
15988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15990
Matthias Kloseb9621712010-04-24 17:59:49 +000015991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15992$as_echo_n "checking for resizeterm... " >&6; }
15993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015994/* end confdefs.h. */
15995#include <curses.h>
15996int
15997main ()
15998{
15999void *x=resizeterm
16000 ;
16001 return 0;
16002}
16003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016004if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016005
Matthias Kloseb9621712010-04-24 17:59:49 +000016006$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016007
Matthias Kloseb159a552010-04-25 21:00:44 +000016008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016009$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016010else
Matthias Kloseb9621712010-04-24 17:59:49 +000016011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16012$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016013
16014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016016# last curses configure check
16017CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016018
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16020$as_echo "$as_me: checking for device files" >&6;}
16021
16022if test "x$cross_compiling" = xyes; then
16023 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16025$as_echo_n "checking for /dev/ptmx... " >&6; }
16026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16027$as_echo "not set" >&6; }
16028 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16029 fi
16030 if test "${ac_cv_file__dev_ptc+set}" != set; then
16031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16032$as_echo_n "checking for /dev/ptc... " >&6; }
16033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16034$as_echo "not set" >&6; }
16035 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16036 fi
16037fi
16038
Matthias Kloseb9621712010-04-24 17:59:49 +000016039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16040$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016041if ${ac_cv_file__dev_ptmx+:} false; then :
16042 $as_echo_n "(cached) " >&6
16043else
16044 test "$cross_compiling" = yes &&
16045 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16046if test -r "/dev/ptmx"; then
16047 ac_cv_file__dev_ptmx=yes
16048else
16049 ac_cv_file__dev_ptmx=no
16050fi
16051fi
16052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16053$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16054if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016055
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016056fi
16057
16058if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016059
Matthias Kloseb9621712010-04-24 17:59:49 +000016060$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016061
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016062fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16064$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016065if ${ac_cv_file__dev_ptc+:} false; then :
16066 $as_echo_n "(cached) " >&6
16067else
16068 test "$cross_compiling" = yes &&
16069 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16070if test -r "/dev/ptc"; then
16071 ac_cv_file__dev_ptc=yes
16072else
16073 ac_cv_file__dev_ptc=no
16074fi
16075fi
16076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16077$as_echo "$ac_cv_file__dev_ptc" >&6; }
16078if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016079
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016080fi
16081
16082if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016083
Matthias Kloseb9621712010-04-24 17:59:49 +000016084$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016085
Neal Norwitz865400f2003-03-21 01:42:58 +000016086fi
16087
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016088if test $ac_sys_system = Darwin
16089then
16090 LIBS="$LIBS -framework CoreFoundation"
16091fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016092
Matthias Kloseb9621712010-04-24 17:59:49 +000016093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16094$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016095if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016096 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016097else
Matthias Kloseb9621712010-04-24 17:59:49 +000016098 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016099 ac_cv_have_size_t_format="cross -- assuming yes"
16100
Thomas Wouters477c8d52006-05-27 19:21:47 +000016101else
Matthias Kloseb9621712010-04-24 17:59:49 +000016102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016103/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016104
Thomas Wouters477c8d52006-05-27 19:21:47 +000016105#include <stdio.h>
16106#include <stddef.h>
16107#include <string.h>
16108
Christian Heimes2c181612007-12-17 20:04:13 +000016109#ifdef HAVE_SYS_TYPES_H
16110#include <sys/types.h>
16111#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016112
16113#ifdef HAVE_SSIZE_T
16114typedef ssize_t Py_ssize_t;
16115#elif SIZEOF_VOID_P == SIZEOF_LONG
16116typedef long Py_ssize_t;
16117#else
16118typedef int Py_ssize_t;
16119#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016120
Christian Heimes2c181612007-12-17 20:04:13 +000016121int main()
16122{
16123 char buffer[256];
16124
Thomas Wouters477c8d52006-05-27 19:21:47 +000016125 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16126 return 1;
16127
Thomas Wouters89f507f2006-12-13 04:49:30 +000016128 if (strcmp(buffer, "123"))
16129 return 1;
16130
16131 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16132 return 1;
16133
16134 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016135 return 1;
16136
16137 return 0;
16138}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016139
Thomas Wouters477c8d52006-05-27 19:21:47 +000016140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016141if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016142 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016143else
Matthias Kloseb9621712010-04-24 17:59:49 +000016144 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016145fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016146rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16147 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016148fi
16149
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16152$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016153if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016154
Matthias Kloseb9621712010-04-24 17:59:49 +000016155$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016156
16157fi
16158
Matthias Kloseb9621712010-04-24 17:59:49 +000016159ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016160#ifdef HAVE_SYS_TYPES_H
16161#include <sys/types.h>
16162#endif
16163#ifdef HAVE_SYS_SOCKET_H
16164#include <sys/socket.h>
16165#endif
16166
Matthias Kloseb9621712010-04-24 17:59:49 +000016167"
Victor Stinnere0be4232011-10-25 13:06:09 +020016168if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016169
Martin v. Löwis11437992002-04-12 09:54:03 +000016170else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016171
Matthias Kloseb9621712010-04-24 17:59:49 +000016172$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016173
16174fi
16175
Michael W. Hudson54241132001-12-07 15:38:26 +000016176
Matthias Kloseb9621712010-04-24 17:59:49 +000016177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16178$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016179if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016180 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016181else
Matthias Kloseb9621712010-04-24 17:59:49 +000016182 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016183 ac_cv_broken_mbstowcs=no
16184else
Matthias Kloseb9621712010-04-24 17:59:49 +000016185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016186/* end confdefs.h. */
16187
Stefan Krah19c21392012-11-22 23:47:32 +010016188#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016189#include<stdlib.h>
16190int main() {
16191 size_t len = -1;
16192 const char *str = "text";
16193 len = mbstowcs(NULL, str, 0);
16194 return (len != 4);
16195}
16196
16197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016198if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016199 ac_cv_broken_mbstowcs=no
16200else
Matthias Kloseb9621712010-04-24 17:59:49 +000016201 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016202fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016203rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16204 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016205fi
16206
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016207fi
16208
Matthias Kloseb9621712010-04-24 17:59:49 +000016209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16210$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016211if test "$ac_cv_broken_mbstowcs" = yes
16212then
16213
Matthias Kloseb9621712010-04-24 17:59:49 +000016214$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016215
16216fi
16217
Antoine Pitroub52ec782009-01-25 16:34:23 +000016218# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16220$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016221
16222# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016223if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016224 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016225if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016226then
16227
Matthias Kloseb9621712010-04-24 17:59:49 +000016228$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016229
Matthias Kloseb9621712010-04-24 17:59:49 +000016230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16231$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016232fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016233if test "$withval" = no
16234then
16235
16236$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16237
Matthias Kloseb9621712010-04-24 17:59:49 +000016238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16239$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016240fi
16241
Antoine Pitrou042b1282010-08-13 21:15:58 +000016242else
16243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16244$as_echo "no value specified" >&6; }
16245fi
16246
Antoine Pitroub52ec782009-01-25 16:34:23 +000016247
Matthias Kloseb17289e2012-03-15 19:51:34 +010016248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16249$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16250if ${ac_cv_computed_gotos+:} false; then :
16251 $as_echo_n "(cached) " >&6
16252else
16253 if test "$cross_compiling" = yes; then :
16254 if test "${with_computed_gotos+set}" = set; then
16255 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16256 else
16257 ac_cv_computed_gotos=no
16258 fi
16259else
16260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16261/* end confdefs.h. */
16262
16263int main(int argc, char **argv)
16264{
16265 static void *targets[1] = { &&LABEL1 };
16266 goto LABEL2;
16267LABEL1:
16268 return 0;
16269LABEL2:
16270 goto *targets[0];
16271 return 1;
16272}
16273
16274_ACEOF
16275if ac_fn_c_try_run "$LINENO"; then :
16276 ac_cv_computed_gotos=yes
16277else
16278 ac_cv_computed_gotos=no
16279fi
16280rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16281 conftest.$ac_objext conftest.beam conftest.$ac_ext
16282fi
16283
16284fi
16285
16286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16287$as_echo "$ac_cv_computed_gotos" >&6; }
16288case "$ac_cv_computed_gotos" in yes*)
16289
16290$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16291
16292esac
16293
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016294case $ac_sys_system in
16295AIX*)
16296
16297$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16298 ;;
16299esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016300
Michael W. Hudson54241132001-12-07 15:38:26 +000016301
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016302
16303
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016304for h in `(cd $srcdir;echo Python/thread_*.h)`
16305do
16306 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16307done
16308
Michael W. Hudson54241132001-12-07 15:38:26 +000016309
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016310SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16312$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016313for dir in $SRCDIRS; do
16314 if test ! -d $dir; then
16315 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016316 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016317done
Matthias Kloseb9621712010-04-24 17:59:49 +000016318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16319$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016320
Stefan Krah1919b7e2012-03-21 18:25:23 +010016321# Availability of -O2:
16322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16323$as_echo_n "checking for -O2... " >&6; }
16324saved_cflags="$CFLAGS"
16325CFLAGS="-O2"
16326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16327/* end confdefs.h. */
16328
16329int
16330main ()
16331{
16332
16333
16334 ;
16335 return 0;
16336}
16337_ACEOF
16338if ac_fn_c_try_compile "$LINENO"; then :
16339 have_O2=yes
16340else
16341 have_O2=no
16342fi
16343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16345$as_echo "$have_O2" >&6; }
16346CFLAGS="$saved_cflags"
16347
16348# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16349# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16351$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16352saved_cflags="$CFLAGS"
16353CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16354if test "$have_O2" = no; then
16355 CFLAGS=""
16356fi
16357if test "$cross_compiling" = yes; then :
16358 have_glibc_memmove_bug=undefined
16359else
16360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16361/* end confdefs.h. */
16362
16363#include <stdio.h>
16364#include <stdlib.h>
16365#include <string.h>
16366void foo(void *p, void *q) { memmove(p, q, 19); }
16367int main() {
16368 char a[32] = "123456789000000000";
16369 foo(&a[9], a);
16370 if (strcmp(a, "123456789123456789000000000") != 0)
16371 return 1;
16372 foo(a, &a[9]);
16373 if (strcmp(a, "123456789000000000") != 0)
16374 return 1;
16375 return 0;
16376}
16377
16378_ACEOF
16379if ac_fn_c_try_run "$LINENO"; then :
16380 have_glibc_memmove_bug=no
16381else
16382 have_glibc_memmove_bug=yes
16383fi
16384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16385 conftest.$ac_objext conftest.beam conftest.$ac_ext
16386fi
16387
16388CFLAGS="$saved_cflags"
16389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16390$as_echo "$have_glibc_memmove_bug" >&6; }
16391if test "$have_glibc_memmove_bug" = yes; then
16392
16393$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16394
16395fi
16396
16397if test "$have_gcc_asm_for_x87" = yes; then
16398 # Some versions of gcc miscompile inline asm:
16399 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16400 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16401 case $CC in
16402 *gcc*)
16403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16404$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16405 saved_cflags="$CFLAGS"
16406 CFLAGS="-O2"
16407 if test "$cross_compiling" = yes; then :
16408 have_ipa_pure_const_bug=undefined
16409else
16410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16411/* end confdefs.h. */
16412
16413 __attribute__((noinline)) int
16414 foo(int *p) {
16415 int r;
16416 asm ( "movl \$6, (%1)\n\t"
16417 "xorl %0, %0\n\t"
16418 : "=r" (r) : "r" (p) : "memory"
16419 );
16420 return r;
16421 }
16422 int main() {
16423 int p = 8;
16424 if ((foo(&p) ? : p) != 6)
16425 return 1;
16426 return 0;
16427 }
16428
16429_ACEOF
16430if ac_fn_c_try_run "$LINENO"; then :
16431 have_ipa_pure_const_bug=no
16432else
16433 have_ipa_pure_const_bug=yes
16434fi
16435rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16436 conftest.$ac_objext conftest.beam conftest.$ac_ext
16437fi
16438
16439 CFLAGS="$saved_cflags"
16440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16441$as_echo "$have_ipa_pure_const_bug" >&6; }
16442 if test "$have_ipa_pure_const_bug" = yes; then
16443
16444$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16445
16446 fi
16447 ;;
16448 esac
16449fi
16450
Victor Stinner4f5366e2015-01-09 02:13:19 +010016451# Check for stdatomic.h
16452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16453$as_echo_n "checking for stdatomic.h... " >&6; }
16454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16455/* end confdefs.h. */
16456
16457
16458 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016459 atomic_int value = ATOMIC_VAR_INIT(1);
16460 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016461 int main() {
16462 int loaded_value = atomic_load(&value);
16463 return 0;
16464 }
16465
16466
16467_ACEOF
16468if ac_fn_c_try_link "$LINENO"; then :
16469 have_stdatomic_h=yes
16470else
16471 have_stdatomic_h=no
16472fi
16473rm -f core conftest.err conftest.$ac_objext \
16474 conftest$ac_exeext conftest.$ac_ext
16475
16476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16477$as_echo "$have_stdatomic_h" >&6; }
16478
16479if test "$have_stdatomic_h" = yes; then
16480
16481$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16482
16483fi
16484
16485# Check for GCC >= 4.7 __atomic builtins
16486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16487$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16489/* end confdefs.h. */
16490
16491
16492 volatile int val = 1;
16493 int main() {
16494 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16495 return 0;
16496 }
16497
16498
16499_ACEOF
16500if ac_fn_c_try_link "$LINENO"; then :
16501 have_builtin_atomic=yes
16502else
16503 have_builtin_atomic=no
16504fi
16505rm -f core conftest.err conftest.$ac_objext \
16506 conftest$ac_exeext conftest.$ac_ext
16507
16508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16509$as_echo "$have_builtin_atomic" >&6; }
16510
16511if test "$have_builtin_atomic" = yes; then
16512
16513$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16514
16515fi
16516
Ned Deily322f5ba2013-11-21 23:01:59 -080016517# ensurepip option
16518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16519$as_echo_n "checking for ensurepip... " >&6; }
16520
16521# Check whether --with-ensurepip was given.
16522if test "${with_ensurepip+set}" = set; then :
16523 withval=$with_ensurepip;
16524else
16525 with_ensurepip=upgrade
16526fi
16527
16528case $with_ensurepip in #(
16529 yes|upgrade) :
16530 ENSUREPIP=upgrade ;; #(
16531 install) :
16532 ENSUREPIP=install ;; #(
16533 no) :
16534 ENSUREPIP=no ;; #(
16535 *) :
16536 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16537esac
16538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16539$as_echo "$ENSUREPIP" >&6; }
16540
16541
Victor Stinner35a97c02015-03-08 02:59:09 +010016542# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16544$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16546/* end confdefs.h. */
16547
16548
16549 #include <dirent.h>
16550
16551 int main() {
16552 struct dirent entry;
16553 return entry.d_type == DT_UNKNOWN;
16554 }
16555
16556
16557_ACEOF
16558if ac_fn_c_try_link "$LINENO"; then :
16559 have_dirent_d_type=yes
16560else
16561 have_dirent_d_type=no
16562fi
16563rm -f core conftest.err conftest.$ac_objext \
16564 conftest$ac_exeext conftest.$ac_ext
16565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16566$as_echo "$have_dirent_d_type" >&6; }
16567
16568if test "$have_dirent_d_type" = yes; then
16569
16570$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16571
16572fi
16573
Victor Stinner9eb57c52015-03-19 22:21:49 +010016574# check if the Linux getrandom() syscall is available
16575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16576$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16578/* end confdefs.h. */
16579
16580
Victor Stinner1b80b242016-04-12 22:34:58 +020016581 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016582 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016583 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016584
16585 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016586 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016587 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016588 const int flags = GRND_NONBLOCK;
16589 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016590 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016591 return 0;
16592 }
16593
16594
16595_ACEOF
16596if ac_fn_c_try_link "$LINENO"; then :
16597 have_getrandom_syscall=yes
16598else
16599 have_getrandom_syscall=no
16600fi
16601rm -f core conftest.err conftest.$ac_objext \
16602 conftest$ac_exeext conftest.$ac_ext
16603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16604$as_echo "$have_getrandom_syscall" >&6; }
16605
16606if test "$have_getrandom_syscall" = yes; then
16607
16608$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16609
16610fi
16611
Victor Stinner3abf44e2015-09-18 15:38:37 +020016612# check if the getrandom() function is available
16613# the test was written for the Solaris function of <sys/random.h>
16614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16615$as_echo_n "checking for the getrandom() function... " >&6; }
16616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16617/* end confdefs.h. */
16618
16619
16620 #include <sys/random.h>
16621
16622 int main() {
16623 char buffer[1];
16624 const size_t buflen = sizeof(buffer);
16625 const int flags = 0;
16626 /* ignore the result, Python checks for ENOSYS at runtime */
16627 (void)getrandom(buffer, buflen, flags);
16628 return 0;
16629 }
16630
16631
16632_ACEOF
16633if ac_fn_c_try_link "$LINENO"; then :
16634 have_getrandom=yes
16635else
16636 have_getrandom=no
16637fi
16638rm -f core conftest.err conftest.$ac_objext \
16639 conftest$ac_exeext conftest.$ac_ext
16640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16641$as_echo "$have_getrandom" >&6; }
16642
16643if test "$have_getrandom" = yes; then
16644
16645$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16646
16647fi
16648
Guido van Rossum627b2d71993-12-24 10:39:16 +000016649# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016650ac_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 +000016651
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016652ac_config_files="$ac_config_files Modules/ld_so_aix"
16653
Martin v. Löwis11437992002-04-12 09:54:03 +000016654cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016655# This file is a shell script that caches the results of configure
16656# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016657# scripts and configure runs, see configure's option --config-cache.
16658# It is not useful on other systems. If it contains results you don't
16659# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016660#
Martin v. Löwis11437992002-04-12 09:54:03 +000016661# config.status only pays attention to the cache file if you give it
16662# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016663#
Skip Montanaro6dead952003-09-25 14:50:04 +000016664# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016665# loading this file, other *unset* `ac_cv_foo' will be assigned the
16666# following values.
16667
16668_ACEOF
16669
Guido van Rossumf78abae1997-01-21 22:02:36 +000016670# The following way of writing the cache mishandles newlines in values,
16671# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016672# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016673# Ultrix sh set writes to stderr and can't be redirected directly,
16674# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016675(
16676 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16677 eval ac_val=\$$ac_var
16678 case $ac_val in #(
16679 *${as_nl}*)
16680 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016681 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16682$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016683 esac
16684 case $ac_var in #(
16685 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016686 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16687 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016688 esac ;;
16689 esac
16690 done
16691
Martin v. Löwis11437992002-04-12 09:54:03 +000016692 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016693 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16694 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016695 # `set' does not quote correctly, so add quotes: double-quote
16696 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016697 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016698 "s/'/'\\\\''/g;
16699 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016700 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016701 *)
16702 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016703 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016704 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016705 esac |
16706 sort
16707) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016708 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016709 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016710 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016711 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016712 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16713 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016714 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16715 :end' >>confcache
16716if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16717 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016718 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016719 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16720$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016721 if test ! -f "$cache_file" || test -h "$cache_file"; then
16722 cat confcache >"$cache_file"
16723 else
16724 case $cache_file in #(
16725 */* | ?:*)
16726 mv -f confcache "$cache_file"$$ &&
16727 mv -f "$cache_file"$$ "$cache_file" ;; #(
16728 *)
16729 mv -f confcache "$cache_file" ;;
16730 esac
16731 fi
16732 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016733 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016734 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16735$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016736 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016737fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016738rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016739
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016740test "x$prefix" = xNONE && prefix=$ac_default_prefix
16741# Let make expand exec_prefix.
16742test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016743
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016744DEFS=-DHAVE_CONFIG_H
16745
Skip Montanaro6dead952003-09-25 14:50:04 +000016746ac_libobjs=
16747ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016748U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016749for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16750 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016751 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016752 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016753 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16754 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016755 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16756 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016757done
16758LIBOBJS=$ac_libobjs
16759
16760LTLIBOBJS=$ac_ltlibobjs
16761
16762
Martin v. Löwis11437992002-04-12 09:54:03 +000016763
Matthias Kloseb9621712010-04-24 17:59:49 +000016764
Victor Stinnere0be4232011-10-25 13:06:09 +020016765: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016766ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016767ac_clean_files_save=$ac_clean_files
16768ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016769{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16770$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16771as_write_fail=0
16772cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016773#! $SHELL
16774# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016775# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016776# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016777# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016778
Martin v. Löwis11437992002-04-12 09:54:03 +000016779debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016780ac_cs_recheck=false
16781ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016782
Matthias Kloseb9621712010-04-24 17:59:49 +000016783SHELL=\${CONFIG_SHELL-$SHELL}
16784export SHELL
16785_ASEOF
16786cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16787## -------------------- ##
16788## M4sh Initialization. ##
16789## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016790
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016791# Be more Bourne compatible
16792DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016793if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016794 emulate sh
16795 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016796 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016797 # is contrary to our usage. Disable this feature.
16798 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016799 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016800else
Matthias Kloseb9621712010-04-24 17:59:49 +000016801 case `(set -o) 2>/dev/null` in #(
16802 *posix*) :
16803 set -o posix ;; #(
16804 *) :
16805 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016806esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016807fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016808
16809
Matthias Kloseb9621712010-04-24 17:59:49 +000016810as_nl='
16811'
16812export as_nl
16813# Printing a long string crashes Solaris 7 /usr/bin/printf.
16814as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16815as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16816as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16817# Prefer a ksh shell builtin over an external printf program on Solaris,
16818# but without wasting forks for bash or zsh.
16819if test -z "$BASH_VERSION$ZSH_VERSION" \
16820 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16821 as_echo='print -r --'
16822 as_echo_n='print -rn --'
16823elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16824 as_echo='printf %s\n'
16825 as_echo_n='printf %s'
16826else
16827 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16828 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16829 as_echo_n='/usr/ucb/echo -n'
16830 else
16831 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16832 as_echo_n_body='eval
16833 arg=$1;
16834 case $arg in #(
16835 *"$as_nl"*)
16836 expr "X$arg" : "X\\(.*\\)$as_nl";
16837 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16838 esac;
16839 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16840 '
16841 export as_echo_n_body
16842 as_echo_n='sh -c $as_echo_n_body as_echo'
16843 fi
16844 export as_echo_body
16845 as_echo='sh -c $as_echo_body as_echo'
16846fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016847
16848# The user is always right.
16849if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016850 PATH_SEPARATOR=:
16851 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16852 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16853 PATH_SEPARATOR=';'
16854 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016855fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016856
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016857
16858# IFS
16859# We need space, tab and new line, in precisely that order. Quoting is
16860# there to prevent editors from complaining about space-tab.
16861# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16862# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016863IFS=" "" $as_nl"
16864
16865# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016866as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016867case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016868 *[\\/]* ) as_myself=$0 ;;
16869 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016870for as_dir in $PATH
16871do
16872 IFS=$as_save_IFS
16873 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016874 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16875 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016876IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016877
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016878 ;;
16879esac
16880# We did not find ourselves, most probably we were run as `sh COMMAND'
16881# in which case we are not to be found in the path.
16882if test "x$as_myself" = x; then
16883 as_myself=$0
16884fi
16885if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016886 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16887 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016888fi
16889
Matthias Kloseb9621712010-04-24 17:59:49 +000016890# Unset variables that we do not need and which cause bugs (e.g. in
16891# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16892# suppresses any "Segmentation fault" message there. '((' could
16893# trigger a bug in pdksh 5.2.14.
16894for as_var in BASH_ENV ENV MAIL MAILPATH
16895do eval test x\${$as_var+set} = xset \
16896 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016897done
16898PS1='$ '
16899PS2='> '
16900PS4='+ '
16901
16902# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016903LC_ALL=C
16904export LC_ALL
16905LANGUAGE=C
16906export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016907
Matthias Kloseb9621712010-04-24 17:59:49 +000016908# CDPATH.
16909(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16910
16911
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016912# as_fn_error STATUS ERROR [LINENO LOG_FD]
16913# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016914# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16915# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016916# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016917as_fn_error ()
16918{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016919 as_status=$1; test $as_status -eq 0 && as_status=1
16920 if test "$4"; then
16921 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16922 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016923 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016924 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016925 as_fn_exit $as_status
16926} # as_fn_error
16927
16928
16929# as_fn_set_status STATUS
16930# -----------------------
16931# Set $? to STATUS, without forking.
16932as_fn_set_status ()
16933{
16934 return $1
16935} # as_fn_set_status
16936
16937# as_fn_exit STATUS
16938# -----------------
16939# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16940as_fn_exit ()
16941{
16942 set +e
16943 as_fn_set_status $1
16944 exit $1
16945} # as_fn_exit
16946
16947# as_fn_unset VAR
16948# ---------------
16949# Portably unset VAR.
16950as_fn_unset ()
16951{
16952 { eval $1=; unset $1;}
16953}
16954as_unset=as_fn_unset
16955# as_fn_append VAR VALUE
16956# ----------------------
16957# Append the text in VALUE to the end of the definition contained in VAR. Take
16958# advantage of any shell optimizations that allow amortized linear growth over
16959# repeated appends, instead of the typical quadratic growth present in naive
16960# implementations.
16961if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16962 eval 'as_fn_append ()
16963 {
16964 eval $1+=\$2
16965 }'
16966else
16967 as_fn_append ()
16968 {
16969 eval $1=\$$1\$2
16970 }
16971fi # as_fn_append
16972
16973# as_fn_arith ARG...
16974# ------------------
16975# Perform arithmetic evaluation on the ARGs, and store the result in the
16976# global $as_val. Take advantage of shells that can avoid forks. The arguments
16977# must be portable across $(()) and expr.
16978if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16979 eval 'as_fn_arith ()
16980 {
16981 as_val=$(( $* ))
16982 }'
16983else
16984 as_fn_arith ()
16985 {
16986 as_val=`expr "$@" || test $? -eq 1`
16987 }
16988fi # as_fn_arith
16989
16990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016991if expr a : '\(a\)' >/dev/null 2>&1 &&
16992 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16993 as_expr=expr
16994else
16995 as_expr=false
16996fi
16997
16998if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16999 as_basename=basename
17000else
17001 as_basename=false
17002fi
17003
Matthias Kloseb9621712010-04-24 17:59:49 +000017004if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17005 as_dirname=dirname
17006else
17007 as_dirname=false
17008fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017009
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017010as_me=`$as_basename -- "$0" ||
17011$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17012 X"$0" : 'X\(//\)$' \| \
17013 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017014$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017015 sed '/^.*\/\([^/][^/]*\)\/*$/{
17016 s//\1/
17017 q
17018 }
17019 /^X\/\(\/\/\)$/{
17020 s//\1/
17021 q
17022 }
17023 /^X\/\(\/\).*/{
17024 s//\1/
17025 q
17026 }
17027 s/.*/./; q'`
17028
Matthias Kloseb9621712010-04-24 17:59:49 +000017029# Avoid depending upon Character Ranges.
17030as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17031as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17032as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17033as_cr_digits='0123456789'
17034as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017035
17036ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017037case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017038-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017039 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017040 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017041 xy) ECHO_C='\c';;
17042 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17043 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017044 esac;;
17045*)
17046 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017047esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017048
Martin v. Löwis11437992002-04-12 09:54:03 +000017049rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017050if test -d conf$$.dir; then
17051 rm -f conf$$.dir/conf$$.file
17052else
17053 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017054 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017055fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017056if (echo >conf$$.file) 2>/dev/null; then
17057 if ln -s conf$$.file conf$$ 2>/dev/null; then
17058 as_ln_s='ln -s'
17059 # ... but there are two gotchas:
17060 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17061 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017062 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017063 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017064 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017065 elif ln conf$$.file conf$$ 2>/dev/null; then
17066 as_ln_s=ln
17067 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017068 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017069 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017070else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017071 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017073rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17074rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017075
Matthias Kloseb9621712010-04-24 17:59:49 +000017076
17077# as_fn_mkdir_p
17078# -------------
17079# Create "$as_dir" as a directory, including parents if necessary.
17080as_fn_mkdir_p ()
17081{
17082
17083 case $as_dir in #(
17084 -*) as_dir=./$as_dir;;
17085 esac
17086 test -d "$as_dir" || eval $as_mkdir_p || {
17087 as_dirs=
17088 while :; do
17089 case $as_dir in #(
17090 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17091 *) as_qdir=$as_dir;;
17092 esac
17093 as_dirs="'$as_qdir' $as_dirs"
17094 as_dir=`$as_dirname -- "$as_dir" ||
17095$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17096 X"$as_dir" : 'X\(//\)[^/]' \| \
17097 X"$as_dir" : 'X\(//\)$' \| \
17098 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17099$as_echo X"$as_dir" |
17100 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17101 s//\1/
17102 q
17103 }
17104 /^X\(\/\/\)[^/].*/{
17105 s//\1/
17106 q
17107 }
17108 /^X\(\/\/\)$/{
17109 s//\1/
17110 q
17111 }
17112 /^X\(\/\).*/{
17113 s//\1/
17114 q
17115 }
17116 s/.*/./; q'`
17117 test -d "$as_dir" && break
17118 done
17119 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017120 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017121
17122
17123} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017124if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017125 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017126else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017127 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017128 as_mkdir_p=false
17129fi
17130
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017131
17132# as_fn_executable_p FILE
17133# -----------------------
17134# Test if FILE is an executable regular file.
17135as_fn_executable_p ()
17136{
17137 test -f "$1" && test -x "$1"
17138} # as_fn_executable_p
17139as_test_x='test -x'
17140as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017141
17142# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017143as_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 +000017144
17145# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017146as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017147
17148
Martin v. Löwis11437992002-04-12 09:54:03 +000017149exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017150## ----------------------------------- ##
17151## Main body of $CONFIG_STATUS script. ##
17152## ----------------------------------- ##
17153_ASEOF
17154test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017155
Matthias Kloseb9621712010-04-24 17:59:49 +000017156cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17157# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017158# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017159# values after options handling.
17160ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017161This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017162generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017163
17164 CONFIG_FILES = $CONFIG_FILES
17165 CONFIG_HEADERS = $CONFIG_HEADERS
17166 CONFIG_LINKS = $CONFIG_LINKS
17167 CONFIG_COMMANDS = $CONFIG_COMMANDS
17168 $ $0 $@
17169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017170on `(hostname || uname -n) 2>/dev/null | sed 1q`
17171"
17172
Martin v. Löwis11437992002-04-12 09:54:03 +000017173_ACEOF
17174
Matthias Kloseb9621712010-04-24 17:59:49 +000017175case $ac_config_files in *"
17176"*) set x $ac_config_files; shift; ac_config_files=$*;;
17177esac
17178
17179case $ac_config_headers in *"
17180"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17181esac
17182
17183
17184cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017185# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017186config_files="$ac_config_files"
17187config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017188
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017189_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017190
Matthias Kloseb9621712010-04-24 17:59:49 +000017191cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017192ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017193\`$as_me' instantiates files and other configuration actions
17194from templates according to the current configuration. Unless the files
17195and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017196
Matthias Kloseb9621712010-04-24 17:59:49 +000017197Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017198
17199 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017200 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017201 --config print configuration, then exit
17202 -q, --quiet, --silent
17203 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017204 -d, --debug don't remove temporary files
17205 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017206 --file=FILE[:TEMPLATE]
17207 instantiate the configuration file FILE
17208 --header=FILE[:TEMPLATE]
17209 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017210
17211Configuration files:
17212$config_files
17213
17214Configuration headers:
17215$config_headers
17216
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017217Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017220cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17221ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017222ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017223python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017224configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017225 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017226
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017227Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017228This config.status script is free software; the Free Software Foundation
17229gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017230
17231ac_pwd='$ac_pwd'
17232srcdir='$srcdir'
17233INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017234MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017235test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017236_ACEOF
17237
Matthias Kloseb9621712010-04-24 17:59:49 +000017238cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17239# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017240ac_need_defaults=:
17241while test $# != 0
17242do
17243 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017244 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017245 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17246 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017247 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017248 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017249 --*=)
17250 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17251 ac_optarg=
17252 ac_shift=:
17253 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017254 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017255 ac_option=$1
17256 ac_optarg=$2
17257 ac_shift=shift
17258 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017259 esac
17260
Skip Montanaro6dead952003-09-25 14:50:04 +000017261 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017262 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017263 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17264 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017265 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017266 $as_echo "$ac_cs_version"; exit ;;
17267 --config | --confi | --conf | --con | --co | --c )
17268 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017269 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017270 debug=: ;;
17271 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017272 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017273 case $ac_optarg in
17274 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017275 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017276 esac
17277 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017278 ac_need_defaults=false;;
17279 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017280 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017281 case $ac_optarg in
17282 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17283 esac
17284 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017285 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017286 --he | --h)
17287 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017288 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017289Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017290 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017291 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017292 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17293 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17294 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017295
17296 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017297 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017298Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017299
Matthias Kloseb9621712010-04-24 17:59:49 +000017300 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017301 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017302
17303 esac
17304 shift
17305done
17306
Skip Montanaro6dead952003-09-25 14:50:04 +000017307ac_configure_extra_args=
17308
17309if $ac_cs_silent; then
17310 exec 6>/dev/null
17311 ac_configure_extra_args="$ac_configure_extra_args --silent"
17312fi
17313
17314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017315cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017316if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017317 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017318 shift
17319 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17320 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017321 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017322 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017323fi
17324
Martin v. Löwis11437992002-04-12 09:54:03 +000017325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017326cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017327exec 5>>config.log
17328{
17329 echo
17330 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17331## Running $as_me. ##
17332_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017333 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017334} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017335
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017337cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017338_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017339
Matthias Kloseb9621712010-04-24 17:59:49 +000017340cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017341
17342# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017343for ac_config_target in $ac_config_targets
17344do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017345 case $ac_config_target in
17346 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17347 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17348 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017349 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17350 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017351 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17352 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017353 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017354 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017355 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017356
Victor Stinnere0be4232011-10-25 13:06:09 +020017357 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017358 esac
17359done
17360
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017361
Martin v. Löwis11437992002-04-12 09:54:03 +000017362# If the user did not use the arguments to specify the items to instantiate,
17363# then the envvar interface is used. Set only those that are not.
17364# We use the long form for the default assignment because of an extremely
17365# bizarre bug on SunOS 4.1.3.
17366if $ac_need_defaults; then
17367 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17368 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17369fi
17370
Skip Montanaro6dead952003-09-25 14:50:04 +000017371# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017372# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017373# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017374# Hook for its removal unless debugging.
17375# Note that there is a small window in which the directory will not be cleaned:
17376# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017377$debug ||
17378{
Victor Stinnere0be4232011-10-25 13:06:09 +020017379 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017381 : "${ac_tmp:=$tmp}"
17382 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017383' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017384 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017385}
Martin v. Löwis11437992002-04-12 09:54:03 +000017386# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017387
Martin v. Löwis11437992002-04-12 09:54:03 +000017388{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017389 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017390 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017391} ||
17392{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017393 tmp=./conf$$-$RANDOM
17394 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017395} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017396ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017397
Matthias Kloseb9621712010-04-24 17:59:49 +000017398# Set up the scripts for CONFIG_FILES section.
17399# No need to generate them if there are no CONFIG_FILES.
17400# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017401if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017402
Matthias Kloseb9621712010-04-24 17:59:49 +000017403
17404ac_cr=`echo X | tr X '\015'`
17405# On cygwin, bash can eat \r inside `` if the user requested igncr.
17406# But we know of no other shell where ac_cr would be empty at this
17407# point, so we can use a bashism as a fallback.
17408if test "x$ac_cr" = x; then
17409 eval ac_cr=\$\'\\r\'
17410fi
17411ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17412if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017413 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017414else
17415 ac_cs_awk_cr=$ac_cr
17416fi
17417
Victor Stinnere0be4232011-10-25 13:06:09 +020017418echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017419_ACEOF
17420
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017421
Matthias Kloseb9621712010-04-24 17:59:49 +000017422{
17423 echo "cat >conf$$subs.awk <<_ACEOF" &&
17424 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17425 echo "_ACEOF"
17426} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017427 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17428ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017429ac_delim='%!_!# '
17430for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017431 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017432 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017433
Matthias Kloseb9621712010-04-24 17:59:49 +000017434 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17435 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017436 break
17437 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017438 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017439 else
17440 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017441 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017442done
Matthias Kloseb9621712010-04-24 17:59:49 +000017443rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017444
Matthias Kloseb9621712010-04-24 17:59:49 +000017445cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017446cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017448sed -n '
17449h
17450s/^/S["/; s/!.*/"]=/
17451p
17452g
17453s/^[^!]*!//
17454:repl
17455t repl
17456s/'"$ac_delim"'$//
17457t delim
17458:nl
17459h
17460s/\(.\{148\}\)..*/\1/
17461t more1
17462s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17463p
17464n
17465b repl
17466:more1
17467s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17468p
17469g
17470s/.\{148\}//
17471t nl
17472:delim
17473h
17474s/\(.\{148\}\)..*/\1/
17475t more2
17476s/["\\]/\\&/g; s/^/"/; s/$/"/
17477p
17478b
17479:more2
17480s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17481p
17482g
17483s/.\{148\}//
17484t delim
17485' <conf$$subs.awk | sed '
17486/^[^""]/{
17487 N
17488 s/\n//
17489}
17490' >>$CONFIG_STATUS || ac_write_fail=1
17491rm -f conf$$subs.awk
17492cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17493_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017494cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017495 for (key in S) S_is_set[key] = 1
17496 FS = ""
17497
17498}
17499{
17500 line = $ 0
17501 nfields = split(line, field, "@")
17502 substed = 0
17503 len = length(field[1])
17504 for (i = 2; i < nfields; i++) {
17505 key = field[i]
17506 keylen = length(key)
17507 if (S_is_set[key]) {
17508 value = S[key]
17509 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17510 len += length(value) + length(field[++i])
17511 substed = 1
17512 } else
17513 len += 1 + keylen
17514 }
17515
17516 print line
17517}
17518
17519_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017521cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17522if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17523 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17524else
17525 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017526fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017527 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017528_ACEOF
17529
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017530# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17531# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017532# trailing colons and then remove the whole line if VPATH becomes empty
17533# (actually we leave an empty line to preserve line numbers).
17534if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017535 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17536h
17537s///
17538s/^/:/
17539s/[ ]*$/:/
17540s/:\$(srcdir):/:/g
17541s/:\${srcdir}:/:/g
17542s/:@srcdir@:/:/g
17543s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017544s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017545x
17546s/\(=[ ]*\).*/\1/
17547G
17548s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017549s/^[^=]*=[ ]*$//
17550}'
17551fi
17552
Matthias Kloseb9621712010-04-24 17:59:49 +000017553cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017554fi # test -n "$CONFIG_FILES"
17555
Matthias Kloseb9621712010-04-24 17:59:49 +000017556# Set up the scripts for CONFIG_HEADERS section.
17557# No need to generate them if there are no CONFIG_HEADERS.
17558# This happens for instance with `./config.status Makefile'.
17559if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017560cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017561BEGIN {
17562_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017563
Matthias Kloseb9621712010-04-24 17:59:49 +000017564# Transform confdefs.h into an awk script `defines.awk', embedded as
17565# here-document in config.status, that substitutes the proper values into
17566# config.h.in to produce config.h.
17567
17568# Create a delimiter string that does not exist in confdefs.h, to ease
17569# handling of long lines.
17570ac_delim='%!_!# '
17571for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017572 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17573 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017574 break
17575 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017576 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017577 else
17578 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17579 fi
17580done
17581
17582# For the awk script, D is an array of macro values keyed by name,
17583# likewise P contains macro parameters if any. Preserve backslash
17584# newline sequences.
17585
17586ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17587sed -n '
17588s/.\{148\}/&'"$ac_delim"'/g
17589t rset
17590:rset
17591s/^[ ]*#[ ]*define[ ][ ]*/ /
17592t def
17593d
17594:def
17595s/\\$//
17596t bsnl
17597s/["\\]/\\&/g
17598s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17599D["\1"]=" \3"/p
17600s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17601d
17602:bsnl
17603s/["\\]/\\&/g
17604s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17605D["\1"]=" \3\\\\\\n"\\/p
17606t cont
17607s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17608t cont
17609d
17610:cont
17611n
17612s/.\{148\}/&'"$ac_delim"'/g
17613t clear
17614:clear
17615s/\\$//
17616t bsnlc
17617s/["\\]/\\&/g; s/^/"/; s/$/"/p
17618d
17619:bsnlc
17620s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17621b cont
17622' <confdefs.h | sed '
17623s/'"$ac_delim"'/"\\\
17624"/g' >>$CONFIG_STATUS || ac_write_fail=1
17625
17626cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17627 for (key in D) D_is_set[key] = 1
17628 FS = ""
17629}
17630/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17631 line = \$ 0
17632 split(line, arg, " ")
17633 if (arg[1] == "#") {
17634 defundef = arg[2]
17635 mac1 = arg[3]
17636 } else {
17637 defundef = substr(arg[1], 2)
17638 mac1 = arg[2]
17639 }
17640 split(mac1, mac2, "(") #)
17641 macro = mac2[1]
17642 prefix = substr(line, 1, index(line, defundef) - 1)
17643 if (D_is_set[macro]) {
17644 # Preserve the white space surrounding the "#".
17645 print prefix "define", macro P[macro] D[macro]
17646 next
17647 } else {
17648 # Replace #undef with comments. This is necessary, for example,
17649 # in the case of _POSIX_SOURCE, which is predefined and required
17650 # on some systems where configure will not decide to define it.
17651 if (defundef == "undef") {
17652 print "/*", prefix defundef, macro, "*/"
17653 next
17654 }
17655 }
17656}
17657{ print }
17658_ACAWK
17659_ACEOF
17660cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017661 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017662fi # test -n "$CONFIG_HEADERS"
17663
17664
17665eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17666shift
17667for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017668do
17669 case $ac_tag in
17670 :[FHLC]) ac_mode=$ac_tag; continue;;
17671 esac
17672 case $ac_mode$ac_tag in
17673 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017674 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017675 :[FH]-) ac_tag=-:-;;
17676 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17677 esac
17678 ac_save_IFS=$IFS
17679 IFS=:
17680 set x $ac_tag
17681 IFS=$ac_save_IFS
17682 shift
17683 ac_file=$1
17684 shift
17685
17686 case $ac_mode in
17687 :L) ac_source=$1;;
17688 :[FH])
17689 ac_file_inputs=
17690 for ac_f
17691 do
17692 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017693 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017694 *) # Look for the file first in the build tree, then in the source tree
17695 # (if the path is not absolute). The absolute path cannot be DOS-style,
17696 # because $ac_f cannot contain `:'.
17697 test -f "$ac_f" ||
17698 case $ac_f in
17699 [\\/$]*) false;;
17700 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17701 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017702 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017703 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017704 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17705 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017706 done
17707
17708 # Let's still pretend it is `configure' which instantiates (i.e., don't
17709 # use $as_me), people would be surprised to read:
17710 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017711 configure_input='Generated from '`
17712 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17713 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017714 if test x"$ac_file" != x-; then
17715 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017716 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17717$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017718 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017719 # Neutralize special characters interpreted by sed in replacement strings.
17720 case $configure_input in #(
17721 *\&* | *\|* | *\\* )
17722 ac_sed_conf_input=`$as_echo "$configure_input" |
17723 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17724 *) ac_sed_conf_input=$configure_input;;
17725 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017726
17727 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017728 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17729 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017730 esac
17731 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017732 esac
17733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017734 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017735$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017736 X"$ac_file" : 'X\(//\)[^/]' \| \
17737 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017738 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017739$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017740 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17741 s//\1/
17742 q
17743 }
17744 /^X\(\/\/\)[^/].*/{
17745 s//\1/
17746 q
17747 }
17748 /^X\(\/\/\)$/{
17749 s//\1/
17750 q
17751 }
17752 /^X\(\/\).*/{
17753 s//\1/
17754 q
17755 }
17756 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017757 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017758 ac_builddir=.
17759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017760case "$ac_dir" in
17761.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17762*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017763 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017764 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017765 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017766 case $ac_top_builddir_sub in
17767 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17768 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17769 esac ;;
17770esac
17771ac_abs_top_builddir=$ac_pwd
17772ac_abs_builddir=$ac_pwd$ac_dir_suffix
17773# for backward compatibility:
17774ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017775
17776case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017777 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017778 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017779 ac_top_srcdir=$ac_top_builddir_sub
17780 ac_abs_top_srcdir=$ac_pwd ;;
17781 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017782 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017783 ac_top_srcdir=$srcdir
17784 ac_abs_top_srcdir=$srcdir ;;
17785 *) # Relative name.
17786 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17787 ac_top_srcdir=$ac_top_build_prefix$srcdir
17788 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017789esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017790ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017791
Martin v. Löwis11437992002-04-12 09:54:03 +000017792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017793 case $ac_mode in
17794 :F)
17795 #
17796 # CONFIG_FILE
17797 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017798
17799 case $INSTALL in
17800 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017801 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017802 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017803 ac_MKDIR_P=$MKDIR_P
17804 case $MKDIR_P in
17805 [\\/$]* | ?:[\\/]* ) ;;
17806 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17807 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017808_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017809
Matthias Kloseb9621712010-04-24 17:59:49 +000017810cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017811# If the template does not know about datarootdir, expand it.
17812# FIXME: This hack should be removed a few years after 2.60.
17813ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017814ac_sed_dataroot='
17815/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017816 p
17817 q
17818}
17819/@datadir@/p
17820/@docdir@/p
17821/@infodir@/p
17822/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017823/@mandir@/p'
17824case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017825*datarootdir*) ac_datarootdir_seen=yes;;
17826*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17828$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017830cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017831 ac_datarootdir_hack='
17832 s&@datadir@&$datadir&g
17833 s&@docdir@&$docdir&g
17834 s&@infodir@&$infodir&g
17835 s&@localedir@&$localedir&g
17836 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017837 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017838esac
17839_ACEOF
17840
17841# Neutralize VPATH when `$srcdir' = `.'.
17842# Shell code in configure.ac might set extrasub.
17843# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017844cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17845ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017846$extrasub
17847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017848cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017849:t
17850/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017851s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017852s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017853s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017854s&@srcdir@&$ac_srcdir&;t t
17855s&@abs_srcdir@&$ac_abs_srcdir&;t t
17856s&@top_srcdir@&$ac_top_srcdir&;t t
17857s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17858s&@builddir@&$ac_builddir&;t t
17859s&@abs_builddir@&$ac_abs_builddir&;t t
17860s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17861s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017862s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017863$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017864"
Victor Stinnere0be4232011-10-25 13:06:09 +020017865eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17866 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017868test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017869 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17870 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17871 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017872 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017873which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017874$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017875which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017876
Victor Stinnere0be4232011-10-25 13:06:09 +020017877 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017878 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017879 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17880 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017881 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017882 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017883 ;;
17884 :H)
17885 #
17886 # CONFIG_HEADER
17887 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017888 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017889 {
17890 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017891 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17892 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017893 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017894 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017895 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17896$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017897 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017898 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017899 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017900 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017901 fi
17902 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017903 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017904 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017905 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017906 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017907 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017909
17910 esac
17911
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017912
17913 case $ac_file$ac_mode in
17914 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17915
17916 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017917done # for ac_tag
17918
Guido van Rossum627b2d71993-12-24 10:39:16 +000017919
Matthias Kloseb9621712010-04-24 17:59:49 +000017920as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017921_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017922ac_clean_files=$ac_clean_files_save
17923
Matthias Kloseb9621712010-04-24 17:59:49 +000017924test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017925 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017926
Martin v. Löwis11437992002-04-12 09:54:03 +000017927
17928# configure is writing to config.log, and then calls config.status.
17929# config.status does its own redirection, appending to config.log.
17930# Unfortunately, on DOS this fails, as config.log is still kept open
17931# by configure, so config.status won't be able to write to it; its
17932# output is simply discarded. So we exec the FD to /dev/null,
17933# effectively closing config.log, so it can be properly (re)opened and
17934# appended to by config.status. When coming back to configure, we
17935# need to make the FD available again.
17936if test "$no_create" != yes; then
17937 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017938 ac_config_status_args=
17939 test "$silent" = yes &&
17940 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017941 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017942 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017943 exec 5>>config.log
17944 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17945 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017946 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017947fi
17948if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17949 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17950$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017951fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017952
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017953
Christian Heimes75ed8902013-11-20 01:11:18 +010017954echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017955if test ! -f Modules/Setup
17956then
17957 cp $srcdir/Modules/Setup.dist Modules/Setup
17958fi
17959
Christian Heimes75ed8902013-11-20 01:11:18 +010017960echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017961if test ! -f Modules/Setup.local
17962then
17963 echo "# Edit this file for local setup changes" >Modules/Setup.local
17964fi
17965
Christian Heimes75ed8902013-11-20 01:11:18 +010017966echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017967$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17968 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017969 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017970mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017971
17972if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17973 echo "" >&6
17974 echo "" >&6
Christian Heimes938da642016-09-24 12:34:25 +020017975 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 +000017976 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017977 echo "" >&6
17978 echo "" >&6
17979fi
17980