blob: d44372a4507d65c7b0522d9bc0cb55adbed5e929 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ned Deily4829bc62016-09-12 17:29:04 -04003# Generated by GNU Autoconf 2.69 for python 3.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Ned Deily4829bc62016-09-12 17:29:04 -0400583PACKAGE_VERSION='3.7'
584PACKAGE_STRING='python 3.7'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700645DTRACE_OBJS
646DTRACE_HEADERS
647DFLAGS
648DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000649THREADOBJ
650LDLAST
651USE_THREAD_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700652TCLTK_LIBS
653TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000654LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100655PKG_CONFIG_LIBDIR
656PKG_CONFIG_PATH
657PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000658SHLIBS
659CFLAGSFORSHARED
660LINKFORSHARED
661CCSHARED
662BLDSHARED
663LDCXXSHARED
664LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700665SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000666LIBTOOL_CRUFT
667OTHER_LIBTOOL_OPT
668UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700669CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000670BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200671CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000672OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700673LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700674target_os
675target_vendor
676target_cpu
677target
678LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700679LLVM_PROF_ERR
680LLVM_PROF_FILE
681LLVM_PROF_MERGER
682PGO_PROF_USE_FLAG
683PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700684LTOFLAGS
Brett Cannon63d98bc2016-09-06 17:12:40 -0700685DEF_MAKE_RULE
686DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000687ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000688LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100689MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000690INSTALL_DATA
691INSTALL_SCRIPT
692INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200693ac_ct_READELF
694READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000695ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200696ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000697AR
698RANLIB
699GNULD
700LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000701LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702RUNSHARED
703INSTSONAME
704LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000705PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000706BLDLIBRARY
707DLLLIBRARY
708LDLIBRARY
709LIBRARY
710BUILDEXEEXT
711EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200712NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200713MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714PLATFORM_TRIPLET
715MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200716ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MAINCC
718CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700719SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200720GREP
721CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000722OBJEXT
723EXEEXT
724ac_ct_CC
725CPPFLAGS
726LDFLAGS
727CFLAGS
728CC
729EXPORT_MACOSX_DEPLOYMENT_TARGET
730CONFIGURE_MACOSX_DEPLOYMENT_TARGET
731SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200732_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000733MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000734FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800736FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKALTINSTALLLAST
738FRAMEWORKALTINSTALLFIRST
739FRAMEWORKINSTALLLAST
740FRAMEWORKINSTALLFIRST
741PYTHONFRAMEWORKINSTALLDIR
742PYTHONFRAMEWORKPREFIX
743PYTHONFRAMEWORKDIR
744PYTHONFRAMEWORKIDENTIFIER
745PYTHONFRAMEWORK
746LIPO_32BIT_FLAGS
747ARCH_RUN_32BIT
748UNIVERSALSDK
749CONFIG_ARGS
750SOVERSION
751VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000752GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200753PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200754PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100755host_os
756host_vendor
757host_cpu
758host
759build_os
760build_vendor
761build_cpu
762build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500763HAS_GIT
764GITBRANCH
765GITTAG
766GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400767BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000768target_alias
769host_alias
770build_alias
771LIBS
772ECHO_T
773ECHO_N
774ECHO_C
775DEFS
776mandir
777localedir
778libdir
779psdir
780pdfdir
781dvidir
782htmldir
783infodir
784docdir
785oldincludedir
786includedir
Benjamin Petersone4f961b2017-04-14 09:36:45 -0700787runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000788localstatedir
789sharedstatedir
790sysconfdir
791datadir
792datarootdir
793libexecdir
794sbindir
795bindir
796program_transform_name
797prefix
798exec_prefix
799PACKAGE_URL
800PACKAGE_BUGREPORT
801PACKAGE_STRING
802PACKAGE_VERSION
803PACKAGE_TARNAME
804PACKAGE_NAME
805PATH_SEPARATOR
806SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000807ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000808ac_user_opts='
809enable_option_checking
810enable_universalsdk
811with_universal_archs
812with_framework_name
813enable_framework
814with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600815with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000816with_cxx_main
817with_suffix
818enable_shared
819enable_profiling
820with_pydebug
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000821enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700822with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100823with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100824with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_libs
826with_system_expat
827with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100828with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000829enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700830with_tcltk_includes
831with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_threads
834with_thread
835enable_ipv6
836with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_pymalloc
838with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700839with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_fpectl
841with_libm
842with_libc
843enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000844with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800845with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000846'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 ac_precious_vars='build_alias
848host_alias
849target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100850MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851CC
852CFLAGS
853LDFLAGS
854LIBS
855CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100856CPP
857PKG_CONFIG
858PKG_CONFIG_PATH
859PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860
Guido van Rossum627b2d71993-12-24 10:39:16 +0000861
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000863ac_init_help=
864ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000865ac_unrecognized_opts=
866ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867# The variables have the same names as the options, with
868# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000869cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872no_recursion=
873prefix=NONE
874program_prefix=NONE
875program_suffix=NONE
876program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881x_includes=NONE
882x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000883
884# Installation directory options.
885# These are left unexpanded so users can "make install exec_prefix=/foo"
886# and all the variables that are supposed to be based on exec_prefix
887# by default will actually change.
888# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890bindir='${exec_prefix}/bin'
891sbindir='${exec_prefix}/sbin'
892libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893datarootdir='${prefix}/share'
894datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895sysconfdir='${prefix}/etc'
896sharedstatedir='${prefix}/com'
897localstatedir='${prefix}/var'
Benjamin Petersone4f961b2017-04-14 09:36:45 -0700898runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000899includedir='${prefix}/include'
900oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
902infodir='${datarootdir}/info'
903htmldir='${docdir}'
904dvidir='${docdir}'
905pdfdir='${docdir}'
906psdir='${docdir}'
907libdir='${exec_prefix}/lib'
908localedir='${datarootdir}/locale'
909mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000910
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000914do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915 # If the previous option needs an argument, assign it.
916 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918 ac_prev=
919 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000920 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000922 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200923 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
924 *=) ac_optarg= ;;
925 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000928 # Accept the important Cygnus configure options, so we can diagnose typos.
929
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000930 case $ac_dashdash$ac_option in
931 --)
932 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934 -bindir | --bindir | --bindi | --bind | --bin | --bi)
935 ac_prev=bindir ;;
936 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938
939 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944 -cache-file | --cache-file | --cache-fil | --cache-fi \
945 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
946 ac_prev=cache_file ;;
947 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
948 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 cache_file=$ac_optarg ;;
950
951 --config-cache | -C)
952 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000956 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000959 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
960 | --dataroo | --dataro | --datar)
961 ac_prev=datarootdir ;;
962 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
963 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
964 datarootdir=$ac_optarg ;;
965
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000968 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200970 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000971 ac_useropt_orig=$ac_useropt
972 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
973 case $ac_user_opts in
974 *"
975"enable_$ac_useropt"
976"*) ;;
977 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
978 ac_unrecognized_sep=', ';;
979 esac
980 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000981
982 -docdir | --docdir | --docdi | --doc | --do)
983 ac_prev=docdir ;;
984 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
985 docdir=$ac_optarg ;;
986
987 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
988 ac_prev=dvidir ;;
989 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
990 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000994 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200996 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000997 ac_useropt_orig=$ac_useropt
998 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
999 case $ac_user_opts in
1000 *"
1001"enable_$ac_useropt"
1002"*) ;;
1003 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1004 ac_unrecognized_sep=', ';;
1005 esac
1006 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1009 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1010 | --exec | --exe | --ex)
1011 ac_prev=exec_prefix ;;
1012 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1013 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1014 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
1017 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001018 # Obsolete; use --with-gas.
1019 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 -help | --help | --hel | --he | -h)
1022 ac_init_help=long ;;
1023 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1024 ac_init_help=recursive ;;
1025 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1026 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
1028 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001033 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1034 ac_prev=htmldir ;;
1035 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1036 | --ht=*)
1037 htmldir=$ac_optarg ;;
1038
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039 -includedir | --includedir | --includedi | --included | --include \
1040 | --includ | --inclu | --incl | --inc)
1041 ac_prev=includedir ;;
1042 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1043 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -infodir | --infodir | --infodi | --infod | --info | --inf)
1047 ac_prev=infodir ;;
1048 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
1051 -libdir | --libdir | --libdi | --libd)
1052 ac_prev=libdir ;;
1053 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
1056 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1057 | --libexe | --libex | --libe)
1058 ac_prev=libexecdir ;;
1059 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1060 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001063 -localedir | --localedir | --localedi | --localed | --locale)
1064 ac_prev=localedir ;;
1065 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1066 localedir=$ac_optarg ;;
1067
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001069 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070 ac_prev=localstatedir ;;
1071 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001072 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
1075 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1076 ac_prev=mandir ;;
1077 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 # Obsolete; use --without-fp.
1082 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
1084 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086 no_create=yes ;;
1087
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001088 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1089 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1090 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1093 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1094 | --oldin | --oldi | --old | --ol | --o)
1095 ac_prev=oldincludedir ;;
1096 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1097 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1098 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001100
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1102 ac_prev=prefix ;;
1103 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105
1106 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1107 | --program-pre | --program-pr | --program-p)
1108 ac_prev=program_prefix ;;
1109 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1110 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112
1113 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1114 | --program-suf | --program-su | --program-s)
1115 ac_prev=program_suffix ;;
1116 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1117 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119
1120 -program-transform-name | --program-transform-name \
1121 | --program-transform-nam | --program-transform-na \
1122 | --program-transform-n | --program-transform- \
1123 | --program-transform | --program-transfor \
1124 | --program-transfo | --program-transf \
1125 | --program-trans | --program-tran \
1126 | --progr-tra | --program-tr | --program-t)
1127 ac_prev=program_transform_name ;;
1128 -program-transform-name=* | --program-transform-name=* \
1129 | --program-transform-nam=* | --program-transform-na=* \
1130 | --program-transform-n=* | --program-transform-=* \
1131 | --program-transform=* | --program-transfor=* \
1132 | --program-transfo=* | --program-transf=* \
1133 | --program-trans=* | --program-tran=* \
1134 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001137 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1138 ac_prev=pdfdir ;;
1139 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1140 pdfdir=$ac_optarg ;;
1141
1142 -psdir | --psdir | --psdi | --psd | --ps)
1143 ac_prev=psdir ;;
1144 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1145 psdir=$ac_optarg ;;
1146
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1148 | -silent | --silent | --silen | --sile | --sil)
1149 silent=yes ;;
1150
Benjamin Petersone4f961b2017-04-14 09:36:45 -07001151 -runstatedir | --runstatedir | --runstatedi | --runstated \
1152 | --runstate | --runstat | --runsta | --runst | --runs \
1153 | --run | --ru | --r)
1154 ac_prev=runstatedir ;;
1155 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1156 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1157 | --run=* | --ru=* | --r=*)
1158 runstatedir=$ac_optarg ;;
1159
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001160 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1161 ac_prev=sbindir ;;
1162 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1163 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165
1166 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1167 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1168 | --sharedst | --shareds | --shared | --share | --shar \
1169 | --sha | --sh)
1170 ac_prev=sharedstatedir ;;
1171 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1172 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1173 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1174 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001177 -site | --site | --sit)
1178 ac_prev=site ;;
1179 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001181
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1183 ac_prev=srcdir ;;
1184 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001187 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1188 | --syscon | --sysco | --sysc | --sys | --sy)
1189 ac_prev=sysconfdir ;;
1190 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1191 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001193
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
1199 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1200 verbose=yes ;;
1201
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 -version | --version | --versio | --versi | --vers | -V)
1203 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
1205 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001207 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001209 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 ac_useropt_orig=$ac_useropt
1211 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1212 case $ac_user_opts in
1213 *"
1214"with_$ac_useropt"
1215"*) ;;
1216 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1217 ac_unrecognized_sep=', ';;
1218 esac
1219 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220
1221 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001225 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 ac_useropt_orig=$ac_useropt
1227 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1228 case $ac_user_opts in
1229 *"
1230"with_$ac_useropt"
1231"*) ;;
1232 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1233 ac_unrecognized_sep=', ';;
1234 esac
1235 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001237 --x)
1238 # Obsolete; use --with-x.
1239 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240
1241 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1242 | --x-incl | --x-inc | --x-in | --x-i)
1243 ac_prev=x_includes ;;
1244 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1245 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247
1248 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1249 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1250 ac_prev=x_libraries ;;
1251 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1252 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001254
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1256Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001257 ;;
1258
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 *=*)
1260 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1261 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 case $ac_envvar in #(
1263 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001264 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001266 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001267 export $ac_envvar ;;
1268
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001269 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001271 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001273 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001274 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275 ;;
1276
1277 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278done
1279
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001281 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001282 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001283fi
1284
Matthias Kloseb9621712010-04-24 17:59:49 +00001285if test -n "$ac_unrecognized_opts"; then
1286 case $enable_option_checking in
1287 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001288 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001289 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1290 esac
1291fi
1292
1293# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001294for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1295 datadir sysconfdir sharedstatedir localstatedir includedir \
1296 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersone4f961b2017-04-14 09:36:45 -07001297 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001298do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001300 # Remove trailing slashes.
1301 case $ac_val in
1302 */ )
1303 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1304 eval $ac_var=\$ac_val;;
1305 esac
1306 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001307 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001308 [\\/$]* | ?:[\\/]* ) continue;;
1309 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001310 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001311 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001312done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Martin v. Löwis11437992002-04-12 09:54:03 +00001314# There might be people who depend on the old broken behavior: `$host'
1315# used to hold the argument of --host etc.
1316# FIXME: To remove some day.
1317build=$build_alias
1318host=$host_alias
1319target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001320
Martin v. Löwis11437992002-04-12 09:54:03 +00001321# FIXME: To remove some day.
1322if test "x$host_alias" != x; then
1323 if test "x$build_alias" = x; then
1324 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001325 elif test "x$build_alias" != "x$host_alias"; then
1326 cross_compiling=yes
1327 fi
1328fi
1329
1330ac_tool_prefix=
1331test -n "$host_alias" && ac_tool_prefix=$host_alias-
1332
1333test "$silent" = yes && exec 6>/dev/null
1334
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336ac_pwd=`pwd` && test -n "$ac_pwd" &&
1337ac_ls_di=`ls -di .` &&
1338ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001339 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001341 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342
1343
Guido van Rossum627b2d71993-12-24 10:39:16 +00001344# Find the source files, if location was not specified.
1345if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001346 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001348 ac_confdir=`$as_dirname -- "$as_myself" ||
1349$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1350 X"$as_myself" : 'X\(//\)[^/]' \| \
1351 X"$as_myself" : 'X\(//\)$' \| \
1352 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1353$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001354 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\/\)[^/].*/{
1359 s//\1/
1360 q
1361 }
1362 /^X\(\/\/\)$/{
1363 s//\1/
1364 q
1365 }
1366 /^X\(\/\).*/{
1367 s//\1/
1368 q
1369 }
1370 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001371 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001373 srcdir=..
1374 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001375else
1376 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001378if test ! -r "$srcdir/$ac_unique_file"; then
1379 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001380 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1383ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001384 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001385 pwd)`
1386# When building in place, set srcdir=.
1387if test "$ac_abs_confdir" = "$ac_pwd"; then
1388 srcdir=.
1389fi
1390# Remove unnecessary trailing slashes from srcdir.
1391# Double slashes in file names in object file debugging info
1392# mess up M-x gdb in Emacs.
1393case $srcdir in
1394*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1395esac
1396for ac_var in $ac_precious_vars; do
1397 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1398 eval ac_env_${ac_var}_value=\$${ac_var}
1399 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1400 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1401done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001402
Martin v. Löwis11437992002-04-12 09:54:03 +00001403#
1404# Report the --help message.
1405#
1406if test "$ac_init_help" = "long"; then
1407 # Omit some internal or obsolete options to make the list less imposing.
1408 # This message is too long to be a string in the A/UX 3.1 sh.
1409 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001410\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001411
1412Usage: $0 [OPTION]... [VAR=VALUE]...
1413
1414To assign environment variables (e.g., CC, CFLAGS...), specify them as
1415VAR=VALUE. See below for descriptions of some of the useful variables.
1416
1417Defaults for the options are specified in brackets.
1418
1419Configuration:
1420 -h, --help display this help and exit
1421 --help=short display options specific to this package
1422 --help=recursive display the short help of all the included packages
1423 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001424 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 --cache-file=FILE cache test results in FILE [disabled]
1426 -C, --config-cache alias for \`--cache-file=config.cache'
1427 -n, --no-create do not create output files
1428 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1429
Martin v. Löwis11437992002-04-12 09:54:03 +00001430Installation directories:
1431 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001432 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001433 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001435
1436By default, \`make install' will install all the files in
1437\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1438an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1439for instance \`--prefix=\$HOME'.
1440
1441For better control, use the options below.
1442
1443Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 --bindir=DIR user executables [EPREFIX/bin]
1445 --sbindir=DIR system admin executables [EPREFIX/sbin]
1446 --libexecdir=DIR program executables [EPREFIX/libexec]
1447 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1448 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1449 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersone4f961b2017-04-14 09:36:45 -07001450 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001451 --libdir=DIR object code libraries [EPREFIX/lib]
1452 --includedir=DIR C header files [PREFIX/include]
1453 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1454 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1455 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1456 --infodir=DIR info documentation [DATAROOTDIR/info]
1457 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1458 --mandir=DIR man documentation [DATAROOTDIR/man]
1459 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1460 --htmldir=DIR html documentation [DOCDIR]
1461 --dvidir=DIR dvi documentation [DOCDIR]
1462 --pdfdir=DIR pdf documentation [DOCDIR]
1463 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001464_ACEOF
1465
1466 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001467
1468System types:
1469 --build=BUILD configure for building on BUILD [guessed]
1470 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001471 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001472_ACEOF
1473fi
1474
1475if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001476 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001477 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001478 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 cat <<\_ACEOF
1480
1481Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001482 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001483 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1484 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001485 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001486 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001487 --enable-framework[=INSTALLDIR]
1488 Build (MacOSX|Darwin) framework
1489 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001490 --enable-profiling enable C-level code profiling
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)164eea52016-11-20 21:13:16 +00001491 --enable-optimizations Enable expensive optimizations (PGO, etc). Disabled
1492 by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001493 --enable-loadable-sqlite-extensions
1494 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --enable-ipv6 Enable ipv6 (with ipv4) support
1496 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001497 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001498 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001499
1500Optional Packages:
1501 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1502 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001503 --with-universal-archs=ARCH
1504 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001505 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001506 --with-framework-name=FRAMEWORK
1507 specify an alternate name of the framework built
1508 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001509 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001510 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001511 --with-cxx-main=<compiler>
1512 compile main() and link python executable with C++
1513 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001514 --with-suffix=.exe set executable suffix
1515 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001516 --with-lto Enable Link Time Optimization in PGO builds.
1517 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001518 --with-hash-algorithm=[fnv|siphash24]
1519 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001520 --with-address-sanitizer
1521 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001522 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001523 --with-system-expat build pyexpat module using an installed expat
1524 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001525 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001526 --with-system-libmpdec build _decimal module using an installed libmpdec
1527 library
Ned Deilyd819b932013-09-06 01:07:05 -07001528 --with-tcltk-includes='-I...'
1529 override search for Tcl and Tk include files
1530 --with-tcltk-libs='-L...'
1531 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001532 --with-dbmliborder=db1:db2:...
1533 order to check db backends for dbm. Valid value is a
1534 colon separated string with the backend names
1535 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001536 --with(out)-threads[=DIRECTORY]
1537 disable/enable thread support
1538 --with(out)-thread[=DIRECTORY]
1539 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001540 --with(out)-doc-strings disable/enable documentation strings
1541 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001542 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001543 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001544 --with-fpectl enable SIGFPE catching
1545 --with-libm=STRING math library
1546 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001547 --with(out)-computed-gotos
1548 Use computed gotos in evaluation loop (enabled by
1549 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001550 --with(out)-ensurepip=[=upgrade]
1551 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001552
1553Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001554 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001555 CC C compiler command
1556 CFLAGS C compiler flags
1557 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1558 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001560 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001561 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001562 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001563 PKG_CONFIG path to pkg-config utility
1564 PKG_CONFIG_PATH
1565 directories to add to pkg-config's search path
1566 PKG_CONFIG_LIBDIR
1567 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001568
1569Use these variables to override the choices made by `configure' or to help
1570it to find libraries and programs with nonstandard names/locations.
1571
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001572Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001573_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001575fi
1576
1577if test "$ac_init_help" = "recursive"; then
1578 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001579 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001580 test -d "$ac_dir" ||
1581 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1582 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001583 ac_builddir=.
1584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585case "$ac_dir" in
1586.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1587*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001588 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001590 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 case $ac_top_builddir_sub in
1592 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1593 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1594 esac ;;
1595esac
1596ac_abs_top_builddir=$ac_pwd
1597ac_abs_builddir=$ac_pwd$ac_dir_suffix
1598# for backward compatibility:
1599ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001600
1601case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604 ac_top_srcdir=$ac_top_builddir_sub
1605 ac_abs_top_srcdir=$ac_pwd ;;
1606 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001607 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001608 ac_top_srcdir=$srcdir
1609 ac_abs_top_srcdir=$srcdir ;;
1610 *) # Relative name.
1611 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1612 ac_top_srcdir=$ac_top_build_prefix$srcdir
1613 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001614esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001617 cd "$ac_dir" || { ac_status=$?; continue; }
1618 # Check for guested configure.
1619 if test -f "$ac_srcdir/configure.gnu"; then
1620 echo &&
1621 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1622 elif test -f "$ac_srcdir/configure"; then
1623 echo &&
1624 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001625 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001626 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 fi || ac_status=$?
1628 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001629 done
1630fi
1631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001632test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001633if $ac_init_version; then
1634 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001635python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001636generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001637
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001638Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001639This configure script is free software; the Free Software Foundation
1640gives unlimited permission to copy, distribute and modify it.
1641_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001642 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001644
1645## ------------------------ ##
1646## Autoconf initialization. ##
1647## ------------------------ ##
1648
1649# ac_fn_c_try_compile LINENO
1650# --------------------------
1651# Try to compile conftest.$ac_ext, and return whether this succeeded.
1652ac_fn_c_try_compile ()
1653{
1654 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1655 rm -f conftest.$ac_objext
1656 if { { ac_try="$ac_compile"
1657case "(($ac_try" in
1658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1659 *) ac_try_echo=$ac_try;;
1660esac
1661eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1662$as_echo "$ac_try_echo"; } >&5
1663 (eval "$ac_compile") 2>conftest.err
1664 ac_status=$?
1665 if test -s conftest.err; then
1666 grep -v '^ *+' conftest.err >conftest.er1
1667 cat conftest.er1 >&5
1668 mv -f conftest.er1 conftest.err
1669 fi
1670 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1671 test $ac_status = 0; } && {
1672 test -z "$ac_c_werror_flag" ||
1673 test ! -s conftest.err
1674 } && test -s conftest.$ac_objext; then :
1675 ac_retval=0
1676else
1677 $as_echo "$as_me: failed program was:" >&5
1678sed 's/^/| /' conftest.$ac_ext >&5
1679
1680 ac_retval=1
1681fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001682 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001683 as_fn_set_status $ac_retval
1684
1685} # ac_fn_c_try_compile
1686
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001687# ac_fn_c_try_cpp LINENO
1688# ----------------------
1689# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1690ac_fn_c_try_cpp ()
1691{
1692 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1693 if { { ac_try="$ac_cpp conftest.$ac_ext"
1694case "(($ac_try" in
1695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1696 *) ac_try_echo=$ac_try;;
1697esac
1698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1699$as_echo "$ac_try_echo"; } >&5
1700 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1701 ac_status=$?
1702 if test -s conftest.err; then
1703 grep -v '^ *+' conftest.err >conftest.er1
1704 cat conftest.er1 >&5
1705 mv -f conftest.er1 conftest.err
1706 fi
1707 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1708 test $ac_status = 0; } > conftest.i && {
1709 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1710 test ! -s conftest.err
1711 }; then :
1712 ac_retval=0
1713else
1714 $as_echo "$as_me: failed program was:" >&5
1715sed 's/^/| /' conftest.$ac_ext >&5
1716
1717 ac_retval=1
1718fi
1719 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1720 as_fn_set_status $ac_retval
1721
1722} # ac_fn_c_try_cpp
1723
Matthias Kloseb9621712010-04-24 17:59:49 +00001724# ac_fn_c_try_link LINENO
1725# -----------------------
1726# Try to link conftest.$ac_ext, and return whether this succeeded.
1727ac_fn_c_try_link ()
1728{
1729 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1730 rm -f conftest.$ac_objext conftest$ac_exeext
1731 if { { ac_try="$ac_link"
1732case "(($ac_try" in
1733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1734 *) ac_try_echo=$ac_try;;
1735esac
1736eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1737$as_echo "$ac_try_echo"; } >&5
1738 (eval "$ac_link") 2>conftest.err
1739 ac_status=$?
1740 if test -s conftest.err; then
1741 grep -v '^ *+' conftest.err >conftest.er1
1742 cat conftest.er1 >&5
1743 mv -f conftest.er1 conftest.err
1744 fi
1745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1746 test $ac_status = 0; } && {
1747 test -z "$ac_c_werror_flag" ||
1748 test ! -s conftest.err
1749 } && test -s conftest$ac_exeext && {
1750 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001751 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001752 }; then :
1753 ac_retval=0
1754else
1755 $as_echo "$as_me: failed program was:" >&5
1756sed 's/^/| /' conftest.$ac_ext >&5
1757
1758 ac_retval=1
1759fi
1760 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1761 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1762 # interfere with the next link command; also delete a directory that is
1763 # left behind by Apple's compiler. We do this before executing the actions.
1764 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001765 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001766 as_fn_set_status $ac_retval
1767
1768} # ac_fn_c_try_link
1769
Matthias Kloseb9621712010-04-24 17:59:49 +00001770# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1771# -------------------------------------------------------
1772# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1773# the include files in INCLUDES and setting the cache variable VAR
1774# accordingly.
1775ac_fn_c_check_header_mongrel ()
1776{
1777 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001778 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1780$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001781if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001782 $as_echo_n "(cached) " >&6
1783fi
1784eval ac_res=\$$3
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1786$as_echo "$ac_res" >&6; }
1787else
1788 # Is the header compilable?
1789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1790$as_echo_n "checking $2 usability... " >&6; }
1791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1792/* end confdefs.h. */
1793$4
1794#include <$2>
1795_ACEOF
1796if ac_fn_c_try_compile "$LINENO"; then :
1797 ac_header_compiler=yes
1798else
1799 ac_header_compiler=no
1800fi
1801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1803$as_echo "$ac_header_compiler" >&6; }
1804
1805# Is the header present?
1806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1807$as_echo_n "checking $2 presence... " >&6; }
1808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1809/* end confdefs.h. */
1810#include <$2>
1811_ACEOF
1812if ac_fn_c_try_cpp "$LINENO"; then :
1813 ac_header_preproc=yes
1814else
1815 ac_header_preproc=no
1816fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001817rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1819$as_echo "$ac_header_preproc" >&6; }
1820
1821# So? What about this header?
1822case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1823 yes:no: )
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1825$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1827$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1828 ;;
1829 no:yes:* )
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1831$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1833$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1835$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1837$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1839$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001840( $as_echo "## --------------------------------------- ##
1841## Report this to https://bugs.python.org/ ##
1842## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001843 ) | sed "s/^/$as_me: WARNING: /" >&2
1844 ;;
1845esac
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1847$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001848if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001849 $as_echo_n "(cached) " >&6
1850else
1851 eval "$3=\$ac_header_compiler"
1852fi
1853eval ac_res=\$$3
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1855$as_echo "$ac_res" >&6; }
1856fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001857 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001858
1859} # ac_fn_c_check_header_mongrel
1860
1861# ac_fn_c_try_run LINENO
1862# ----------------------
1863# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1864# that executables *can* be run.
1865ac_fn_c_try_run ()
1866{
1867 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1868 if { { ac_try="$ac_link"
1869case "(($ac_try" in
1870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1871 *) ac_try_echo=$ac_try;;
1872esac
1873eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1874$as_echo "$ac_try_echo"; } >&5
1875 (eval "$ac_link") 2>&5
1876 ac_status=$?
1877 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1878 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1879 { { case "(($ac_try" in
1880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1881 *) ac_try_echo=$ac_try;;
1882esac
1883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1884$as_echo "$ac_try_echo"; } >&5
1885 (eval "$ac_try") 2>&5
1886 ac_status=$?
1887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1888 test $ac_status = 0; }; }; then :
1889 ac_retval=0
1890else
1891 $as_echo "$as_me: program exited with status $ac_status" >&5
1892 $as_echo "$as_me: failed program was:" >&5
1893sed 's/^/| /' conftest.$ac_ext >&5
1894
1895 ac_retval=$ac_status
1896fi
1897 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001898 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001899 as_fn_set_status $ac_retval
1900
1901} # ac_fn_c_try_run
1902
1903# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1904# -------------------------------------------------------
1905# Tests whether HEADER exists and can be compiled using the include files in
1906# INCLUDES, setting the cache variable VAR accordingly.
1907ac_fn_c_check_header_compile ()
1908{
1909 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1911$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001912if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001913 $as_echo_n "(cached) " >&6
1914else
1915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1916/* end confdefs.h. */
1917$4
1918#include <$2>
1919_ACEOF
1920if ac_fn_c_try_compile "$LINENO"; then :
1921 eval "$3=yes"
1922else
1923 eval "$3=no"
1924fi
1925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1926fi
1927eval ac_res=\$$3
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1929$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001930 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001931
1932} # ac_fn_c_check_header_compile
1933
Matthias Kloseb9621712010-04-24 17:59:49 +00001934# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1935# -------------------------------------------
1936# Tests whether TYPE exists after having included INCLUDES, setting cache
1937# variable VAR accordingly.
1938ac_fn_c_check_type ()
1939{
1940 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1942$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001943if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001944 $as_echo_n "(cached) " >&6
1945else
1946 eval "$3=no"
1947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1948/* end confdefs.h. */
1949$4
1950int
1951main ()
1952{
1953if (sizeof ($2))
1954 return 0;
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1961/* end confdefs.h. */
1962$4
1963int
1964main ()
1965{
1966if (sizeof (($2)))
1967 return 0;
1968 ;
1969 return 0;
1970}
1971_ACEOF
1972if ac_fn_c_try_compile "$LINENO"; then :
1973
1974else
1975 eval "$3=yes"
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1978fi
1979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1980fi
1981eval ac_res=\$$3
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1983$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001984 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001985
1986} # ac_fn_c_check_type
1987
Matthias Kloseb9621712010-04-24 17:59:49 +00001988# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1989# --------------------------------------------
1990# Tries to find the compile-time value of EXPR in a program that includes
1991# INCLUDES, setting VAR accordingly. Returns whether the value could be
1992# computed
1993ac_fn_c_compute_int ()
1994{
1995 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1996 if test "$cross_compiling" = yes; then
1997 # Depending upon the size, compute the lo and hi bounds.
1998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1999/* end confdefs.h. */
2000$4
2001int
2002main ()
2003{
2004static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002005test_array [0] = 0;
2006return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002007
2008 ;
2009 return 0;
2010}
2011_ACEOF
2012if ac_fn_c_try_compile "$LINENO"; then :
2013 ac_lo=0 ac_mid=0
2014 while :; do
2015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016/* end confdefs.h. */
2017$4
2018int
2019main ()
2020{
2021static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002022test_array [0] = 0;
2023return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002024
2025 ;
2026 return 0;
2027}
2028_ACEOF
2029if ac_fn_c_try_compile "$LINENO"; then :
2030 ac_hi=$ac_mid; break
2031else
2032 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2033 if test $ac_lo -le $ac_mid; then
2034 ac_lo= ac_hi=
2035 break
2036 fi
2037 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2038fi
2039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2040 done
2041else
2042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2043/* end confdefs.h. */
2044$4
2045int
2046main ()
2047{
2048static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002049test_array [0] = 0;
2050return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002051
2052 ;
2053 return 0;
2054}
2055_ACEOF
2056if ac_fn_c_try_compile "$LINENO"; then :
2057 ac_hi=-1 ac_mid=-1
2058 while :; do
2059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2060/* end confdefs.h. */
2061$4
2062int
2063main ()
2064{
2065static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002066test_array [0] = 0;
2067return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002068
2069 ;
2070 return 0;
2071}
2072_ACEOF
2073if ac_fn_c_try_compile "$LINENO"; then :
2074 ac_lo=$ac_mid; break
2075else
2076 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2077 if test $ac_mid -le $ac_hi; then
2078 ac_lo= ac_hi=
2079 break
2080 fi
2081 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084 done
2085else
2086 ac_lo= ac_hi=
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091# Binary search between lo and hi bounds.
2092while test "x$ac_lo" != "x$ac_hi"; do
2093 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2095/* end confdefs.h. */
2096$4
2097int
2098main ()
2099{
2100static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002101test_array [0] = 0;
2102return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002103
2104 ;
2105 return 0;
2106}
2107_ACEOF
2108if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_hi=$ac_mid
2110else
2111 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2112fi
2113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2114done
2115case $ac_lo in #((
2116?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2117'') ac_retval=1 ;;
2118esac
2119 else
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123static long int longval () { return $2; }
2124static unsigned long int ulongval () { return $2; }
2125#include <stdio.h>
2126#include <stdlib.h>
2127int
2128main ()
2129{
2130
2131 FILE *f = fopen ("conftest.val", "w");
2132 if (! f)
2133 return 1;
2134 if (($2) < 0)
2135 {
2136 long int i = longval ();
2137 if (i != ($2))
2138 return 1;
2139 fprintf (f, "%ld", i);
2140 }
2141 else
2142 {
2143 unsigned long int i = ulongval ();
2144 if (i != ($2))
2145 return 1;
2146 fprintf (f, "%lu", i);
2147 }
2148 /* Do not output a trailing newline, as this causes \r\n confusion
2149 on some platforms. */
2150 return ferror (f) || fclose (f) != 0;
2151
2152 ;
2153 return 0;
2154}
2155_ACEOF
2156if ac_fn_c_try_run "$LINENO"; then :
2157 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2158else
2159 ac_retval=1
2160fi
2161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2162 conftest.$ac_objext conftest.beam conftest.$ac_ext
2163rm -f conftest.val
2164
2165 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002166 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002167 as_fn_set_status $ac_retval
2168
2169} # ac_fn_c_compute_int
2170
2171# ac_fn_c_check_func LINENO FUNC VAR
2172# ----------------------------------
2173# Tests whether FUNC exists, setting the cache variable VAR accordingly
2174ac_fn_c_check_func ()
2175{
2176 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2178$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002179if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002180 $as_echo_n "(cached) " >&6
2181else
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183/* end confdefs.h. */
2184/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2185 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2186#define $2 innocuous_$2
2187
2188/* System header to define __stub macros and hopefully few prototypes,
2189 which can conflict with char $2 (); below.
2190 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2191 <limits.h> exists even on freestanding compilers. */
2192
2193#ifdef __STDC__
2194# include <limits.h>
2195#else
2196# include <assert.h>
2197#endif
2198
2199#undef $2
2200
2201/* Override any GCC internal prototype to avoid an error.
2202 Use char because int might match the return type of a GCC
2203 builtin and then its argument prototype would still apply. */
2204#ifdef __cplusplus
2205extern "C"
2206#endif
2207char $2 ();
2208/* The GNU C library defines this for functions which it implements
2209 to always fail with ENOSYS. Some functions are actually named
2210 something starting with __ and the normal name is an alias. */
2211#if defined __stub_$2 || defined __stub___$2
2212choke me
2213#endif
2214
2215int
2216main ()
2217{
2218return $2 ();
2219 ;
2220 return 0;
2221}
2222_ACEOF
2223if ac_fn_c_try_link "$LINENO"; then :
2224 eval "$3=yes"
2225else
2226 eval "$3=no"
2227fi
2228rm -f core conftest.err conftest.$ac_objext \
2229 conftest$ac_exeext conftest.$ac_ext
2230fi
2231eval ac_res=\$$3
2232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2233$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002234 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002235
2236} # ac_fn_c_check_func
2237
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002238# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2239# ---------------------------------------------
2240# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2241# accordingly.
2242ac_fn_c_check_decl ()
2243{
2244 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2245 as_decl_name=`echo $2|sed 's/ *(.*//'`
2246 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2248$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2249if eval \${$3+:} false; then :
2250 $as_echo_n "(cached) " >&6
2251else
2252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h. */
2254$4
2255int
2256main ()
2257{
2258#ifndef $as_decl_name
2259#ifdef __cplusplus
2260 (void) $as_decl_use;
2261#else
2262 (void) $as_decl_name;
2263#endif
2264#endif
2265
2266 ;
2267 return 0;
2268}
2269_ACEOF
2270if ac_fn_c_try_compile "$LINENO"; then :
2271 eval "$3=yes"
2272else
2273 eval "$3=no"
2274fi
2275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2276fi
2277eval ac_res=\$$3
2278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2279$as_echo "$ac_res" >&6; }
2280 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2281
2282} # ac_fn_c_check_decl
2283
Matthias Kloseb9621712010-04-24 17:59:49 +00002284# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2285# ----------------------------------------------------
2286# Tries to find if the field MEMBER exists in type AGGR, after including
2287# INCLUDES, setting cache variable VAR accordingly.
2288ac_fn_c_check_member ()
2289{
2290 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2292$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002293if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002294 $as_echo_n "(cached) " >&6
2295else
2296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2297/* end confdefs.h. */
2298$5
2299int
2300main ()
2301{
2302static $2 ac_aggr;
2303if (ac_aggr.$3)
2304return 0;
2305 ;
2306 return 0;
2307}
2308_ACEOF
2309if ac_fn_c_try_compile "$LINENO"; then :
2310 eval "$4=yes"
2311else
2312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2313/* end confdefs.h. */
2314$5
2315int
2316main ()
2317{
2318static $2 ac_aggr;
2319if (sizeof ac_aggr.$3)
2320return 0;
2321 ;
2322 return 0;
2323}
2324_ACEOF
2325if ac_fn_c_try_compile "$LINENO"; then :
2326 eval "$4=yes"
2327else
2328 eval "$4=no"
2329fi
2330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2331fi
2332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333fi
2334eval ac_res=\$$4
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2336$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002337 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002338
2339} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002340cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002341This file contains any messages produced by compilers while
2342running configure, to aid debugging if configure makes a mistake.
2343
Ned Deily4829bc62016-09-12 17:29:04 -04002344It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002345generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002346
2347 $ $0 $@
2348
2349_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002350exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002351{
2352cat <<_ASUNAME
2353## --------- ##
2354## Platform. ##
2355## --------- ##
2356
2357hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2358uname -m = `(uname -m) 2>/dev/null || echo unknown`
2359uname -r = `(uname -r) 2>/dev/null || echo unknown`
2360uname -s = `(uname -s) 2>/dev/null || echo unknown`
2361uname -v = `(uname -v) 2>/dev/null || echo unknown`
2362
2363/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2364/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2365
2366/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2367/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2368/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002370/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2371/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2372/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2373
2374_ASUNAME
2375
2376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2377for as_dir in $PATH
2378do
2379 IFS=$as_save_IFS
2380 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002381 $as_echo "PATH: $as_dir"
2382 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002383IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002384
2385} >&5
2386
2387cat >&5 <<_ACEOF
2388
2389
2390## ----------- ##
2391## Core tests. ##
2392## ----------- ##
2393
2394_ACEOF
2395
2396
2397# Keep a trace of the command line.
2398# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002399# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002400# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002401# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002402ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002403ac_configure_args0=
2404ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002405ac_must_keep_next=false
2406for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002407do
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 for ac_arg
2409 do
2410 case $ac_arg in
2411 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2412 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2413 | -silent | --silent | --silen | --sile | --sil)
2414 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002415 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002416 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 esac
2418 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002421 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002423 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002425 case $ac_arg in
2426 *=* | --config-cache | -C | -disable-* | --disable-* \
2427 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2428 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2429 | -with-* | --with-* | -without-* | --without-* | --x)
2430 case "$ac_configure_args0 " in
2431 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2432 esac
2433 ;;
2434 -* ) ac_must_keep_next=true ;;
2435 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002437 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002438 ;;
2439 esac
2440 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002441done
Matthias Kloseb9621712010-04-24 17:59:49 +00002442{ ac_configure_args0=; unset ac_configure_args0;}
2443{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002444
2445# When interrupted or exit'd, cleanup temporary files, and complete
2446# config.log. We remove comments because anyway the quotes in there
2447# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448# WARNING: Use '\'' to represent an apostrophe within the trap.
2449# 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 +00002450trap 'exit_status=$?
2451 # Save into config.log some information that might help in debugging.
2452 {
2453 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002454
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002455 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002456## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002457## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002458 echo
2459 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002460(
2461 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2462 eval ac_val=\$$ac_var
2463 case $ac_val in #(
2464 *${as_nl}*)
2465 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002466 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2467$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 esac
2469 case $ac_var in #(
2470 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002471 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2472 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 esac ;;
2474 esac
2475 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2478 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 "s/'\''/'\''\\\\'\'''\''/g;
2481 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2482 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002483 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002485 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 esac |
2487 sort
2488)
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002490
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002491 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002492## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002493## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 echo
2495 for ac_var in $ac_subst_vars
2496 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 eval ac_val=\$$ac_var
2498 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002501 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 done | sort
2503 echo
2504
2505 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002506 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002508## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 echo
2510 for ac_var in $ac_subst_files
2511 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 eval ac_val=\$$ac_var
2513 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 done | sort
2518 echo
2519 fi
2520
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002522 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002523## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002524## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 echo
2528 fi
2529 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 $as_echo "$as_me: caught signal $ac_signal"
2531 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 rm -f core *.core core.conftest.* &&
2534 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002537for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002538 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002539done
2540ac_signal=0
2541
2542# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002544
Matthias Kloseb9621712010-04-24 17:59:49 +00002545$as_echo "/* confdefs.h */" > confdefs.h
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547# Predefined preprocessor variables.
2548
2549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_NAME "$PACKAGE_NAME"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_VERSION "$PACKAGE_VERSION"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_STRING "$PACKAGE_STRING"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2567_ACEOF
2568
Matthias Kloseb9621712010-04-24 17:59:49 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_URL "$PACKAGE_URL"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573
2574# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002575# Prefer an explicitly selected file to automatically selected ones.
2576ac_site_file1=NONE
2577ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002579 # We do not want a PATH search for config.site.
2580 case $CONFIG_SITE in #((
2581 -*) ac_site_file1=./$CONFIG_SITE;;
2582 */*) ac_site_file1=$CONFIG_SITE;;
2583 *) ac_site_file1=./$CONFIG_SITE;;
2584 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 ac_site_file1=$prefix/share/config.site
2587 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588else
Matthias Kloseb9621712010-04-24 17:59:49 +00002589 ac_site_file1=$ac_default_prefix/share/config.site
2590 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002592for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593do
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 test "x$ac_site_file" = xNONE && continue
2595 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2597$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002599 . "$ac_site_file" \
2600 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2602as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002603See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002604 fi
2605done
2606
2607if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 # Some versions of bash will fail to source /dev/null (special files
2609 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2610 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2611 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2612$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2615 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 esac
2617 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002618else
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2620$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 >$cache_file
2622fi
2623
2624# Check that the precious variables saved in the cache have kept the same
2625# value.
2626ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2629 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2631 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 case $ac_old_set,$ac_new_set in
2633 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2635$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 +00002636 ac_cache_corrupted=: ;;
2637 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2639$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 ac_cache_corrupted=: ;;
2641 ,);;
2642 *)
2643 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 # differences in whitespace do not lead to failure.
2645 ac_old_val_w=`echo x $ac_old_val`
2646 ac_new_val_w=`echo x $ac_new_val`
2647 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2649$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2650 ac_cache_corrupted=:
2651 else
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2653$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2654 eval $ac_var=\$ac_old_val
2655 fi
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2657$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2659$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 fi;;
2661 esac
2662 # Pass precious variables to config.status.
2663 if test "$ac_new_set" = set; then
2664 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002665 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 *) ac_arg=$ac_var=$ac_new_val ;;
2667 esac
2668 case " $ac_configure_args " in
2669 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002670 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 esac
2672 fi
2673done
2674if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2678$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002679 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002681## -------------------- ##
2682## Main body of script. ##
2683## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684
Guido van Rossum7f43da71994-08-01 12:15:30 +00002685ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002687ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2688ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2689ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690
Guido van Rossum627b2d71993-12-24 10:39:16 +00002691
Michael W. Hudson54241132001-12-07 15:38:26 +00002692
Trent Nelson4d4ec652012-10-16 08:51:24 -04002693
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002694if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002695 # If we're building out-of-tree, we need to make sure the following
2696 # resources get picked up before their $srcdir counterparts.
2697 # Objects/ -> typeslots.inc
2698 # Include/ -> Python-ast.h, graminit.h
2699 # Python/ -> importlib.h
2700 # (A side effect of this is that these resources will automatically be
2701 # regenerated when building out-of-tree, regardless of whether or not
2702 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2703 # off.)
2704 BASECPPFLAGS="-IObjects -IInclude -IPython"
2705else
2706 BASECPPFLAGS=""
2707fi
2708
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002709
2710
2711
2712
Victor Stinner9ed34a82017-05-02 22:35:58 +02002713if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002715# Extract the first word of "git", so it can be a program name with args.
2716set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2718$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002719if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002720 $as_echo_n "(cached) " >&6
2721else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002722 if test -n "$HAS_GIT"; then
2723 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002724else
2725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2726for as_dir in $PATH
2727do
2728 IFS=$as_save_IFS
2729 test -z "$as_dir" && as_dir=.
2730 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002732 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2734 break 2
2735 fi
2736done
2737 done
2738IFS=$as_save_IFS
2739
Ned Deily5c4b0d02017-03-04 00:19:55 -05002740 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002741fi
2742fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002743HAS_GIT=$ac_cv_prog_HAS_GIT
2744if test -n "$HAS_GIT"; then
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2746$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002747else
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2749$as_echo "no" >&6; }
2750fi
2751
2752
2753else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002754HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002756if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002757then
Ned Deily554626a2017-03-20 23:41:52 -04002758 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2759 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002760 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002761else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002762 GITVERSION=""
2763 GITTAG=""
2764 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002765fi
2766
2767
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002768ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002769
2770
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002771ac_aux_dir=
2772for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2773 if test -f "$ac_dir/install-sh"; then
2774 ac_aux_dir=$ac_dir
2775 ac_install_sh="$ac_aux_dir/install-sh -c"
2776 break
2777 elif test -f "$ac_dir/install.sh"; then
2778 ac_aux_dir=$ac_dir
2779 ac_install_sh="$ac_aux_dir/install.sh -c"
2780 break
2781 elif test -f "$ac_dir/shtool"; then
2782 ac_aux_dir=$ac_dir
2783 ac_install_sh="$ac_aux_dir/shtool install -c"
2784 break
2785 fi
2786done
2787if test -z "$ac_aux_dir"; then
2788 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2789fi
2790
2791# These three variables are undocumented and unsupported,
2792# and are intended to be withdrawn in a future Autoconf release.
2793# They can cause serious problems if a builder's source tree is in a directory
2794# whose full name contains unusual characters.
2795ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2796ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2797ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2798
2799
2800# Make sure we can run config.sub.
2801$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2802 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2803
2804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2805$as_echo_n "checking build system type... " >&6; }
2806if ${ac_cv_build+:} false; then :
2807 $as_echo_n "(cached) " >&6
2808else
2809 ac_build_alias=$build_alias
2810test "x$ac_build_alias" = x &&
2811 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2812test "x$ac_build_alias" = x &&
2813 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2814ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2815 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2816
2817fi
2818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2819$as_echo "$ac_cv_build" >&6; }
2820case $ac_cv_build in
2821*-*-*) ;;
2822*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2823esac
2824build=$ac_cv_build
2825ac_save_IFS=$IFS; IFS='-'
2826set x $ac_cv_build
2827shift
2828build_cpu=$1
2829build_vendor=$2
2830shift; shift
2831# Remember, the first character of IFS is used to create $*,
2832# except with old shells:
2833build_os=$*
2834IFS=$ac_save_IFS
2835case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2836
2837
2838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2839$as_echo_n "checking host system type... " >&6; }
2840if ${ac_cv_host+:} false; then :
2841 $as_echo_n "(cached) " >&6
2842else
2843 if test "x$host_alias" = x; then
2844 ac_cv_host=$ac_cv_build
2845else
2846 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2847 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2848fi
2849
2850fi
2851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2852$as_echo "$ac_cv_host" >&6; }
2853case $ac_cv_host in
2854*-*-*) ;;
2855*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2856esac
2857host=$ac_cv_host
2858ac_save_IFS=$IFS; IFS='-'
2859set x $ac_cv_host
2860shift
2861host_cpu=$1
2862host_vendor=$2
2863shift; shift
2864# Remember, the first character of IFS is used to create $*,
2865# except with old shells:
2866host_os=$*
2867IFS=$ac_save_IFS
2868case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2869
2870
2871
doko@python.orga10e4a92013-01-25 18:45:12 +01002872
2873
Ned Deilyfcbc2462014-08-22 13:32:49 -07002874# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2875rm -f pybuilddir.txt
2876
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002877for ac_prog in python$PACKAGE_VERSION python3 python
2878do
2879 # Extract the first word of "$ac_prog", so it can be a program name with args.
2880set dummy $ac_prog; ac_word=$2
2881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2882$as_echo_n "checking for $ac_word... " >&6; }
2883if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2884 $as_echo_n "(cached) " >&6
2885else
2886 if test -n "$PYTHON_FOR_GEN"; then
2887 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2888else
2889as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2890for as_dir in $PATH
2891do
2892 IFS=$as_save_IFS
2893 test -z "$as_dir" && as_dir=.
2894 for ac_exec_ext in '' $ac_executable_extensions; do
2895 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2896 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
2897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2898 break 2
2899 fi
2900done
2901 done
2902IFS=$as_save_IFS
2903
2904fi
2905fi
2906PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
2907if test -n "$PYTHON_FOR_GEN"; then
2908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
2909$as_echo "$PYTHON_FOR_GEN" >&6; }
2910else
2911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2912$as_echo "no" >&6; }
2913fi
2914
2915
2916 test -n "$PYTHON_FOR_GEN" && break
2917done
2918test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
2919
2920if test "$PYTHON_FOR_GEN" = not-found; then
2921 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
2922 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
2923 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
2924fi
2925
2926
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002927if test "$cross_compiling" = yes; then
2928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2929$as_echo_n "checking for python interpreter for cross build... " >&6; }
2930 if test -z "$PYTHON_FOR_BUILD"; then
2931 for interp in python$PACKAGE_VERSION python3 python; do
2932 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002933 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 +02002934 break
2935 fi
2936 interp=
2937 done
2938 if test x$interp = x; then
2939 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2940 fi
2941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2942$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002943 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 +02002944 fi
Martin Panter43a94a72016-07-29 05:52:32 +00002945 # Used to comment out stuff for rebuilding generated files
2946 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01002947elif test "$cross_compiling" = maybe; then
2948 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002949else
2950 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00002951 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002952fi
2953
2954
Martin v. Löwis11437992002-04-12 09:54:03 +00002955
Martin Pantereac67be2016-07-28 01:28:27 +00002956
Benjamin Petersond23f8222009-04-05 19:13:16 +00002957if test "$prefix" != "/"; then
2958 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2959fi
2960
2961
Martin v. Löwis11437992002-04-12 09:54:03 +00002962
2963
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002964# We don't use PACKAGE_ variables, and they cause conflicts
2965# with other autoconf-based packages that include Python.h
2966grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2967rm confdefs.h
2968mv confdefs.h.new confdefs.h
2969
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002970
Ned Deily4829bc62016-09-12 17:29:04 -04002971VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002972
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002973# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002974
2975SOVERSION=1.0
2976
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002977# The later defininition of _XOPEN_SOURCE disables certain features
2978# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2979
Matthias Kloseb9621712010-04-24 17:59:49 +00002980$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002981
2982
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002983# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2984# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2985# them.
2986
Matthias Kloseb9621712010-04-24 17:59:49 +00002987$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002988
2989
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002990# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2991# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2992# them.
2993
Matthias Kloseb9621712010-04-24 17:59:49 +00002994$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002995
2996
Martin v. Löwisd6320502004-08-12 13:45:08 +00002997# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2998# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2999
Matthias Kloseb9621712010-04-24 17:59:49 +00003000$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003001
3002
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003003# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3004# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3005# them.
3006
Matthias Kloseb9621712010-04-24 17:59:49 +00003007$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003008
3009
3010
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003011define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003012
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003013# Arguments passed to configure.
3014
3015CONFIG_ARGS="$ac_configure_args"
3016
Matthias Kloseb9621712010-04-24 17:59:49 +00003017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3018$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003019# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003020if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003021 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003022 case $enableval in
3023 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003024 # Locate the best usable SDK, see Mac/README.txt for more
3025 # information
3026 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003027 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003029 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3030 if test ! -d "${enableval}"
3031 then
3032 enableval=/
3033 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003034 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003035 ;;
3036 esac
3037 case $enableval in
3038 no)
3039 UNIVERSALSDK=
3040 enable_universalsdk=
3041 ;;
3042 *)
3043 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044 if test ! -d "${UNIVERSALSDK}"
3045 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003046 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003048 ;;
3049 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003050
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051
Thomas Wouters477c8d52006-05-27 19:21:47 +00003052else
3053
3054 UNIVERSALSDK=
3055 enable_universalsdk=
3056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003057fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003058
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003059if test -n "${UNIVERSALSDK}"
3060then
Matthias Kloseb9621712010-04-24 17:59:49 +00003061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3062$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063else
Matthias Kloseb9621712010-04-24 17:59:49 +00003064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3065$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003066fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003068
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003069
Ned Deily87adb6e2013-10-18 21:09:56 -07003070ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003071
Ned Deilycbfb9a52012-06-23 16:02:19 -07003072# For backward compatibility reasons we prefer to select '32-bit' if available,
3073# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003075if test "`uname -s`" = "Darwin"
3076then
3077 if test -n "${UNIVERSALSDK}"
3078 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003079 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003080 then
3081 UNIVERSAL_ARCHS="intel"
3082 fi
3083 fi
3084fi
3085
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003086
Matthias Kloseb9621712010-04-24 17:59:49 +00003087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3088$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089
3090# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003091if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003092 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003093 UNIVERSAL_ARCHS="$withval"
3094
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003095fi
3096
Ned Deily87adb6e2013-10-18 21:09:56 -07003097if test -n "${UNIVERSALSDK}"
3098then
3099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3100$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3101else
3102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3103$as_echo "no" >&6; }
3104fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003105
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003106
3107# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003108if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003109 withval=$with_framework_name;
3110 PYTHONFRAMEWORK=${withval}
3111 PYTHONFRAMEWORKDIR=${withval}.framework
3112 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3113
3114else
3115
3116 PYTHONFRAMEWORK=Python
3117 PYTHONFRAMEWORKDIR=Python.framework
3118 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3119
3120fi
3121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003122# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003123if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003124 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003125 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003126 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003127 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003128 esac
3129 case $enableval in
3130 no)
3131 PYTHONFRAMEWORK=
3132 PYTHONFRAMEWORKDIR=no-framework
3133 PYTHONFRAMEWORKPREFIX=
3134 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003135 FRAMEWORKINSTALLFIRST=
3136 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003137 FRAMEWORKALTINSTALLFIRST=
3138 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003139 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003140 if test "x${prefix}" = "xNONE"; then
3141 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3142 else
3143 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3144 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003145 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003146 ;;
3147 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003148 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003149 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003150 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003151 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003152 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3153 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003154 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003155 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003156
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003157 if test "x${prefix}" = "xNONE" ; then
3158 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003159
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003160 else
3161 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3162 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003163
3164 case "${enableval}" in
3165 /System*)
3166 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3167 if test "${prefix}" = "NONE" ; then
3168 # See below
3169 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3170 fi
3171 ;;
3172
3173 /Library*)
3174 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3175 ;;
3176
3177 */Library/Frameworks)
3178 MDIR="`dirname "${enableval}"`"
3179 MDIR="`dirname "${MDIR}"`"
3180 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3181
3182 if test "${prefix}" = "NONE"; then
3183 # User hasn't specified the
3184 # --prefix option, but wants to install
3185 # the framework in a non-default location,
3186 # ensure that the compatibility links get
3187 # installed relative to that prefix as well
3188 # instead of in /usr/local.
3189 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3190 fi
3191 ;;
3192
3193 *)
3194 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3195 ;;
3196 esac
3197
Jack Jansen127e56e2001-09-11 14:41:54 +00003198 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003200 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003201 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003202 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003205
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003206 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3207
3208 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3209
Jack Jansene578a632001-08-15 01:27:14 +00003210 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003211
Guido van Rossum563e7081996-09-10 18:20:48 +00003212else
Martin v. Löwis11437992002-04-12 09:54:03 +00003213
Jack Jansene578a632001-08-15 01:27:14 +00003214 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003215 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003216 PYTHONFRAMEWORKPREFIX=
3217 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003218 FRAMEWORKINSTALLFIRST=
3219 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003220 FRAMEWORKALTINSTALLFIRST=
3221 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003222 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003223 if test "x${prefix}" = "xNONE" ; then
3224 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3225 else
3226 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3227 fi
Jack Jansene578a632001-08-15 01:27:14 +00003228 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003229
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231fi
3232
Thomas Wouters477c8d52006-05-27 19:21:47 +00003233
3234
Michael W. Hudson54241132001-12-07 15:38:26 +00003235
3236
3237
3238
Jack Jansene578a632001-08-15 01:27:14 +00003239
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003240
3241
3242
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003243
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003244
Ned Deilyb8f944f2013-11-21 22:42:25 -08003245
Jack Jansene578a632001-08-15 01:27:14 +00003246##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003247## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003248## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003249##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003250# Set name for machine-dependent library files
3251
Matthias Kloseb9621712010-04-24 17:59:49 +00003252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3253$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003254if test -z "$MACHDEP"
3255then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003256 # avoid using uname for cross builds
3257 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003258 # ac_sys_system and ac_sys_release are used for setting
3259 # a lot of different things including 'define_xopen_source'
3260 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003261 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003262 *-*-linux-android*)
3263 ac_sys_system=Linux-android
3264 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003265 *-*-linux*)
3266 ac_sys_system=Linux
3267 ;;
3268 *-*-cygwin*)
3269 ac_sys_system=Cygwin
3270 ;;
3271 *)
3272 # for now, limit cross builds to known configurations
3273 MACHDEP="unknown"
3274 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3275 esac
3276 ac_sys_release=
3277 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003278 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003279 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003280 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003281 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003282 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003283 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003284 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003285 fi
3286 ac_md_system=`echo $ac_sys_system |
3287 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3288 ac_md_release=`echo $ac_sys_release |
3289 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3290 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003291
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003292 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003293 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003294 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003295 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003296 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003297 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003298 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003299fi
Guido van Rossum91922671997-10-09 20:24:13 +00003300
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003301
3302if test "$cross_compiling" = yes; then
3303 case "$host" in
3304 *-*-linux*)
3305 case "$host_cpu" in
3306 arm*)
3307 _host_cpu=arm
3308 ;;
3309 *)
3310 _host_cpu=$host_cpu
3311 esac
3312 ;;
3313 *-*-cygwin*)
3314 _host_cpu=
3315 ;;
3316 *)
3317 # for now, limit cross builds to known configurations
3318 MACHDEP="unknown"
3319 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3320 esac
3321 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3322fi
3323
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003324# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3325# disable features if it is defined, without any means to access these
3326# features as extensions. For these systems, we skip the definition of
3327# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3328# some feature, make sure there is no alternative way to access this
3329# feature. Also, when using wildcards, make sure you have verified the
3330# need for not defining _XOPEN_SOURCE on all systems matching the
3331# wildcard, and that the wildcard does not include future systems
3332# (which may remove their limitations).
3333case $ac_sys_system/$ac_sys_release in
3334 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3335 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003336 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003337 # In addition, Stefan Krah confirms that issue #1244610 exists through
3338 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003339 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003340 define_xopen_source=no
3341 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3342 # also defined. This can be overridden by defining _BSD_SOURCE
3343 # As this has a different meaning on Linux, only define it on OpenBSD
3344
Matthias Kloseb9621712010-04-24 17:59:49 +00003345$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003346
3347 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003348 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003349 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3350 # also defined. This can be overridden by defining _BSD_SOURCE
3351 # As this has a different meaning on Linux, only define it on OpenBSD
3352
Matthias Kloseb9621712010-04-24 17:59:49 +00003353$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003354
3355 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003356 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3357 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3358 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003359 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 +00003360 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003361 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3362 # request to enable features supported by the standard as a request
3363 # to disable features not supported by the standard. The best way
3364 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3365 # entirely and define __EXTENSIONS__ instead.
3366 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003367 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003368 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3369 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003370 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003371 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003372 define_xopen_source=no;;
3373 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003374 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003375 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003376 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003377 # On FreeBSD 4, the math functions C89 does not cover are never defined
3378 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3379 FreeBSD/4.*)
3380 define_xopen_source=no;;
3381 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3382 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3383 # identifies itself as Darwin/7.*
3384 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3385 # disables platform specific features beyond repair.
3386 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3387 # has no effect, don't bother defining them
3388 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003389 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003390 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003391 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003392 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3393 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3394 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003395 AIX/4)
3396 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003397 AIX/5)
3398 if test `uname -r` -eq 1; then
3399 define_xopen_source=no
3400 fi
3401 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003402 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3403 # defining NI_NUMERICHOST.
3404 QNX/6.3.2)
3405 define_xopen_source=no
3406 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003407
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003408esac
3409
3410if test $define_xopen_source = yes
3411then
Victor Stinner14d098d2011-09-07 22:29:43 +02003412 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
Victor Stinner14d098d2011-09-07 22:29:43 +02003414$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003415
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003416
3417 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3418 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3419 # several APIs are not declared. Since this is also needed in some
3420 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003421
Matthias Kloseb9621712010-04-24 17:59:49 +00003422$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003423
3424
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003425
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003426$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003427
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003428fi
3429
Christian Heimes647cd872013-12-07 23:39:33 +01003430# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3431case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003432 hp*|HP*)
3433 define_stdc_a1=yes;;
3434 *)
3435 define_stdc_a1=no;;
3436esac
3437
3438if test $define_stdc_a1 = yes
3439then
Christian Heimes647cd872013-12-07 23:39:33 +01003440
3441$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3442
Christian Heimesb02bcae2013-12-08 15:21:08 +01003443fi
Christian Heimes647cd872013-12-07 23:39:33 +01003444
Guido van Rossum91922671997-10-09 20:24:13 +00003445#
3446# SGI compilers allow the specification of the both the ABI and the
3447# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003448# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003449#
3450# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3451# thus supply support for various ABI/ISA combinations. The MACHDEP
3452# variable is also adjusted.
3453#
3454
3455if test ! -z "$SGI_ABI"
3456then
3457 CC="cc $SGI_ABI"
3458 LDFLAGS="$SGI_ABI $LDFLAGS"
3459 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3460fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3462$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003463
Jack Jansen6b08a402004-06-03 12:41:45 +00003464# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3465# it may influence the way we can build extensions, so distutils
3466# needs to check it
3467
Thomas Wouters477c8d52006-05-27 19:21:47 +00003468
Jack Jansen6b08a402004-06-03 12:41:45 +00003469CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003470EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003471
Guido van Rossum627b2d71993-12-24 10:39:16 +00003472# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003473
3474# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3475# for debug/optimization stuff. BASECFLAGS is for flags that are required
3476# just to get things to compile and link. Users are free to override OPT
3477# when running configure or make. The build should not break if they do.
3478# BASECFLAGS should generally not be messed with, however.
3479
3480# XXX shouldn't some/most/all of this code be merged with the stuff later
3481# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3483$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003484
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003485# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003486if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003487 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003488 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003489 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003490 without_gcc=yes;;
3491 yes) CC=gcc
3492 without_gcc=no;;
3493 *) CC=$withval
3494 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003495 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003496else
Martin v. Löwis11437992002-04-12 09:54:03 +00003497
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003498 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003499 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003500 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003501 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003502 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003503fi
3504
Matthias Kloseb9621712010-04-24 17:59:49 +00003505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3506$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003507
Zachary Ware5af85642015-12-21 12:09:17 -06003508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3509$as_echo_n "checking for --with-icc... " >&6; }
3510
3511# Check whether --with-icc was given.
3512if test "${with_icc+set}" = set; then :
3513 withval=$with_icc;
3514 case $withval in
3515 no) CC=${CC:-cc}
3516 with_icc=no;;
3517 yes) CC=icc
3518 CXX=icpc
3519 with_icc=yes;;
3520 *) CC=$withval
3521 with_icc=$withval;;
3522 esac
3523else
3524
3525 with_icc=no
3526fi
3527
3528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3529$as_echo "$with_icc" >&6; }
3530
Guido van Rossum8b131c51995-03-09 14:10:13 +00003531# If the user switches compilers, we can't believe the cache
3532if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3533then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003534 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003535(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003536fi
3537
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003538# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3539# when the compiler supports them, but we don't always want -O2, and
3540# we set -g later.
3541if test -z "$CFLAGS"; then
3542 CFLAGS=
3543fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003544
3545if test "$ac_sys_system" = "Darwin"
3546then
3547 # Compiler selection on MacOSX is more complicated than
3548 # AC_PROG_CC can handle, see Mac/README.txt for more
3549 # information
3550 if test -z "${CC}"
3551 then
3552 found_gcc=
3553 found_clang=
3554 as_save_IFS=$IFS; IFS=:
3555 for as_dir in $PATH
3556 do
3557 IFS=$as_save_IFS
3558 if test -x $as_dir/gcc; then
3559 if test -z "${found_gcc}"; then
3560 found_gcc=$as_dir/gcc
3561 fi
3562 fi
3563 if test -x $as_dir/clang; then
3564 if test -z "${found_clang}"; then
3565 found_clang=$as_dir/clang
3566 fi
3567 fi
3568 done
3569 IFS=$as_save_IFS
3570
3571 if test -n "$found_gcc" -a -n "$found_clang"
3572 then
3573 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3574 then
3575 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3576$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3577 CC="$found_clang"
3578 CXX="$found_clang++"
3579 fi
3580
3581
3582 elif test -z "$found_gcc" -a -n "$found_clang"
3583 then
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3585$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3586 CC="$found_clang"
3587 CXX="$found_clang++"
3588
3589 elif test -z "$found_gcc" -a -z "$found_clang"
3590 then
3591 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3592 if test -n "${found_clang}"
3593 then
3594 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3595$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3596 CC="${found_clang}"
3597 CXX="`/usr/bin/xcrun -find clang++`"
3598
3599 # else: use default behaviour
3600 fi
3601 fi
3602 fi
3603fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003604ac_ext=c
3605ac_cpp='$CPP $CPPFLAGS'
3606ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3607ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3608ac_compiler_gnu=$ac_cv_c_compiler_gnu
3609if test -n "$ac_tool_prefix"; then
3610 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3611set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3613$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003614if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003615 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003616else
3617 if test -n "$CC"; then
3618 ac_cv_prog_CC="$CC" # Let the user override the test.
3619else
Martin v. Löwis11437992002-04-12 09:54:03 +00003620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3621for as_dir in $PATH
3622do
3623 IFS=$as_save_IFS
3624 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003626 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003627 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 $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 +00003629 break 2
3630 fi
3631done
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003633IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003634
Jack Jansendd19cf82001-12-06 22:36:17 +00003635fi
3636fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003637CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003638if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3640$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003641else
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3643$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003644fi
3645
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003646
Martin v. Löwis11437992002-04-12 09:54:03 +00003647fi
3648if test -z "$ac_cv_prog_CC"; then
3649 ac_ct_CC=$CC
3650 # Extract the first word of "gcc", so it can be a program name with args.
3651set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3653$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003654if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003655 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003656else
3657 if test -n "$ac_ct_CC"; then
3658 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3659else
3660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3661for as_dir in $PATH
3662do
3663 IFS=$as_save_IFS
3664 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003665 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003666 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003667 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 $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 +00003669 break 2
3670 fi
3671done
Matthias Kloseb9621712010-04-24 17:59:49 +00003672 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003673IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003674
3675fi
3676fi
3677ac_ct_CC=$ac_cv_prog_ac_ct_CC
3678if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3680$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003681else
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3683$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003684fi
3685
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003686 if test "x$ac_ct_CC" = x; then
3687 CC=""
3688 else
3689 case $cross_compiling:$ac_tool_warned in
3690yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003691{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3692$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003693ac_tool_warned=yes ;;
3694esac
3695 CC=$ac_ct_CC
3696 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003697else
3698 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003699fi
3700
Jack Jansendd19cf82001-12-06 22:36:17 +00003701if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003702 if test -n "$ac_tool_prefix"; then
3703 # 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 +00003704set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3706$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003707if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003708 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003709else
3710 if test -n "$CC"; then
3711 ac_cv_prog_CC="$CC" # Let the user override the test.
3712else
Martin v. Löwis11437992002-04-12 09:54:03 +00003713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3714for as_dir in $PATH
3715do
3716 IFS=$as_save_IFS
3717 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003719 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003720 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 $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 +00003722 break 2
3723 fi
3724done
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003726IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003727
3728fi
3729fi
3730CC=$ac_cv_prog_CC
3731if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3733$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003734else
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3736$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003737fi
3738
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003741fi
3742if test -z "$CC"; then
3743 # Extract the first word of "cc", so it can be a program name with args.
3744set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3746$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003747if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003749else
3750 if test -n "$CC"; then
3751 ac_cv_prog_CC="$CC" # Let the user override the test.
3752else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003753 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3755for as_dir in $PATH
3756do
3757 IFS=$as_save_IFS
3758 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003760 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003761 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3762 ac_prog_rejected=yes
3763 continue
3764 fi
3765 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 $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 +00003767 break 2
3768 fi
3769done
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003771IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003772
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003773if test $ac_prog_rejected = yes; then
3774 # We found a bogon in the path, so make sure we never use it.
3775 set dummy $ac_cv_prog_CC
3776 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003777 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003778 # We chose a different compiler from the bogus one.
3779 # However, it has the same basename, so the bogon will be chosen
3780 # first if we set CC to just the basename; use the full file name.
3781 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003782 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003783 fi
3784fi
3785fi
3786fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003787CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003788if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3790$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003791else
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3793$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003794fi
3795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796
Martin v. Löwis11437992002-04-12 09:54:03 +00003797fi
3798if test -z "$CC"; then
3799 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003800 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003801 do
3802 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3803set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3805$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003806if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003808else
3809 if test -n "$CC"; then
3810 ac_cv_prog_CC="$CC" # Let the user override the test.
3811else
Martin v. Löwis11437992002-04-12 09:54:03 +00003812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3813for as_dir in $PATH
3814do
3815 IFS=$as_save_IFS
3816 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003818 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003819 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 $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 +00003821 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003822 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003823done
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003825IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003826
3827fi
3828fi
3829CC=$ac_cv_prog_CC
3830if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3832$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003833else
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3835$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003836fi
3837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838
Martin v. Löwis11437992002-04-12 09:54:03 +00003839 test -n "$CC" && break
3840 done
3841fi
3842if test -z "$CC"; then
3843 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003845do
3846 # Extract the first word of "$ac_prog", so it can be a program name with args.
3847set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3849$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003850if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003852else
3853 if test -n "$ac_ct_CC"; then
3854 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3855else
3856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3857for as_dir in $PATH
3858do
3859 IFS=$as_save_IFS
3860 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003861 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003862 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003863 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 $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 +00003865 break 2
3866 fi
3867done
Matthias Kloseb9621712010-04-24 17:59:49 +00003868 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003869IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003870
Martin v. Löwis11437992002-04-12 09:54:03 +00003871fi
3872fi
3873ac_ct_CC=$ac_cv_prog_ac_ct_CC
3874if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3876$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003877else
Matthias Kloseb9621712010-04-24 17:59:49 +00003878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3879$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003880fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003881
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882
Martin v. Löwis11437992002-04-12 09:54:03 +00003883 test -n "$ac_ct_CC" && break
3884done
Michael W. Hudson54241132001-12-07 15:38:26 +00003885
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003886 if test "x$ac_ct_CC" = x; then
3887 CC=""
3888 else
3889 case $cross_compiling:$ac_tool_warned in
3890yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003891{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3892$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003893ac_tool_warned=yes ;;
3894esac
3895 CC=$ac_ct_CC
3896 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003897fi
3898
3899fi
3900
3901
Matthias Kloseb9621712010-04-24 17:59:49 +00003902test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3903$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003904as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003905See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003906
3907# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003908$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3909set X $ac_compile
3910ac_compiler=$2
3911for ac_option in --version -v -V -qversion; do
3912 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003913case "(($ac_try" in
3914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3915 *) ac_try_echo=$ac_try;;
3916esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003917eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3918$as_echo "$ac_try_echo"; } >&5
3919 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003920 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003921 if test -s conftest.err; then
3922 sed '10a\
3923... rest of stderr output deleted ...
3924 10q' conftest.err >conftest.er1
3925 cat conftest.er1 >&5
3926 fi
3927 rm -f conftest.er1 conftest.err
3928 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3929 test $ac_status = 0; }
3930done
Martin v. Löwis11437992002-04-12 09:54:03 +00003931
Matthias Kloseb9621712010-04-24 17:59:49 +00003932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003933/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003934
Martin v. Löwis11437992002-04-12 09:54:03 +00003935int
3936main ()
3937{
3938
3939 ;
3940 return 0;
3941}
3942_ACEOF
3943ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003944ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003945# Try to create an executable without -o first, disregard a.out.
3946# It will help us diagnose broken compilers, and finding out an intuition
3947# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3949$as_echo_n "checking whether the C compiler works... " >&6; }
3950ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3951
3952# The possible output files:
3953ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3954
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955ac_rmfiles=
3956for ac_file in $ac_files
3957do
3958 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003959 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3961 esac
3962done
3963rm -f $ac_rmfiles
3964
Matthias Kloseb9621712010-04-24 17:59:49 +00003965if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966case "(($ac_try" in
3967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3968 *) ac_try_echo=$ac_try;;
3969esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003970eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3971$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003973 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3975 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003976 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3977# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3978# in a Makefile. We should not override ac_cv_exeext if it was cached,
3979# so that the user can short-circuit this test for compilers unknown to
3980# Autoconf.
3981for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003982do
3983 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003984 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003985 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003986 ;;
3987 [ab].out )
3988 # We found the default executable, but exeext='' is most
3989 # certainly right.
3990 break;;
3991 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003992 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003993 then :; else
3994 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3995 fi
3996 # We set ac_cv_exeext here because the later test for it is not
3997 # safe: cross compilers may not add the suffix if given an `-o'
3998 # argument, so we may need to know it at that point already.
3999 # Even if this section looks crufty: it has the advantage of
4000 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004001 break;;
4002 * )
4003 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004004 esac
4005done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004006test "$ac_cv_exeext" = no && ac_cv_exeext=
4007
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004008else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009 ac_file=''
4010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004011if test -z "$ac_file"; then :
4012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4013$as_echo "no" >&6; }
4014$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004015sed 's/^/| /' conftest.$ac_ext >&5
4016
Matthias Kloseb9621712010-04-24 17:59:49 +00004017{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004019as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004020See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004021else
4022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4023$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4026$as_echo_n "checking for C compiler default output file name... " >&6; }
4027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4028$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004029ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004030
Matthias Kloseb9621712010-04-24 17:59:49 +00004031rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004032ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4034$as_echo_n "checking for suffix of executables... " >&6; }
4035if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004036case "(($ac_try" in
4037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4038 *) ac_try_echo=$ac_try;;
4039esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004040eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4041$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004042 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004043 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004044 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4045 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004046 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4047# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4048# work properly (i.e., refer to `conftest.exe'), while it won't with
4049# `rm'.
4050for ac_file in conftest.exe conftest conftest.*; do
4051 test -f "$ac_file" || continue
4052 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004053 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004054 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4055 break;;
4056 * ) break;;
4057 esac
4058done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004059else
Matthias Kloseb9621712010-04-24 17:59:49 +00004060 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4061$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004062as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004063See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004065rm -f conftest conftest$ac_cv_exeext
4066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4067$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004068
4069rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004070EXEEXT=$ac_cv_exeext
4071ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4073/* end confdefs.h. */
4074#include <stdio.h>
4075int
4076main ()
4077{
4078FILE *f = fopen ("conftest.out", "w");
4079 return ferror (f) || fclose (f) != 0;
4080
4081 ;
4082 return 0;
4083}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004085ac_clean_files="$ac_clean_files conftest.out"
4086# Check that the compiler produces executables we can run. If not, either
4087# the compiler is broken, or we cross compile.
4088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4089$as_echo_n "checking whether we are cross compiling... " >&6; }
4090if test "$cross_compiling" != yes; then
4091 { { ac_try="$ac_link"
4092case "(($ac_try" in
4093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4094 *) ac_try_echo=$ac_try;;
4095esac
4096eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4097$as_echo "$ac_try_echo"; } >&5
4098 (eval "$ac_link") 2>&5
4099 ac_status=$?
4100 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4101 test $ac_status = 0; }
4102 if { ac_try='./conftest$ac_cv_exeext'
4103 { { case "(($ac_try" in
4104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4105 *) ac_try_echo=$ac_try;;
4106esac
4107eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4108$as_echo "$ac_try_echo"; } >&5
4109 (eval "$ac_try") 2>&5
4110 ac_status=$?
4111 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4112 test $ac_status = 0; }; }; then
4113 cross_compiling=no
4114 else
4115 if test "$cross_compiling" = maybe; then
4116 cross_compiling=yes
4117 else
4118 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4119$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004120as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004121If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004122See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 fi
4124 fi
4125fi
4126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4127$as_echo "$cross_compiling" >&6; }
4128
4129rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4130ac_clean_files=$ac_clean_files_save
4131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4132$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004133if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 $as_echo_n "(cached) " >&6
4135else
4136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004137/* end confdefs.h. */
4138
4139int
4140main ()
4141{
4142
4143 ;
4144 return 0;
4145}
4146_ACEOF
4147rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004148if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004149case "(($ac_try" in
4150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4151 *) ac_try_echo=$ac_try;;
4152esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004153eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4154$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004155 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004156 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4158 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004159 for ac_file in conftest.o conftest.obj conftest.*; do
4160 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004161 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004162 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004163 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4164 break;;
4165 esac
4166done
4167else
Matthias Kloseb9621712010-04-24 17:59:49 +00004168 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004169sed 's/^/| /' conftest.$ac_ext >&5
4170
Matthias Kloseb9621712010-04-24 17:59:49 +00004171{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4172$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004173as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004174See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004175fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004176rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4179$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004180OBJEXT=$ac_cv_objext
4181ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4183$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004184if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004185 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004186else
Matthias Kloseb9621712010-04-24 17:59:49 +00004187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004189
Martin v. Löwis11437992002-04-12 09:54:03 +00004190int
4191main ()
4192{
4193#ifndef __GNUC__
4194 choke me
4195#endif
4196
4197 ;
4198 return 0;
4199}
4200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004201if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004202 ac_compiler_gnu=yes
4203else
Matthias Kloseb9621712010-04-24 17:59:49 +00004204 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004207ac_cv_c_compiler_gnu=$ac_compiler_gnu
4208
4209fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4211$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4212if test $ac_compiler_gnu = yes; then
4213 GCC=yes
4214else
4215 GCC=
4216fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004217ac_test_CFLAGS=${CFLAGS+set}
4218ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4220$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004221if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004222 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004223else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224 ac_save_c_werror_flag=$ac_c_werror_flag
4225 ac_c_werror_flag=yes
4226 ac_cv_prog_cc_g=no
4227 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004229/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004230
Martin v. Löwis11437992002-04-12 09:54:03 +00004231int
4232main ()
4233{
4234
4235 ;
4236 return 0;
4237}
4238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004239if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004240 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004241else
Matthias Kloseb9621712010-04-24 17:59:49 +00004242 CFLAGS=""
4243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244/* end confdefs.h. */
4245
4246int
4247main ()
4248{
4249
4250 ;
4251 return 0;
4252}
4253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004254if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255
Matthias Kloseb9621712010-04-24 17:59:49 +00004256else
4257 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004258 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260/* end confdefs.h. */
4261
4262int
4263main ()
4264{
4265
4266 ;
4267 return 0;
4268}
4269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004270if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4278 ac_c_werror_flag=$ac_save_c_werror_flag
4279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4281$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004282if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004283 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004284elif test $ac_cv_prog_cc_g = yes; then
4285 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004286 CFLAGS="-g -O2"
4287 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004288 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004289 fi
4290else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004291 if test "$GCC" = yes; then
4292 CFLAGS="-O2"
4293 else
4294 CFLAGS=
4295 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004296fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4298$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004299if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004300 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004301else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004302 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004303ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004305/* end confdefs.h. */
4306#include <stdarg.h>
4307#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004308struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004309/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4310struct buf { int x; };
4311FILE * (*rcsopen) (struct buf *, struct stat *, int);
4312static char *e (p, i)
4313 char **p;
4314 int i;
4315{
4316 return p[i];
4317}
4318static char *f (char * (*g) (char **, int), char **p, ...)
4319{
4320 char *s;
4321 va_list v;
4322 va_start (v,p);
4323 s = g (p, va_arg (v,int));
4324 va_end (v);
4325 return s;
4326}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004327
4328/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4329 function prototypes and stuff, but not '\xHH' hex character constants.
4330 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004332 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4333 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004335int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4336
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4338 inside strings and character constants. */
4339#define FOO(x) 'x'
4340int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4341
Skip Montanaro6dead952003-09-25 14:50:04 +00004342int test (int i, double x);
4343struct s1 {int (*f) (int a);};
4344struct s2 {int (*f) (double a);};
4345int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4346int argc;
4347char **argv;
4348int
4349main ()
4350{
4351return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4352 ;
4353 return 0;
4354}
4355_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4357 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004358do
4359 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004360 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363rm -f core conftest.err conftest.$ac_objext
4364 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004365done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004367CC=$ac_save_CC
4368
4369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370# AC_CACHE_VAL
4371case "x$ac_cv_prog_cc_c89" in
4372 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4374$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4377$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004378 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4381$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004382esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004383if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004384
Matthias Kloseb9621712010-04-24 17:59:49 +00004385fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004386
Martin v. Löwis11437992002-04-12 09:54:03 +00004387ac_ext=c
4388ac_cpp='$CPP $CPPFLAGS'
4389ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4390ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4391ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004392
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004393ac_ext=c
4394ac_cpp='$CPP $CPPFLAGS'
4395ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4396ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4397ac_compiler_gnu=$ac_cv_c_compiler_gnu
4398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4399$as_echo_n "checking how to run the C preprocessor... " >&6; }
4400# On Suns, sometimes $CPP names a directory.
4401if test -n "$CPP" && test -d "$CPP"; then
4402 CPP=
4403fi
4404if test -z "$CPP"; then
4405 if ${ac_cv_prog_CPP+:} false; then :
4406 $as_echo_n "(cached) " >&6
4407else
4408 # Double quotes because CPP needs to be expanded
4409 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4410 do
4411 ac_preproc_ok=false
4412for ac_c_preproc_warn_flag in '' yes
4413do
4414 # Use a header file that comes with gcc, so configuring glibc
4415 # with a fresh cross-compiler works.
4416 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4417 # <limits.h> exists even on freestanding compilers.
4418 # On the NeXT, cc -E runs the code through the compiler's parser,
4419 # not just through cpp. "Syntax error" is here to catch this case.
4420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4421/* end confdefs.h. */
4422#ifdef __STDC__
4423# include <limits.h>
4424#else
4425# include <assert.h>
4426#endif
4427 Syntax error
4428_ACEOF
4429if ac_fn_c_try_cpp "$LINENO"; then :
4430
4431else
4432 # Broken: fails on valid input.
4433continue
4434fi
4435rm -f conftest.err conftest.i conftest.$ac_ext
4436
4437 # OK, works on sane cases. Now check whether nonexistent headers
4438 # can be detected and how.
4439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4440/* end confdefs.h. */
4441#include <ac_nonexistent.h>
4442_ACEOF
4443if ac_fn_c_try_cpp "$LINENO"; then :
4444 # Broken: success on invalid input.
4445continue
4446else
4447 # Passes both tests.
4448ac_preproc_ok=:
4449break
4450fi
4451rm -f conftest.err conftest.i conftest.$ac_ext
4452
4453done
4454# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4455rm -f conftest.i conftest.err conftest.$ac_ext
4456if $ac_preproc_ok; then :
4457 break
4458fi
4459
4460 done
4461 ac_cv_prog_CPP=$CPP
4462
4463fi
4464 CPP=$ac_cv_prog_CPP
4465else
4466 ac_cv_prog_CPP=$CPP
4467fi
4468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4469$as_echo "$CPP" >&6; }
4470ac_preproc_ok=false
4471for ac_c_preproc_warn_flag in '' yes
4472do
4473 # Use a header file that comes with gcc, so configuring glibc
4474 # with a fresh cross-compiler works.
4475 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4476 # <limits.h> exists even on freestanding compilers.
4477 # On the NeXT, cc -E runs the code through the compiler's parser,
4478 # not just through cpp. "Syntax error" is here to catch this case.
4479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4480/* end confdefs.h. */
4481#ifdef __STDC__
4482# include <limits.h>
4483#else
4484# include <assert.h>
4485#endif
4486 Syntax error
4487_ACEOF
4488if ac_fn_c_try_cpp "$LINENO"; then :
4489
4490else
4491 # Broken: fails on valid input.
4492continue
4493fi
4494rm -f conftest.err conftest.i conftest.$ac_ext
4495
4496 # OK, works on sane cases. Now check whether nonexistent headers
4497 # can be detected and how.
4498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4499/* end confdefs.h. */
4500#include <ac_nonexistent.h>
4501_ACEOF
4502if ac_fn_c_try_cpp "$LINENO"; then :
4503 # Broken: success on invalid input.
4504continue
4505else
4506 # Passes both tests.
4507ac_preproc_ok=:
4508break
4509fi
4510rm -f conftest.err conftest.i conftest.$ac_ext
4511
4512done
4513# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4514rm -f conftest.i conftest.err conftest.$ac_ext
4515if $ac_preproc_ok; then :
4516
4517else
4518 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4519$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4520as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4521See \`config.log' for more details" "$LINENO" 5; }
4522fi
4523
4524ac_ext=c
4525ac_cpp='$CPP $CPPFLAGS'
4526ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4527ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4528ac_compiler_gnu=$ac_cv_c_compiler_gnu
4529
4530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4531$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4532if ${ac_cv_path_GREP+:} false; then :
4533 $as_echo_n "(cached) " >&6
4534else
4535 if test -z "$GREP"; then
4536 ac_path_GREP_found=false
4537 # Loop through the user's path and test for each of PROGNAME-LIST
4538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4539for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4540do
4541 IFS=$as_save_IFS
4542 test -z "$as_dir" && as_dir=.
4543 for ac_prog in grep ggrep; do
4544 for ac_exec_ext in '' $ac_executable_extensions; do
4545 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4546 as_fn_executable_p "$ac_path_GREP" || continue
4547# Check for GNU ac_path_GREP and select it if it is found.
4548 # Check for GNU $ac_path_GREP
4549case `"$ac_path_GREP" --version 2>&1` in
4550*GNU*)
4551 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4552*)
4553 ac_count=0
4554 $as_echo_n 0123456789 >"conftest.in"
4555 while :
4556 do
4557 cat "conftest.in" "conftest.in" >"conftest.tmp"
4558 mv "conftest.tmp" "conftest.in"
4559 cp "conftest.in" "conftest.nl"
4560 $as_echo 'GREP' >> "conftest.nl"
4561 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4562 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4563 as_fn_arith $ac_count + 1 && ac_count=$as_val
4564 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4565 # Best one so far, save it but keep looking for a better one
4566 ac_cv_path_GREP="$ac_path_GREP"
4567 ac_path_GREP_max=$ac_count
4568 fi
4569 # 10*(2^10) chars as input seems more than enough
4570 test $ac_count -gt 10 && break
4571 done
4572 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4573esac
4574
4575 $ac_path_GREP_found && break 3
4576 done
4577 done
4578 done
4579IFS=$as_save_IFS
4580 if test -z "$ac_cv_path_GREP"; then
4581 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4582 fi
4583else
4584 ac_cv_path_GREP=$GREP
4585fi
4586
4587fi
4588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4589$as_echo "$ac_cv_path_GREP" >&6; }
4590 GREP="$ac_cv_path_GREP"
4591
4592
Łukasz Langaa785c872016-09-09 17:37:37 -07004593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4594$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4595if ${ac_cv_path_SED+:} false; then :
4596 $as_echo_n "(cached) " >&6
4597else
4598 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4599 for ac_i in 1 2 3 4 5 6 7; do
4600 ac_script="$ac_script$as_nl$ac_script"
4601 done
4602 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4603 { ac_script=; unset ac_script;}
4604 if test -z "$SED"; then
4605 ac_path_SED_found=false
4606 # Loop through the user's path and test for each of PROGNAME-LIST
4607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4608for as_dir in $PATH
4609do
4610 IFS=$as_save_IFS
4611 test -z "$as_dir" && as_dir=.
4612 for ac_prog in sed gsed; do
4613 for ac_exec_ext in '' $ac_executable_extensions; do
4614 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4615 as_fn_executable_p "$ac_path_SED" || continue
4616# Check for GNU ac_path_SED and select it if it is found.
4617 # Check for GNU $ac_path_SED
4618case `"$ac_path_SED" --version 2>&1` in
4619*GNU*)
4620 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4621*)
4622 ac_count=0
4623 $as_echo_n 0123456789 >"conftest.in"
4624 while :
4625 do
4626 cat "conftest.in" "conftest.in" >"conftest.tmp"
4627 mv "conftest.tmp" "conftest.in"
4628 cp "conftest.in" "conftest.nl"
4629 $as_echo '' >> "conftest.nl"
4630 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4631 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4632 as_fn_arith $ac_count + 1 && ac_count=$as_val
4633 if test $ac_count -gt ${ac_path_SED_max-0}; then
4634 # Best one so far, save it but keep looking for a better one
4635 ac_cv_path_SED="$ac_path_SED"
4636 ac_path_SED_max=$ac_count
4637 fi
4638 # 10*(2^10) chars as input seems more than enough
4639 test $ac_count -gt 10 && break
4640 done
4641 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4642esac
4643
4644 $ac_path_SED_found && break 3
4645 done
4646 done
4647 done
4648IFS=$as_save_IFS
4649 if test -z "$ac_cv_path_SED"; then
4650 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4651 fi
4652else
4653 ac_cv_path_SED=$SED
4654fi
4655
4656fi
4657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4658$as_echo "$ac_cv_path_SED" >&6; }
4659 SED="$ac_cv_path_SED"
4660 rm -f conftest.sed
4661
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004662
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004663
4664
Matthias Kloseb9621712010-04-24 17:59:49 +00004665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4666$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004668# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004669if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004670 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004671
4672 case $withval in
4673 no) with_cxx_main=no
4674 MAINCC='$(CC)';;
4675 yes) with_cxx_main=yes
4676 MAINCC='$(CXX)';;
4677 *) with_cxx_main=yes
4678 MAINCC=$withval
4679 if test -z "$CXX"
4680 then
4681 CXX=$withval
4682 fi;;
4683 esac
4684else
4685
4686 with_cxx_main=no
4687 MAINCC='$(CC)'
4688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004689fi
4690
Matthias Kloseb9621712010-04-24 17:59:49 +00004691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4692$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004693
4694preset_cxx="$CXX"
4695if test -z "$CXX"
4696then
4697 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004698 gcc) if test -n "$ac_tool_prefix"; then
4699 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4700set dummy ${ac_tool_prefix}g++; ac_word=$2
4701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4702$as_echo_n "checking for $ac_word... " >&6; }
4703if ${ac_cv_path_CXX+:} false; then :
4704 $as_echo_n "(cached) " >&6
4705else
4706 case $CXX in
4707 [\\/]* | ?:[\\/]*)
4708 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4709 ;;
4710 *)
4711 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4712for as_dir in notfound
4713do
4714 IFS=$as_save_IFS
4715 test -z "$as_dir" && as_dir=.
4716 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004717 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004718 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4719 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4720 break 2
4721 fi
4722done
4723 done
4724IFS=$as_save_IFS
4725
4726 ;;
4727esac
4728fi
4729CXX=$ac_cv_path_CXX
4730if test -n "$CXX"; then
4731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4732$as_echo "$CXX" >&6; }
4733else
4734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4735$as_echo "no" >&6; }
4736fi
4737
4738
4739fi
4740if test -z "$ac_cv_path_CXX"; then
4741 ac_pt_CXX=$CXX
4742 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004743set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4745$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004746if ${ac_cv_path_ac_pt_CXX+:} false; then :
4747 $as_echo_n "(cached) " >&6
4748else
4749 case $ac_pt_CXX in
4750 [\\/]* | ?:[\\/]*)
4751 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4752 ;;
4753 *)
4754 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4755for as_dir in notfound
4756do
4757 IFS=$as_save_IFS
4758 test -z "$as_dir" && as_dir=.
4759 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004760 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004761 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4762 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4763 break 2
4764 fi
4765done
4766 done
4767IFS=$as_save_IFS
4768
4769 ;;
4770esac
4771fi
4772ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4773if test -n "$ac_pt_CXX"; then
4774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4775$as_echo "$ac_pt_CXX" >&6; }
4776else
4777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4778$as_echo "no" >&6; }
4779fi
4780
4781 if test "x$ac_pt_CXX" = x; then
4782 CXX="g++"
4783 else
4784 case $cross_compiling:$ac_tool_warned in
4785yes:)
4786{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4787$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4788ac_tool_warned=yes ;;
4789esac
4790 CXX=$ac_pt_CXX
4791 fi
4792else
4793 CXX="$ac_cv_path_CXX"
4794fi
4795 ;;
4796 cc) if test -n "$ac_tool_prefix"; then
4797 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4798set dummy ${ac_tool_prefix}c++; ac_word=$2
4799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4800$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004801if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803else
4804 case $CXX in
4805 [\\/]* | ?:[\\/]*)
4806 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4807 ;;
4808 *)
4809 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4810for as_dir in notfound
4811do
4812 IFS=$as_save_IFS
4813 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004814 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004815 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004816 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004817 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004818 break 2
4819 fi
4820done
Matthias Kloseb9621712010-04-24 17:59:49 +00004821 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004822IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004823
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004824 ;;
4825esac
4826fi
4827CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004828if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4830$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004831else
Matthias Kloseb9621712010-04-24 17:59:49 +00004832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4833$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004835
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004836
4837fi
4838if test -z "$ac_cv_path_CXX"; then
4839 ac_pt_CXX=$CXX
4840 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004841set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4843$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004844if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004845 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004846else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004847 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004848 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004849 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 +00004850 ;;
4851 *)
4852 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4853for as_dir in notfound
4854do
4855 IFS=$as_save_IFS
4856 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004857 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004858 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004859 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004860 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004861 break 2
4862 fi
4863done
Matthias Kloseb9621712010-04-24 17:59:49 +00004864 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004865IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004866
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004867 ;;
4868esac
4869fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004870ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4871if test -n "$ac_pt_CXX"; then
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4873$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004874else
Matthias Kloseb9621712010-04-24 17:59:49 +00004875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4876$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004878
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004879 if test "x$ac_pt_CXX" = x; then
4880 CXX="c++"
4881 else
4882 case $cross_compiling:$ac_tool_warned in
4883yes:)
4884{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4885$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4886ac_tool_warned=yes ;;
4887esac
4888 CXX=$ac_pt_CXX
4889 fi
4890else
4891 CXX="$ac_cv_path_CXX"
4892fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004893 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004894 clang|*/clang) if test -n "$ac_tool_prefix"; then
4895 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4896set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4898$as_echo_n "checking for $ac_word... " >&6; }
4899if ${ac_cv_path_CXX+:} false; then :
4900 $as_echo_n "(cached) " >&6
4901else
4902 case $CXX in
4903 [\\/]* | ?:[\\/]*)
4904 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4905 ;;
4906 *)
4907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4908for as_dir in notfound
4909do
4910 IFS=$as_save_IFS
4911 test -z "$as_dir" && as_dir=.
4912 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004913 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004914 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4915 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4916 break 2
4917 fi
4918done
4919 done
4920IFS=$as_save_IFS
4921
Ned Deilycbfb9a52012-06-23 16:02:19 -07004922 ;;
4923esac
4924fi
4925CXX=$ac_cv_path_CXX
4926if test -n "$CXX"; then
4927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4928$as_echo "$CXX" >&6; }
4929else
4930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4931$as_echo "no" >&6; }
4932fi
4933
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004934
4935fi
4936if test -z "$ac_cv_path_CXX"; then
4937 ac_pt_CXX=$CXX
4938 # Extract the first word of "clang++", so it can be a program name with args.
4939set dummy clang++; ac_word=$2
4940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4941$as_echo_n "checking for $ac_word... " >&6; }
4942if ${ac_cv_path_ac_pt_CXX+:} false; then :
4943 $as_echo_n "(cached) " >&6
4944else
4945 case $ac_pt_CXX in
4946 [\\/]* | ?:[\\/]*)
4947 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4948 ;;
4949 *)
4950 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4951for as_dir in notfound
4952do
4953 IFS=$as_save_IFS
4954 test -z "$as_dir" && as_dir=.
4955 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004956 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004957 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4958 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4959 break 2
4960 fi
4961done
4962 done
4963IFS=$as_save_IFS
4964
4965 ;;
4966esac
4967fi
4968ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4969if test -n "$ac_pt_CXX"; then
4970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4971$as_echo "$ac_pt_CXX" >&6; }
4972else
4973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4974$as_echo "no" >&6; }
4975fi
4976
4977 if test "x$ac_pt_CXX" = x; then
4978 CXX="clang++"
4979 else
4980 case $cross_compiling:$ac_tool_warned in
4981yes:)
4982{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4983$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4984ac_tool_warned=yes ;;
4985esac
4986 CXX=$ac_pt_CXX
4987 fi
4988else
4989 CXX="$ac_cv_path_CXX"
4990fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004991 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004992 icc|*/icc) if test -n "$ac_tool_prefix"; then
4993 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4994set dummy ${ac_tool_prefix}icpc; ac_word=$2
4995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4996$as_echo_n "checking for $ac_word... " >&6; }
4997if ${ac_cv_path_CXX+:} false; then :
4998 $as_echo_n "(cached) " >&6
4999else
5000 case $CXX in
5001 [\\/]* | ?:[\\/]*)
5002 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5003 ;;
5004 *)
5005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5006for as_dir in notfound
5007do
5008 IFS=$as_save_IFS
5009 test -z "$as_dir" && as_dir=.
5010 for ac_exec_ext in '' $ac_executable_extensions; do
5011 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5012 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5014 break 2
5015 fi
5016done
5017 done
5018IFS=$as_save_IFS
5019
5020 ;;
5021esac
5022fi
5023CXX=$ac_cv_path_CXX
5024if test -n "$CXX"; then
5025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5026$as_echo "$CXX" >&6; }
5027else
5028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5029$as_echo "no" >&6; }
5030fi
5031
5032
5033fi
5034if test -z "$ac_cv_path_CXX"; then
5035 ac_pt_CXX=$CXX
5036 # Extract the first word of "icpc", so it can be a program name with args.
5037set dummy icpc; ac_word=$2
5038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5039$as_echo_n "checking for $ac_word... " >&6; }
5040if ${ac_cv_path_ac_pt_CXX+:} false; then :
5041 $as_echo_n "(cached) " >&6
5042else
5043 case $ac_pt_CXX in
5044 [\\/]* | ?:[\\/]*)
5045 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5046 ;;
5047 *)
5048 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5049for as_dir in notfound
5050do
5051 IFS=$as_save_IFS
5052 test -z "$as_dir" && as_dir=.
5053 for ac_exec_ext in '' $ac_executable_extensions; do
5054 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5055 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5057 break 2
5058 fi
5059done
5060 done
5061IFS=$as_save_IFS
5062
5063 ;;
5064esac
5065fi
5066ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5067if test -n "$ac_pt_CXX"; then
5068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5069$as_echo "$ac_pt_CXX" >&6; }
5070else
5071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5072$as_echo "no" >&6; }
5073fi
5074
5075 if test "x$ac_pt_CXX" = x; then
5076 CXX="icpc"
5077 else
5078 case $cross_compiling:$ac_tool_warned in
5079yes:)
5080{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5081$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5082ac_tool_warned=yes ;;
5083esac
5084 CXX=$ac_pt_CXX
5085 fi
5086else
5087 CXX="$ac_cv_path_CXX"
5088fi
5089 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005090 esac
5091 if test "$CXX" = "notfound"
5092 then
5093 CXX=""
5094 fi
5095fi
5096if test -z "$CXX"
5097then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005098 if test -n "$ac_tool_prefix"; then
5099 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5100 do
5101 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5102set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5104$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005105if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005106 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005107else
5108 if test -n "$CXX"; then
5109 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5110else
5111as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5112for as_dir in $PATH
5113do
5114 IFS=$as_save_IFS
5115 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005116 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005117 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005118 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005120 break 2
5121 fi
5122done
Matthias Kloseb9621712010-04-24 17:59:49 +00005123 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005124IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005125
5126fi
5127fi
5128CXX=$ac_cv_prog_CXX
5129if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5131$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005132else
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5134$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005135fi
5136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005137
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005138 test -n "$CXX" && break
5139 done
5140fi
5141if test -z "$CXX"; then
5142 ac_ct_CXX=$CXX
5143 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5144do
5145 # Extract the first word of "$ac_prog", so it can be a program name with args.
5146set dummy $ac_prog; ac_word=$2
5147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5148$as_echo_n "checking for $ac_word... " >&6; }
5149if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5150 $as_echo_n "(cached) " >&6
5151else
5152 if test -n "$ac_ct_CXX"; then
5153 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5154else
5155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5156for as_dir in $PATH
5157do
5158 IFS=$as_save_IFS
5159 test -z "$as_dir" && as_dir=.
5160 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005161 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005162 ac_cv_prog_ac_ct_CXX="$ac_prog"
5163 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5164 break 2
5165 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005166done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005167 done
5168IFS=$as_save_IFS
5169
5170fi
5171fi
5172ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5173if test -n "$ac_ct_CXX"; then
5174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5175$as_echo "$ac_ct_CXX" >&6; }
5176else
5177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5178$as_echo "no" >&6; }
5179fi
5180
5181
5182 test -n "$ac_ct_CXX" && break
5183done
5184
5185 if test "x$ac_ct_CXX" = x; then
5186 CXX="notfound"
5187 else
5188 case $cross_compiling:$ac_tool_warned in
5189yes:)
5190{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5191$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5192ac_tool_warned=yes ;;
5193esac
5194 CXX=$ac_ct_CXX
5195 fi
5196fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005197
5198 if test "$CXX" = "notfound"
5199 then
5200 CXX=""
5201 fi
5202fi
5203if test "$preset_cxx" != "$CXX"
5204then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005205 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005206
5207 By default, distutils will build C++ extension modules with \"$CXX\".
5208 If this is not intended, then set CXX on the configure command line.
5209 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005210$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005211
5212 By default, distutils will build C++ extension modules with \"$CXX\".
5213 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005214 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005215fi
5216
5217
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005218MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5219
5220
5221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5222$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5223cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005224#undef bfin
5225#undef cris
5226#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005227#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005228#undef hppa
5229#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005230#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005231#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005232#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005233#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005234#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005235#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005236 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005237#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005238# if defined(__x86_64__) && defined(__LP64__)
5239 x86_64-linux-gnu
5240# elif defined(__x86_64__) && defined(__ILP32__)
5241 x86_64-linux-gnux32
5242# elif defined(__i386__)
5243 i386-linux-gnu
5244# elif defined(__aarch64__) && defined(__AARCH64EL__)
5245# if defined(__ILP32__)
5246 aarch64_ilp32-linux-gnu
5247# else
5248 aarch64-linux-gnu
5249# endif
5250# elif defined(__aarch64__) && defined(__AARCH64EB__)
5251# if defined(__ILP32__)
5252 aarch64_be_ilp32-linux-gnu
5253# else
5254 aarch64_be-linux-gnu
5255# endif
5256# elif defined(__alpha__)
5257 alpha-linux-gnu
5258# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5259# if defined(__ARMEL__)
5260 arm-linux-gnueabihf
5261# else
5262 armeb-linux-gnueabihf
5263# endif
5264# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5265# if defined(__ARMEL__)
5266 arm-linux-gnueabi
5267# else
5268 armeb-linux-gnueabi
5269# endif
5270# elif defined(__hppa__)
5271 hppa-linux-gnu
5272# elif defined(__ia64__)
5273 ia64-linux-gnu
5274# elif defined(__m68k__) && !defined(__mcoldfire__)
5275 m68k-linux-gnu
5276# elif defined(__mips_hard_float) && defined(_MIPSEL)
5277# if _MIPS_SIM == _ABIO32
5278 mipsel-linux-gnu
5279# elif _MIPS_SIM == _ABIN32
5280 mips64el-linux-gnuabin32
5281# elif _MIPS_SIM == _ABI64
5282 mips64el-linux-gnuabi64
5283# else
5284# error unknown platform triplet
5285# endif
5286# elif defined(__mips_hard_float)
5287# if _MIPS_SIM == _ABIO32
5288 mips-linux-gnu
5289# elif _MIPS_SIM == _ABIN32
5290 mips64-linux-gnuabin32
5291# elif _MIPS_SIM == _ABI64
5292 mips64-linux-gnuabi64
5293# else
5294# error unknown platform triplet
5295# endif
5296# elif defined(__or1k__)
5297 or1k-linux-gnu
5298# elif defined(__powerpc__) && defined(__SPE__)
5299 powerpc-linux-gnuspe
5300# elif defined(__powerpc64__)
5301# if defined(__LITTLE_ENDIAN__)
5302 powerpc64le-linux-gnu
5303# else
5304 powerpc64-linux-gnu
5305# endif
5306# elif defined(__powerpc__)
5307 powerpc-linux-gnu
5308# elif defined(__s390x__)
5309 s390x-linux-gnu
5310# elif defined(__s390__)
5311 s390-linux-gnu
5312# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5313 sh4-linux-gnu
5314# elif defined(__sparc__) && defined(__arch64__)
5315 sparc64-linux-gnu
5316# elif defined(__sparc__)
5317 sparc-linux-gnu
5318# else
5319# error unknown platform triplet
5320# endif
5321#elif defined(__FreeBSD_kernel__)
5322# if defined(__LP64__)
5323 x86_64-kfreebsd-gnu
5324# elif defined(__i386__)
5325 i386-kfreebsd-gnu
5326# else
5327# error unknown platform triplet
5328# endif
5329#elif defined(__gnu_hurd__)
5330 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005331#elif defined(__APPLE__)
5332 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005333#else
5334# error unknown platform triplet
5335#endif
5336
5337EOF
5338
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005339if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005340 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5342$as_echo "$PLATFORM_TRIPLET" >&6; }
5343else
5344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5345$as_echo "none" >&6; }
5346fi
5347rm -f conftest.c conftest.out
5348
5349if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5350 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5351 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5352 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005353elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5354 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005355fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005356
doko@ubuntu.com55532312016-06-14 08:55:19 +02005357if test x$MULTIARCH != x; then
5358 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5359fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005360
5361
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5363$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5364save_LDFLAGS="$LDFLAGS"
5365LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005366
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5368/* end confdefs.h. */
5369
5370int
5371main ()
5372{
5373
5374 ;
5375 return 0;
5376}
5377_ACEOF
5378if ac_fn_c_try_link "$LINENO"; then :
5379 NO_AS_NEEDED="-Wl,--no-as-needed"
5380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5381$as_echo "yes" >&6; }
5382else
5383 NO_AS_NEEDED=""
5384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5385$as_echo "no" >&6; }
5386fi
5387rm -f core conftest.err conftest.$ac_objext \
5388 conftest$ac_exeext conftest.$ac_ext
5389LDFLAGS="$save_LDFLAGS"
5390
5391
5392
5393# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005394
Matthias Kloseb9621712010-04-24 17:59:49 +00005395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5396$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005397if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005399else
5400 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5401 then ac_cv_path_EGREP="$GREP -E"
5402 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005405 # Loop through the user's path and test for each of PROGNAME-LIST
5406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005407for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5408do
5409 IFS=$as_save_IFS
5410 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 for ac_prog in egrep; do
5412 for ac_exec_ext in '' $ac_executable_extensions; do
5413 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005414 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005415# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005416 # Check for GNU $ac_path_EGREP
5417case `"$ac_path_EGREP" --version 2>&1` in
5418*GNU*)
5419 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5420*)
5421 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005422 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005423 while :
5424 do
5425 cat "conftest.in" "conftest.in" >"conftest.tmp"
5426 mv "conftest.tmp" "conftest.in"
5427 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005428 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005429 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5430 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005431 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005432 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5433 # Best one so far, save it but keep looking for a better one
5434 ac_cv_path_EGREP="$ac_path_EGREP"
5435 ac_path_EGREP_max=$ac_count
5436 fi
5437 # 10*(2^10) chars as input seems more than enough
5438 test $ac_count -gt 10 && break
5439 done
5440 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5441esac
5442
Matthias Kloseb9621712010-04-24 17:59:49 +00005443 $ac_path_EGREP_found && break 3
5444 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005445 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005446 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005447IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005448 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005449 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 +00005450 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005451else
5452 ac_cv_path_EGREP=$EGREP
5453fi
5454
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005455 fi
5456fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5458$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005459 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005460
5461
Matthias Kloseb9621712010-04-24 17:59:49 +00005462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5463$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005464if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005465 $as_echo_n "(cached) " >&6
5466else
5467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005468/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005469#include <stdlib.h>
5470#include <stdarg.h>
5471#include <string.h>
5472#include <float.h>
5473
5474int
5475main ()
5476{
5477
5478 ;
5479 return 0;
5480}
5481_ACEOF
5482if ac_fn_c_try_compile "$LINENO"; then :
5483 ac_cv_header_stdc=yes
5484else
5485 ac_cv_header_stdc=no
5486fi
5487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5488
5489if test $ac_cv_header_stdc = yes; then
5490 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5492/* end confdefs.h. */
5493#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005494
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005495_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005496if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005497 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005498
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005499else
Matthias Kloseb9621712010-04-24 17:59:49 +00005500 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005501fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005502rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005503
Matthias Kloseb9621712010-04-24 17:59:49 +00005504fi
5505
5506if test $ac_cv_header_stdc = yes; then
5507 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5509/* end confdefs.h. */
5510#include <stdlib.h>
5511
5512_ACEOF
5513if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5514 $EGREP "free" >/dev/null 2>&1; then :
5515
5516else
5517 ac_cv_header_stdc=no
5518fi
5519rm -f conftest*
5520
5521fi
5522
5523if test $ac_cv_header_stdc = yes; then
5524 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5525 if test "$cross_compiling" = yes; then :
5526 :
5527else
5528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5529/* end confdefs.h. */
5530#include <ctype.h>
5531#include <stdlib.h>
5532#if ((' ' & 0x0FF) == 0x020)
5533# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5534# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5535#else
5536# define ISLOWER(c) \
5537 (('a' <= (c) && (c) <= 'i') \
5538 || ('j' <= (c) && (c) <= 'r') \
5539 || ('s' <= (c) && (c) <= 'z'))
5540# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5541#endif
5542
5543#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5544int
5545main ()
5546{
5547 int i;
5548 for (i = 0; i < 256; i++)
5549 if (XOR (islower (i), ISLOWER (i))
5550 || toupper (i) != TOUPPER (i))
5551 return 2;
5552 return 0;
5553}
5554_ACEOF
5555if ac_fn_c_try_run "$LINENO"; then :
5556
5557else
5558 ac_cv_header_stdc=no
5559fi
5560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5561 conftest.$ac_objext conftest.beam conftest.$ac_ext
5562fi
5563
5564fi
5565fi
5566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5567$as_echo "$ac_cv_header_stdc" >&6; }
5568if test $ac_cv_header_stdc = yes; then
5569
5570$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5571
5572fi
5573
5574# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5575for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5576 inttypes.h stdint.h unistd.h
5577do :
5578 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5579ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5580"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005581if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005582 cat >>confdefs.h <<_ACEOF
5583#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5584_ACEOF
5585
5586fi
5587
5588done
5589
5590
5591
5592 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 +02005593if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005594 MINIX=yes
5595else
5596 MINIX=
5597fi
5598
5599
5600 if test "$MINIX" = yes; then
5601
5602$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5603
5604
5605$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5606
5607
5608$as_echo "#define _MINIX 1" >>confdefs.h
5609
5610 fi
5611
5612
5613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5614$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005615if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005616 $as_echo_n "(cached) " >&6
5617else
5618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5619/* end confdefs.h. */
5620
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005621# define __EXTENSIONS__ 1
5622 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005623int
5624main ()
5625{
5626
5627 ;
5628 return 0;
5629}
5630_ACEOF
5631if ac_fn_c_try_compile "$LINENO"; then :
5632 ac_cv_safe_to_define___extensions__=yes
5633else
5634 ac_cv_safe_to_define___extensions__=no
5635fi
5636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5637fi
5638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5639$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5640 test $ac_cv_safe_to_define___extensions__ = yes &&
5641 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5642
5643 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5644
5645 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5646
5647 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5648
5649 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5650
5651
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652
Xavier de Gaye95750b12016-07-09 11:05:42 +02005653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5654$as_echo_n "checking for the Android API level... " >&6; }
5655cat >> conftest.c <<EOF
5656#ifdef __ANDROID__
5657#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005658android_api = __ANDROID_API__
5659arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005660#else
5661#error not Android
5662#endif
5663EOF
5664
5665if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005666 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5667 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5669$as_echo "$ANDROID_API_LEVEL" >&6; }
5670
5671cat >>confdefs.h <<_ACEOF
5672#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5673_ACEOF
5674
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005675
5676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5677$as_echo_n "checking for the Android arm ABI... " >&6; }
5678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5679$as_echo "$_arm_arch" >&6; }
5680 if test "$_arm_arch" = 7; then
5681 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5682 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5683 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005684else
5685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5686$as_echo "not Android" >&6; }
5687fi
5688rm -f conftest.c conftest.out
5689
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690# Check for unsupported systems
5691case $ac_sys_system/$ac_sys_release in
5692atheos*|Linux*/1*)
5693 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5694 echo See README for details.
5695 exit 1;;
5696esac
5697
5698
Matthias Kloseb9621712010-04-24 17:59:49 +00005699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5700$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701
5702# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005703if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704 withval=$with_suffix;
5705 case $withval in
5706 no) EXEEXT=;;
5707 yes) EXEEXT=.exe;;
5708 *) EXEEXT=$withval;;
5709 esac
5710fi
5711
Matthias Kloseb9621712010-04-24 17:59:49 +00005712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5713$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714
5715# Test whether we're running on a non-case-sensitive system, in which
5716# case we give a warning if no ext is given
5717
Matthias Kloseb9621712010-04-24 17:59:49 +00005718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5719$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720if test ! -d CaseSensitiveTestDir; then
5721mkdir CaseSensitiveTestDir
5722fi
5723
5724if test -d casesensitivetestdir
5725then
Matthias Kloseb9621712010-04-24 17:59:49 +00005726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5727$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728 BUILDEXEEXT=.exe
5729else
Matthias Kloseb9621712010-04-24 17:59:49 +00005730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5731$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732 BUILDEXEEXT=$EXEEXT
5733fi
5734rmdir CaseSensitiveTestDir
5735
5736case $MACHDEP in
5737bsdos*)
5738 case $CC in
5739 gcc) CC="$CC -D_HAVE_BSDI";;
5740 esac;;
5741esac
5742
5743case $ac_sys_system in
5744hp*|HP*)
5745 case $CC in
5746 cc|*/cc) CC="$CC -Ae";;
5747 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748esac
5749
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750
Matthias Kloseb9621712010-04-24 17:59:49 +00005751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5752$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753if test -z "$LIBRARY"
5754then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005755 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5758$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759
5760# LDLIBRARY is the name of the library to link against (as opposed to the
5761# name of the library into which to insert object files). BLDLIBRARY is also
5762# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5763# is blank as the main program is not linked directly against LDLIBRARY.
5764# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5765# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5766# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5767# DLLLIBRARY is the shared (i.e., DLL) library.
5768#
5769# RUNSHARED is used to run shared python without installed libraries
5770#
5771# INSTSONAME is the name of the shared library that will be use to install
5772# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005773#
5774# LDVERSION is the shared library version number, normally the Python version
5775# with the ABI build flags appended.
5776
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777
5778
5779
5780
5781
5782
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005783
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784LDLIBRARY="$LIBRARY"
5785BLDLIBRARY='$(LDLIBRARY)'
5786INSTSONAME='$(LDLIBRARY)'
5787DLLLIBRARY=''
5788LDLIBRARYDIR=''
5789RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005790LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791
5792# LINKCC is the command that links the python executable -- default is $(CC).
5793# If CXX is set, and if it is needed to link a main function that was
5794# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5795# python might then depend on the C++ runtime
5796# This is altered for AIX in order to build the export list before
5797# linking.
5798
Matthias Kloseb9621712010-04-24 17:59:49 +00005799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5800$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801if test -z "$LINKCC"
5802then
5803 LINKCC='$(PURIFY) $(MAINCC)'
5804 case $ac_sys_system in
5805 AIX*)
5806 exp_extra="\"\""
5807 if test $ac_sys_release -ge 5 -o \
5808 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5809 exp_extra="."
5810 fi
5811 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812 QNX*)
5813 # qcc must be used because the other compilers do not
5814 # support -N.
5815 LINKCC=qcc;;
5816 esac
5817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5819$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820
5821# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5822# make sure we default having it set to "no": this is used by
5823# distutils.unixccompiler to know if it should add --enable-new-dtags
5824# to linker command lines, and failing to detect GNU ld simply results
5825# in the same bahaviour as before.
5826
Matthias Kloseb9621712010-04-24 17:59:49 +00005827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5828$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829ac_prog=ld
5830if test "$GCC" = yes; then
5831 ac_prog=`$CC -print-prog-name=ld`
5832fi
5833case `"$ac_prog" -V 2>&1 < /dev/null` in
5834 *GNU*)
5835 GNULD=yes;;
5836 *)
5837 GNULD=no;;
5838esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5840$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841
Matthias Kloseb9621712010-04-24 17:59:49 +00005842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5843$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005845if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846 enableval=$enable_shared;
5847fi
5848
5849
5850if test -z "$enable_shared"
5851then
5852 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005853 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854 enable_shared="yes";;
5855 *)
5856 enable_shared="no";;
5857 esac
5858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5860$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861
Matthias Kloseb9621712010-04-24 17:59:49 +00005862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5863$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005865if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005866 enableval=$enable_profiling;
5867fi
5868
5869if test "x$enable_profiling" = xyes; then
5870 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005871 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873/* end confdefs.h. */
5874int main() { return 0; }
5875_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005876if ac_fn_c_try_link "$LINENO"; then :
5877
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005879 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005881rm -f core conftest.err conftest.$ac_objext \
5882 conftest$ac_exeext conftest.$ac_ext
5883 CC="$ac_save_cc"
5884else
5885 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5888$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889
doko@ubuntu.comba015832012-06-30 16:52:05 +02005890if test "x$enable_profiling" = xyes; then
5891 BASECFLAGS="-pg $BASECFLAGS"
5892 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893fi
5894
Matthias Kloseb9621712010-04-24 17:59:49 +00005895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5896$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897
5898# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5899# library that we build, but we do not want to link against it (we
5900# will find it with a -framework option). For this reason there is an
5901# extra variable BLDLIBRARY against which Python and the extension
5902# modules are linked, BLDLIBRARY. This is normally the same as
5903# LDLIBRARY, but empty for MacOSX framework builds.
5904if test "$enable_framework"
5905then
5906 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005907 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908 BLDLIBRARY=''
5909else
5910 BLDLIBRARY='$(LDLIBRARY)'
5911fi
5912
5913# Other platforms follow
5914if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005915 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916
Matthias Kloseb9621712010-04-24 17:59:49 +00005917$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918
5919 case $ac_sys_system in
5920 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005921 LDLIBRARY='libpython$(LDVERSION).dll.a'
5922 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 ;;
5924 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005925 LDLIBRARY='libpython$(LDVERSION).so'
5926 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005927 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005929 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005930 then
5931 PY3LIBRARY=libpython3.so
5932 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005934 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005935 LDLIBRARY='libpython$(LDVERSION).so'
5936 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005937 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005939 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005940 then
5941 PY3LIBRARY=libpython3.so
5942 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943 ;;
5944 hp*|HP*)
5945 case `uname -m` in
5946 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005947 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948 ;;
5949 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005950 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951 ;;
5952 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005953 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005954 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005957 LDLIBRARY='libpython$(LDVERSION).dylib'
5958 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005959 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005961 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005962 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005963 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005964 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965
5966 esac
5967else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005968 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969 case $ac_sys_system in
5970 CYGWIN*)
5971 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005972 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973 ;;
5974 esac
5975fi
5976
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005977if test "$cross_compiling" = yes; then
5978 RUNSHARED=
5979fi
5980
Matthias Kloseb9621712010-04-24 17:59:49 +00005981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5982$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983
5984if test -n "$ac_tool_prefix"; then
5985 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5986set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5988$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005989if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005990 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991else
5992 if test -n "$RANLIB"; then
5993 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5994else
5995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5996for as_dir in $PATH
5997do
5998 IFS=$as_save_IFS
5999 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006000 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006001 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006003 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004 break 2
6005 fi
6006done
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008IFS=$as_save_IFS
6009
6010fi
6011fi
6012RANLIB=$ac_cv_prog_RANLIB
6013if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6015$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006016else
Matthias Kloseb9621712010-04-24 17:59:49 +00006017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6018$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019fi
6020
6021
6022fi
6023if test -z "$ac_cv_prog_RANLIB"; then
6024 ac_ct_RANLIB=$RANLIB
6025 # Extract the first word of "ranlib", so it can be a program name with args.
6026set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6028$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006029if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006030 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031else
6032 if test -n "$ac_ct_RANLIB"; then
6033 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6034else
6035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6036for as_dir in $PATH
6037do
6038 IFS=$as_save_IFS
6039 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006040 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006041 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044 break 2
6045 fi
6046done
Matthias Kloseb9621712010-04-24 17:59:49 +00006047 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048IFS=$as_save_IFS
6049
6050fi
6051fi
6052ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6053if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6055$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006056else
Matthias Kloseb9621712010-04-24 17:59:49 +00006057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6058$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059fi
6060
6061 if test "x$ac_ct_RANLIB" = x; then
6062 RANLIB=":"
6063 else
6064 case $cross_compiling:$ac_tool_warned in
6065yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006066{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6067$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006068ac_tool_warned=yes ;;
6069esac
6070 RANLIB=$ac_ct_RANLIB
6071 fi
6072else
6073 RANLIB="$ac_cv_prog_RANLIB"
6074fi
6075
6076
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006077if test -n "$ac_tool_prefix"; then
6078 for ac_prog in ar aal
6079 do
6080 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6081set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6083$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006084if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006085 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006086else
6087 if test -n "$AR"; then
6088 ac_cv_prog_AR="$AR" # Let the user override the test.
6089else
6090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6091for as_dir in $PATH
6092do
6093 IFS=$as_save_IFS
6094 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006095 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006096 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006097 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006099 break 2
6100 fi
6101done
Matthias Kloseb9621712010-04-24 17:59:49 +00006102 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006103IFS=$as_save_IFS
6104
6105fi
6106fi
6107AR=$ac_cv_prog_AR
6108if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6110$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006111else
Matthias Kloseb9621712010-04-24 17:59:49 +00006112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6113$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006114fi
6115
6116
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006117 test -n "$AR" && break
6118 done
6119fi
6120if test -z "$AR"; then
6121 ac_ct_AR=$AR
6122 for ac_prog in ar aal
6123do
6124 # Extract the first word of "$ac_prog", so it can be a program name with args.
6125set dummy $ac_prog; ac_word=$2
6126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6127$as_echo_n "checking for $ac_word... " >&6; }
6128if ${ac_cv_prog_ac_ct_AR+:} false; then :
6129 $as_echo_n "(cached) " >&6
6130else
6131 if test -n "$ac_ct_AR"; then
6132 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6133else
6134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6135for as_dir in $PATH
6136do
6137 IFS=$as_save_IFS
6138 test -z "$as_dir" && as_dir=.
6139 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006140 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006141 ac_cv_prog_ac_ct_AR="$ac_prog"
6142 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6143 break 2
6144 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006145done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006146 done
6147IFS=$as_save_IFS
6148
6149fi
6150fi
6151ac_ct_AR=$ac_cv_prog_ac_ct_AR
6152if test -n "$ac_ct_AR"; then
6153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6154$as_echo "$ac_ct_AR" >&6; }
6155else
6156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6157$as_echo "no" >&6; }
6158fi
6159
6160
6161 test -n "$ac_ct_AR" && break
6162done
6163
6164 if test "x$ac_ct_AR" = x; then
6165 AR="ar"
6166 else
6167 case $cross_compiling:$ac_tool_warned in
6168yes:)
6169{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6170$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6171ac_tool_warned=yes ;;
6172esac
6173 AR=$ac_ct_AR
6174 fi
6175fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006176
6177
6178# tweak ARFLAGS only if the user didn't set it on the command line
6179
6180if test -z "$ARFLAGS"
6181then
6182 ARFLAGS="rc"
6183fi
6184
doko@ubuntu.com58844492012-06-30 18:25:32 +02006185if test -n "$ac_tool_prefix"; then
6186 for ac_prog in readelf
6187 do
6188 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6189set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6191$as_echo_n "checking for $ac_word... " >&6; }
6192if ${ac_cv_prog_READELF+:} false; then :
6193 $as_echo_n "(cached) " >&6
6194else
6195 if test -n "$READELF"; then
6196 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6197else
6198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6199for as_dir in $PATH
6200do
6201 IFS=$as_save_IFS
6202 test -z "$as_dir" && as_dir=.
6203 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006204 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006205 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6206 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6207 break 2
6208 fi
6209done
6210 done
6211IFS=$as_save_IFS
6212
6213fi
6214fi
6215READELF=$ac_cv_prog_READELF
6216if test -n "$READELF"; then
6217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6218$as_echo "$READELF" >&6; }
6219else
6220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6221$as_echo "no" >&6; }
6222fi
6223
6224
6225 test -n "$READELF" && break
6226 done
6227fi
6228if test -z "$READELF"; then
6229 ac_ct_READELF=$READELF
6230 for ac_prog in readelf
6231do
6232 # Extract the first word of "$ac_prog", so it can be a program name with args.
6233set dummy $ac_prog; ac_word=$2
6234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6235$as_echo_n "checking for $ac_word... " >&6; }
6236if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6237 $as_echo_n "(cached) " >&6
6238else
6239 if test -n "$ac_ct_READELF"; then
6240 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6241else
6242as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6243for as_dir in $PATH
6244do
6245 IFS=$as_save_IFS
6246 test -z "$as_dir" && as_dir=.
6247 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006248 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006249 ac_cv_prog_ac_ct_READELF="$ac_prog"
6250 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6251 break 2
6252 fi
6253done
6254 done
6255IFS=$as_save_IFS
6256
6257fi
6258fi
6259ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6260if test -n "$ac_ct_READELF"; then
6261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6262$as_echo "$ac_ct_READELF" >&6; }
6263else
6264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6265$as_echo "no" >&6; }
6266fi
6267
6268
6269 test -n "$ac_ct_READELF" && break
6270done
6271
6272 if test "x$ac_ct_READELF" = x; then
6273 READELF=":"
6274 else
6275 case $cross_compiling:$ac_tool_warned in
6276yes:)
6277{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6278$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6279ac_tool_warned=yes ;;
6280esac
6281 READELF=$ac_ct_READELF
6282 fi
6283fi
6284
6285if test "$cross_compiling" = yes; then
6286 case "$READELF" in
6287 readelf|:)
6288 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6289 ;;
6290 esac
6291fi
6292
6293
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006294
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006295case $MACHDEP in
6296bsdos*|hp*|HP*)
6297 # install -d does not work on BSDI or HP-UX
6298 if test -z "$INSTALL"
6299 then
6300 INSTALL="${srcdir}/install-sh -c"
6301 fi
6302esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006303# Find a good install program. We prefer a C program (faster),
6304# so one script is as good as another. But avoid the broken or
6305# incompatible versions:
6306# SysV /etc/install, /usr/sbin/install
6307# SunOS /usr/etc/install
6308# IRIX /sbin/install
6309# AIX /bin/install
6310# AmigaOS /C/install, which installs bootblocks on floppy discs
6311# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6312# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6313# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6314# OS/2's system install, which has a completely different semantic
6315# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006316# Reject install programs that cannot install multiple files.
6317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6318$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006319if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006320if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006321 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322else
6323 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6324for as_dir in $PATH
6325do
6326 IFS=$as_save_IFS
6327 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006328 # Account for people who put trailing slashes in PATH elements.
6329case $as_dir/ in #((
6330 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006331 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006332 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333 /usr/ucb/* ) ;;
6334 *)
6335 # OSF1 and SCO ODT 3.0 have their own names for install.
6336 # Don't use installbsd from OSF since it installs stuff as root
6337 # by default.
6338 for ac_prog in ginstall scoinst install; do
6339 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006340 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006341 if test $ac_prog = install &&
6342 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6343 # AIX install. It has an incompatible calling convention.
6344 :
6345 elif test $ac_prog = install &&
6346 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6347 # program-specific install script used by HP pwplus--don't use.
6348 :
6349 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006350 rm -rf conftest.one conftest.two conftest.dir
6351 echo one > conftest.one
6352 echo two > conftest.two
6353 mkdir conftest.dir
6354 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6355 test -s conftest.one && test -s conftest.two &&
6356 test -s conftest.dir/conftest.one &&
6357 test -s conftest.dir/conftest.two
6358 then
6359 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6360 break 3
6361 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006362 fi
6363 fi
6364 done
6365 done
6366 ;;
6367esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006368
6369 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006370IFS=$as_save_IFS
6371
Matthias Kloseb9621712010-04-24 17:59:49 +00006372rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006373
6374fi
6375 if test "${ac_cv_path_install+set}" = set; then
6376 INSTALL=$ac_cv_path_install
6377 else
6378 # As a last resort, use the slow shell script. Don't cache a
6379 # value for INSTALL within a source directory, because that will
6380 # break other packages using the cache if that directory is
6381 # removed, or if the value is a relative name.
6382 INSTALL=$ac_install_sh
6383 fi
6384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6386$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006387
6388# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6389# It thinks the first close brace ends the variable substitution.
6390test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6391
6392test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6393
6394test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6395
Matthias Klose93a0ef12012-03-15 18:08:34 +01006396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6397$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6398if test -z "$MKDIR_P"; then
6399 if ${ac_cv_path_mkdir+:} false; then :
6400 $as_echo_n "(cached) " >&6
6401else
6402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6403for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6404do
6405 IFS=$as_save_IFS
6406 test -z "$as_dir" && as_dir=.
6407 for ac_prog in mkdir gmkdir; do
6408 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006409 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006410 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6411 'mkdir (GNU coreutils) '* | \
6412 'mkdir (coreutils) '* | \
6413 'mkdir (fileutils) '4.1*)
6414 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6415 break 3;;
6416 esac
6417 done
6418 done
6419 done
6420IFS=$as_save_IFS
6421
6422fi
6423
6424 test -d ./--version && rmdir ./--version
6425 if test "${ac_cv_path_mkdir+set}" = set; then
6426 MKDIR_P="$ac_cv_path_mkdir -p"
6427 else
6428 # As a last resort, use the slow shell script. Don't cache a
6429 # value for MKDIR_P within a source directory, because that will
6430 # break other packages using the cache if that directory is
6431 # removed, or if the value is a relative name.
6432 MKDIR_P="$ac_install_sh -d"
6433 fi
6434fi
6435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6436$as_echo "$MKDIR_P" >&6; }
6437
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006438
6439# Not every filesystem supports hard links
6440
6441if test -z "$LN" ; then
6442 case $ac_sys_system in
6443 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006444 *) LN=ln;;
6445 esac
6446fi
6447
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006448# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006449
6450ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006451
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006452# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6454$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006455
6456# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006457if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006458 withval=$with_pydebug;
6459if test "$withval" != no
6460then
6461
Matthias Kloseb9621712010-04-24 17:59:49 +00006462$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006463
Matthias Kloseb9621712010-04-24 17:59:49 +00006464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6465$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006466 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006467 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006468else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6469$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006470fi
6471else
Matthias Kloseb9621712010-04-24 17:59:49 +00006472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6473$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006474fi
6475
6476
Brett Cannon63d98bc2016-09-06 17:12:40 -07006477# Enable optimization flags
6478
6479
6480Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6482$as_echo_n "checking for --enable-optimizations... " >&6; }
6483# Check whether --enable-optimizations was given.
6484if test "${enable_optimizations+set}" = set; then :
6485 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006486if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006487then
6488 Py_OPT='true'
6489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6490$as_echo "yes" >&6; };
6491else
6492 Py_OPT='false'
6493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6494$as_echo "no" >&6; };
6495fi
6496else
6497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6498$as_echo "no" >&6; }
6499fi
6500
6501if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006502 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6503 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006504 # 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 +00006505 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006506 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006507 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006508 DEF_MAKE_RULE="build_all"
6509else
6510 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006511 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006512 DEF_MAKE_RULE="all"
6513fi
6514
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006515# Enable LTO flags
6516
6517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6518$as_echo_n "checking for --with-lto... " >&6; }
6519
6520# Check whether --with-lto was given.
6521if test "${with_lto+set}" = set; then :
6522 withval=$with_lto;
6523if test "$withval" != no
6524then
6525 Py_LTO='true'
6526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6527$as_echo "yes" >&6; };
6528else
6529 Py_LTO='false'
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6531$as_echo "no" >&6; };
6532fi
6533else
6534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6535$as_echo "no" >&6; }
6536fi
6537
6538if test "$Py_LTO" = 'true' ; then
6539 case $CC in
6540 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006541 case $ac_sys_system in
6542 Darwin*)
6543 # Any changes made here should be reflected in the GCC+Darwin case below
6544 LTOFLAGS="-flto -Wl,-export_dynamic"
6545 ;;
6546 *)
6547 LTOFLAGS="-flto"
6548 ;;
6549 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006550 ;;
6551 *gcc*)
6552 case $ac_sys_system in
6553 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006554 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006555 ;;
6556 *)
6557 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6558 ;;
6559 esac
6560 ;;
6561 esac
6562fi
6563
Brett Cannon7188a3e2015-09-18 15:13:44 -07006564# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006565
6566
6567
6568
6569
Gregory P. Smith799520c2016-09-07 16:10:00 -07006570# Make this work on systems where llvm tools are not installed with their
6571# normal names in the default $PATH (ie: Ubuntu). They exist under the
6572# non-suffixed name in their versioned llvm directory.
6573llvm_bin_dir=''
6574llvm_path="${PATH}"
6575if test "${CC}" = "clang"
6576then
6577 clang_bin=`which clang`
6578 # Some systems install clang elsewhere as a symlink to the real path
6579 # which is where the related llvm tools are located.
6580 if test -L "${clang_bin}"
6581 then
6582 clang_dir=`dirname "${clang_bin}"`
6583 clang_bin=`readlink "${clang_bin}"`
6584 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6585 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6586 fi
6587fi
Zachary Ware5af85642015-12-21 12:09:17 -06006588
Gregory P. Smith799520c2016-09-07 16:10:00 -07006589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6590$as_echo_n "checking target system type... " >&6; }
6591if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006592 $as_echo_n "(cached) " >&6
6593else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006594 if test "x$target_alias" = x; then
6595 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006596else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006597 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6598 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6599fi
6600
6601fi
6602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6603$as_echo "$ac_cv_target" >&6; }
6604case $ac_cv_target in
6605*-*-*) ;;
6606*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6607esac
6608target=$ac_cv_target
6609ac_save_IFS=$IFS; IFS='-'
6610set x $ac_cv_target
6611shift
6612target_cpu=$1
6613target_vendor=$2
6614shift; shift
6615# Remember, the first character of IFS is used to create $*,
6616# except with old shells:
6617target_os=$*
6618IFS=$ac_save_IFS
6619case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6620
6621
6622# The aliases save the names the user supplied, while $host etc.
6623# will get canonicalized.
6624test -n "$target_alias" &&
6625 test "$program_prefix$program_suffix$program_transform_name" = \
6626 NONENONEs,x,x, &&
6627 program_prefix=${target_alias}-
6628# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6629set dummy $target_alias-llvm-profdata; ac_word=$2
6630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6631$as_echo_n "checking for $ac_word... " >&6; }
6632if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6633 $as_echo_n "(cached) " >&6
6634else
6635 case $LLVM_PROFDATA in
6636 [\\/]* | ?:[\\/]*)
6637 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6638 ;;
6639 *)
6640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6641for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006642do
6643 IFS=$as_save_IFS
6644 test -z "$as_dir" && as_dir=.
6645 for ac_exec_ext in '' $ac_executable_extensions; do
6646 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006647 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006648 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6649 break 2
6650 fi
6651done
6652 done
6653IFS=$as_save_IFS
6654
Gregory P. Smith799520c2016-09-07 16:10:00 -07006655 ;;
6656esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006657fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006658LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6659if test -n "$LLVM_PROFDATA"; then
6660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6661$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006662else
6663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6664$as_echo "no" >&6; }
6665fi
6666
6667
Gregory P. Smith799520c2016-09-07 16:10:00 -07006668if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6669 if test "$build" = "$target"; then
6670 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6671 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6672set dummy llvm-profdata; ac_word=$2
6673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6674$as_echo_n "checking for $ac_word... " >&6; }
6675if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6676 $as_echo_n "(cached) " >&6
6677else
6678 case $ac_pt_LLVM_PROFDATA in
6679 [\\/]* | ?:[\\/]*)
6680 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6681 ;;
6682 *)
6683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6684for as_dir in ${llvm_path}
6685do
6686 IFS=$as_save_IFS
6687 test -z "$as_dir" && as_dir=.
6688 for ac_exec_ext in '' $ac_executable_extensions; do
6689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6690 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6692 break 2
6693 fi
6694done
6695 done
6696IFS=$as_save_IFS
6697
6698 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6699 ;;
6700esac
6701fi
6702ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6703if test -n "$ac_pt_LLVM_PROFDATA"; then
6704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6705$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6706else
6707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6708$as_echo "no" >&6; }
6709fi
6710
6711 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6712 else
6713 LLVM_PROFDATA="''"
6714 fi
6715else
6716 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6717fi
6718
6719
6720if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6721then
6722 LLVM_PROF_FOUND="found"
6723else
6724 LLVM_PROF_FOUND="not-found"
6725fi
6726if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6727then
6728 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6729 if test -n "${found_llvm_profdata}"
6730 then
6731 # llvm-profdata isn't directly in $PATH in some cases.
6732 # https://apple.stackexchange.com/questions/197053/
6733 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6734 LLVM_PROF_FOUND=found
6735 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6736$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6737 fi
6738fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006739LLVM_PROF_ERR=no
6740case $CC in
6741 *clang*)
6742 # Any changes made here should be reflected in the GCC+Darwin case below
6743 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6744 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006745 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006746 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6747 if test $LLVM_PROF_FOUND = not-found
6748 then
6749 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006750 if test "${REQUIRE_PGO}" = "yes"
6751 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006752 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 -07006753 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006754 fi
6755 ;;
6756 *gcc*)
6757 case $ac_sys_system in
6758 Darwin*)
6759 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6760 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006761 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006762 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006763 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006764 then
6765 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006766 if test "${REQUIRE_PGO}" = "yes"
6767 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006768 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 -07006769 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006770 fi
6771 ;;
6772 *)
6773 PGO_PROF_GEN_FLAG="-fprofile-generate"
6774 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6775 LLVM_PROF_MERGER="true"
6776 LLVM_PROF_FILE=""
6777 ;;
6778 esac
6779 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006780 *icc*)
6781 PGO_PROF_GEN_FLAG="-prof-gen"
6782 PGO_PROF_USE_FLAG="-prof-use"
6783 LLVM_PROF_MERGER="true"
6784 LLVM_PROF_FILE=""
6785 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006786esac
6787
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006788# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6789# merged with this chunk of code?
6790
6791# Optimizer/debugger flags
6792# ------------------------
6793# (The following bit of code is complicated enough - please keep things
6794# indented properly. Just pretend you're editing Python code. ;-)
6795
6796# There are two parallel sets of case statements below, one that checks to
6797# see if OPT was set and one that does BASECFLAGS setting based upon
6798# compiler and platform. BASECFLAGS tweaks need to be made even if the
6799# user set OPT.
6800
6801# tweak OPT based on compiler and platform, only if the user didn't set
6802# it on the command line
6803
Victor Stinner9ed34a82017-05-02 22:35:58 +02006804
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006805if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006806then
6807 case $GCC in
6808 yes)
6809 if test "$CC" != 'g++' ; then
6810 STRICT_PROTO="-Wstrict-prototypes"
6811 fi
6812 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6813 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6814 WRAP="-fwrapv"
6815 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006816
Stefan Krahaf04ff22011-12-08 22:20:31 +01006817 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006818 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006819 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006820 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006821 *)
6822 if $CC --version 2>&1 | grep -q clang
6823 then
6824 cc_is_clang=1
6825 else
6826 cc_is_clang=
6827 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006828 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006829
Victor Stinner35f3d242017-04-21 12:35:24 +02006830 if test -n "${cc_is_clang}"
6831 then
6832 # Clang also needs -fwrapv
6833 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006834 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6835 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006836 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006837 fi
6838
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006839 case $ac_cv_prog_cc_g in
6840 yes)
6841 if test "$Py_DEBUG" = 'true' ; then
6842 # Optimization messes up debuggers, so turn it off for
6843 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006844 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006845 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006846 else
Victor Stinner28205b22017-04-21 11:24:34 +02006847 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006848 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849 else
Victor Stinner28205b22017-04-21 11:24:34 +02006850 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006851 fi
6852 ;;
6853 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006854 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006855 ;;
6856 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006857
Victor Stinner826f83f2017-04-28 15:07:10 +02006858 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006859
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860 case $ac_sys_system in
6861 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6862 ;;
6863 esac
6864 ;;
6865
6866 *)
6867 OPT="-O"
6868 ;;
6869 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006870fi
6871
6872
6873
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006874
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006875# The -arch flags for universal builds on OSX
6876UNIVERSAL_ARCH_FLAGS=
6877
6878
6879# tweak BASECFLAGS based on compiler and platform
6880case $GCC in
6881yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006882 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006883
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6885$as_echo_n "checking for -Wextra... " >&6; }
6886 ac_save_cc="$CC"
6887 CC="$CC -Wextra -Werror"
6888 if ${ac_cv_extra_warnings+:} false; then :
6889 $as_echo_n "(cached) " >&6
6890else
6891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6892/* end confdefs.h. */
6893
6894
6895int
6896main ()
6897{
6898
6899 ;
6900 return 0;
6901}
6902
6903_ACEOF
6904if ac_fn_c_try_compile "$LINENO"; then :
6905
6906 ac_cv_extra_warnings=yes
6907
6908else
6909
6910 ac_cv_extra_warnings=no
6911
6912fi
6913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6914fi
6915
6916 CC="$ac_save_cc"
6917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6918$as_echo "$ac_cv_extra_warnings" >&6; }
6919
6920 if test $ac_cv_extra_warnings = yes
6921 then
6922 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6923 fi
6924
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006925 # Python doesn't violate C99 aliasing rules, but older versions of
6926 # GCC produce warnings for legal Python code. Enable
6927 # -fno-strict-aliasing on versions of GCC that support but produce
6928 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6930$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006931 ac_save_cc="$CC"
6932 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006933 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006934 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006935 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006936else
Matthias Kloseb9621712010-04-24 17:59:49 +00006937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006938/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006939
Matthias Kloseb159a552010-04-25 21:00:44 +00006940
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006941int
6942main ()
6943{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006944
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006945 ;
6946 return 0;
6947}
Matthias Kloseb159a552010-04-25 21:00:44 +00006948
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006950if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006951
6952 CC="$ac_save_cc -fstrict-aliasing"
6953 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006955/* end confdefs.h. */
6956
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006957 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006958int
6959main ()
6960{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006961double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006962 ;
6963 return 0;
6964}
Matthias Kloseb159a552010-04-25 21:00:44 +00006965
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006967if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006968
6969 ac_cv_no_strict_aliasing=no
6970
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006971else
Matthias Kloseb159a552010-04-25 21:00:44 +00006972
6973 ac_cv_no_strict_aliasing=yes
6974
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006975fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006977
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006978else
Matthias Kloseb159a552010-04-25 21:00:44 +00006979
6980 ac_cv_no_strict_aliasing=no
6981
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006982fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006984fi
6985
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006986 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006987 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6989$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006990 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006991 then
6992 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6993 fi
6994
Zachary Ware5af85642015-12-21 12:09:17 -06006995 # ICC doesn't recognize the option, but only emits a warning
6996 ## XXX does it emit an unused result warning and can it be disabled?
6997 case "$CC" in
6998 *icc*)
6999 ac_cv_disable_unused_result_warning=no
7000 ;;
7001 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7003$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7004 ac_save_cc="$CC"
7005 CC="$CC -Wunused-result -Werror"
7006 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007007 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007008 $as_echo_n "(cached) " >&6
7009else
7010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7011/* end confdefs.h. */
7012
7013
7014int
7015main ()
7016{
7017
7018 ;
7019 return 0;
7020}
7021
7022_ACEOF
7023if ac_fn_c_try_compile "$LINENO"; then :
7024
7025 ac_cv_disable_unused_result_warning=yes
7026
7027else
7028
7029 ac_cv_disable_unused_result_warning=no
7030
7031fi
7032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7033fi
7034
7035 CFLAGS="$save_CFLAGS"
7036 CC="$ac_save_cc"
7037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7038$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007039 ;;
7040 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007041
7042 if test $ac_cv_disable_unused_result_warning = yes
7043 then
7044 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007045 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7046 fi
7047
7048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7049$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7050 ac_save_cc="$CC"
7051 CC="$CC -Wunused-parameter -Werror"
7052 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7053 $as_echo_n "(cached) " >&6
7054else
7055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7056/* end confdefs.h. */
7057
7058
7059int
7060main ()
7061{
7062
7063 ;
7064 return 0;
7065}
7066
7067_ACEOF
7068if ac_fn_c_try_compile "$LINENO"; then :
7069
7070 ac_cv_disable_unused_parameter_warning=yes
7071
7072else
7073
7074 ac_cv_disable_unused_parameter_warning=no
7075
7076fi
7077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7078fi
7079
7080 CC="$ac_save_cc"
7081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7082$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7083
7084 if test $ac_cv_disable_unused_parameter_warning = yes
7085 then
7086 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7087 fi
7088
7089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7090$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7091 ac_save_cc="$CC"
7092 CC="$CC -Wmissing-field-initializers -Werror"
7093 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7094 $as_echo_n "(cached) " >&6
7095else
7096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7097/* end confdefs.h. */
7098
7099
7100int
7101main ()
7102{
7103
7104 ;
7105 return 0;
7106}
7107
7108_ACEOF
7109if ac_fn_c_try_compile "$LINENO"; then :
7110
7111 ac_cv_disable_missing_field_initializers=yes
7112
7113else
7114
7115 ac_cv_disable_missing_field_initializers=no
7116
7117fi
7118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7119fi
7120
7121 CC="$ac_save_cc"
7122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7123$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7124
7125 if test $ac_cv_disable_missing_field_initializers = yes
7126 then
7127 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007128 fi
7129
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7131$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7132 ac_save_cc="$CC"
7133 CC="$CC -Wsign-compare"
7134 save_CFLAGS="$CFLAGS"
7135 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7136 $as_echo_n "(cached) " >&6
7137else
7138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7139/* end confdefs.h. */
7140
7141
7142int
7143main ()
7144{
7145
7146 ;
7147 return 0;
7148}
7149
7150_ACEOF
7151if ac_fn_c_try_compile "$LINENO"; then :
7152
7153 ac_cv_enable_sign_compare_warning=yes
7154
7155else
7156
7157 ac_cv_enable_sign_compare_warning=no
7158
7159fi
7160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7161fi
7162
7163 CFLAGS="$save_CFLAGS"
7164 CC="$ac_save_cc"
7165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7166$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7167
7168 if test $ac_cv_enable_sign_compare_warning = yes
7169 then
7170 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7171 fi
7172
7173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7174$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7175 ac_save_cc="$CC"
7176 CC="$CC -Wunreachable-code"
7177 save_CFLAGS="$CFLAGS"
7178 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7179 $as_echo_n "(cached) " >&6
7180else
7181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7182/* end confdefs.h. */
7183
7184
7185int
7186main ()
7187{
7188
7189 ;
7190 return 0;
7191}
7192
7193_ACEOF
7194if ac_fn_c_try_compile "$LINENO"; then :
7195
7196 ac_cv_enable_unreachable_code_warning=yes
7197
7198else
7199
7200 ac_cv_enable_unreachable_code_warning=no
7201
7202fi
7203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7204fi
7205
7206 CFLAGS="$save_CFLAGS"
7207 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007208
7209 # Don't enable unreachable code warning in debug mode, since it usually
7210 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007211 # Issue #24324: Unfortunately, the unreachable code warning does not work
7212 # correctly on gcc and has been silently removed from the compiler.
7213 # It is supported on clang but on OS X systems gcc may be an alias
7214 # for clang. Try to determine if the compiler is not really gcc and,
7215 # if so, only then enable the warning.
7216 if test $ac_cv_enable_unreachable_code_warning = yes && \
7217 test "$Py_DEBUG" != "true" && \
7218 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007219 then
7220 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007221 else
7222 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007223 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7225$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007226
Victor Stinner193ee0a2017-02-06 14:24:00 +01007227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7228$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7229 ac_save_cc="$CC"
7230 CC="$CC -Werror=implicit-function-declaration"
7231 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7232 $as_echo_n "(cached) " >&6
7233else
7234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7235/* end confdefs.h. */
7236
7237
7238int
7239main ()
7240{
7241
7242 ;
7243 return 0;
7244}
7245
7246_ACEOF
7247if ac_fn_c_try_compile "$LINENO"; then :
7248
7249 ac_cv_enable_implicit_function_declaration_error=yes
7250
7251else
7252
7253 ac_cv_enable_implicit_function_declaration_error=no
7254
7255fi
7256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7257fi
7258
7259 CC="$ac_save_cc"
7260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7261$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7262
7263 if test $ac_cv_enable_implicit_function_declaration_error = yes
7264 then
7265 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7266 fi
7267
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007268 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7269 # support. Without this, treatment of subnormals doesn't follow
7270 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007271 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007272 alpha*)
7273 BASECFLAGS="$BASECFLAGS -mieee"
7274 ;;
7275 esac
7276
7277 case $ac_sys_system in
7278 SCO_SV*)
7279 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7280 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007281
7282 # is there any other compiler on Darwin besides gcc?
7283 Darwin*)
7284 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7285 # used to be here, but non-Apple gcc doesn't accept them.
7286 if test "${CC}" = gcc
7287 then
7288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007289$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007290 case "${UNIVERSALSDK}" in
7291 */MacOSX10.4u.sdk)
7292 # Build using 10.4 SDK, force usage of gcc when the
7293 # compiler is gcc, otherwise the user will get very
7294 # confusing error messages when building on OSX 10.6
7295 CC=gcc-4.0
7296 CPP=cpp-4.0
7297 ;;
7298 esac
7299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007300$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007301 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007302
Ned Deily87adb6e2013-10-18 21:09:56 -07007303 if test "${enable_universalsdk}"
7304 then
7305 case "$UNIVERSAL_ARCHS" in
7306 32-bit)
7307 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7308 LIPO_32BIT_FLAGS=""
7309 ARCH_RUN_32BIT=""
7310 ;;
7311 64-bit)
7312 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7313 LIPO_32BIT_FLAGS=""
7314 ARCH_RUN_32BIT="true"
7315 ;;
7316 all)
7317 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7318 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7319 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7320 ;;
7321 intel)
7322 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7323 LIPO_32BIT_FLAGS="-extract i386"
7324 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7325 ;;
7326 intel-32)
7327 UNIVERSAL_ARCH_FLAGS="-arch i386"
7328 LIPO_32BIT_FLAGS=""
7329 ARCH_RUN_32BIT=""
7330 ;;
7331 3-way)
7332 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7333 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7334 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7335 ;;
7336 *)
7337 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7338 ;;
7339 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007340
Ned Deily87adb6e2013-10-18 21:09:56 -07007341 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7342 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7343 if test "${UNIVERSALSDK}" != "/"
7344 then
7345 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7346 fi
7347 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007348
Ned Deily87adb6e2013-10-18 21:09:56 -07007349 # Calculate an appropriate deployment target for this build:
7350 # The deployment target value is used explicitly to enable certain
7351 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007352 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007353 # component of the string returned by distutils.get_platform().
7354 #
7355 # Use the value from:
7356 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7357 # 2. the operating system version of the build machine if >= 10.6
7358 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7359 # below to pick either 10.3, 10.4, or 10.5 as the target.
7360 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007361
Ned Deily87adb6e2013-10-18 21:09:56 -07007362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7363$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007364 cur_target_major=`sw_vers -productVersion | \
7365 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7366 cur_target_minor=`sw_vers -productVersion | \
7367 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7368 cur_target="${cur_target_major}.${cur_target_minor}"
7369 if test ${cur_target_major} -eq 10 && \
7370 test ${cur_target_minor} -ge 3 && \
7371 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007372 then
Ned Deily36820b62014-06-25 13:44:22 -07007373 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007374 cur_target=10.3
7375 if test ${enable_universalsdk}
7376 then
7377 case "$UNIVERSAL_ARCHS" in
7378 all|3-way|intel|64-bit)
7379 # These configurations were first supported in 10.5
7380 cur_target='10.5'
7381 ;;
7382 esac
7383 else
7384 if test `/usr/bin/arch` = "i386"
7385 then
7386 # 10.4 was the first release to support Intel archs
7387 cur_target="10.4"
7388 fi
7389 fi
7390 fi
7391 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007392
Ned Deily87adb6e2013-10-18 21:09:56 -07007393 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7394 # environment with a value that is the same as what we'll use
7395 # in the Makefile to ensure that we'll get the same compiler
7396 # environment during configure and build time.
7397 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7398 export MACOSX_DEPLOYMENT_TARGET
7399 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7401$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007402
Ned Deily87adb6e2013-10-18 21:09:56 -07007403 # end of Darwin* tests
7404 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007405 esac
7406 ;;
7407
7408*)
7409 case $ac_sys_system in
7410 OpenUNIX*|UnixWare*)
7411 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7412 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007413 SCO_SV*)
7414 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7415 ;;
7416 esac
7417 ;;
7418esac
7419
Zachary Ware5af85642015-12-21 12:09:17 -06007420# ICC needs -fp-model strict or floats behave badly
7421case "$CC" in
7422*icc*)
7423 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7424 ;;
7425esac
7426
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007427if test "$Py_DEBUG" = 'true'; then
7428 :
7429else
7430 OPT="-DNDEBUG $OPT"
7431fi
7432
7433if test "$ac_arch_flags"
7434then
7435 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7436fi
7437
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007438# On some compilers, pthreads are available without further options
7439# (e.g. MacOS X). On some of these systems, the compiler will not
7440# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7441# So we have to see first whether pthreads are available without
7442# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7444$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007445if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007446 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007447else
Matthias Kloseb9621712010-04-24 17:59:49 +00007448 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449 ac_cv_pthread_is_default=no
7450else
Matthias Kloseb9621712010-04-24 17:59:49 +00007451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007452/* end confdefs.h. */
7453
Stefan Krah7dba5942012-11-22 22:49:11 +01007454#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007455#include <pthread.h>
7456
7457void* routine(void* p){return NULL;}
7458
7459int main(){
7460 pthread_t p;
7461 if(pthread_create(&p,NULL,routine,NULL)!=0)
7462 return 1;
7463 (void)pthread_detach(p);
7464 return 0;
7465}
7466
7467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007468if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007469
7470 ac_cv_pthread_is_default=yes
7471 ac_cv_kthread=no
7472 ac_cv_pthread=no
7473
7474else
Matthias Kloseb9621712010-04-24 17:59:49 +00007475 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007477rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7478 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007479fi
7480
7481
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007482fi
7483
Matthias Kloseb9621712010-04-24 17:59:49 +00007484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7485$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007486
7487
7488if test $ac_cv_pthread_is_default = yes
7489then
7490 ac_cv_kpthread=no
7491else
7492# -Kpthread, if available, provides the right #defines
7493# and linker options to make pthread_create available
7494# Some compilers won't report that they do not support -Kpthread,
7495# so we need to run a program to see whether it really made the
7496# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7498$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007499if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007500 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007501else
7502 ac_save_cc="$CC"
7503CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007504if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007505 ac_cv_kpthread=no
7506else
Matthias Kloseb9621712010-04-24 17:59:49 +00007507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007508/* end confdefs.h. */
7509
Stefan Krah7dba5942012-11-22 22:49:11 +01007510#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007511#include <pthread.h>
7512
7513void* routine(void* p){return NULL;}
7514
7515int main(){
7516 pthread_t p;
7517 if(pthread_create(&p,NULL,routine,NULL)!=0)
7518 return 1;
7519 (void)pthread_detach(p);
7520 return 0;
7521}
7522
7523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007524if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007525 ac_cv_kpthread=yes
7526else
Matthias Kloseb9621712010-04-24 17:59:49 +00007527 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007528fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007529rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7530 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007531fi
7532
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007533CC="$ac_save_cc"
7534fi
7535
Matthias Kloseb9621712010-04-24 17:59:49 +00007536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7537$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007538fi
7539
7540if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7541then
7542# -Kthread, if available, provides the right #defines
7543# and linker options to make pthread_create available
7544# Some compilers won't report that they do not support -Kthread,
7545# so we need to run a program to see whether it really made the
7546# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7548$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007549if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007550 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007551else
7552 ac_save_cc="$CC"
7553CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007554if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007555 ac_cv_kthread=no
7556else
Matthias Kloseb9621712010-04-24 17:59:49 +00007557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007558/* end confdefs.h. */
7559
Stefan Krah7dba5942012-11-22 22:49:11 +01007560#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007561#include <pthread.h>
7562
7563void* routine(void* p){return NULL;}
7564
7565int main(){
7566 pthread_t p;
7567 if(pthread_create(&p,NULL,routine,NULL)!=0)
7568 return 1;
7569 (void)pthread_detach(p);
7570 return 0;
7571}
7572
7573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007574if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007575 ac_cv_kthread=yes
7576else
Matthias Kloseb9621712010-04-24 17:59:49 +00007577 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007579rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7580 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007581fi
7582
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583CC="$ac_save_cc"
7584fi
7585
Matthias Kloseb9621712010-04-24 17:59:49 +00007586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7587$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588fi
7589
7590if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7591then
7592# -pthread, if available, provides the right #defines
7593# and linker options to make pthread_create available
7594# Some compilers won't report that they do not support -pthread,
7595# so we need to run a program to see whether it really made the
7596# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7598$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007599if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007600 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007601else
7602 ac_save_cc="$CC"
7603CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007604if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007605 ac_cv_pthread=no
7606else
Matthias Kloseb9621712010-04-24 17:59:49 +00007607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608/* end confdefs.h. */
7609
Stefan Krah7dba5942012-11-22 22:49:11 +01007610#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007611#include <pthread.h>
7612
7613void* routine(void* p){return NULL;}
7614
7615int main(){
7616 pthread_t p;
7617 if(pthread_create(&p,NULL,routine,NULL)!=0)
7618 return 1;
7619 (void)pthread_detach(p);
7620 return 0;
7621}
7622
7623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007624if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007625 ac_cv_pthread=yes
7626else
Matthias Kloseb9621712010-04-24 17:59:49 +00007627 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007629rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7630 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007631fi
7632
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007633CC="$ac_save_cc"
7634fi
7635
Matthias Kloseb9621712010-04-24 17:59:49 +00007636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7637$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638fi
7639
7640# If we have set a CC compiler flag for thread support then
7641# check if it works for CXX, too.
7642ac_cv_cxx_thread=no
7643if test ! -z "$CXX"
7644then
Matthias Kloseb9621712010-04-24 17:59:49 +00007645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7646$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007647ac_save_cxx="$CXX"
7648
7649if test "$ac_cv_kpthread" = "yes"
7650then
7651 CXX="$CXX -Kpthread"
7652 ac_cv_cxx_thread=yes
7653elif test "$ac_cv_kthread" = "yes"
7654then
7655 CXX="$CXX -Kthread"
7656 ac_cv_cxx_thread=yes
7657elif test "$ac_cv_pthread" = "yes"
7658then
7659 CXX="$CXX -pthread"
7660 ac_cv_cxx_thread=yes
7661fi
7662
7663if test $ac_cv_cxx_thread = yes
7664then
7665 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7666 $CXX -c conftest.$ac_ext 2>&5
7667 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7668 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7669 then
7670 ac_cv_cxx_thread=yes
7671 else
7672 ac_cv_cxx_thread=no
7673 fi
7674 rm -fr conftest*
7675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7677$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007678fi
7679CXX="$ac_save_cxx"
7680
7681
7682# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7684$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007685if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007686 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007687else
Matthias Kloseb9621712010-04-24 17:59:49 +00007688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007689/* end confdefs.h. */
7690#include <stdlib.h>
7691#include <stdarg.h>
7692#include <string.h>
7693#include <float.h>
7694
7695int
7696main ()
7697{
7698
7699 ;
7700 return 0;
7701}
7702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007703if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007704 ac_cv_header_stdc=yes
7705else
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7709
7710if test $ac_cv_header_stdc = yes; then
7711 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007713/* end confdefs.h. */
7714#include <string.h>
7715
7716_ACEOF
7717if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007718 $EGREP "memchr" >/dev/null 2>&1; then :
7719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007720else
7721 ac_cv_header_stdc=no
7722fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007723rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007724
7725fi
7726
7727if test $ac_cv_header_stdc = yes; then
7728 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007730/* end confdefs.h. */
7731#include <stdlib.h>
7732
7733_ACEOF
7734if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007735 $EGREP "free" >/dev/null 2>&1; then :
7736
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007737else
7738 ac_cv_header_stdc=no
7739fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007740rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007741
7742fi
7743
7744if test $ac_cv_header_stdc = yes; then
7745 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007746 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007747 :
7748else
Matthias Kloseb9621712010-04-24 17:59:49 +00007749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007750/* end confdefs.h. */
7751#include <ctype.h>
7752#include <stdlib.h>
7753#if ((' ' & 0x0FF) == 0x020)
7754# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7755# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7756#else
7757# define ISLOWER(c) \
7758 (('a' <= (c) && (c) <= 'i') \
7759 || ('j' <= (c) && (c) <= 'r') \
7760 || ('s' <= (c) && (c) <= 'z'))
7761# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7762#endif
7763
7764#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7765int
7766main ()
7767{
7768 int i;
7769 for (i = 0; i < 256; i++)
7770 if (XOR (islower (i), ISLOWER (i))
7771 || toupper (i) != TOUPPER (i))
7772 return 2;
7773 return 0;
7774}
7775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007776if ac_fn_c_try_run "$LINENO"; then :
7777
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007778else
Matthias Kloseb9621712010-04-24 17:59:49 +00007779 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7782 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007783fi
7784
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007785fi
7786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7788$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007789if test $ac_cv_header_stdc = yes; then
7790
Matthias Kloseb9621712010-04-24 17:59:49 +00007791$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007792
7793fi
7794
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007795for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007796fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007797ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007798sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007799unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007800poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007801sys/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 +01007802sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007803sys/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 +01007804sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007805sys/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 -07007806libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007807linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007808sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007809do :
7810 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7811ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007812if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007813 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007814#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007815_ACEOF
7816
7817fi
7818
Guido van Rossum627b2d71993-12-24 10:39:16 +00007819done
7820
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007821ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007822for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007823 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7825$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007826if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007827 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007828else
Matthias Kloseb9621712010-04-24 17:59:49 +00007829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007830/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007831#include <sys/types.h>
7832#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007833
Martin v. Löwis11437992002-04-12 09:54:03 +00007834int
7835main ()
7836{
7837if ((DIR *) 0)
7838return 0;
7839 ;
7840 return 0;
7841}
7842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007843if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007844 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007845else
Matthias Kloseb9621712010-04-24 17:59:49 +00007846 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007850eval ac_res=\$$as_ac_Header
7851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7852$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007853if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007854 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007855#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007856_ACEOF
7857
7858ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007859fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007860
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007861done
7862# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7863if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7865$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007866if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007867 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007868else
Martin v. Löwis11437992002-04-12 09:54:03 +00007869 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007871/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007872
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007873/* Override any GCC internal prototype to avoid an error.
7874 Use char because int might match the return type of a GCC
7875 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007876#ifdef __cplusplus
7877extern "C"
7878#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007879char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007880int
7881main ()
7882{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007883return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007884 ;
7885 return 0;
7886}
7887_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007888for ac_lib in '' dir; do
7889 if test -z "$ac_lib"; then
7890 ac_res="none required"
7891 else
7892 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007893 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007895 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007896 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007898rm -f core conftest.err conftest.$ac_objext \
7899 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007900 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007901 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007902fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007903done
Victor Stinnere0be4232011-10-25 13:06:09 +02007904if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007906else
7907 ac_cv_search_opendir=no
7908fi
7909rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007910LIBS=$ac_func_search_save_LIBS
7911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7913$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007914ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007915if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007916 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007917
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007918fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007919
Michael W. Hudson54241132001-12-07 15:38:26 +00007920else
Matthias Kloseb9621712010-04-24 17:59:49 +00007921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7922$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007923if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007924 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007925else
7926 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007929
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007930/* Override any GCC internal prototype to avoid an error.
7931 Use char because int might match the return type of a GCC
7932 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007933#ifdef __cplusplus
7934extern "C"
7935#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007936char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007937int
7938main ()
7939{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007940return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007941 ;
7942 return 0;
7943}
7944_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007945for ac_lib in '' x; do
7946 if test -z "$ac_lib"; then
7947 ac_res="none required"
7948 else
7949 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007950 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007952 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007955rm -f core conftest.err conftest.$ac_objext \
7956 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007957 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007958 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007960done
Victor Stinnere0be4232011-10-25 13:06:09 +02007961if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007962
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007963else
7964 ac_cv_search_opendir=no
7965fi
7966rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007967LIBS=$ac_func_search_save_LIBS
7968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7970$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007972if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007973 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007974
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007975fi
7976
7977fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007978
Matthias Kloseb9621712010-04-24 17:59:49 +00007979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7980$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007981if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007982 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007983else
Matthias Kloseb9621712010-04-24 17:59:49 +00007984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007985/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007986#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007987int
7988main ()
7989{
7990return makedev(0, 0);
7991 ;
7992 return 0;
7993}
7994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007995if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007996 ac_cv_header_sys_types_h_makedev=yes
7997else
Matthias Kloseb9621712010-04-24 17:59:49 +00007998 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008000rm -f core conftest.err conftest.$ac_objext \
8001 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008002
8003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8005$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008006
8007if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008008ac_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 +02008009if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008010
Matthias Kloseb9621712010-04-24 17:59:49 +00008011$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008012
8013fi
8014
8015
8016
8017 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008018 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 +02008019if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008020
Matthias Kloseb9621712010-04-24 17:59:49 +00008021$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008022
8023fi
8024
8025
8026 fi
8027fi
8028
Michael W. Hudson54241132001-12-07 15:38:26 +00008029
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008030# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8031# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8032SAVE_CFLAGS=$CFLAGS
8033CFLAGS="-std=c99 $CFLAGS"
8034for ac_header in bluetooth/bluetooth.h
8035do :
8036 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8037if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8038 cat >>confdefs.h <<_ACEOF
8039#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8040_ACEOF
8041
8042fi
8043
8044done
8045
8046CFLAGS=$SAVE_CFLAGS
8047
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008048# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8049for ac_header in net/if.h
8050do :
8051 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8052#ifdef STDC_HEADERS
8053# include <stdlib.h>
8054# include <stddef.h>
8055#else
8056# ifdef HAVE_STDLIB_H
8057# include <stdlib.h>
8058# endif
8059#endif
8060#ifdef HAVE_SYS_SOCKET_H
8061# include <sys/socket.h>
8062#endif
8063
8064"
Victor Stinnere0be4232011-10-25 13:06:09 +02008065if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008066 cat >>confdefs.h <<_ACEOF
8067#define HAVE_NET_IF_H 1
8068_ACEOF
8069
8070fi
8071
8072done
8073
8074
Martin v. Löwis11017b12006-01-14 18:12:57 +00008075# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008076for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008077do :
8078 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 +00008079#ifdef HAVE_ASM_TYPES_H
8080#include <asm/types.h>
8081#endif
8082#ifdef HAVE_SYS_SOCKET_H
8083#include <sys/socket.h>
8084#endif
8085
Matthias Kloseb9621712010-04-24 17:59:49 +00008086"
Victor Stinnere0be4232011-10-25 13:06:09 +02008087if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008088 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008089#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008090_ACEOF
8091
8092fi
8093
8094done
8095
8096
Charles-François Natali47413c12011-10-06 19:47:44 +02008097# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008098for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008099do :
8100 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8101ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8102#ifdef HAVE_SYS_SOCKET_H
8103#include <sys/socket.h>
8104#endif
8105
8106"
8107if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8108 cat >>confdefs.h <<_ACEOF
8109#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8110_ACEOF
8111
8112fi
8113
8114done
8115
8116
Guido van Rossum627b2d71993-12-24 10:39:16 +00008117# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008118was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8120$as_echo_n "checking for clock_t in time.h... " >&6; }
8121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008122/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008123#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008124
8125_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008126if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008127 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008128 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008129else
Martin v. Löwis11437992002-04-12 09:54:03 +00008130
8131
Matthias Kloseb9621712010-04-24 17:59:49 +00008132$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008133
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008134
Guido van Rossum627b2d71993-12-24 10:39:16 +00008135fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008136rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008137
Matthias Kloseb9621712010-04-24 17:59:49 +00008138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8139$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008140
Matthias Kloseb9621712010-04-24 17:59:49 +00008141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8142$as_echo_n "checking for makedev... " >&6; }
8143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008144/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008145
Jesus Cea740f53a2010-04-28 11:35:30 +00008146#if defined(MAJOR_IN_MKDEV)
8147#include <sys/mkdev.h>
8148#elif defined(MAJOR_IN_SYSMACROS)
8149#include <sys/sysmacros.h>
8150#else
8151#include <sys/types.h>
8152#endif
8153
Neal Norwitz11690112002-07-30 01:08:28 +00008154int
8155main ()
8156{
Jesus Cea740f53a2010-04-28 11:35:30 +00008157
8158 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008159 ;
8160 return 0;
8161}
Matthias Kloseb159a552010-04-25 21:00:44 +00008162
Neal Norwitz11690112002-07-30 01:08:28 +00008163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008164if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008165 ac_cv_has_makedev=yes
8166else
Matthias Kloseb9621712010-04-24 17:59:49 +00008167 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008169rm -f core conftest.err conftest.$ac_objext \
8170 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8172$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008173if test "$ac_cv_has_makedev" = "yes"; then
8174
Matthias Kloseb9621712010-04-24 17:59:49 +00008175$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008176
8177fi
8178
Christian Heimes985ecdc2013-11-20 11:46:18 +01008179# byte swapping
8180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8181$as_echo_n "checking for le64toh... " >&6; }
8182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8183/* end confdefs.h. */
8184
8185#ifdef HAVE_ENDIAN_H
8186#include <endian.h>
8187#elif defined(HAVE_SYS_ENDIAN_H)
8188#include <sys/endian.h>
8189#endif
8190
8191int
8192main ()
8193{
8194
8195 le64toh(1)
8196 ;
8197 return 0;
8198}
8199
8200_ACEOF
8201if ac_fn_c_try_link "$LINENO"; then :
8202 ac_cv_has_le64toh=yes
8203else
8204 ac_cv_has_le64toh=no
8205fi
8206rm -f core conftest.err conftest.$ac_objext \
8207 conftest$ac_exeext conftest.$ac_ext
8208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8209$as_echo "$ac_cv_has_le64toh" >&6; }
8210if test "$ac_cv_has_le64toh" = "yes"; then
8211
8212$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8213
8214fi
8215
Martin v. Löwis399a6892002-10-04 10:22:02 +00008216# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8217# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8218# defined, but the compiler does not support pragma redefine_extname,
8219# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8220# structures (such as rlimit64) without declaring them. As a
8221# work-around, disable LFS on such configurations
8222
8223use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8225$as_echo_n "checking Solaris LFS bug... " >&6; }
8226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008227/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008228
8229#define _LARGEFILE_SOURCE 1
8230#define _FILE_OFFSET_BITS 64
8231#include <sys/resource.h>
8232
Martin v. Löwis399a6892002-10-04 10:22:02 +00008233int
8234main ()
8235{
8236struct rlimit foo;
8237 ;
8238 return 0;
8239}
8240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008241if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008242 sol_lfs_bug=no
8243else
Matthias Kloseb9621712010-04-24 17:59:49 +00008244 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8248$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008249if test "$sol_lfs_bug" = "yes"; then
8250 use_lfs=no
8251fi
8252
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008253# Don't use largefile support for GNU/Hurd
8254case $ac_sys_system in GNU*)
8255 use_lfs=no
8256esac
8257
Martin v. Löwis399a6892002-10-04 10:22:02 +00008258if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008259# Two defines needed to enable largefile support on various platforms
8260# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008261case $ac_sys_system/$ac_sys_release in
8262AIX*)
8263
8264$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8265
8266 ;;
8267esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008268
Matthias Kloseb9621712010-04-24 17:59:49 +00008269$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008270
8271
Matthias Kloseb9621712010-04-24 17:59:49 +00008272$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008273
Martin v. Löwis399a6892002-10-04 10:22:02 +00008274fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008275
Guido van Rossum84e7b241996-08-19 21:59:00 +00008276# Add some code to confdefs.h so that the test for off_t works on SCO
8277cat >> confdefs.h <<\EOF
8278#if defined(SCO_DS)
8279#undef _OFF_T
8280#endif
8281EOF
8282
Guido van Rossumef2255b2000-03-10 22:30:29 +00008283# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008284ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008285if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008286
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008287else
Martin v. Löwis11437992002-04-12 09:54:03 +00008288
8289cat >>confdefs.h <<_ACEOF
8290#define mode_t int
8291_ACEOF
8292
8293fi
8294
Matthias Kloseb9621712010-04-24 17:59:49 +00008295ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008296if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008297
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008298else
Martin v. Löwis11437992002-04-12 09:54:03 +00008299
8300cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008301#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008302_ACEOF
8303
8304fi
8305
Matthias Kloseb9621712010-04-24 17:59:49 +00008306ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008307if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008308
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008309else
Martin v. Löwis11437992002-04-12 09:54:03 +00008310
8311cat >>confdefs.h <<_ACEOF
8312#define pid_t int
8313_ACEOF
8314
8315fi
8316
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008317
Martin v. Löwis11437992002-04-12 09:54:03 +00008318cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008319#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008320_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008321
Matthias Kloseb9621712010-04-24 17:59:49 +00008322ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008323if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008324
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008325else
Martin v. Löwis11437992002-04-12 09:54:03 +00008326
8327cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008328#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008329_ACEOF
8330
8331fi
8332
Matthias Kloseb9621712010-04-24 17:59:49 +00008333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8334$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008335if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008336 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008337else
Matthias Kloseb9621712010-04-24 17:59:49 +00008338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008339/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008340#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008341
8342_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008343if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008344 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008345 ac_cv_type_uid_t=yes
8346else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008347 ac_cv_type_uid_t=no
8348fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008349rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008350
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008351fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8353$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008354if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008355
Matthias Kloseb9621712010-04-24 17:59:49 +00008356$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008357
8358
Matthias Kloseb9621712010-04-24 17:59:49 +00008359$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008360
8361fi
8362
Mark Dickinson983bc162012-12-02 12:11:38 +00008363
Matthias Kloseb9621712010-04-24 17:59:49 +00008364ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008365if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008366
Matthias Kloseb9621712010-04-24 17:59:49 +00008367$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008368
8369fi
8370
Stefan Krah1919b7e2012-03-21 18:25:23 +01008371ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8372if test "x$ac_cv_type___uint128_t" = xyes; then :
8373
8374$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8375
8376fi
8377
Jack Jansendd19cf82001-12-06 22:36:17 +00008378
Michael W. Hudson54241132001-12-07 15:38:26 +00008379# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008380# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008381# The cast to long int works around a bug in the HP C Compiler
8382# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8383# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8384# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8386$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008387if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008389else
Matthias Kloseb9621712010-04-24 17:59:49 +00008390 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 +00008391
Martin v. Löwis11437992002-04-12 09:54:03 +00008392else
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 if test "$ac_cv_type_int" = yes; then
8394 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8395$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008396as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008397See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008398 else
8399 ac_cv_sizeof_int=0
8400 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008401fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008402
Martin v. Löwis11437992002-04-12 09:54:03 +00008403fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8405$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008406
8407
8408
Martin v. Löwis11437992002-04-12 09:54:03 +00008409cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008410#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008411_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008412
8413
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008414# The cast to long int works around a bug in the HP C Compiler
8415# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8416# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8417# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8419$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008420if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008421 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008422else
Matthias Kloseb9621712010-04-24 17:59:49 +00008423 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 +00008424
Martin v. Löwis11437992002-04-12 09:54:03 +00008425else
Matthias Kloseb9621712010-04-24 17:59:49 +00008426 if test "$ac_cv_type_long" = yes; then
8427 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8428$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008429as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008430See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008431 else
8432 ac_cv_sizeof_long=0
8433 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008435
Martin v. Löwis11437992002-04-12 09:54:03 +00008436fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8438$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008439
8440
8441
Martin v. Löwis11437992002-04-12 09:54:03 +00008442cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008443#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008444_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008445
8446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008447# The cast to long int works around a bug in the HP C Compiler
8448# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8449# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8450# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8452$as_echo_n "checking size of long long... " >&6; }
8453if ${ac_cv_sizeof_long_long+:} false; then :
8454 $as_echo_n "(cached) " >&6
8455else
8456 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8457
8458else
8459 if test "$ac_cv_type_long_long" = yes; then
8460 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8461$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8462as_fn_error 77 "cannot compute sizeof (long long)
8463See \`config.log' for more details" "$LINENO" 5; }
8464 else
8465 ac_cv_sizeof_long_long=0
8466 fi
8467fi
8468
8469fi
8470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8471$as_echo "$ac_cv_sizeof_long_long" >&6; }
8472
8473
8474
8475cat >>confdefs.h <<_ACEOF
8476#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8477_ACEOF
8478
8479
8480# The cast to long int works around a bug in the HP C Compiler
8481# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8482# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8483# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8485$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008486if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008488else
Matthias Kloseb9621712010-04-24 17:59:49 +00008489 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 +00008490
Martin v. Löwis11437992002-04-12 09:54:03 +00008491else
Matthias Kloseb9621712010-04-24 17:59:49 +00008492 if test "$ac_cv_type_void_p" = yes; then
8493 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8494$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008495as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008496See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008497 else
8498 ac_cv_sizeof_void_p=0
8499 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008500fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008501
Martin v. Löwis11437992002-04-12 09:54:03 +00008502fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8504$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008505
8506
8507
Martin v. Löwis11437992002-04-12 09:54:03 +00008508cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008509#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008510_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008511
8512
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513# The cast to long int works around a bug in the HP C Compiler
8514# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8515# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8516# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8518$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008519if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008520 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008521else
Matthias Kloseb9621712010-04-24 17:59:49 +00008522 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 +00008523
Martin v. Löwis11437992002-04-12 09:54:03 +00008524else
Matthias Kloseb9621712010-04-24 17:59:49 +00008525 if test "$ac_cv_type_short" = yes; then
8526 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8527$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008528as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008529See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008530 else
8531 ac_cv_sizeof_short=0
8532 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008534
Martin v. Löwis11437992002-04-12 09:54:03 +00008535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8537$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008538
8539
8540
Martin v. Löwis11437992002-04-12 09:54:03 +00008541cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008542#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008543_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008544
8545
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008546# The cast to long int works around a bug in the HP C Compiler
8547# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8548# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8549# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8551$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008552if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008554else
Matthias Kloseb9621712010-04-24 17:59:49 +00008555 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 +00008556
Martin v. Löwis11437992002-04-12 09:54:03 +00008557else
Matthias Kloseb9621712010-04-24 17:59:49 +00008558 if test "$ac_cv_type_float" = yes; then
8559 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8560$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008561as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008562See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008563 else
8564 ac_cv_sizeof_float=0
8565 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008567
Martin v. Löwis11437992002-04-12 09:54:03 +00008568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8570$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571
8572
8573
Martin v. Löwis11437992002-04-12 09:54:03 +00008574cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008575#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008576_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008577
8578
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008579# The cast to long int works around a bug in the HP C Compiler
8580# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8581# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8582# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8584$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008585if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008587else
Matthias Kloseb9621712010-04-24 17:59:49 +00008588 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 +00008589
Martin v. Löwis11437992002-04-12 09:54:03 +00008590else
Matthias Kloseb9621712010-04-24 17:59:49 +00008591 if test "$ac_cv_type_double" = yes; then
8592 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8593$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008594as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008595See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008596 else
8597 ac_cv_sizeof_double=0
8598 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008600
Martin v. Löwis11437992002-04-12 09:54:03 +00008601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8603$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008604
8605
8606
Martin v. Löwis11437992002-04-12 09:54:03 +00008607cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008608#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008609_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008610
8611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008612# The cast to long int works around a bug in the HP C Compiler
8613# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8614# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8615# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8617$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008618if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008619 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008620else
Matthias Kloseb9621712010-04-24 17:59:49 +00008621 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 +00008622
Martin v. Löwis11437992002-04-12 09:54:03 +00008623else
Matthias Kloseb9621712010-04-24 17:59:49 +00008624 if test "$ac_cv_type_fpos_t" = yes; then
8625 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8626$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008627as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008628See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629 else
8630 ac_cv_sizeof_fpos_t=0
8631 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008633
Martin v. Löwis11437992002-04-12 09:54:03 +00008634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8636$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008637
8638
8639
Martin v. Löwis11437992002-04-12 09:54:03 +00008640cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008641#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008642_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008643
Michael W. Hudson54241132001-12-07 15:38:26 +00008644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645# The cast to long int works around a bug in the HP C Compiler
8646# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8647# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8648# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8650$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008651if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008653else
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 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 +00008655
Martin v. Löwis18e16552006-02-15 17:27:45 +00008656else
Matthias Kloseb9621712010-04-24 17:59:49 +00008657 if test "$ac_cv_type_size_t" = yes; then
8658 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8659$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008660as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008661See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008662 else
8663 ac_cv_sizeof_size_t=0
8664 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008666
Martin v. Löwis18e16552006-02-15 17:27:45 +00008667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8669$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670
8671
8672
Martin v. Löwis18e16552006-02-15 17:27:45 +00008673cat >>confdefs.h <<_ACEOF
8674#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8675_ACEOF
8676
8677
Christian Heimes400adb02008-02-01 08:12:03 +00008678# The cast to long int works around a bug in the HP C Compiler
8679# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8680# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8681# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8683$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008684if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008685 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008686else
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 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 +00008688
Christian Heimes400adb02008-02-01 08:12:03 +00008689else
Matthias Kloseb9621712010-04-24 17:59:49 +00008690 if test "$ac_cv_type_pid_t" = yes; then
8691 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8692$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008693as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008694See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008695 else
8696 ac_cv_sizeof_pid_t=0
8697 fi
8698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008699
Christian Heimes400adb02008-02-01 08:12:03 +00008700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8702$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008703
8704
8705
8706cat >>confdefs.h <<_ACEOF
8707#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8708_ACEOF
8709
8710
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008711# The cast to long int works around a bug in the HP C Compiler
8712# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8713# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8714# This bug is HP SR number 8606223364.
8715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8716$as_echo_n "checking size of uintptr_t... " >&6; }
8717if ${ac_cv_sizeof_uintptr_t+:} false; then :
8718 $as_echo_n "(cached) " >&6
8719else
8720 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8721
8722else
8723 if test "$ac_cv_type_uintptr_t" = yes; then
8724 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8725$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8726as_fn_error 77 "cannot compute sizeof (uintptr_t)
8727See \`config.log' for more details" "$LINENO" 5; }
8728 else
8729 ac_cv_sizeof_uintptr_t=0
8730 fi
8731fi
8732
8733fi
8734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8735$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8736
8737
8738
8739cat >>confdefs.h <<_ACEOF
8740#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8741_ACEOF
8742
8743
Michael W. Hudson54241132001-12-07 15:38:26 +00008744
Matthias Kloseb9621712010-04-24 17:59:49 +00008745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8746$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008747have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008749/* end confdefs.h. */
8750
8751int
8752main ()
8753{
8754long double x; x = (long double)0;
8755 ;
8756 return 0;
8757}
8758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008759if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008760
8761
Matthias Kloseb9621712010-04-24 17:59:49 +00008762$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008763
8764 have_long_double=yes
8765
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008766fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8769$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008770if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008771# The cast to long int works around a bug in the HP C Compiler
8772# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8773# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8774# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8776$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008777if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008778 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008779else
Matthias Kloseb9621712010-04-24 17:59:49 +00008780 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 +00008781
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008782else
Matthias Kloseb9621712010-04-24 17:59:49 +00008783 if test "$ac_cv_type_long_double" = yes; then
8784 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8785$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008786as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008787See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008788 else
8789 ac_cv_sizeof_long_double=0
8790 fi
8791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008792
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8795$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008796
8797
8798
8799cat >>confdefs.h <<_ACEOF
8800#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8801_ACEOF
8802
8803
8804fi
8805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008806# The cast to long int works around a bug in the HP C Compiler
8807# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8808# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8809# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8811$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008812if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008813 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008814else
Matthias Kloseb9621712010-04-24 17:59:49 +00008815 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 +00008816
Thomas Woutersb2137042007-02-01 18:02:27 +00008817else
Matthias Kloseb9621712010-04-24 17:59:49 +00008818 if test "$ac_cv_type__Bool" = yes; then
8819 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8820$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008821as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008822See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008823 else
8824 ac_cv_sizeof__Bool=0
8825 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008827
Thomas Woutersb2137042007-02-01 18:02:27 +00008828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8830$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008831
8832
8833
Thomas Woutersb2137042007-02-01 18:02:27 +00008834cat >>confdefs.h <<_ACEOF
8835#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8836_ACEOF
8837
8838
Thomas Woutersb2137042007-02-01 18:02:27 +00008839
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008840# The cast to long int works around a bug in the HP C Compiler
8841# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8842# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8843# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8845$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008846if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008848else
Matthias Kloseb9621712010-04-24 17:59:49 +00008849 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008850#ifdef HAVE_SYS_TYPES_H
8851#include <sys/types.h>
8852#endif
8853
Matthias Kloseb9621712010-04-24 17:59:49 +00008854"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008855
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008856else
Matthias Kloseb9621712010-04-24 17:59:49 +00008857 if test "$ac_cv_type_off_t" = yes; then
8858 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8859$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008860as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008861See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008862 else
8863 ac_cv_sizeof_off_t=0
8864 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008866
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8869$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008870
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008871
8872
Martin v. Löwis11437992002-04-12 09:54:03 +00008873cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008874#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008875_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008876
Michael W. Hudson54241132001-12-07 15:38:26 +00008877
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008878
Matthias Kloseb9621712010-04-24 17:59:49 +00008879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8880$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008881if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008882 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008883
Matthias Kloseb9621712010-04-24 17:59:49 +00008884$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008885
Matthias Kloseb9621712010-04-24 17:59:49 +00008886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8887$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008888else
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8890$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008891fi
8892
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008893# The cast to long int works around a bug in the HP C Compiler
8894# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8895# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8896# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8898$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008899if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008900 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008901else
Matthias Kloseb9621712010-04-24 17:59:49 +00008902 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008903#ifdef HAVE_SYS_TYPES_H
8904#include <sys/types.h>
8905#endif
8906#ifdef HAVE_TIME_H
8907#include <time.h>
8908#endif
8909
Matthias Kloseb9621712010-04-24 17:59:49 +00008910"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008911
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008912else
Matthias Kloseb9621712010-04-24 17:59:49 +00008913 if test "$ac_cv_type_time_t" = yes; then
8914 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8915$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008916as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008917See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008918 else
8919 ac_cv_sizeof_time_t=0
8920 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008922
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8925$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008926
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008927
8928
Martin v. Löwis11437992002-04-12 09:54:03 +00008929cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008930#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008931_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008932
Michael W. Hudson54241132001-12-07 15:38:26 +00008933
8934
Trent Mick635f6fb2000-08-23 21:33:05 +00008935# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008936ac_save_cc="$CC"
8937if test "$ac_cv_kpthread" = "yes"
8938then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008939elif test "$ac_cv_kthread" = "yes"
8940then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008941elif test "$ac_cv_pthread" = "yes"
8942then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008943fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008944
Matthias Kloseb9621712010-04-24 17:59:49 +00008945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8946$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008947have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008949/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008950
8951 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008952int
8953main ()
8954{
Guido van Rossum12580492000-09-24 16:47:19 +00008955pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008956 ;
8957 return 0;
8958}
Matthias Kloseb159a552010-04-25 21:00:44 +00008959
Martin v. Löwis11437992002-04-12 09:54:03 +00008960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008961if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008962 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008963fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8966$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008967if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008968 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008969# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8970# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8971# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8973$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008974if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008976else
Matthias Kloseb9621712010-04-24 17:59:49 +00008977 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008978#ifdef HAVE_PTHREAD_H
8979#include <pthread.h>
8980#endif
8981
Matthias Kloseb9621712010-04-24 17:59:49 +00008982"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008983
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008984else
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 if test "$ac_cv_type_pthread_t" = yes; then
8986 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8987$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008988as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008989See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008990 else
8991 ac_cv_sizeof_pthread_t=0
8992 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008994
Trent Mick635f6fb2000-08-23 21:33:05 +00008995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8997$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008998
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008999
9000
Martin v. Löwis11437992002-04-12 09:54:03 +00009001cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009002#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009003_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009004
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009005
Trent Mick635f6fb2000-08-23 21:33:05 +00009006fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009007CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009008
Michael W. Hudson54241132001-12-07 15:38:26 +00009009
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009010case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009011 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009012 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9013 ;;
9014 Darwin/*)
9015 OTHER_LIBTOOL_OPT=""
9016 ;;
9017esac
9018
9019
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009020
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009021case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009022 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009023 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9024 if test "${enable_universalsdk}"; then
9025 :
9026 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009027 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009028 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009029 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009030 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009031 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009032 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009033 if test ${gcc_version} '<' 4.0
9034 then
9035 LIBTOOL_CRUFT="-lcc_dynamic"
9036 else
9037 LIBTOOL_CRUFT=""
9038 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009039 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009040 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009041else
Matthias Kloseb9621712010-04-24 17:59:49 +00009042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009043/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009044
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009045 #include <unistd.h>
9046 int main(int argc, char*argv[])
9047 {
9048 if (sizeof(long) == 4) {
9049 return 0;
9050 } else {
9051 return 1;
9052 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009053 }
9054
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009056if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009057 ac_osx_32bit=yes
9058else
Matthias Kloseb9621712010-04-24 17:59:49 +00009059 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9062 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009063fi
9064
9065
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009066 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009067 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009068 i386)
9069 MACOSX_DEFAULT_ARCH="i386"
9070 ;;
9071 ppc)
9072 MACOSX_DEFAULT_ARCH="ppc"
9073 ;;
9074 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009075 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009076 ;;
9077 esac
9078 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009079 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009080 i386)
9081 MACOSX_DEFAULT_ARCH="x86_64"
9082 ;;
9083 ppc)
9084 MACOSX_DEFAULT_ARCH="ppc64"
9085 ;;
9086 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009087 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009088 ;;
9089 esac
9090
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009091 fi
9092
9093 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009094 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009095 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009096esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9098$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009099if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009100then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009101 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009102 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009103 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009104
Matthias Kloseb9621712010-04-24 17:59:49 +00009105$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009106
Matthias Kloseb9621712010-04-24 17:59:49 +00009107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9108$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009109 if test $enable_shared = "yes"
9110 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009111 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 +00009112 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009113else
Matthias Kloseb9621712010-04-24 17:59:49 +00009114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9115$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009116fi
9117
Matthias Kloseb9621712010-04-24 17:59:49 +00009118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9119$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009120case $ac_sys_system/$ac_sys_release in
9121 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009122
Matthias Kloseb9621712010-04-24 17:59:49 +00009123$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009124
Matthias Kloseb9621712010-04-24 17:59:49 +00009125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9126$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009127 ;;
9128 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9130$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009131 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009132esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009133
Guido van Rossum0a516c91994-09-12 10:58:40 +00009134# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009135
Michael W. Hudson54241132001-12-07 15:38:26 +00009136
9137
9138
9139
Benjamin Peterson99f03762010-04-11 22:15:28 +00009140
Thomas Wouters477c8d52006-05-27 19:21:47 +00009141
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009142# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9143# -- usually .so, .sl on HP-UX, .dll on Cygwin
9144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9145$as_echo_n "checking the extension of shared libraries... " >&6; }
9146if test -z "$SHLIB_SUFFIX"; then
9147 case $ac_sys_system in
9148 hp*|HP*)
9149 case `uname -m` in
9150 ia64) SHLIB_SUFFIX=.so;;
9151 *) SHLIB_SUFFIX=.sl;;
9152 esac
9153 ;;
9154 CYGWIN*) SHLIB_SUFFIX=.dll;;
9155 *) SHLIB_SUFFIX=.so;;
9156 esac
9157fi
9158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9159$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009160
Guido van Rossum0a516c91994-09-12 10:58:40 +00009161# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009162# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009163# (Shared libraries in this instance are shared modules to be loaded into
9164# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9166$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009167if test -z "$LDSHARED"
9168then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009169 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009170 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009171 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009172 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009173 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009174 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009175 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009176 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009177 if test "$GCC" = "yes" ; then
9178 LDSHARED='$(CC) -shared'
9179 LDCXXSHARED='$(CXX) -shared'
9180 else
9181 LDSHARED='$(CC) -G'
9182 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009183 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009184 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009185 if test "$GCC" = "yes" ; then
9186 LDSHARED='$(CC) -shared'
9187 LDCXXSHARED='$(CXX) -shared'
9188 else
9189 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009190 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009191 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009192 LDSHARED='$(CC) -bundle'
9193 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009194 if test "$enable_framework" ; then
9195 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009196 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9197 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009198 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009199 else
9200 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009201 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009202 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009203 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009204 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009205 LDSHARED='$(CC) -bundle'
9206 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009207 if test "$enable_framework" ; then
9208 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009209 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9210 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009211 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009212 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009213 # No framework, use the Python app as bundle-loader
9214 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009215 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009216 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009217 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009218 Darwin/*)
9219 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9220 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009221
Ned Deily36820b62014-06-25 13:44:22 -07009222 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9223 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9224 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9225 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9226 if test ${dep_target_major} -eq 10 && \
9227 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009228 then
Ned Deily36820b62014-06-25 13:44:22 -07009229 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009230 LDSHARED='$(CC) -bundle'
9231 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009232 if test "$enable_framework" ; then
9233 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009234 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9235 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009236 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009237 else
9238 # No framework, use the Python app as bundle-loader
9239 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9240 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009241 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009242 fi
Ned Deily36820b62014-06-25 13:44:22 -07009243 else
9244 # building for OS X 10.3 and later
9245 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9246 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9247 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009248 fi
9249 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009250 Linux*|GNU*|QNX*)
9251 LDSHARED='$(CC) -shared'
9252 LDCXXSHARED='$(CXX) -shared';;
9253 BSD/OS*/4*)
9254 LDSHARED="gcc -shared"
9255 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009256 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009257 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009258 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009259 LDSHARED='$(CC) -shared'
9260 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009261 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009262 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009263 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009264 OpenBSD*)
9265 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9266 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009267 LDSHARED='$(CC) -shared $(CCSHARED)'
9268 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009269 else
9270 case `uname -r` in
9271 [01].* | 2.[0-7] | 2.[0-7].*)
9272 LDSHARED="ld -Bshareable ${LDFLAGS}"
9273 ;;
9274 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009275 LDSHARED='$(CC) -shared $(CCSHARED)'
9276 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009277 ;;
9278 esac
9279 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009280 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009281 LDSHARED='$(CC) -shared'
9282 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009283 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009284 if test "$GCC" = "yes" ; then
9285 LDSHARED='$(CC) -shared'
9286 LDCXXSHARED='$(CXX) -shared'
9287 else
9288 LDSHARED='$(CC) -G'
9289 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009290 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009291 SCO_SV*)
9292 LDSHARED='$(CC) -Wl,-G,-Bexport'
9293 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9294 CYGWIN*)
9295 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9296 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009297 *) LDSHARED="ld";;
9298 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9301$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009302LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009303BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009304# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009305# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9307$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009308if test -z "$CCSHARED"
9309then
Guido van Rossum07397971997-04-29 21:49:50 +00009310 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009311 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009312 then CCSHARED="-fPIC";
9313 elif test `uname -p` = sparc;
9314 then CCSHARED="-xcode=pic32";
9315 else CCSHARED="-Kpic";
9316 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009317 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009318 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009319 else CCSHARED="+z";
9320 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009321 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009322 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009323 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009324 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009325 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009326 if test "$GCC" = "yes"
9327 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009328 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009329 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009330 SCO_SV*)
9331 if test "$GCC" = "yes"
9332 then CCSHARED="-fPIC"
9333 else CCSHARED="-Kpic -belf"
9334 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009335 IRIX*/6*) case $CC in
9336 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009337 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009338 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009339 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009340fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9342$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009343# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009344# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9346$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009347if test -z "$LINKFORSHARED"
9348then
Guido van Rossum07397971997-04-29 21:49:50 +00009349 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009350 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009351 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009352 LINKFORSHARED="-Wl,-E -Wl,+s";;
9353# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009354 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009355 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009356 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009357 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009358 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009359 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009360
9361 # Issue #18075: the default maximum stack size (8MBytes) is too
9362 # small for the default recursion limit. Increase the stack size
9363 # to ensure that tests don't crash
9364 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9365
Jack Jansene578a632001-08-15 01:27:14 +00009366 if test "$enable_framework"
9367 then
Jack Jansenda49e192005-01-07 13:08:22 +00009368 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009369 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009370 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009371 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009372 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009373 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009374 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009375 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9376 then
9377 LINKFORSHARED="-Wl,--export-dynamic"
9378 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009379 SunOS/5*) case $CC in
9380 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009381 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009382 then
9383 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009384 fi;;
9385 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009386 CYGWIN*)
9387 if test $enable_shared = "no"
9388 then
9389 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9390 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009391 QNX*)
9392 # -Wl,-E causes the symbols to be added to the dynamic
9393 # symbol table so that they can be found when a module
9394 # is loaded. -N 2048K causes the stack size to be set
9395 # to 2048 kilobytes so that the stack doesn't overflow
9396 # when running test_compile.py.
9397 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009398 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009399fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9401$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009402
Michael W. Hudson54241132001-12-07 15:38:26 +00009403
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009404
Matthias Kloseb9621712010-04-24 17:59:49 +00009405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9406$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009407if test ! "$LIBRARY" = "$LDLIBRARY"
9408then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009409 case $ac_sys_system in
9410 CYGWIN*)
9411 # Cygwin needs CCSHARED when building extension DLLs
9412 # but not when building the interpreter DLL.
9413 CFLAGSFORSHARED='';;
9414 *)
9415 CFLAGSFORSHARED='$(CCSHARED)'
9416 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009417fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9419$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009420
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009421# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9422# library (with --enable-shared).
9423# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009424# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9425# if it is not required, since it creates a dependency of the shared library
9426# to LIBS. This, in turn, means that applications linking the shared libpython
9427# don't need to link LIBS explicitly. The default should be only changed
9428# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009429
Matthias Kloseb9621712010-04-24 17:59:49 +00009430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9431$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009432case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009433 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009434 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009435esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9437$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009438
9439
Guido van Rossum627b2d71993-12-24 10:39:16 +00009440# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9442$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009443if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009444 $as_echo_n "(cached) " >&6
9445else
9446 ac_check_lib_save_LIBS=$LIBS
9447LIBS="-lsendfile $LIBS"
9448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9449/* end confdefs.h. */
9450
9451/* Override any GCC internal prototype to avoid an error.
9452 Use char because int might match the return type of a GCC
9453 builtin and then its argument prototype would still apply. */
9454#ifdef __cplusplus
9455extern "C"
9456#endif
9457char sendfile ();
9458int
9459main ()
9460{
9461return sendfile ();
9462 ;
9463 return 0;
9464}
9465_ACEOF
9466if ac_fn_c_try_link "$LINENO"; then :
9467 ac_cv_lib_sendfile_sendfile=yes
9468else
9469 ac_cv_lib_sendfile_sendfile=no
9470fi
9471rm -f core conftest.err conftest.$ac_objext \
9472 conftest$ac_exeext conftest.$ac_ext
9473LIBS=$ac_check_lib_save_LIBS
9474fi
9475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9476$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009477if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009478 cat >>confdefs.h <<_ACEOF
9479#define HAVE_LIBSENDFILE 1
9480_ACEOF
9481
9482 LIBS="-lsendfile $LIBS"
9483
9484fi
9485
Matthias Kloseb9621712010-04-24 17:59:49 +00009486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9487$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009488if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009489 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009490else
Martin v. Löwis11437992002-04-12 09:54:03 +00009491 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009492LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009495
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009496/* Override any GCC internal prototype to avoid an error.
9497 Use char because int might match the return type of a GCC
9498 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009499#ifdef __cplusplus
9500extern "C"
9501#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009502char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009503int
9504main ()
9505{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009506return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009507 ;
9508 return 0;
9509}
9510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009511if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009512 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009513else
Matthias Kloseb9621712010-04-24 17:59:49 +00009514 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009515fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009516rm -f core conftest.err conftest.$ac_objext \
9517 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009518LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009519fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9521$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009522if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009523 cat >>confdefs.h <<_ACEOF
9524#define HAVE_LIBDL 1
9525_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009526
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009527 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009528
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009529fi
9530 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9532$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009533if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009534 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009535else
Martin v. Löwis11437992002-04-12 09:54:03 +00009536 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009537LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009539/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009540
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009541/* Override any GCC internal prototype to avoid an error.
9542 Use char because int might match the return type of a GCC
9543 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009544#ifdef __cplusplus
9545extern "C"
9546#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009547char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009548int
9549main ()
9550{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009551return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009552 ;
9553 return 0;
9554}
9555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009556if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009557 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009558else
Matthias Kloseb9621712010-04-24 17:59:49 +00009559 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009560fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009561rm -f core conftest.err conftest.$ac_objext \
9562 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009563LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009564fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9566$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009567if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009568 cat >>confdefs.h <<_ACEOF
9569#define HAVE_LIBDLD 1
9570_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009571
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009572 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009573
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009574fi
9575 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009576
Georg Brandlb1441c72009-01-03 22:33:39 +00009577# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009578if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9580$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009581if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009582 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009583else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009584 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009586/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009587
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009588/* Override any GCC internal prototype to avoid an error.
9589 Use char because int might match the return type of a GCC
9590 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009591#ifdef __cplusplus
9592extern "C"
9593#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009594char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009595int
9596main ()
9597{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009598return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009599 ;
9600 return 0;
9601}
9602_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009603for ac_lib in '' pthread rt posix4; do
9604 if test -z "$ac_lib"; then
9605 ac_res="none required"
9606 else
9607 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009608 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009609 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009610 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009611 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009612fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009613rm -f core conftest.err conftest.$ac_objext \
9614 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009615 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009616 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009617fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618done
Victor Stinnere0be4232011-10-25 13:06:09 +02009619if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009621else
9622 ac_cv_search_sem_init=no
9623fi
9624rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009625LIBS=$ac_func_search_save_LIBS
9626fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9628$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009629ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009630if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009631 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009632
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009633fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009634 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009635 # posix4 on Solaris 2.6
9636 # pthread (first!) on Linux
9637fi
9638
Martin v. Löwis19d17342003-06-14 21:03:05 +00009639# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9641$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009642if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009643 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009644else
9645 ac_check_lib_save_LIBS=$LIBS
9646LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009648/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009650/* Override any GCC internal prototype to avoid an error.
9651 Use char because int might match the return type of a GCC
9652 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009653#ifdef __cplusplus
9654extern "C"
9655#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009656char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009657int
9658main ()
9659{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009660return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009661 ;
9662 return 0;
9663}
9664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009665if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009666 ac_cv_lib_intl_textdomain=yes
9667else
Matthias Kloseb9621712010-04-24 17:59:49 +00009668 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009670rm -f core conftest.err conftest.$ac_objext \
9671 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009672LIBS=$ac_check_lib_save_LIBS
9673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9675$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009676if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009677
Matthias Kloseb9621712010-04-24 17:59:49 +00009678$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009679
Brett Cannonc6d936e2009-06-07 20:09:53 +00009680 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009681fi
9682
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009683
9684# checks for system dependent C++ extensions support
9685case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009686 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9687$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009689/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009690
Georg Brandl59e87bd2011-02-15 19:48:59 +00009691 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009692int
9693main ()
9694{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009695loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009696 ;
9697 return 0;
9698}
Matthias Kloseb159a552010-04-25 21:00:44 +00009699
Martin v. Löwis11437992002-04-12 09:54:03 +00009700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009701if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009702
Matthias Kloseb159a552010-04-25 21:00:44 +00009703
Matthias Kloseb9621712010-04-24 17:59:49 +00009704$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009705
Matthias Kloseb159a552010-04-25 21:00:44 +00009706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009707$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009708
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009709else
Matthias Kloseb159a552010-04-25 21:00:44 +00009710
9711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009712$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009713
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009715rm -f core conftest.err conftest.$ac_objext \
9716 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009717 *) ;;
9718esac
9719
Christian Heimes985ecdc2013-11-20 11:46:18 +01009720# check for systems that require aligned memory access
9721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9722$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009723if ${ac_cv_aligned_required+:} false; then :
9724 $as_echo_n "(cached) " >&6
9725else
9726 if test "$cross_compiling" = yes; then :
9727 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009728else
9729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9730/* end confdefs.h. */
9731
9732int main()
9733{
9734 char s[16];
9735 int i, *p1, *p2;
9736 for (i=0; i < 16; i++)
9737 s[i] = i;
9738 p1 = (int*)(s+1);
9739 p2 = (int*)(s+2);
9740 if (*p1 == *p2)
9741 return 1;
9742 return 0;
9743}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009744_ACEOF
9745if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009746 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009747else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009748 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009749fi
9750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9751 conftest.$ac_objext conftest.beam conftest.$ac_ext
9752fi
9753
9754
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009755fi
9756
9757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9758$as_echo "$ac_cv_aligned_required" >&6; }
9759if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009760
9761$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9762
9763fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009764
9765# str, bytes and memoryview hash algorithm
9766
9767
9768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9769$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9770
9771# Check whether --with-hash_algorithm was given.
9772if test "${with_hash_algorithm+set}" = set; then :
9773 withval=$with_hash_algorithm;
9774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9775$as_echo "$withval" >&6; }
9776case "$withval" in
9777 siphash24)
9778 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9779
9780 ;;
9781 fnv)
9782 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9783
9784 ;;
9785 *)
9786 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9787 ;;
9788esac
9789
9790else
9791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9792$as_echo "default" >&6; }
9793fi
9794
9795
Charles-François Natalid30b0222014-05-08 23:08:51 +01009796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9797$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9798
9799# Check whether --with-address_sanitizer was given.
9800if test "${with_address_sanitizer+set}" = set; then :
9801 withval=$with_address_sanitizer;
9802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9803$as_echo "$withval" >&6; }
9804BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9805LDFLAGS="-fsanitize=address $LDFLAGS"
9806
9807else
9808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9809$as_echo "no" >&6; }
9810fi
9811
9812
Guido van Rossum70c7f481998-03-26 18:44:10 +00009813# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9815$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009816if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009817 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009818else
Martin v. Löwis11437992002-04-12 09:54:03 +00009819 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009820LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009822/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009824/* Override any GCC internal prototype to avoid an error.
9825 Use char because int might match the return type of a GCC
9826 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009827#ifdef __cplusplus
9828extern "C"
9829#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009830char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009831int
9832main ()
9833{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009834return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009835 ;
9836 return 0;
9837}
9838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009839if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009841else
Matthias Kloseb9621712010-04-24 17:59:49 +00009842 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009844rm -f core conftest.err conftest.$ac_objext \
9845 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009846LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9849$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009850if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009851 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009852fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009853 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9855$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009856if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009857 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009858else
Martin v. Löwis11437992002-04-12 09:54:03 +00009859 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009860LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009862/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009863
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009864/* Override any GCC internal prototype to avoid an error.
9865 Use char because int might match the return type of a GCC
9866 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009867#ifdef __cplusplus
9868extern "C"
9869#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009870char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009871int
9872main ()
9873{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009874return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009875 ;
9876 return 0;
9877}
9878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009879if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009880 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009881else
Matthias Kloseb9621712010-04-24 17:59:49 +00009882 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009884rm -f core conftest.err conftest.$ac_objext \
9885 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009886LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9889$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009890if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009891 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009892fi
9893 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009894
Matthias Kloseb9621712010-04-24 17:59:49 +00009895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9896$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009897
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009898# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009899if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009900 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9902$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009903LIBS="$withval $LIBS"
9904
9905else
Matthias Kloseb9621712010-04-24 17:59:49 +00009906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9907$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009908fi
9909
Guido van Rossum7f43da71994-08-01 12:15:30 +00009910
Victor Stinner8291b5e2015-03-20 16:03:14 +01009911
9912
9913
9914
9915
9916
9917
9918if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9919 if test -n "$ac_tool_prefix"; then
9920 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9921set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9923$as_echo_n "checking for $ac_word... " >&6; }
9924if ${ac_cv_path_PKG_CONFIG+:} false; then :
9925 $as_echo_n "(cached) " >&6
9926else
9927 case $PKG_CONFIG in
9928 [\\/]* | ?:[\\/]*)
9929 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9930 ;;
9931 *)
9932 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9933for as_dir in $PATH
9934do
9935 IFS=$as_save_IFS
9936 test -z "$as_dir" && as_dir=.
9937 for ac_exec_ext in '' $ac_executable_extensions; do
9938 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9939 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9940 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9941 break 2
9942 fi
9943done
9944 done
9945IFS=$as_save_IFS
9946
9947 ;;
9948esac
9949fi
9950PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9951if test -n "$PKG_CONFIG"; then
9952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9953$as_echo "$PKG_CONFIG" >&6; }
9954else
9955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9956$as_echo "no" >&6; }
9957fi
9958
9959
9960fi
9961if test -z "$ac_cv_path_PKG_CONFIG"; then
9962 ac_pt_PKG_CONFIG=$PKG_CONFIG
9963 # Extract the first word of "pkg-config", so it can be a program name with args.
9964set dummy pkg-config; ac_word=$2
9965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9966$as_echo_n "checking for $ac_word... " >&6; }
9967if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9968 $as_echo_n "(cached) " >&6
9969else
9970 case $ac_pt_PKG_CONFIG in
9971 [\\/]* | ?:[\\/]*)
9972 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9973 ;;
9974 *)
9975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9976for as_dir in $PATH
9977do
9978 IFS=$as_save_IFS
9979 test -z "$as_dir" && as_dir=.
9980 for ac_exec_ext in '' $ac_executable_extensions; do
9981 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9982 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9983 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9984 break 2
9985 fi
9986done
9987 done
9988IFS=$as_save_IFS
9989
9990 ;;
9991esac
9992fi
9993ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9994if test -n "$ac_pt_PKG_CONFIG"; then
9995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9996$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9997else
9998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9999$as_echo "no" >&6; }
10000fi
10001
10002 if test "x$ac_pt_PKG_CONFIG" = x; then
10003 PKG_CONFIG=""
10004 else
10005 case $cross_compiling:$ac_tool_warned in
10006yes:)
10007{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10008$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10009ac_tool_warned=yes ;;
10010esac
10011 PKG_CONFIG=$ac_pt_PKG_CONFIG
10012 fi
10013else
10014 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10015fi
10016
10017fi
10018if test -n "$PKG_CONFIG"; then
10019 _pkg_min_version=0.9.0
10020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10021$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10022 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10024$as_echo "yes" >&6; }
10025 else
10026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10027$as_echo "no" >&6; }
10028 PKG_CONFIG=""
10029 fi
10030fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010031
10032# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10034$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010035
10036# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010037if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010038 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010039else
10040 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010041fi
10042
10043
Matthias Kloseb9621712010-04-24 17:59:49 +000010044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10045$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010046
10047# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10049$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010050
10051# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010052if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010053 withval=$with_system_ffi;
10054fi
10055
10056
Zachary Waref40d4dd2016-09-17 01:25:24 -050010057if test "$ac_sys_system" = "Darwin"
10058then
10059 case "$with_system_ffi" in
10060 "")
10061 with_system_ffi="no"
10062 ;;
10063 yes|no)
10064 ;;
10065 *)
10066 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10067 ;;
10068 esac
10069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10070$as_echo "$with_system_ffi" >&6; }
10071else
10072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10073$as_echo "yes" >&6; }
10074 if test "$with_system_ffi" != ""
10075 then
10076 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10077$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10078 fi
10079 with_system_ffi="yes"
10080fi
Zachary Ware935043d2016-09-09 17:01:21 -070010081
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010082if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010083 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10084else
10085 LIBFFI_INCLUDEDIR=""
10086fi
10087
10088
Stefan Krah60187b52012-03-23 19:06:27 +010010089# Check for use of the system libmpdec library
10090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10091$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10092
10093# Check whether --with-system_libmpdec was given.
10094if test "${with_system_libmpdec+set}" = set; then :
10095 withval=$with_system_libmpdec;
10096else
10097 with_system_libmpdec="no"
10098fi
10099
10100
10101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10102$as_echo "$with_system_libmpdec" >&6; }
10103
Benjamin Peterson076ed002010-10-31 17:11:02 +000010104# Check for support for loadable sqlite extensions
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10106$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10107# Check whether --enable-loadable-sqlite-extensions was given.
10108if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10109 enableval=$enable_loadable_sqlite_extensions;
10110else
10111 enable_loadable_sqlite_extensions="no"
10112fi
10113
10114
10115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10116$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10117
Ned Deilyd819b932013-09-06 01:07:05 -070010118# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10119
10120
10121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10122$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10123
10124# Check whether --with-tcltk-includes was given.
10125if test "${with_tcltk_includes+set}" = set; then :
10126 withval=$with_tcltk_includes;
10127else
10128 with_tcltk_includes="default"
10129fi
10130
10131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10132$as_echo "$with_tcltk_includes" >&6; }
10133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10134$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10135
10136# Check whether --with-tcltk-libs was given.
10137if test "${with_tcltk_libs+set}" = set; then :
10138 withval=$with_tcltk_libs;
10139else
10140 with_tcltk_libs="default"
10141fi
10142
10143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10144$as_echo "$with_tcltk_libs" >&6; }
10145if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10146then
10147 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10148 then
10149 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10150 fi
10151 TCLTK_INCLUDES=""
10152 TCLTK_LIBS=""
10153else
10154 TCLTK_INCLUDES="$with_tcltk_includes"
10155 TCLTK_LIBS="$with_tcltk_libs"
10156fi
10157
Matthias Klose55708cc2009-04-30 08:06:49 +000010158# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10160$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010161
10162# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010163if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010164 withval=$with_dbmliborder;
10165if test x$with_dbmliborder = xyes
10166then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010167as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010168else
10169 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10170 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10171 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010172 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010173 fi
10174 done
10175fi
10176fi
10177
Matthias Kloseb9621712010-04-24 17:59:49 +000010178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10179$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010180
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010181# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010182
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010183USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010185
Martin v. Löwis11437992002-04-12 09:54:03 +000010186
10187# Templates for things AC_DEFINEd more than once.
10188# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010189
10190
Martin v. Löwis11437992002-04-12 09:54:03 +000010191
Matthias Kloseb9621712010-04-24 17:59:49 +000010192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10193$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010195# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010196if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010197 withval=$with_threads;
10198fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010199
10200
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010201# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010202
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010203# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010204if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010205 withval=$with_thread; with_threads=$with_thread
10206fi
10207
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010208
10209if test -z "$with_threads"
10210then with_threads="yes"
10211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10213$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010214
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010215
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010216if test "$with_threads" = "no"
10217then
10218 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010219elif test "$ac_cv_pthread_is_default" = yes
10220then
Matthias Kloseb9621712010-04-24 17:59:49 +000010221 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010222
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010223 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010224 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010225
10226 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010227 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010228elif test "$ac_cv_kpthread" = "yes"
10229then
10230 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010231 if test "$ac_cv_cxx_thread" = "yes"; then
10232 CXX="$CXX -Kpthread"
10233 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010234 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010235
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010236 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010237 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010238elif test "$ac_cv_kthread" = "yes"
10239then
10240 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010241 if test "$ac_cv_cxx_thread" = "yes"; then
10242 CXX="$CXX -Kthread"
10243 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010244 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010245
10246 posix_threads=yes
10247 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010248elif test "$ac_cv_pthread" = "yes"
10249then
10250 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010251 if test "$ac_cv_cxx_thread" = "yes"; then
10252 CXX="$CXX -pthread"
10253 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010254 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010255
10256 posix_threads=yes
10257 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010258else
10259 if test ! -z "$with_threads" -a -d "$with_threads"
10260 then LDFLAGS="$LDFLAGS -L$with_threads"
10261 fi
10262 if test ! -z "$withval" -a -d "$withval"
10263 then LDFLAGS="$LDFLAGS -L$withval"
10264 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010265
10266 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010267 # define _POSIX_THREADS in unistd.h. Some apparently don't
10268 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10270$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010272/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010273
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010274#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010275#ifdef _POSIX_THREADS
10276yes
10277#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010278
10279_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010281 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010282 unistd_defines_pthreads=yes
10283else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010284 unistd_defines_pthreads=no
10285fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010286rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010287
Matthias Kloseb9621712010-04-24 17:59:49 +000010288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10289$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010290
Matthias Kloseb9621712010-04-24 17:59:49 +000010291 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010292
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010293 # Just looking for pthread_create in libpthread is not enough:
10294 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10295 # So we really have to include pthread.h, and then link.
10296 _libs=$LIBS
10297 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10299$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010301/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010302
10303#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010304#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010305
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010306void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010307int
10308main ()
10309{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010310
10311pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010312 ;
10313 return 0;
10314}
10315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010316if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010317
Matthias Kloseb9621712010-04-24 17:59:49 +000010318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10319$as_echo "yes" >&6; }
10320 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010321
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010322 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010323 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010324else
Martin v. Löwis11437992002-04-12 09:54:03 +000010325
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010326 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010327 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010328if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010329 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010330
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010331 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010332 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010333else
Guido van Rossumad678af1998-10-02 14:42:15 +000010334
Matthias Kloseb9621712010-04-24 17:59:49 +000010335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10336$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010337if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010338 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010339else
Martin v. Löwis11437992002-04-12 09:54:03 +000010340 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010341LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010343/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010344
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010345/* Override any GCC internal prototype to avoid an error.
10346 Use char because int might match the return type of a GCC
10347 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010348#ifdef __cplusplus
10349extern "C"
10350#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010351char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010352int
10353main ()
10354{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010355return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010356 ;
10357 return 0;
10358}
10359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010360if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010361 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010362else
Matthias Kloseb9621712010-04-24 17:59:49 +000010363 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010364fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010365rm -f core conftest.err conftest.$ac_objext \
10366 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010367LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010368fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10370$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010371if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010372 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010373
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010374 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010375 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010376 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010377else
Greg Steinadf63d62000-07-05 10:38:09 +000010378
Matthias Kloseb9621712010-04-24 17:59:49 +000010379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10380$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010381if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010382 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010383else
Martin v. Löwis11437992002-04-12 09:54:03 +000010384 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010385LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010387/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010389/* Override any GCC internal prototype to avoid an error.
10390 Use char because int might match the return type of a GCC
10391 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010392#ifdef __cplusplus
10393extern "C"
10394#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010395char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010396int
10397main ()
10398{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010399return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010400 ;
10401 return 0;
10402}
10403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010404if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010405 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010406else
Matthias Kloseb9621712010-04-24 17:59:49 +000010407 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010408fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010409rm -f core conftest.err conftest.$ac_objext \
10410 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010411LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010412fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10414$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010415if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010416 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010417
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010418 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010419 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010420 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010421else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010422
Matthias Kloseb9621712010-04-24 17:59:49 +000010423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10424$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010425if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010426 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010427else
Martin v. Löwis11437992002-04-12 09:54:03 +000010428 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010429LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010431/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010433/* Override any GCC internal prototype to avoid an error.
10434 Use char because int might match the return type of a GCC
10435 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010436#ifdef __cplusplus
10437extern "C"
10438#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010439char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010440int
10441main ()
10442{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010443return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010444 ;
10445 return 0;
10446}
10447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010448if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010449 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010450else
Matthias Kloseb9621712010-04-24 17:59:49 +000010451 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010452fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010453rm -f core conftest.err conftest.$ac_objext \
10454 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010455LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10458$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010459if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010460 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010461
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010462 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010463 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010464 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010465else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010466
Matthias Kloseb9621712010-04-24 17:59:49 +000010467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10468$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010469if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010470 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010471else
Martin v. Löwis11437992002-04-12 09:54:03 +000010472 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010473LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010477/* Override any GCC internal prototype to avoid an error.
10478 Use char because int might match the return type of a GCC
10479 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010480#ifdef __cplusplus
10481extern "C"
10482#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010483char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010484int
10485main ()
10486{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010487return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010488 ;
10489 return 0;
10490}
10491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010492if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010493 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010494else
Matthias Kloseb9621712010-04-24 17:59:49 +000010495 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010497rm -f core conftest.err conftest.$ac_objext \
10498 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010499LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010500fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10502$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010503if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010504 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010505
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010506 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010507 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010508 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010509else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010510
Martin v. Löwis130fb172001-07-19 11:00:41 +000010511 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010512fi
10513
Guido van Rossum627b2d71993-12-24 10:39:16 +000010514
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010515fi
10516
Guido van Rossum0be3e491997-05-22 20:33:33 +000010517fi
10518
Guido van Rossum49545951997-12-02 19:28:29 +000010519fi
10520
Guido van Rossumb93a8621998-05-07 13:27:32 +000010521fi
10522
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010524rm -f core conftest.err conftest.$ac_objext \
10525 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010526
Matthias Kloseb9621712010-04-24 17:59:49 +000010527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10528$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010529if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010530 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010531else
Martin v. Löwis11437992002-04-12 09:54:03 +000010532 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010533LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010535/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010537/* Override any GCC internal prototype to avoid an error.
10538 Use char because int might match the return type of a GCC
10539 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010540#ifdef __cplusplus
10541extern "C"
10542#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010543char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010544int
10545main ()
10546{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010547return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010548 ;
10549 return 0;
10550}
10551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010552if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010553 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010554else
Matthias Kloseb9621712010-04-24 17:59:49 +000010555 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010556fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010557rm -f core conftest.err conftest.$ac_objext \
10558 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010559LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010560fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10562$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010563if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010564 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010565
Martin v. Löwis130fb172001-07-19 11:00:41 +000010566 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010567 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010568 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010569fi
10570
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010571
Neal Norwitza978ab02002-11-02 16:58:05 +000010572 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10574$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010575if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010576 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010577else
Martin v. Löwis11437992002-04-12 09:54:03 +000010578 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010579LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010583/* Override any GCC internal prototype to avoid an error.
10584 Use char because int might match the return type of a GCC
10585 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010586#ifdef __cplusplus
10587extern "C"
10588#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010589char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010590int
10591main ()
10592{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010593return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010594 ;
10595 return 0;
10596}
10597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010598if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010599 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010600else
Matthias Kloseb9621712010-04-24 17:59:49 +000010601 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010602fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010603rm -f core conftest.err conftest.$ac_objext \
10604 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010605LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010606fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10608$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010609if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010610 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010611
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010612 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010613 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010614 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010615fi
10616
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010617 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010618fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010619
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010620if test "$posix_threads" = "yes"; then
10621 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010622
Matthias Kloseb9621712010-04-24 17:59:49 +000010623$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010624
10625 fi
10626
10627 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10628 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010629 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010630$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010631
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010632 ;;
10633 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010634$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010635
10636 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010637 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010638$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010639
10640 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010641 esac
10642
Matthias Kloseb9621712010-04-24 17:59:49 +000010643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10644$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010645 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010646 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010647else
Matthias Kloseb9621712010-04-24 17:59:49 +000010648 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010649 ac_cv_pthread_system_supported=no
10650else
Matthias Kloseb9621712010-04-24 17:59:49 +000010651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010652/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010653
10654 #include <stdio.h>
10655 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010656 void *foo(void *parm) {
10657 return NULL;
10658 }
10659 main() {
10660 pthread_attr_t attr;
10661 pthread_t id;
10662 if (pthread_attr_init(&attr)) exit(-1);
10663 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10664 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10665 exit(0);
10666 }
10667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010668if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010669 ac_cv_pthread_system_supported=yes
10670else
Matthias Kloseb9621712010-04-24 17:59:49 +000010671 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010672fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010673rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10674 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010675fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010676
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010677
Guido van Rossum627b2d71993-12-24 10:39:16 +000010678fi
10679
Matthias Kloseb9621712010-04-24 17:59:49 +000010680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10681$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010682 if test "$ac_cv_pthread_system_supported" = "yes"; then
10683
Matthias Kloseb9621712010-04-24 17:59:49 +000010684$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010685
10686 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010687 for ac_func in pthread_sigmask
10688do :
10689 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010690if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010691 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010692#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010693_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010694 case $ac_sys_system in
10695 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010696
Matthias Kloseb9621712010-04-24 17:59:49 +000010697$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010698
10699 ;;
10700 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010701fi
10702done
10703
Christian Heimesf77b4b22013-08-21 13:26:05 +020010704 for ac_func in pthread_atfork
10705do :
10706 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10707if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10708 cat >>confdefs.h <<_ACEOF
10709#define HAVE_PTHREAD_ATFORK 1
10710_ACEOF
10711
10712fi
10713done
10714
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010715fi
10716
10717
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010718# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010719
Matthias Kloseb9621712010-04-24 17:59:49 +000010720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10721$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010722# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010723if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010724 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010725 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10727$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010728 ipv6=no
10729 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010730 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10731$as_echo "yes" >&6; }
10732 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010733
10734 ipv6=yes
10735 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010736 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010737else
Martin v. Löwis11437992002-04-12 09:54:03 +000010738
Matthias Kloseb9621712010-04-24 17:59:49 +000010739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010740/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010741 /* AF_INET6 available check */
10742#include <sys/types.h>
10743#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010744int
10745main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010746{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010747int domain = AF_INET6;
10748 ;
10749 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010750}
Martin v. Löwis11437992002-04-12 09:54:03 +000010751_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010752if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010753
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10755$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010756 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010757
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010758else
Matthias Kloseb159a552010-04-25 21:00:44 +000010759
Matthias Kloseb9621712010-04-24 17:59:49 +000010760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10761$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010762 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010763
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010764fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010766
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010767if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10769$as_echo_n "checking if RFC2553 API is available... " >&6; }
10770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010771/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010772
10773 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010774#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010775int
10776main ()
10777{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010778struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010779 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010780 ;
10781 return 0;
10782}
Matthias Kloseb159a552010-04-25 21:00:44 +000010783
Martin v. Löwis11437992002-04-12 09:54:03 +000010784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010785if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010786
10787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010788$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010789 ipv6=yes
10790
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010791else
Matthias Kloseb159a552010-04-25 21:00:44 +000010792
10793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010794$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010795 ipv6=no
10796
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010799fi
10800
10801if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010802 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010803
10804fi
10805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010806fi
10807
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010808
10809ipv6type=unknown
10810ipv6lib=none
10811ipv6trylibc=no
10812
10813if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10815$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010816 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10817 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010818 case $i in
10819 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010821/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010822
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823#include <netinet/in.h>
10824#ifdef IPV6_INRIA_VERSION
10825yes
10826#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010827_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010828if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010829 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010830 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010831fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010832rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833
10834 ;;
10835 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010837/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010838
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010839#include <netinet/in.h>
10840#ifdef __KAME__
10841yes
10842#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010843_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010844if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010845 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846 ipv6type=$i;
10847 ipv6lib=inet6
10848 ipv6libdir=/usr/local/v6/lib
10849 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010850fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010851rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010852
10853 ;;
10854 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010856/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010857
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010858#include <features.h>
10859#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10860yes
10861#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010862_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010863if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010864 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010865 ipv6type=$i;
10866 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010867fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010868rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010869
10870 ;;
10871 linux-inet6)
10872 if test -d /usr/inet6; then
10873 ipv6type=$i
10874 ipv6lib=inet6
10875 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010876 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010877 fi
10878 ;;
10879 solaris)
10880 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010881 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010882 ipv6type=$i
10883 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010884 fi
10885 fi
10886 ;;
10887 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010889/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010890
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010891#include <sys/param.h>
10892#ifdef _TOSHIBA_INET6
10893yes
10894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010895_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010896if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010897 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010898 ipv6type=$i;
10899 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010900 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010901fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010902rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010903
10904 ;;
10905 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010907/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010908
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010909#include </usr/local/v6/include/sys/v6config.h>
10910#ifdef __V6D__
10911yes
10912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010913_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010914if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010915 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010916 ipv6type=$i;
10917 ipv6lib=v6;
10918 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010919 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010920fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010921rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010922
10923 ;;
10924 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010926/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010927
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010928#include <sys/param.h>
10929#ifdef _ZETA_MINAMI_INET6
10930yes
10931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010932_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010934 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010935 ipv6type=$i;
10936 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010937 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010938fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010939rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010940
10941 ;;
10942 esac
10943 if test "$ipv6type" != "unknown"; then
10944 break
10945 fi
10946 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10948$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010949fi
10950
10951if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10952 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10953 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10954 echo "using lib$ipv6lib"
10955 else
10956 if test $ipv6trylibc = "yes"; then
10957 echo "using libc"
10958 else
10959 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10960 echo "You need to fetch lib$ipv6lib.a from appropriate"
10961 echo 'ipv6 kit and compile beforehand.'
10962 exit 1
10963 fi
10964 fi
10965fi
10966
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10968$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10970/* end confdefs.h. */
10971 /* CAN_RAW_FD_FRAMES available check */
10972#include <linux/can/raw.h>
10973int
10974main ()
10975{
10976int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10977 ;
10978 return 0;
10979}
10980_ACEOF
10981if ac_fn_c_try_compile "$LINENO"; then :
10982
10983
10984$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10985
10986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10987$as_echo "yes" >&6; }
10988
10989else
10990
10991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10992$as_echo "no" >&6; }
10993
10994fi
10995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10996
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010997# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10999$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011000
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011001# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011002if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011003 withval=$with_doc_strings;
11004fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011005
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011006
11007if test -z "$with_doc_strings"
11008then with_doc_strings="yes"
11009fi
11010if test "$with_doc_strings" != "no"
11011then
11012
Matthias Kloseb9621712010-04-24 17:59:49 +000011013$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011014
11015fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11017$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011018
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011019# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11021$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011023# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011024if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011025 withval=$with_pymalloc;
11026fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011027
Neil Schemenauera35c6882001-02-27 04:45:05 +000011028
Neil Schemenauer16c22972002-03-22 15:34:49 +000011029if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011030then
11031 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011032fi
11033if test "$with_pymalloc" != "no"
11034then
Martin v. Löwis11437992002-04-12 09:54:03 +000011035
Matthias Kloseb9621712010-04-24 17:59:49 +000011036$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011037
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011038 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11041$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011042
Benjamin Peterson05159c42009-12-03 03:01:27 +000011043# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11045$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011046
11047# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011048if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011049 withval=$with_valgrind;
11050else
11051 with_valgrind=no
11052fi
11053
Matthias Kloseb9621712010-04-24 17:59:49 +000011054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11055$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011056if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011057 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 +020011058if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011059
Matthias Kloseb9621712010-04-24 17:59:49 +000011060$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011061
11062else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011063 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011064
11065fi
11066
11067
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011068 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011069fi
11070
Łukasz Langaa785c872016-09-09 17:37:37 -070011071# Check for DTrace support
11072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11073$as_echo_n "checking for --with-dtrace... " >&6; }
11074
11075# Check whether --with-dtrace was given.
11076if test "${with_dtrace+set}" = set; then :
11077 withval=$with_dtrace;
11078else
11079 with_dtrace=no
11080fi
11081
11082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11083$as_echo "$with_dtrace" >&6; }
11084
11085
11086
11087
11088
11089DTRACE=
11090DFLAGS=
11091DTRACE_HEADERS=
11092DTRACE_OBJS=
11093
11094if test "$with_dtrace" = "yes"
11095then
11096 # Extract the first word of "dtrace", so it can be a program name with args.
11097set dummy dtrace; ac_word=$2
11098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11099$as_echo_n "checking for $ac_word... " >&6; }
11100if ${ac_cv_path_DTRACE+:} false; then :
11101 $as_echo_n "(cached) " >&6
11102else
11103 case $DTRACE in
11104 [\\/]* | ?:[\\/]*)
11105 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11106 ;;
11107 *)
11108 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11109for as_dir in $PATH
11110do
11111 IFS=$as_save_IFS
11112 test -z "$as_dir" && as_dir=.
11113 for ac_exec_ext in '' $ac_executable_extensions; do
11114 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11115 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11116 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11117 break 2
11118 fi
11119done
11120 done
11121IFS=$as_save_IFS
11122
11123 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11124 ;;
11125esac
11126fi
11127DTRACE=$ac_cv_path_DTRACE
11128if test -n "$DTRACE"; then
11129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11130$as_echo "$DTRACE" >&6; }
11131else
11132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11133$as_echo "no" >&6; }
11134fi
11135
11136
11137 if test "$DTRACE" = "not found"; then
11138 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11139 fi
11140
11141$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11142
11143 DTRACE_HEADERS="Include/pydtrace_probes.h"
11144
11145 # On OS X, DTrace providers do not need to be explicitly compiled and
11146 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11147 # generation flag '-G'. We check for presence of this flag, rather than
11148 # hardcoding support by OS, in the interest of robustness.
11149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11150$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11151if ${ac_cv_dtrace_link+:} false; then :
11152 $as_echo_n "(cached) " >&6
11153else
11154 ac_cv_dtrace_link=no
11155 echo 'BEGIN' > conftest.d
11156 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11157 ac_cv_dtrace_link=yes
11158
11159fi
11160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11161$as_echo "$ac_cv_dtrace_link" >&6; }
11162 if test "$ac_cv_dtrace_link" = "yes"; then
11163 DTRACE_OBJS="Python/pydtrace.o"
11164 fi
11165fi
11166
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011167# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011168
Guido van Rossum98935bf2001-09-05 19:13:16 +000011169DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011170
Guido van Rossume97ee181999-12-20 21:27:22 +000011171# the dlopen() function means we might want to use dynload_shlib.o. some
11172# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011173for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011174do :
11175 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011176if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011177 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011178#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011179_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011180
Guido van Rossume97ee181999-12-20 21:27:22 +000011181fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011182done
Guido van Rossume97ee181999-12-20 21:27:22 +000011183
Michael W. Hudson54241132001-12-07 15:38:26 +000011184
Guido van Rossume97ee181999-12-20 21:27:22 +000011185# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11186# loading of modules.
11187
Matthias Kloseb9621712010-04-24 17:59:49 +000011188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11189$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011190if test -z "$DYNLOADFILE"
11191then
11192 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011193 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11194 if test "$ac_cv_func_dlopen" = yes
11195 then DYNLOADFILE="dynload_shlib.o"
11196 else DYNLOADFILE="dynload_aix.o"
11197 fi
11198 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011199 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011200 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11201 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011202 *)
11203 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11204 # out any dynamic loading
11205 if test "$ac_cv_func_dlopen" = yes
11206 then DYNLOADFILE="dynload_shlib.o"
11207 else DYNLOADFILE="dynload_stub.o"
11208 fi
11209 ;;
11210 esac
11211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11213$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011214if test "$DYNLOADFILE" != "dynload_stub.o"
11215then
Martin v. Löwis11437992002-04-12 09:54:03 +000011216
Matthias Kloseb9621712010-04-24 17:59:49 +000011217$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011218
11219fi
11220
Neil Schemenauer4e425612001-06-19 15:44:15 +000011221# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11222
Michael W. Hudson54241132001-12-07 15:38:26 +000011223
Matthias Kloseb9621712010-04-24 17:59:49 +000011224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11225$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011226if test -z "$MACHDEP_OBJS"
11227then
Jack Jansene578a632001-08-15 01:27:14 +000011228 MACHDEP_OBJS=$extra_machdep_objs
11229else
11230 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011231fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011232if test -z "$MACHDEP_OBJS"; then
11233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11234$as_echo "none" >&6; }
11235else
11236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11237$as_echo "$MACHDEP_OBJS" >&6; }
11238fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011239
Guido van Rossum627b2d71993-12-24 10:39:16 +000011240# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011241for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011242 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011243 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011244 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011245 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011246 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011247 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011248 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011249 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011250 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011251 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011252 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011253 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011254 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011255 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11256 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011257 sigaction sigaltstack siginterrupt sigpending sigrelse \
11258 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011259 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011260 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011261 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011262do :
11263 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11264ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011265if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011266 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011267#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011268_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011269
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011270fi
11271done
11272
Michael W. Hudson54241132001-12-07 15:38:26 +000011273
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011274ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11275 #include <dirent.h>
11276"
11277if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11278
11279$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11280
11281fi
11282
11283
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011284# For some functions, having a definition is not sufficient, since
11285# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11287$as_echo_n "checking for chroot... " >&6; }
11288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011289/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011290#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011291int
11292main ()
11293{
11294void *x=chroot
11295 ;
11296 return 0;
11297}
11298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011299if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011300
Matthias Kloseb9621712010-04-24 17:59:49 +000011301$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011302
Matthias Kloseb159a552010-04-25 21:00:44 +000011303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011304$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011305else
Matthias Kloseb9621712010-04-24 17:59:49 +000011306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11307$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011308
11309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11312$as_echo_n "checking for link... " >&6; }
11313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011314/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011315#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011316int
11317main ()
11318{
11319void *x=link
11320 ;
11321 return 0;
11322}
11323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011324if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011325
Matthias Kloseb9621712010-04-24 17:59:49 +000011326$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011327
Matthias Kloseb159a552010-04-25 21:00:44 +000011328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011329$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011330else
Matthias Kloseb9621712010-04-24 17:59:49 +000011331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11332$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011333
11334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11337$as_echo_n "checking for symlink... " >&6; }
11338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011339/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011340#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011341int
11342main ()
11343{
11344void *x=symlink
11345 ;
11346 return 0;
11347}
11348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011349if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011350
Matthias Kloseb9621712010-04-24 17:59:49 +000011351$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011352
Matthias Kloseb159a552010-04-25 21:00:44 +000011353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011354$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011355else
Matthias Kloseb9621712010-04-24 17:59:49 +000011356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11357$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011358
11359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11362$as_echo_n "checking for fchdir... " >&6; }
11363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011364/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011365#include <unistd.h>
11366int
11367main ()
11368{
11369void *x=fchdir
11370 ;
11371 return 0;
11372}
11373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011375
Matthias Kloseb9621712010-04-24 17:59:49 +000011376$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011377
Matthias Kloseb159a552010-04-25 21:00:44 +000011378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011379$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011380else
Matthias Kloseb9621712010-04-24 17:59:49 +000011381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11382$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011383
11384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11387$as_echo_n "checking for fsync... " >&6; }
11388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011389/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011390#include <unistd.h>
11391int
11392main ()
11393{
11394void *x=fsync
11395 ;
11396 return 0;
11397}
11398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011399if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011400
Matthias Kloseb9621712010-04-24 17:59:49 +000011401$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011402
Matthias Kloseb159a552010-04-25 21:00:44 +000011403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011404$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011405else
Matthias Kloseb9621712010-04-24 17:59:49 +000011406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11407$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011408
11409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11412$as_echo_n "checking for fdatasync... " >&6; }
11413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011414/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011415#include <unistd.h>
11416int
11417main ()
11418{
11419void *x=fdatasync
11420 ;
11421 return 0;
11422}
11423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011424if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011425
Matthias Kloseb9621712010-04-24 17:59:49 +000011426$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011427
Matthias Kloseb159a552010-04-25 21:00:44 +000011428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011429$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011430else
Matthias Kloseb9621712010-04-24 17:59:49 +000011431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11432$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011433
11434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11437$as_echo_n "checking for epoll... " >&6; }
11438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011439/* end confdefs.h. */
11440#include <sys/epoll.h>
11441int
11442main ()
11443{
11444void *x=epoll_create
11445 ;
11446 return 0;
11447}
11448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011449if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011450
Matthias Kloseb9621712010-04-24 17:59:49 +000011451$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011452
Matthias Kloseb159a552010-04-25 21:00:44 +000011453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011454$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011455else
Matthias Kloseb9621712010-04-24 17:59:49 +000011456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11457$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011458
11459fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11462$as_echo_n "checking for epoll_create1... " >&6; }
11463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11464/* end confdefs.h. */
11465#include <sys/epoll.h>
11466int
11467main ()
11468{
11469void *x=epoll_create1
11470 ;
11471 return 0;
11472}
11473_ACEOF
11474if ac_fn_c_try_compile "$LINENO"; then :
11475
11476$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11477
11478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11479$as_echo "yes" >&6; }
11480else
11481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11482$as_echo "no" >&6; }
11483
11484fi
11485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11487$as_echo_n "checking for kqueue... " >&6; }
11488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011489/* end confdefs.h. */
11490
11491#include <sys/types.h>
11492#include <sys/event.h>
11493
11494int
11495main ()
11496{
11497int x=kqueue()
11498 ;
11499 return 0;
11500}
11501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011502if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011503
Matthias Kloseb9621712010-04-24 17:59:49 +000011504$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011505
Matthias Kloseb159a552010-04-25 21:00:44 +000011506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011507$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011508else
Matthias Kloseb9621712010-04-24 17:59:49 +000011509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11510$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011511
11512fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11515$as_echo_n "checking for prlimit... " >&6; }
11516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11517/* end confdefs.h. */
11518
11519#include <sys/time.h>
11520#include <sys/resource.h>
11521
11522int
11523main ()
11524{
11525void *x=prlimit
11526 ;
11527 return 0;
11528}
11529_ACEOF
11530if ac_fn_c_try_compile "$LINENO"; then :
11531
11532$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11533
11534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11535$as_echo "yes" >&6; }
11536else
11537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11538$as_echo "no" >&6; }
11539
11540fi
11541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11542
Martin v. Löwisd5843682002-11-21 20:41:28 +000011543# On some systems (eg. FreeBSD 5), we would find a definition of the
11544# functions ctermid_r, setgroups in the library, but no prototype
11545# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11546# address to avoid compiler warnings and potential miscompilations
11547# because of the missing prototypes.
11548
Matthias Kloseb9621712010-04-24 17:59:49 +000011549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11550$as_echo_n "checking for ctermid_r... " >&6; }
11551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011552/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011553
Martin v. Löwisd5843682002-11-21 20:41:28 +000011554#include <stdio.h>
11555
Martin v. Löwisd5843682002-11-21 20:41:28 +000011556int
11557main ()
11558{
11559void* p = ctermid_r
11560 ;
11561 return 0;
11562}
11563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011564if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011565
Matthias Kloseb9621712010-04-24 17:59:49 +000011566$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011567
Matthias Kloseb159a552010-04-25 21:00:44 +000011568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011569$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011570else
Matthias Kloseb9621712010-04-24 17:59:49 +000011571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11572$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011573
11574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11576
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11578$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011579if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011580 $as_echo_n "(cached) " >&6
11581else
11582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011583/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011584#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011585int
11586main ()
11587{
11588void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011589
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011590 ;
11591 return 0;
11592}
11593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011594if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011595 ac_cv_flock_decl=yes
11596else
11597 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011598
11599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011601
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011602fi
11603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11604$as_echo "$ac_cv_flock_decl" >&6; }
11605if test "x${ac_cv_flock_decl}" = xyes; then
11606 for ac_func in flock
11607do :
11608 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011609if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011610 cat >>confdefs.h <<_ACEOF
11611#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011612_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011613
Antoine Pitroua3000072010-09-07 14:52:42 +000011614else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011616$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011617if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011618 $as_echo_n "(cached) " >&6
11619else
11620 ac_check_lib_save_LIBS=$LIBS
11621LIBS="-lbsd $LIBS"
11622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11623/* end confdefs.h. */
11624
11625/* Override any GCC internal prototype to avoid an error.
11626 Use char because int might match the return type of a GCC
11627 builtin and then its argument prototype would still apply. */
11628#ifdef __cplusplus
11629extern "C"
11630#endif
11631char flock ();
11632int
11633main ()
11634{
11635return flock ();
11636 ;
11637 return 0;
11638}
11639_ACEOF
11640if ac_fn_c_try_link "$LINENO"; then :
11641 ac_cv_lib_bsd_flock=yes
11642else
11643 ac_cv_lib_bsd_flock=no
11644fi
11645rm -f core conftest.err conftest.$ac_objext \
11646 conftest$ac_exeext conftest.$ac_ext
11647LIBS=$ac_check_lib_save_LIBS
11648fi
11649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11650$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011651if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011652 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011653
11654
11655$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11656
11657
11658fi
11659
11660
11661fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011662done
11663
Antoine Pitroua3000072010-09-07 14:52:42 +000011664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011665
Matthias Kloseb9621712010-04-24 17:59:49 +000011666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11667$as_echo_n "checking for getpagesize... " >&6; }
11668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011669/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011670
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011671#include <unistd.h>
11672
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011673int
11674main ()
11675{
11676void* p = getpagesize
11677 ;
11678 return 0;
11679}
11680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011681if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011682
Matthias Kloseb9621712010-04-24 17:59:49 +000011683$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011684
Matthias Kloseb159a552010-04-25 21:00:44 +000011685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011686$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011687else
Matthias Kloseb9621712010-04-24 17:59:49 +000011688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11689$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011690
11691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011693
Victor Stinner984890f2011-11-24 13:53:38 +010011694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11695$as_echo_n "checking for broken unsetenv... " >&6; }
11696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11697/* end confdefs.h. */
11698
11699#include <stdlib.h>
11700
11701int
11702main ()
11703{
11704int res = unsetenv("DUMMY")
11705 ;
11706 return 0;
11707}
11708_ACEOF
11709if ac_fn_c_try_compile "$LINENO"; then :
11710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11711$as_echo "no" >&6; }
11712else
11713
11714$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11715
11716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11717$as_echo "yes" >&6; }
11718
11719fi
11720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11721
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011722for ac_prog in true
11723do
11724 # Extract the first word of "$ac_prog", so it can be a program name with args.
11725set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11727$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011728if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011729 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011730else
11731 if test -n "$TRUE"; then
11732 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11733else
11734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11735for as_dir in $PATH
11736do
11737 IFS=$as_save_IFS
11738 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011739 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011741 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011742 $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 +000011743 break 2
11744 fi
11745done
Matthias Kloseb9621712010-04-24 17:59:49 +000011746 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011747IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011748
11749fi
11750fi
11751TRUE=$ac_cv_prog_TRUE
11752if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11754$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011755else
Matthias Kloseb9621712010-04-24 17:59:49 +000011756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11757$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011758fi
11759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011760
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011761 test -n "$TRUE" && break
11762done
11763test -n "$TRUE" || TRUE="/bin/true"
11764
11765
Matthias Kloseb9621712010-04-24 17:59:49 +000011766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11767$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011768if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011769 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011770else
11771 ac_check_lib_save_LIBS=$LIBS
11772LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011774/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011776/* Override any GCC internal prototype to avoid an error.
11777 Use char because int might match the return type of a GCC
11778 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011779#ifdef __cplusplus
11780extern "C"
11781#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011782char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011783int
11784main ()
11785{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011786return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011787 ;
11788 return 0;
11789}
11790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011791if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011792 ac_cv_lib_c_inet_aton=yes
11793else
Matthias Kloseb9621712010-04-24 17:59:49 +000011794 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011795fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011796rm -f core conftest.err conftest.$ac_objext \
11797 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011798LIBS=$ac_check_lib_save_LIBS
11799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11801$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011802if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011803 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011804else
Matthias Kloseb9621712010-04-24 17:59:49 +000011805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11806$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011807if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011808 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011809else
11810 ac_check_lib_save_LIBS=$LIBS
11811LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011813/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011814
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011815/* Override any GCC internal prototype to avoid an error.
11816 Use char because int might match the return type of a GCC
11817 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011818#ifdef __cplusplus
11819extern "C"
11820#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011821char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011822int
11823main ()
11824{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011825return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011826 ;
11827 return 0;
11828}
11829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011830if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011831 ac_cv_lib_resolv_inet_aton=yes
11832else
Matthias Kloseb9621712010-04-24 17:59:49 +000011833 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011835rm -f core conftest.err conftest.$ac_objext \
11836 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011837LIBS=$ac_check_lib_save_LIBS
11838fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11840$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011841if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011842 cat >>confdefs.h <<_ACEOF
11843#define HAVE_LIBRESOLV 1
11844_ACEOF
11845
11846 LIBS="-lresolv $LIBS"
11847
11848fi
11849
11850
11851fi
11852
11853
Christian Heimesd0764e22007-12-04 15:00:33 +000011854# On Tru64, chflags seems to be present, but calling it will
11855# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11857$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011858if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011859 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011860else
Matthias Kloseb9621712010-04-24 17:59:49 +000011861 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011862 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011863else
Matthias Kloseb9621712010-04-24 17:59:49 +000011864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011865/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011866
Christian Heimesd0764e22007-12-04 15:00:33 +000011867#include <sys/stat.h>
11868#include <unistd.h>
11869int main(int argc, char*argv[])
11870{
11871 if(chflags(argv[0], 0) != 0)
11872 return 1;
11873 return 0;
11874}
Ned Deily3eb67d52011-06-28 00:00:28 -070011875
Christian Heimesd0764e22007-12-04 15:00:33 +000011876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011877if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011878 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011879else
Matthias Kloseb9621712010-04-24 17:59:49 +000011880 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011881fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11883 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011884fi
11885
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011886
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011887fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11889$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011890if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011891 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011892if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011893 ac_cv_have_chflags="yes"
11894else
11895 ac_cv_have_chflags="no"
11896fi
11897
11898fi
11899if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011900
Matthias Kloseb9621712010-04-24 17:59:49 +000011901$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011902
11903fi
11904
Matthias Kloseb9621712010-04-24 17:59:49 +000011905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11906$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011907if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011908 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011909else
Matthias Kloseb9621712010-04-24 17:59:49 +000011910 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011911 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011912else
Matthias Kloseb9621712010-04-24 17:59:49 +000011913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011914/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011915
Christian Heimesd0764e22007-12-04 15:00:33 +000011916#include <sys/stat.h>
11917#include <unistd.h>
11918int main(int argc, char*argv[])
11919{
11920 if(lchflags(argv[0], 0) != 0)
11921 return 1;
11922 return 0;
11923}
Ned Deily3eb67d52011-06-28 00:00:28 -070011924
Christian Heimesd0764e22007-12-04 15:00:33 +000011925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011926if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011927 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011928else
Matthias Kloseb9621712010-04-24 17:59:49 +000011929 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011930fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011931rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11932 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011933fi
11934
11935
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011936fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11938$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011939if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011940 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011941if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011942 ac_cv_have_lchflags="yes"
11943else
11944 ac_cv_have_lchflags="no"
11945fi
11946
11947fi
11948if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011949
Matthias Kloseb9621712010-04-24 17:59:49 +000011950$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011951
11952fi
11953
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011954case $ac_sys_system/$ac_sys_release in
11955Darwin/*)
11956 _CUR_CFLAGS="${CFLAGS}"
11957 _CUR_LDFLAGS="${LDFLAGS}"
11958 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11959 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11960 ;;
11961esac
11962
Matthias Kloseb9621712010-04-24 17:59:49 +000011963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11964$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011965if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011966 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011967else
11968 ac_check_lib_save_LIBS=$LIBS
11969LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011971/* end confdefs.h. */
11972
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011973/* Override any GCC internal prototype to avoid an error.
11974 Use char because int might match the return type of a GCC
11975 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011976#ifdef __cplusplus
11977extern "C"
11978#endif
11979char inflateCopy ();
11980int
11981main ()
11982{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011983return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011984 ;
11985 return 0;
11986}
11987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011988if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011989 ac_cv_lib_z_inflateCopy=yes
11990else
Matthias Kloseb9621712010-04-24 17:59:49 +000011991 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011993rm -f core conftest.err conftest.$ac_objext \
11994 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011995LIBS=$ac_check_lib_save_LIBS
11996fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11998$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011999if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012000
Matthias Kloseb9621712010-04-24 17:59:49 +000012001$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012002
12003fi
12004
12005
12006case $ac_sys_system/$ac_sys_release in
12007Darwin/*)
12008 CFLAGS="${_CUR_CFLAGS}"
12009 LDFLAGS="${_CUR_LDFLAGS}"
12010 ;;
12011esac
12012
Matthias Kloseb9621712010-04-24 17:59:49 +000012013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12014$as_echo_n "checking for hstrerror... " >&6; }
12015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012016/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012017
Martin v. Löwise9416172003-05-03 10:12:45 +000012018#include <netdb.h>
12019
Martin v. Löwise9416172003-05-03 10:12:45 +000012020int
12021main ()
12022{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012023void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012024 ;
12025 return 0;
12026}
12027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012028if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012029
Matthias Kloseb9621712010-04-24 17:59:49 +000012030$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012031
Matthias Kloseb159a552010-04-25 21:00:44 +000012032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012033$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012034else
Matthias Kloseb9621712010-04-24 17:59:49 +000012035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12036$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012037
12038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012039rm -f core conftest.err conftest.$ac_objext \
12040 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012041
Matthias Kloseb9621712010-04-24 17:59:49 +000012042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12043$as_echo_n "checking for inet_aton... " >&6; }
12044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012045/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012046
Martin v. Löwis86d66262006-02-17 08:40:11 +000012047#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012048#include <sys/socket.h>
12049#include <netinet/in.h>
12050#include <arpa/inet.h>
12051
Martin v. Löwise9416172003-05-03 10:12:45 +000012052int
12053main ()
12054{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012055void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012056 ;
12057 return 0;
12058}
12059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012060if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012061
Matthias Kloseb9621712010-04-24 17:59:49 +000012062$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012063
Matthias Kloseb159a552010-04-25 21:00:44 +000012064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012065$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012066else
Matthias Kloseb9621712010-04-24 17:59:49 +000012067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12068$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012069
12070fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012071rm -f core conftest.err conftest.$ac_objext \
12072 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012073
Matthias Kloseb9621712010-04-24 17:59:49 +000012074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12075$as_echo_n "checking for inet_pton... " >&6; }
12076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012077/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012078
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012079#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012080#include <sys/socket.h>
12081#include <netinet/in.h>
12082#include <arpa/inet.h>
12083
Martin v. Löwise9416172003-05-03 10:12:45 +000012084int
12085main ()
12086{
12087void* p = inet_pton
12088 ;
12089 return 0;
12090}
12091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012092if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012093
Matthias Kloseb9621712010-04-24 17:59:49 +000012094$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012095
Matthias Kloseb159a552010-04-25 21:00:44 +000012096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012097$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012098else
Matthias Kloseb9621712010-04-24 17:59:49 +000012099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12100$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012101
12102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012104
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012105# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12107$as_echo_n "checking for setgroups... " >&6; }
12108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012109/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012110
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012111#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012112#ifdef HAVE_GRP_H
12113#include <grp.h>
12114#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012115
Martin v. Löwisd5843682002-11-21 20:41:28 +000012116int
12117main ()
12118{
12119void* p = setgroups
12120 ;
12121 return 0;
12122}
12123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012124if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012125
Matthias Kloseb9621712010-04-24 17:59:49 +000012126$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012127
Matthias Kloseb159a552010-04-25 21:00:44 +000012128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012129$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012130else
Matthias Kloseb9621712010-04-24 17:59:49 +000012131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12132$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012133
12134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012136
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012137# check for openpty and forkpty
12138
12139for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012140do :
12141 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012142if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012143 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012144#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012145_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012146
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012147else
Matthias Kloseb9621712010-04-24 17:59:49 +000012148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12149$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012150if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012151 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012152else
Martin v. Löwis11437992002-04-12 09:54:03 +000012153 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012154LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012158/* Override any GCC internal prototype to avoid an error.
12159 Use char because int might match the return type of a GCC
12160 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012161#ifdef __cplusplus
12162extern "C"
12163#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012164char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012165int
12166main ()
12167{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012168return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012169 ;
12170 return 0;
12171}
12172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012173if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012174 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012175else
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012178rm -f core conftest.err conftest.$ac_objext \
12179 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012180LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12183$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012184if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012186 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012187else
Matthias Kloseb9621712010-04-24 17:59:49 +000012188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12189$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012190if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012191 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012192else
12193 ac_check_lib_save_LIBS=$LIBS
12194LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012196/* end confdefs.h. */
12197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012198/* Override any GCC internal prototype to avoid an error.
12199 Use char because int might match the return type of a GCC
12200 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012201#ifdef __cplusplus
12202extern "C"
12203#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012204char openpty ();
12205int
12206main ()
12207{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012208return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012209 ;
12210 return 0;
12211}
12212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012213if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012214 ac_cv_lib_bsd_openpty=yes
12215else
Matthias Kloseb9621712010-04-24 17:59:49 +000012216 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012217fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012218rm -f core conftest.err conftest.$ac_objext \
12219 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012220LIBS=$ac_check_lib_save_LIBS
12221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12223$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012224if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012225 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012226 LIBS="$LIBS -lbsd"
12227fi
12228
12229
12230fi
12231
Fred Drake8cef4cf2000-06-28 16:40:38 +000012232
12233fi
12234done
12235
12236for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012237do :
12238 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012239if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012240 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012241#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012242_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012243
Fred Drake8cef4cf2000-06-28 16:40:38 +000012244else
Matthias Kloseb9621712010-04-24 17:59:49 +000012245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12246$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012247if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012248 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012249else
Martin v. Löwis11437992002-04-12 09:54:03 +000012250 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012251LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012254
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012255/* Override any GCC internal prototype to avoid an error.
12256 Use char because int might match the return type of a GCC
12257 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012258#ifdef __cplusplus
12259extern "C"
12260#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012261char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012262int
12263main ()
12264{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012265return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012266 ;
12267 return 0;
12268}
12269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012270if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012271 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012272else
Matthias Kloseb9621712010-04-24 17:59:49 +000012273 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012275rm -f core conftest.err conftest.$ac_objext \
12276 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012277LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12280$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012281if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012282 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012283 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012284else
Matthias Kloseb9621712010-04-24 17:59:49 +000012285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12286$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012287if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012288 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012289else
12290 ac_check_lib_save_LIBS=$LIBS
12291LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012293/* end confdefs.h. */
12294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012295/* Override any GCC internal prototype to avoid an error.
12296 Use char because int might match the return type of a GCC
12297 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012298#ifdef __cplusplus
12299extern "C"
12300#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012301char forkpty ();
12302int
12303main ()
12304{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012305return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012306 ;
12307 return 0;
12308}
12309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012310if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012311 ac_cv_lib_bsd_forkpty=yes
12312else
Matthias Kloseb9621712010-04-24 17:59:49 +000012313 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012314fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012315rm -f core conftest.err conftest.$ac_objext \
12316 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012317LIBS=$ac_check_lib_save_LIBS
12318fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12320$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012321if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012322 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012323 LIBS="$LIBS -lbsd"
12324fi
12325
12326
12327fi
12328
Fred Drake8cef4cf2000-06-28 16:40:38 +000012329
12330fi
12331done
12332
Jack Jansendd19cf82001-12-06 22:36:17 +000012333
Christian Heimesb186d002008-03-18 15:15:01 +000012334# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012335for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012336do :
12337 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012338if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012339 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012340#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012341_ACEOF
12342
12343fi
12344done
12345
12346
Michael W. Hudson54241132001-12-07 15:38:26 +000012347# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012348for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012349do :
12350 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12351ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012352if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012353 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012354#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012355_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012356
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012357fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012358done
12359
Michael W. Hudson54241132001-12-07 15:38:26 +000012360
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012361ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012362if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012363 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012364
Martin v. Löwis1142de32002-03-29 16:28:31 +000012365else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012366 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012367 *" dup2.$ac_objext "* ) ;;
12368 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012370esac
12371
Martin v. Löwis1142de32002-03-29 16:28:31 +000012372fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012373
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012374ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012375if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012376 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12377
12378else
12379 case " $LIBOBJS " in
12380 *" strdup.$ac_objext "* ) ;;
12381 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12382 ;;
12383esac
12384
12385fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012386
12387
12388for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012389do :
12390 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012391if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012392 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012393#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012396/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012397#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012398int
12399main ()
12400{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012401getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012402 ;
12403 return 0;
12404}
12405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012406if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012407
Matthias Kloseb9621712010-04-24 17:59:49 +000012408$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012409
Guido van Rossum627b2d71993-12-24 10:39:16 +000012410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012412
Guido van Rossum627b2d71993-12-24 10:39:16 +000012413fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012414done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012415
Jack Jansen150753c2003-03-29 22:07:47 +000012416for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012417do :
12418 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012419if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012420 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012421#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012424/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012425#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012426int
12427main ()
12428{
12429setpgrp(0,0);
12430 ;
12431 return 0;
12432}
12433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012434if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012435
Matthias Kloseb9621712010-04-24 17:59:49 +000012436$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012437
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012440
12441fi
12442done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012443
Thomas Wouters3a584202000-08-05 23:28:51 +000012444for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012445do :
12446 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012447if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012448 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012449#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012452/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012453#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012454int
12455main ()
12456{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012457gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012458 ;
12459 return 0;
12460}
12461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012462if ac_fn_c_try_compile "$LINENO"; then :
12463
Guido van Rossum627b2d71993-12-24 10:39:16 +000012464else
Skip Montanaro6dead952003-09-25 14:50:04 +000012465
Matthias Kloseb9621712010-04-24 17:59:49 +000012466$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012467
Martin v. Löwis11437992002-04-12 09:54:03 +000012468
Guido van Rossum627b2d71993-12-24 10:39:16 +000012469fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012471
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012472fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012473done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012474
Michael W. Hudson54241132001-12-07 15:38:26 +000012475
Victor Stinnere0be4232011-10-25 13:06:09 +020012476for ac_func in clock_gettime
12477do :
12478 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12479if test "x$ac_cv_func_clock_gettime" = xyes; then :
12480 cat >>confdefs.h <<_ACEOF
12481#define HAVE_CLOCK_GETTIME 1
12482_ACEOF
12483
12484else
12485
12486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12487$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12488if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12489 $as_echo_n "(cached) " >&6
12490else
12491 ac_check_lib_save_LIBS=$LIBS
12492LIBS="-lrt $LIBS"
12493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12494/* end confdefs.h. */
12495
12496/* Override any GCC internal prototype to avoid an error.
12497 Use char because int might match the return type of a GCC
12498 builtin and then its argument prototype would still apply. */
12499#ifdef __cplusplus
12500extern "C"
12501#endif
12502char clock_gettime ();
12503int
12504main ()
12505{
12506return clock_gettime ();
12507 ;
12508 return 0;
12509}
12510_ACEOF
12511if ac_fn_c_try_link "$LINENO"; then :
12512 ac_cv_lib_rt_clock_gettime=yes
12513else
12514 ac_cv_lib_rt_clock_gettime=no
12515fi
12516rm -f core conftest.err conftest.$ac_objext \
12517 conftest$ac_exeext conftest.$ac_ext
12518LIBS=$ac_check_lib_save_LIBS
12519fi
12520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12521$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12522if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12523
Victor Stinner7efb8332014-08-29 15:41:08 +020012524 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012525 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12526
12527
12528$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12529
12530
12531fi
12532
12533
12534fi
12535done
12536
12537
12538for ac_func in clock_getres
12539do :
12540 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12541if test "x$ac_cv_func_clock_getres" = xyes; then :
12542 cat >>confdefs.h <<_ACEOF
12543#define HAVE_CLOCK_GETRES 1
12544_ACEOF
12545
12546else
12547
12548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12549$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12550if ${ac_cv_lib_rt_clock_getres+:} false; then :
12551 $as_echo_n "(cached) " >&6
12552else
12553 ac_check_lib_save_LIBS=$LIBS
12554LIBS="-lrt $LIBS"
12555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12556/* end confdefs.h. */
12557
12558/* Override any GCC internal prototype to avoid an error.
12559 Use char because int might match the return type of a GCC
12560 builtin and then its argument prototype would still apply. */
12561#ifdef __cplusplus
12562extern "C"
12563#endif
12564char clock_getres ();
12565int
12566main ()
12567{
12568return clock_getres ();
12569 ;
12570 return 0;
12571}
12572_ACEOF
12573if ac_fn_c_try_link "$LINENO"; then :
12574 ac_cv_lib_rt_clock_getres=yes
12575else
12576 ac_cv_lib_rt_clock_getres=no
12577fi
12578rm -f core conftest.err conftest.$ac_objext \
12579 conftest$ac_exeext conftest.$ac_ext
12580LIBS=$ac_check_lib_save_LIBS
12581fi
12582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12583$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12584if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12585
12586 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12587
12588
12589fi
12590
12591
12592fi
12593done
12594
12595
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012596for ac_func in clock_settime
12597do :
12598 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12599if test "x$ac_cv_func_clock_settime" = xyes; then :
12600 cat >>confdefs.h <<_ACEOF
12601#define HAVE_CLOCK_SETTIME 1
12602_ACEOF
12603
12604else
12605
12606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12607$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12608if ${ac_cv_lib_rt_clock_settime+:} false; then :
12609 $as_echo_n "(cached) " >&6
12610else
12611 ac_check_lib_save_LIBS=$LIBS
12612LIBS="-lrt $LIBS"
12613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12614/* end confdefs.h. */
12615
12616/* Override any GCC internal prototype to avoid an error.
12617 Use char because int might match the return type of a GCC
12618 builtin and then its argument prototype would still apply. */
12619#ifdef __cplusplus
12620extern "C"
12621#endif
12622char clock_settime ();
12623int
12624main ()
12625{
12626return clock_settime ();
12627 ;
12628 return 0;
12629}
12630_ACEOF
12631if ac_fn_c_try_link "$LINENO"; then :
12632 ac_cv_lib_rt_clock_settime=yes
12633else
12634 ac_cv_lib_rt_clock_settime=no
12635fi
12636rm -f core conftest.err conftest.$ac_objext \
12637 conftest$ac_exeext conftest.$ac_ext
12638LIBS=$ac_check_lib_save_LIBS
12639fi
12640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12641$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12642if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12643
12644 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12645
12646
12647fi
12648
12649
12650fi
12651done
12652
12653
Matthias Kloseb9621712010-04-24 17:59:49 +000012654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12655$as_echo_n "checking for major... " >&6; }
12656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012657/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012658
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012659#if defined(MAJOR_IN_MKDEV)
12660#include <sys/mkdev.h>
12661#elif defined(MAJOR_IN_SYSMACROS)
12662#include <sys/sysmacros.h>
12663#else
12664#include <sys/types.h>
12665#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012666
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012667int
12668main ()
12669{
12670
12671 makedev(major(0),minor(0));
12672
12673 ;
12674 return 0;
12675}
12676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012677if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012678
12679
Matthias Kloseb9621712010-04-24 17:59:49 +000012680$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012681
Matthias Kloseb9621712010-04-24 17:59:49 +000012682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12683$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012684
12685else
Skip Montanaro6dead952003-09-25 14:50:04 +000012686
Matthias Kloseb9621712010-04-24 17:59:49 +000012687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12688$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012689
12690fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012691rm -f core conftest.err conftest.$ac_objext \
12692 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012693
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012694# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12695# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12697$as_echo_n "checking for if_nameindex... " >&6; }
12698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12699/* end confdefs.h. */
12700
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012701#include <stdio.h>
12702#ifdef STDC_HEADERS
12703# include <stdlib.h>
12704# include <stddef.h>
12705#else
12706# ifdef HAVE_STDLIB_H
12707# include <stdlib.h>
12708# endif
12709#endif
12710#ifdef HAVE_SYS_SOCKET_H
12711# include <sys/socket.h>
12712#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012713#ifdef HAVE_NET_IF_H
12714# include <net/if.h>
12715#endif
12716
12717int
12718main ()
12719{
12720struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12721 ;
12722 return 0;
12723}
12724_ACEOF
12725if ac_fn_c_try_link "$LINENO"; then :
12726
12727$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12728
12729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12730$as_echo "yes" >&6; }
12731else
12732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12733$as_echo "no" >&6; }
12734
12735fi
12736rm -f core conftest.err conftest.$ac_objext \
12737 conftest$ac_exeext conftest.$ac_ext
12738
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012739# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12740# macro is not defined in android-ndk-r13.
12741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12742$as_echo_n "checking for lockf... " >&6; }
12743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12744/* end confdefs.h. */
12745#include <unistd.h>
12746int
12747main ()
12748{
12749lockf(0, F_LOCK, 0);
12750 ;
12751 return 0;
12752}
12753_ACEOF
12754if ac_fn_c_try_link "$LINENO"; then :
12755
12756$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12757
12758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12759$as_echo "yes" >&6; }
12760else
12761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12762$as_echo "no" >&6; }
12763
12764fi
12765rm -f core conftest.err conftest.$ac_objext \
12766 conftest$ac_exeext conftest.$ac_ext
12767
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012768# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012769# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12771$as_echo_n "checking for getaddrinfo... " >&6; }
12772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012773/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012774
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012775#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012776#include <sys/socket.h>
12777#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012778#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012779
Martin v. Löwis11437992002-04-12 09:54:03 +000012780int
12781main ()
12782{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012783getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012784 ;
12785 return 0;
12786}
12787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012788if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012789 have_getaddrinfo=yes
12790else
Matthias Kloseb9621712010-04-24 17:59:49 +000012791 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012793rm -f core conftest.err conftest.$ac_objext \
12794 conftest$ac_exeext conftest.$ac_ext
12795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12796$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012797if test $have_getaddrinfo = yes
12798then
Matthias Kloseb9621712010-04-24 17:59:49 +000012799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12800$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012801 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012802 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012803else
Matthias Kloseb9621712010-04-24 17:59:49 +000012804 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012805
12806if test "${enable_ipv6+set}" = set; then
12807 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12808else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012809 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012810fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012811else
Matthias Kloseb9621712010-04-24 17:59:49 +000012812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012813/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012814
Stefan Krah19c21392012-11-22 23:47:32 +010012815#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012816#include <sys/types.h>
12817#include <netdb.h>
12818#include <string.h>
12819#include <sys/socket.h>
12820#include <netinet/in.h>
12821
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012822int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012823{
12824 int passive, gaierr, inet4 = 0, inet6 = 0;
12825 struct addrinfo hints, *ai, *aitop;
12826 char straddr[INET6_ADDRSTRLEN], strport[16];
12827
12828 for (passive = 0; passive <= 1; passive++) {
12829 memset(&hints, 0, sizeof(hints));
12830 hints.ai_family = AF_UNSPEC;
12831 hints.ai_flags = passive ? AI_PASSIVE : 0;
12832 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012833 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012834 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12835 (void)gai_strerror(gaierr);
12836 goto bad;
12837 }
12838 for (ai = aitop; ai; ai = ai->ai_next) {
12839 if (ai->ai_addr == NULL ||
12840 ai->ai_addrlen == 0 ||
12841 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12842 straddr, sizeof(straddr), strport, sizeof(strport),
12843 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12844 goto bad;
12845 }
12846 switch (ai->ai_family) {
12847 case AF_INET:
12848 if (strcmp(strport, "54321") != 0) {
12849 goto bad;
12850 }
12851 if (passive) {
12852 if (strcmp(straddr, "0.0.0.0") != 0) {
12853 goto bad;
12854 }
12855 } else {
12856 if (strcmp(straddr, "127.0.0.1") != 0) {
12857 goto bad;
12858 }
12859 }
12860 inet4++;
12861 break;
12862 case AF_INET6:
12863 if (strcmp(strport, "54321") != 0) {
12864 goto bad;
12865 }
12866 if (passive) {
12867 if (strcmp(straddr, "::") != 0) {
12868 goto bad;
12869 }
12870 } else {
12871 if (strcmp(straddr, "::1") != 0) {
12872 goto bad;
12873 }
12874 }
12875 inet6++;
12876 break;
12877 case AF_UNSPEC:
12878 goto bad;
12879 break;
12880 default:
12881 /* another family support? */
12882 break;
12883 }
12884 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012885 freeaddrinfo(aitop);
12886 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012887 }
12888
12889 if (!(inet4 == 0 || inet4 == 2))
12890 goto bad;
12891 if (!(inet6 == 0 || inet6 == 2))
12892 goto bad;
12893
12894 if (aitop)
12895 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012896 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012897
12898 bad:
12899 if (aitop)
12900 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012901 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012902}
12903
Martin v. Löwis11437992002-04-12 09:54:03 +000012904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012905if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012906 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012907else
Matthias Kloseb9621712010-04-24 17:59:49 +000012908 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012909fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12911 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012913
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012914fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012915
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012917
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12919$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12920
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012921if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012922then
12923 if test $ipv6 = yes
12924 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012925 echo 'Fatal: You must get working getaddrinfo() function.'
12926 echo ' or you can specify "--disable-ipv6"'.
12927 exit 1
12928 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012929else
Martin v. Löwis11437992002-04-12 09:54:03 +000012930
Matthias Kloseb9621712010-04-24 17:59:49 +000012931$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012932
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012933fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012934
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012935for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012936do :
12937 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012938if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012939 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012940#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012941_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012942
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012943fi
12944done
12945
Michael W. Hudson54241132001-12-07 15:38:26 +000012946
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012947# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12949$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012950if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012951 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012952else
Matthias Kloseb9621712010-04-24 17:59:49 +000012953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012954/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012955#include <sys/types.h>
12956#include <sys/time.h>
12957#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012958
Martin v. Löwis11437992002-04-12 09:54:03 +000012959int
12960main ()
12961{
12962if ((struct tm *) 0)
12963return 0;
12964 ;
12965 return 0;
12966}
12967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012968if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012969 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012970else
Matthias Kloseb9621712010-04-24 17:59:49 +000012971 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012974fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12976$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012977if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012978
Matthias Kloseb9621712010-04-24 17:59:49 +000012979$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012980
12981fi
12982
Matthias Kloseb9621712010-04-24 17:59:49 +000012983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12984$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012985if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012986 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012987else
Matthias Kloseb9621712010-04-24 17:59:49 +000012988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012989/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012990#include <sys/types.h>
12991#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012992
Martin v. Löwis11437992002-04-12 09:54:03 +000012993int
12994main ()
12995{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012996struct tm tm;
12997 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012998 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012999 ;
13000 return 0;
13001}
13002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013003if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013004 ac_cv_struct_tm=time.h
13005else
Matthias Kloseb9621712010-04-24 17:59:49 +000013006 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13011$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013012if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013013
Matthias Kloseb9621712010-04-24 17:59:49 +000013014$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013015
13016fi
13017
Matthias Kloseb9621712010-04-24 17:59:49 +000013018ac_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 +000013019#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013020
Matthias Kloseb9621712010-04-24 17:59:49 +000013021"
Victor Stinnere0be4232011-10-25 13:06:09 +020013022if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013023
13024cat >>confdefs.h <<_ACEOF
13025#define HAVE_STRUCT_TM_TM_ZONE 1
13026_ACEOF
13027
13028
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013029fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013030
Martin v. Löwis11437992002-04-12 09:54:03 +000013031if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13032
Matthias Kloseb9621712010-04-24 17:59:49 +000013033$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013034
13035else
Matthias Kloseb9621712010-04-24 17:59:49 +000013036 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13037"
Victor Stinnere0be4232011-10-25 13:06:09 +020013038if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013039 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013040else
Matthias Kloseb9621712010-04-24 17:59:49 +000013041 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013042fi
13043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013044cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013045#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013046_ACEOF
13047
Matthias Kloseb9621712010-04-24 17:59:49 +000013048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13049$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013050if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013051 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013052else
Matthias Kloseb9621712010-04-24 17:59:49 +000013053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013054/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013055#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013056#if !HAVE_DECL_TZNAME
13057extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013058#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013059
Martin v. Löwis11437992002-04-12 09:54:03 +000013060int
13061main ()
13062{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013063return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013064 ;
13065 return 0;
13066}
13067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013068if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013069 ac_cv_var_tzname=yes
13070else
Matthias Kloseb9621712010-04-24 17:59:49 +000013071 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013073rm -f core conftest.err conftest.$ac_objext \
13074 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13077$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013078 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013079
Matthias Kloseb9621712010-04-24 17:59:49 +000013080$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013081
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013082 fi
13083fi
13084
Matthias Kloseb9621712010-04-24 17:59:49 +000013085ac_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 +020013086if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013087
13088cat >>confdefs.h <<_ACEOF
13089#define HAVE_STRUCT_STAT_ST_RDEV 1
13090_ACEOF
13091
13092
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013093fi
13094
Matthias Kloseb9621712010-04-24 17:59:49 +000013095ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013096if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013097
Martin v. Löwis11437992002-04-12 09:54:03 +000013098cat >>confdefs.h <<_ACEOF
13099#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13100_ACEOF
13101
13102
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013103fi
13104
Matthias Kloseb9621712010-04-24 17:59:49 +000013105ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013106if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013107
13108cat >>confdefs.h <<_ACEOF
13109#define HAVE_STRUCT_STAT_ST_FLAGS 1
13110_ACEOF
13111
13112
13113fi
13114
Matthias Kloseb9621712010-04-24 17:59:49 +000013115ac_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 +020013116if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013117
13118cat >>confdefs.h <<_ACEOF
13119#define HAVE_STRUCT_STAT_ST_GEN 1
13120_ACEOF
13121
13122
13123fi
13124
Matthias Kloseb9621712010-04-24 17:59:49 +000013125ac_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 +020013126if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013127
13128cat >>confdefs.h <<_ACEOF
13129#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13130_ACEOF
13131
13132
13133fi
13134
Matthias Kloseb9621712010-04-24 17:59:49 +000013135ac_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 +020013136if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013137
Martin v. Löwis11437992002-04-12 09:54:03 +000013138cat >>confdefs.h <<_ACEOF
13139#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13140_ACEOF
13141
13142
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013143fi
13144
Stefan Krah267b6392016-04-26 01:09:18 +020013145ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13146 #include <sys/types.h>
13147 #include <pwd.h>
13148
13149"
13150if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13151
13152cat >>confdefs.h <<_ACEOF
13153#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13154_ACEOF
13155
13156
13157fi
13158ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13159 #include <sys/types.h>
13160 #include <pwd.h>
13161
13162"
13163if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13164
13165cat >>confdefs.h <<_ACEOF
13166#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13167_ACEOF
13168
13169
13170fi
13171
Zachary Ware6a6967e2016-10-01 00:47:27 -050013172# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13173ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13174"
13175if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13176
13177cat >>confdefs.h <<_ACEOF
13178#define HAVE_SIGINFO_T_SI_BAND 1
13179_ACEOF
13180
13181
13182fi
13183
Michael W. Hudson54241132001-12-07 15:38:26 +000013184
Matthias Kloseb9621712010-04-24 17:59:49 +000013185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13186$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013187if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013188 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013189else
Matthias Kloseb159a552010-04-25 21:00:44 +000013190
Matthias Kloseb9621712010-04-24 17:59:49 +000013191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013192/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013193#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013194int
13195main ()
13196{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013197return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013198 ;
13199 return 0;
13200}
13201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013202if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013203 ac_cv_header_time_altzone=yes
13204else
Matthias Kloseb9621712010-04-24 17:59:49 +000013205 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013208
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013209fi
13210
Matthias Kloseb9621712010-04-24 17:59:49 +000013211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13212$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013213if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013216
13217fi
13218
Guido van Rossumda88dad1995-01-26 00:46:29 +000013219was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13221$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013223/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013224
13225#include <sys/types.h>
13226#include <sys/select.h>
13227#include <sys/time.h>
13228
Martin v. Löwis11437992002-04-12 09:54:03 +000013229int
13230main ()
13231{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013232;
Martin v. Löwis11437992002-04-12 09:54:03 +000013233 ;
13234 return 0;
13235}
13236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013237if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013238
13239
Matthias Kloseb9621712010-04-24 17:59:49 +000013240$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013241
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013242 was_it_defined=yes
13243
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13247$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013248
Matthias Kloseb9621712010-04-24 17:59:49 +000013249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13250$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013251if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013252 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013253else
Matthias Kloseb9621712010-04-24 17:59:49 +000013254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013255/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013256#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013257int
13258main ()
13259{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013260struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013261 ;
13262 return 0;
13263}
13264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013265if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013266 ac_cv_struct_addrinfo=yes
13267else
Matthias Kloseb9621712010-04-24 17:59:49 +000013268 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13271fi
13272
Matthias Kloseb9621712010-04-24 17:59:49 +000013273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13274$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013275if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013276
Matthias Kloseb9621712010-04-24 17:59:49 +000013277$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013278
13279fi
13280
Matthias Kloseb9621712010-04-24 17:59:49 +000013281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13282$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013283if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013284 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013285else
Matthias Kloseb9621712010-04-24 17:59:49 +000013286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013287/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013288
13289# include <sys/types.h>
13290# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013291int
13292main ()
13293{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013294struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013295 ;
13296 return 0;
13297}
13298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013299if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013300 ac_cv_struct_sockaddr_storage=yes
13301else
Matthias Kloseb9621712010-04-24 17:59:49 +000013302 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13305fi
13306
Matthias Kloseb9621712010-04-24 17:59:49 +000013307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13308$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013309if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013310
Matthias Kloseb9621712010-04-24 17:59:49 +000013311$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013312
13313fi
13314
Christian Heimesdffa3942016-09-05 23:54:41 +020013315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13316$as_echo_n "checking for sockaddr_alg... " >&6; }
13317if ${ac_cv_struct_sockaddr_alg+:} false; then :
13318 $as_echo_n "(cached) " >&6
13319else
13320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13321/* end confdefs.h. */
13322
13323# include <sys/types.h>
13324# include <sys/socket.h>
13325# include <linux/if_alg.h>
13326int
13327main ()
13328{
13329struct sockaddr_alg s
13330 ;
13331 return 0;
13332}
13333_ACEOF
13334if ac_fn_c_try_compile "$LINENO"; then :
13335 ac_cv_struct_sockaddr_alg=yes
13336else
13337 ac_cv_struct_sockaddr_alg=no
13338fi
13339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13340fi
13341
13342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13343$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13344if test $ac_cv_struct_sockaddr_alg = yes; then
13345
13346$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13347
13348fi
13349
Guido van Rossum627b2d71993-12-24 10:39:16 +000013350# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013351
Matthias Kloseb9621712010-04-24 17:59:49 +000013352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13353$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013354if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013355 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013356else
Matthias Kloseb9621712010-04-24 17:59:49 +000013357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013358/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013359$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013360int
13361main ()
13362{
13363static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013364test_array [0] = 0;
13365return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013366
13367 ;
13368 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013369}
Martin v. Löwis11437992002-04-12 09:54:03 +000013370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013371if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013372 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013373else
Matthias Kloseb9621712010-04-24 17:59:49 +000013374 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013377fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13379$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013380if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013381 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013382
13383fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013384
Matthias Kloseb9621712010-04-24 17:59:49 +000013385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13386$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013387if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013388 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013389else
Matthias Kloseb9621712010-04-24 17:59:49 +000013390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013391/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013392
Martin v. Löwis11437992002-04-12 09:54:03 +000013393int
13394main ()
13395{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013396
Martin v. Löwis11437992002-04-12 09:54:03 +000013397#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013398 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013399 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013400 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013401 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013402 char const *const *pcpcc;
13403 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013404 /* NEC SVR4.0.2 mips cc rejects this. */
13405 struct point {int x, y;};
13406 static struct point const zero = {0,0};
13407 /* AIX XL C 1.02.0.0 rejects this.
13408 It does not let you subtract one const X* pointer from another in
13409 an arm of an if-expression whose if-part is not a constant
13410 expression */
13411 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013412 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013413 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013414 ++pcpcc;
13415 ppc = (char**) pcpcc;
13416 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013417 { /* SCO 3.2v4 cc rejects this sort of thing. */
13418 char tx;
13419 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013421
Martin v. Löwis11437992002-04-12 09:54:03 +000013422 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013423 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013424 }
13425 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13426 int x[] = {25, 17};
13427 const int *foo = &x[0];
13428 ++foo;
13429 }
13430 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13431 typedef const int *iptr;
13432 iptr p = 0;
13433 ++p;
13434 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013435 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013436 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013437 struct s { int j; const int *ap[3]; } bx;
13438 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013439 }
13440 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13441 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013442 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013444 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013445#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013446
Martin v. Löwis11437992002-04-12 09:54:03 +000013447 ;
13448 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013449}
Martin v. Löwis11437992002-04-12 09:54:03 +000013450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013451if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013452 ac_cv_c_const=yes
13453else
Matthias Kloseb9621712010-04-24 17:59:49 +000013454 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013457fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13459$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013460if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013461
Matthias Kloseb9621712010-04-24 17:59:49 +000013462$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013463
13464fi
13465
Michael W. Hudson54241132001-12-07 15:38:26 +000013466
Guido van Rossumda88dad1995-01-26 00:46:29 +000013467works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13469$as_echo_n "checking for working volatile... " >&6; }
13470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013471/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013472
Martin v. Löwis11437992002-04-12 09:54:03 +000013473int
13474main ()
13475{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013476volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013477 ;
13478 return 0;
13479}
13480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013481if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013482 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013483else
Skip Montanaro6dead952003-09-25 14:50:04 +000013484
Matthias Kloseb9621712010-04-24 17:59:49 +000013485$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013486
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013487
Guido van Rossum627b2d71993-12-24 10:39:16 +000013488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13491$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013492
Guido van Rossumda88dad1995-01-26 00:46:29 +000013493works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13495$as_echo_n "checking for working signed char... " >&6; }
13496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013497/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013498
Martin v. Löwis11437992002-04-12 09:54:03 +000013499int
13500main ()
13501{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013502signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013503 ;
13504 return 0;
13505}
13506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013507if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013508 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013509else
Skip Montanaro6dead952003-09-25 14:50:04 +000013510
Matthias Kloseb9621712010-04-24 17:59:49 +000013511$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013512
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013513
Guido van Rossum7f43da71994-08-01 12:15:30 +000013514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13517$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013518
Guido van Rossumda88dad1995-01-26 00:46:29 +000013519have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13521$as_echo_n "checking for prototypes... " >&6; }
13522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013523/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013524int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013525int
13526main ()
13527{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013528return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013529 ;
13530 return 0;
13531}
13532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013533if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013534
Matthias Kloseb9621712010-04-24 17:59:49 +000013535$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013536
Matthias Kloseb159a552010-04-25 21:00:44 +000013537 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13541$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013542
Guido van Rossumda88dad1995-01-26 00:46:29 +000013543works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13545$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013547/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013548
13549#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013550int foo(int x, ...) {
13551 va_list va;
13552 va_start(va, x);
13553 va_arg(va, int);
13554 va_arg(va, char *);
13555 va_arg(va, double);
13556 return 0;
13557}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013558
Martin v. Löwis11437992002-04-12 09:54:03 +000013559int
13560main ()
13561{
Guido van Rossum90eea071996-08-30 20:58:57 +000013562return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013563 ;
13564 return 0;
13565}
13566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013567if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013568
13569
Matthias Kloseb9621712010-04-24 17:59:49 +000013570$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013571
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013572 works=yes
13573
Guido van Rossum627b2d71993-12-24 10:39:16 +000013574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13577$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013578
Martin v. Löwisd6320502004-08-12 13:45:08 +000013579# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13581$as_echo_n "checking for socketpair... " >&6; }
13582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013583/* end confdefs.h. */
13584
13585#include <sys/types.h>
13586#include <sys/socket.h>
13587
13588int
13589main ()
13590{
13591void *x=socketpair
13592 ;
13593 return 0;
13594}
13595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013596if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013597
Matthias Kloseb9621712010-04-24 17:59:49 +000013598$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013599
Matthias Kloseb159a552010-04-25 21:00:44 +000013600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013601$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013602else
Matthias Kloseb9621712010-04-24 17:59:49 +000013603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13604$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013605
13606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013608
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013609# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13611$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013613/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013614#include <sys/types.h>
13615#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013616int
13617main ()
13618{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013619struct sockaddr x;
13620x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013621 ;
13622 return 0;
13623}
13624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013625if ac_fn_c_try_compile "$LINENO"; then :
13626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13627$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013628
Matthias Kloseb9621712010-04-24 17:59:49 +000013629$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013630
13631else
Matthias Kloseb9621712010-04-24 17:59:49 +000013632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13633$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013634
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013637
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013638# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013639
13640
Matthias Kloseb9621712010-04-24 17:59:49 +000013641ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013642if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013643
Matthias Kloseb9621712010-04-24 17:59:49 +000013644 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013645
Matthias Kloseb9621712010-04-24 17:59:49 +000013646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13647$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013648 OLD_CFLAGS=$CFLAGS
13649 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013651/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013652
13653# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013654
Martin v. Löwis11437992002-04-12 09:54:03 +000013655int
13656main ()
13657{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013658
13659 char *name;
13660 struct hostent *he, *res;
13661 char buffer[2048];
13662 int buflen = 2048;
13663 int h_errnop;
13664
13665 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013666
13667 ;
13668 return 0;
13669}
13670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013671if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013672
Matthias Kloseb9621712010-04-24 17:59:49 +000013673 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013674
Martin v. Löwis11437992002-04-12 09:54:03 +000013675
Matthias Kloseb9621712010-04-24 17:59:49 +000013676$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013677
Matthias Kloseb9621712010-04-24 17:59:49 +000013678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13679$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013680
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013681else
Skip Montanaro6dead952003-09-25 14:50:04 +000013682
Matthias Kloseb9621712010-04-24 17:59:49 +000013683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13684$as_echo "no" >&6; }
13685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13686$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013688/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013689
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013690# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013691
Martin v. Löwis11437992002-04-12 09:54:03 +000013692int
13693main ()
13694{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013695
13696 char *name;
13697 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013698 char buffer[2048];
13699 int buflen = 2048;
13700 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013701
Matthias Kloseb159a552010-04-25 21:00:44 +000013702 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013703
13704 ;
13705 return 0;
13706}
13707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013708if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013709
Matthias Kloseb9621712010-04-24 17:59:49 +000013710 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013711
Martin v. Löwis11437992002-04-12 09:54:03 +000013712
Matthias Kloseb159a552010-04-25 21:00:44 +000013713$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013714
Matthias Kloseb9621712010-04-24 17:59:49 +000013715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13716$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013717
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013718else
Skip Montanaro6dead952003-09-25 14:50:04 +000013719
Matthias Kloseb9621712010-04-24 17:59:49 +000013720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13721$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13723$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13725/* end confdefs.h. */
13726
13727# include <netdb.h>
13728
13729int
13730main ()
13731{
13732
13733 char *name;
13734 struct hostent *he;
13735 struct hostent_data data;
13736
13737 (void) gethostbyname_r(name, he, &data);
13738
13739 ;
13740 return 0;
13741}
13742_ACEOF
13743if ac_fn_c_try_compile "$LINENO"; then :
13744
13745 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13746
13747
13748$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13749
13750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13751$as_echo "yes" >&6; }
13752
13753else
13754
13755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13756$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013757
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013760
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013763
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013766 CFLAGS=$OLD_CFLAGS
13767
13768else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013769
Matthias Kloseb9621712010-04-24 17:59:49 +000013770 for ac_func in gethostbyname
13771do :
13772 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013773if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013774 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013775#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013776_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013777
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013778fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013779done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013780
Michael W. Hudson54241132001-12-07 15:38:26 +000013781
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013782fi
13783
Michael W. Hudson54241132001-12-07 15:38:26 +000013784
13785
13786
13787
13788
13789
Guido van Rossum627b2d71993-12-24 10:39:16 +000013790# checks for system services
13791# (none yet)
13792
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013793# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013794ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013795if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013796
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013797else
Matthias Kloseb9621712010-04-24 17:59:49 +000013798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13799$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013800if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013801 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013802else
Martin v. Löwis11437992002-04-12 09:54:03 +000013803 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013804LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013807
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013808/* Override any GCC internal prototype to avoid an error.
13809 Use char because int might match the return type of a GCC
13810 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013811#ifdef __cplusplus
13812extern "C"
13813#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013814char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013815int
13816main ()
13817{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013818return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013819 ;
13820 return 0;
13821}
13822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013823if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013824 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013825else
Matthias Kloseb9621712010-04-24 17:59:49 +000013826 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013827fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013828rm -f core conftest.err conftest.$ac_objext \
13829 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013830LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13833$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013834if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013835 cat >>confdefs.h <<_ACEOF
13836#define HAVE_LIBIEEE 1
13837_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013838
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013839 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013840
Guido van Rossum627b2d71993-12-24 10:39:16 +000013841fi
13842
Michael W. Hudson54241132001-12-07 15:38:26 +000013843
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013844fi
13845
Michael W. Hudson54241132001-12-07 15:38:26 +000013846
Guido van Rossum7f253911997-05-09 02:42:48 +000013847# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13849$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013851# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013852if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013853 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013854if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013855then
13856
Matthias Kloseb9621712010-04-24 17:59:49 +000013857$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013858
Matthias Kloseb9621712010-04-24 17:59:49 +000013859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13860$as_echo "yes" >&6; }
13861else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13862$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013863fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013864else
Matthias Kloseb9621712010-04-24 17:59:49 +000013865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13866$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013867fi
13868
Guido van Rossum7f253911997-05-09 02:42:48 +000013869
Guido van Rossum7f43da71994-08-01 12:15:30 +000013870# check for --with-libm=...
13871
Guido van Rossum563e7081996-09-10 18:20:48 +000013872case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013873Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013874*) LIBM=-lm
13875esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13877$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013878
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013879# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013880if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013881 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013882if test "$withval" = no
13883then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13885$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013886elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013887then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13889$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013890else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013891fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013892else
Matthias Kloseb9621712010-04-24 17:59:49 +000013893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13894$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013895fi
13896
Guido van Rossum7f43da71994-08-01 12:15:30 +000013897
13898# check for --with-libc=...
13899
Matthias Kloseb9621712010-04-24 17:59:49 +000013900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13901$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013902
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013903# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013904if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013905 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013906if test "$withval" = no
13907then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13909$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013910elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013911then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13913$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013914else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013915fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013916else
Matthias Kloseb9621712010-04-24 17:59:49 +000013917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13918$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013919fi
13920
Guido van Rossum7f43da71994-08-01 12:15:30 +000013921
Stefan Krah1919b7e2012-03-21 18:25:23 +010013922# **************************************
13923# * Check for gcc x64 inline assembler *
13924# **************************************
13925
13926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13927$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13929/* end confdefs.h. */
13930
13931int
13932main ()
13933{
13934
13935 __asm__ __volatile__ ("movq %rcx, %rax");
13936
13937 ;
13938 return 0;
13939}
13940_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013941if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013942 have_gcc_asm_for_x64=yes
13943else
13944 have_gcc_asm_for_x64=no
13945fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013946rm -f core conftest.err conftest.$ac_objext \
13947 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13949$as_echo "$have_gcc_asm_for_x64" >&6; }
13950if test "$have_gcc_asm_for_x64" = yes
13951then
13952
13953$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13954
13955fi
13956
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013957# **************************************************
13958# * Check for various properties of floating point *
13959# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013960
Matthias Kloseb9621712010-04-24 17:59:49 +000013961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13962$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013963if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013964 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013965else
13966
Matthias Kloseb9621712010-04-24 17:59:49 +000013967if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013968 ac_cv_little_endian_double=no
13969else
Matthias Kloseb9621712010-04-24 17:59:49 +000013970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013971/* end confdefs.h. */
13972
13973#include <string.h>
13974int main() {
13975 double x = 9006104071832581.0;
13976 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13977 return 0;
13978 else
13979 return 1;
13980}
13981
13982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013983if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013984 ac_cv_little_endian_double=yes
13985else
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013987fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013988rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13989 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013990fi
13991
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013992fi
13993
Matthias Kloseb9621712010-04-24 17:59:49 +000013994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13995$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013996if test "$ac_cv_little_endian_double" = yes
13997then
13998
Matthias Kloseb9621712010-04-24 17:59:49 +000013999$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014000
14001fi
14002
Matthias Kloseb9621712010-04-24 17:59:49 +000014003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
14004$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014005if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014006 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014007else
14008
Matthias Kloseb9621712010-04-24 17:59:49 +000014009if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014010 ac_cv_big_endian_double=no
14011else
Matthias Kloseb9621712010-04-24 17:59:49 +000014012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014013/* end confdefs.h. */
14014
14015#include <string.h>
14016int main() {
14017 double x = 9006104071832581.0;
14018 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
14019 return 0;
14020 else
14021 return 1;
14022}
14023
14024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014025if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014026 ac_cv_big_endian_double=yes
14027else
Matthias Kloseb9621712010-04-24 17:59:49 +000014028 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014029fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014030rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14031 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014032fi
14033
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014034fi
14035
Matthias Kloseb9621712010-04-24 17:59:49 +000014036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
14037$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014038if test "$ac_cv_big_endian_double" = yes
14039then
14040
Matthias Kloseb9621712010-04-24 17:59:49 +000014041$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014042
14043fi
14044
14045# Some ARM platforms use a mixed-endian representation for doubles.
14046# While Python doesn't currently have full support for these platforms
14047# (see e.g., issue 1762561), we can at least make sure that float <-> string
14048# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14050$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014051if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014052 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014053else
14054
Matthias Kloseb9621712010-04-24 17:59:49 +000014055if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014056 ac_cv_mixed_endian_double=no
14057else
Matthias Kloseb9621712010-04-24 17:59:49 +000014058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014059/* end confdefs.h. */
14060
14061#include <string.h>
14062int main() {
14063 double x = 9006104071832581.0;
14064 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14065 return 0;
14066 else
14067 return 1;
14068}
14069
14070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014071if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014072 ac_cv_mixed_endian_double=yes
14073else
Matthias Kloseb9621712010-04-24 17:59:49 +000014074 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014076rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14077 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014078fi
14079
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014080fi
14081
Matthias Kloseb9621712010-04-24 17:59:49 +000014082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14083$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014084if test "$ac_cv_mixed_endian_double" = yes
14085then
14086
Matthias Kloseb9621712010-04-24 17:59:49 +000014087$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014088
14089fi
14090
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014091# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014092# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014093# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014094# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014095# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014096# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014097
14098# This inline assembler syntax may also work for suncc and icc,
14099# so we try it on all platforms.
14100
Matthias Kloseb9621712010-04-24 17:59:49 +000014101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14102$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014104/* end confdefs.h. */
14105
14106int
14107main ()
14108{
14109
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014110 unsigned short cw;
14111 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14112 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014113
14114 ;
14115 return 0;
14116}
14117_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014118if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014119 have_gcc_asm_for_x87=yes
14120else
Matthias Kloseb9621712010-04-24 17:59:49 +000014121 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014122fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014123rm -f core conftest.err conftest.$ac_objext \
14124 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14126$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014127if test "$have_gcc_asm_for_x87" = yes
14128then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014129
Matthias Kloseb9621712010-04-24 17:59:49 +000014130$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014131
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014132fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014133
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14135$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14137/* end confdefs.h. */
14138
14139int
14140main ()
14141{
14142
14143 unsigned int fpcr;
14144 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14145 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14146
14147 ;
14148 return 0;
14149}
14150_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014151if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014152 have_gcc_asm_for_mc68881=yes
14153else
14154 have_gcc_asm_for_mc68881=no
14155fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014156rm -f core conftest.err conftest.$ac_objext \
14157 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14159$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14160if test "$have_gcc_asm_for_mc68881" = yes
14161then
14162
14163$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14164
14165fi
14166
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014167# Detect whether system arithmetic is subject to x87-style double
14168# rounding issues. The result of this test has little meaning on non
14169# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14170# mode is round-to-nearest and double rounding issues are present, and
14171# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14173$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014174# $BASECFLAGS may affect the result
14175ac_save_cc="$CC"
14176CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014177if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014178 ac_cv_x87_double_rounding=no
14179else
Matthias Kloseb9621712010-04-24 17:59:49 +000014180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014181/* end confdefs.h. */
14182
14183#include <stdlib.h>
14184#include <math.h>
14185int main() {
14186 volatile double x, y, z;
14187 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14188 x = 0.99999999999999989; /* 1-2**-53 */
14189 y = 1./x;
14190 if (y != 1.)
14191 exit(0);
14192 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14193 x = 1e16;
14194 y = 2.99999;
14195 z = x + y;
14196 if (z != 1e16+4.)
14197 exit(0);
14198 /* both tests show evidence of double rounding */
14199 exit(1);
14200}
14201
14202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014203if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014204 ac_cv_x87_double_rounding=no
14205else
Matthias Kloseb9621712010-04-24 17:59:49 +000014206 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014208rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14209 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014210fi
14211
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014212CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14214$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014215if test "$ac_cv_x87_double_rounding" = yes
14216then
14217
Matthias Kloseb9621712010-04-24 17:59:49 +000014218$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014219
14220fi
14221
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014222# ************************************
14223# * Check for mathematical functions *
14224# ************************************
14225
14226LIBS_SAVE=$LIBS
14227LIBS="$LIBS $LIBM"
14228
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014229for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14230do :
14231 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14232ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014233if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014234 cat >>confdefs.h <<_ACEOF
14235#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14236_ACEOF
14237
14238fi
14239done
14240
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014241for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014242do :
14243 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14244ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014245if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014246 cat >>confdefs.h <<_ACEOF
14247#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14248_ACEOF
14249
14250fi
14251done
14252
14253ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14254"
Victor Stinnere0be4232011-10-25 13:06:09 +020014255if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014256 ac_have_decl=1
14257else
14258 ac_have_decl=0
14259fi
14260
14261cat >>confdefs.h <<_ACEOF
14262#define HAVE_DECL_ISINF $ac_have_decl
14263_ACEOF
14264ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14265"
Victor Stinnere0be4232011-10-25 13:06:09 +020014266if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014267 ac_have_decl=1
14268else
14269 ac_have_decl=0
14270fi
14271
14272cat >>confdefs.h <<_ACEOF
14273#define HAVE_DECL_ISNAN $ac_have_decl
14274_ACEOF
14275ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14276"
Victor Stinnere0be4232011-10-25 13:06:09 +020014277if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014278 ac_have_decl=1
14279else
14280 ac_have_decl=0
14281fi
14282
14283cat >>confdefs.h <<_ACEOF
14284#define HAVE_DECL_ISFINITE $ac_have_decl
14285_ACEOF
14286
14287
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014288# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14289# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14291$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014292if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014293 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014294else
14295
Matthias Kloseb9621712010-04-24 17:59:49 +000014296if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014297 ac_cv_tanh_preserves_zero_sign=no
14298else
Matthias Kloseb9621712010-04-24 17:59:49 +000014299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014300/* end confdefs.h. */
14301
14302#include <math.h>
14303#include <stdlib.h>
14304int main() {
14305 /* return 0 if either negative zeros don't exist
14306 on this platform or if negative zeros exist
14307 and tanh(-0.) == -0. */
14308 if (atan2(0., -1.) == atan2(-0., -1.) ||
14309 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14310 else exit(1);
14311}
14312
14313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014314if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014315 ac_cv_tanh_preserves_zero_sign=yes
14316else
Matthias Kloseb9621712010-04-24 17:59:49 +000014317 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014318fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014319rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14320 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014321fi
14322
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014323fi
14324
Matthias Kloseb9621712010-04-24 17:59:49 +000014325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14326$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014327if test "$ac_cv_tanh_preserves_zero_sign" = yes
14328then
14329
Matthias Kloseb9621712010-04-24 17:59:49 +000014330$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014331
14332fi
14333
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014334if test "$ac_cv_func_log1p" = yes
14335then
14336 # On some versions of AIX, log1p(-0.) returns 0. instead of
14337 # -0. See issue #9920.
14338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14339$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014340 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014341 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014342else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014343
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014344 if test "$cross_compiling" = yes; then :
14345 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014346else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14348/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014349
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014350 #include <math.h>
14351 #include <stdlib.h>
14352 int main() {
14353 /* Fail if the signs of log1p(-0.) and -0. can be
14354 distinguished. */
14355 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14356 return 0;
14357 else
14358 return 1;
14359 }
14360
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014361_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014362if ac_fn_c_try_run "$LINENO"; then :
14363 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014364else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014365 ac_cv_log1p_drops_zero_sign=yes
14366fi
14367rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14368 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014369fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014370
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014371fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014372
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14374$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14375fi
14376if test "$ac_cv_log1p_drops_zero_sign" = yes
14377then
14378
14379$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14380
14381fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014382
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014383LIBS=$LIBS_SAVE
14384
Mark Dickinsona614f042009-11-28 12:48:43 +000014385# For multiprocessing module, check that sem_open
14386# actually works. For FreeBSD versions <= 7.2,
14387# the kernel module that provides POSIX semaphores
14388# isn't loaded by default, so an attempt to call
14389# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14391$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014392if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014393 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014394else
Matthias Kloseb9621712010-04-24 17:59:49 +000014395 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014396 ac_cv_posix_semaphores_enabled=yes
14397else
Matthias Kloseb9621712010-04-24 17:59:49 +000014398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014399/* end confdefs.h. */
14400
14401#include <unistd.h>
14402#include <fcntl.h>
14403#include <stdio.h>
14404#include <semaphore.h>
14405#include <sys/stat.h>
14406
14407int main(void) {
14408 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14409 if (a == SEM_FAILED) {
14410 perror("sem_open");
14411 return 1;
14412 }
14413 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014414 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014415 return 0;
14416}
14417
14418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014419if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014420 ac_cv_posix_semaphores_enabled=yes
14421else
Matthias Kloseb9621712010-04-24 17:59:49 +000014422 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014423fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014424rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14425 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014426fi
14427
14428
Mark Dickinsona614f042009-11-28 12:48:43 +000014429fi
14430
Matthias Kloseb9621712010-04-24 17:59:49 +000014431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14432$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014433if test $ac_cv_posix_semaphores_enabled = no
14434then
14435
Matthias Kloseb9621712010-04-24 17:59:49 +000014436$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014437
14438fi
14439
Mark Dickinson10683072009-04-18 21:18:19 +000014440# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14442$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014443if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014444 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014445else
Matthias Kloseb9621712010-04-24 17:59:49 +000014446 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014447 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014448else
Matthias Kloseb9621712010-04-24 17:59:49 +000014449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014450/* end confdefs.h. */
14451
14452#include <unistd.h>
14453#include <fcntl.h>
14454#include <stdio.h>
14455#include <semaphore.h>
14456#include <sys/stat.h>
14457
14458int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014459 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014460 int count;
14461 int res;
14462 if(a==SEM_FAILED){
14463 perror("sem_open");
14464 return 1;
14465
14466 }
14467 res = sem_getvalue(a, &count);
14468 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014469 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014470 return res==-1 ? 1 : 0;
14471}
14472
Mark Dickinson10683072009-04-18 21:18:19 +000014473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014474if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014475 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014476else
Matthias Kloseb9621712010-04-24 17:59:49 +000014477 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014478fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14480 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014481fi
14482
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014483
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014484fi
14485
Matthias Kloseb9621712010-04-24 17:59:49 +000014486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14487$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014488if test $ac_cv_broken_sem_getvalue = yes
14489then
14490
Matthias Kloseb9621712010-04-24 17:59:49 +000014491$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014492
14493fi
14494
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014495ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14496"
14497if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14498 ac_have_decl=1
14499else
14500 ac_have_decl=0
14501fi
14502
14503cat >>confdefs.h <<_ACEOF
14504#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14505_ACEOF
14506ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14507"
14508if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14509 ac_have_decl=1
14510else
14511 ac_have_decl=0
14512fi
14513
14514cat >>confdefs.h <<_ACEOF
14515#define HAVE_DECL_RTLD_NOW $ac_have_decl
14516_ACEOF
14517ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14518"
14519if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14520 ac_have_decl=1
14521else
14522 ac_have_decl=0
14523fi
14524
14525cat >>confdefs.h <<_ACEOF
14526#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14527_ACEOF
14528ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14529"
14530if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14531 ac_have_decl=1
14532else
14533 ac_have_decl=0
14534fi
14535
14536cat >>confdefs.h <<_ACEOF
14537#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14538_ACEOF
14539ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14540"
14541if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14542 ac_have_decl=1
14543else
14544 ac_have_decl=0
14545fi
14546
14547cat >>confdefs.h <<_ACEOF
14548#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14549_ACEOF
14550ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14551"
14552if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14553 ac_have_decl=1
14554else
14555 ac_have_decl=0
14556fi
14557
14558cat >>confdefs.h <<_ACEOF
14559#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14560_ACEOF
14561ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14562"
14563if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14564 ac_have_decl=1
14565else
14566 ac_have_decl=0
14567fi
14568
14569cat >>confdefs.h <<_ACEOF
14570#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14571_ACEOF
14572
14573
Mark Dickinsonbd792642009-03-18 20:06:12 +000014574# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14576$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014577# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014578if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014579 enableval=$enable_big_digits; case $enable_big_digits in
14580yes)
14581 enable_big_digits=30 ;;
14582no)
14583 enable_big_digits=15 ;;
1458415|30)
14585 ;;
14586*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014587 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 +000014588esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14590$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014591
14592cat >>confdefs.h <<_ACEOF
14593#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14594_ACEOF
14595
14596
14597else
Matthias Kloseb9621712010-04-24 17:59:49 +000014598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14599$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014600fi
14601
14602
Guido van Rossumef2255b2000-03-10 22:30:29 +000014603# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014604ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014605if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014606
14607
Matthias Kloseb9621712010-04-24 17:59:49 +000014608$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014609
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014610 wchar_h="yes"
14611
Guido van Rossumef2255b2000-03-10 22:30:29 +000014612else
Martin v. Löwis11437992002-04-12 09:54:03 +000014613 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014614
14615fi
14616
Michael W. Hudson54241132001-12-07 15:38:26 +000014617
Martin v. Löwis11437992002-04-12 09:54:03 +000014618
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014619# determine wchar_t size
14620if test "$wchar_h" = yes
14621then
Matthias Kloseb9621712010-04-24 17:59:49 +000014622 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014623# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14624# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14625# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14627$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014628if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014629 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014630else
Matthias Kloseb9621712010-04-24 17:59:49 +000014631 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14632"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014633
Martin v. Löwis11437992002-04-12 09:54:03 +000014634else
Matthias Kloseb9621712010-04-24 17:59:49 +000014635 if test "$ac_cv_type_wchar_t" = yes; then
14636 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14637$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014638as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014639See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014640 else
14641 ac_cv_sizeof_wchar_t=0
14642 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014643fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014644
Martin v. Löwis11437992002-04-12 09:54:03 +000014645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14647$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014648
14649
14650
Martin v. Löwis11437992002-04-12 09:54:03 +000014651cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014652#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014653_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014654
Michael W. Hudson54241132001-12-07 15:38:26 +000014655
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014656fi
14657
Matthias Kloseb9621712010-04-24 17:59:49 +000014658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14659$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014660have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014662/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014663
14664#include <tcl.h>
14665#if TCL_UTF_MAX != 6
14666# error "NOT UCS4_TCL"
14667#endif
14668int
14669main ()
14670{
14671
14672 ;
14673 return 0;
14674}
14675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014676if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014677
14678
Matthias Kloseb9621712010-04-24 17:59:49 +000014679$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014680
14681 have_ucs4_tcl=yes
14682
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14686$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014687
Skip Montanaro6dead952003-09-25 14:50:04 +000014688# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014689if test "$wchar_h" = yes
14690then
14691 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14693$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014694 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014695 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014696else
14697
Matthias Kloseb9621712010-04-24 17:59:49 +000014698 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014699 ac_cv_wchar_t_signed=yes
14700else
Matthias Kloseb9621712010-04-24 17:59:49 +000014701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014702/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014703
14704 #include <wchar.h>
14705 int main()
14706 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014707 /* Success: exit code 0 */
14708 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014709 }
14710
14711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014712if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014713 ac_cv_wchar_t_signed=yes
14714else
Matthias Kloseb9621712010-04-24 17:59:49 +000014715 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014716fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014717rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14718 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014719fi
14720
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014721fi
14722
Matthias Kloseb9621712010-04-24 17:59:49 +000014723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14724$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014725fi
14726
Georg Brandl52d168a2008-01-07 18:10:24 +000014727# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014728if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014729 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014730then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014731 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014732
Matthias Kloseb9621712010-04-24 17:59:49 +000014733$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014734
Georg Brandl52d168a2008-01-07 18:10:24 +000014735else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014736 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014737fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14739$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014740
14741# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14743$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014744if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014745 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014746else
Matthias Kloseb9621712010-04-24 17:59:49 +000014747 ac_cv_c_bigendian=unknown
14748 # See if we're dealing with a universal compiler.
14749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14750/* end confdefs.h. */
14751#ifndef __APPLE_CC__
14752 not a universal capable compiler
14753 #endif
14754 typedef int dummy;
14755
Skip Montanaro6dead952003-09-25 14:50:04 +000014756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014757if ac_fn_c_try_compile "$LINENO"; then :
14758
14759 # Check for potential -arch flags. It is not universal unless
14760 # there are at least two -arch flags with different values.
14761 ac_arch=
14762 ac_prev=
14763 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14764 if test -n "$ac_prev"; then
14765 case $ac_word in
14766 i?86 | x86_64 | ppc | ppc64)
14767 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14768 ac_arch=$ac_word
14769 else
14770 ac_cv_c_bigendian=universal
14771 break
14772 fi
14773 ;;
14774 esac
14775 ac_prev=
14776 elif test "x$ac_word" = "x-arch"; then
14777 ac_prev=arch
14778 fi
14779 done
14780fi
14781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14782 if test $ac_cv_c_bigendian = unknown; then
14783 # See if sys/param.h defines the BYTE_ORDER macro.
14784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014785/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014786#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014787 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014788
Martin v. Löwis11437992002-04-12 09:54:03 +000014789int
14790main ()
14791{
Matthias Kloseb9621712010-04-24 17:59:49 +000014792#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14793 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14794 && LITTLE_ENDIAN)
14795 bogus endian macros
14796 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014797
14798 ;
14799 return 0;
14800}
14801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014802if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014803 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014805/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014806#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014807 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014808
Martin v. Löwis11437992002-04-12 09:54:03 +000014809int
14810main ()
14811{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014812#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014813 not big endian
14814 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014815
14816 ;
14817 return 0;
14818}
14819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014820if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014821 ac_cv_c_bigendian=yes
14822else
Matthias Kloseb9621712010-04-24 17:59:49 +000014823 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014826fi
14827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14828 fi
14829 if test $ac_cv_c_bigendian = unknown; then
14830 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014832/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014833#include <limits.h>
14834
Martin v. Löwis11437992002-04-12 09:54:03 +000014835int
14836main ()
14837{
Matthias Kloseb9621712010-04-24 17:59:49 +000014838#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14839 bogus endian macros
14840 #endif
14841
Martin v. Löwis11437992002-04-12 09:54:03 +000014842 ;
14843 return 0;
14844}
14845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014846if ac_fn_c_try_compile "$LINENO"; then :
14847 # It does; now see whether it defined to _BIG_ENDIAN or not.
14848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14849/* end confdefs.h. */
14850#include <limits.h>
14851
14852int
14853main ()
14854{
14855#ifndef _BIG_ENDIAN
14856 not big endian
14857 #endif
14858
14859 ;
14860 return 0;
14861}
14862_ACEOF
14863if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014864 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014865else
Matthias Kloseb9621712010-04-24 17:59:49 +000014866 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014867fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14869fi
14870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14871 fi
14872 if test $ac_cv_c_bigendian = unknown; then
14873 # Compile a test program.
14874 if test "$cross_compiling" = yes; then :
14875 # Try to guess by grepping values from an object file.
14876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14877/* end confdefs.h. */
14878short int ascii_mm[] =
14879 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14880 short int ascii_ii[] =
14881 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14882 int use_ascii (int i) {
14883 return ascii_mm[i] + ascii_ii[i];
14884 }
14885 short int ebcdic_ii[] =
14886 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14887 short int ebcdic_mm[] =
14888 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14889 int use_ebcdic (int i) {
14890 return ebcdic_mm[i] + ebcdic_ii[i];
14891 }
14892 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014893
Matthias Kloseb9621712010-04-24 17:59:49 +000014894int
14895main ()
14896{
14897return use_ascii (foo) == use_ebcdic (foo);
14898 ;
14899 return 0;
14900}
14901_ACEOF
14902if ac_fn_c_try_compile "$LINENO"; then :
14903 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14904 ac_cv_c_bigendian=yes
14905 fi
14906 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14907 if test "$ac_cv_c_bigendian" = unknown; then
14908 ac_cv_c_bigendian=no
14909 else
14910 # finding both strings is unlikely to happen, but who knows?
14911 ac_cv_c_bigendian=unknown
14912 fi
14913 fi
14914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014916else
Matthias Kloseb9621712010-04-24 17:59:49 +000014917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014918/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014919$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014920int
14921main ()
14922{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014923
Matthias Kloseb9621712010-04-24 17:59:49 +000014924 /* Are we little or big endian? From Harbison&Steele. */
14925 union
14926 {
14927 long int l;
14928 char c[sizeof (long int)];
14929 } u;
14930 u.l = 1;
14931 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014932
14933 ;
14934 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014935}
Martin v. Löwis11437992002-04-12 09:54:03 +000014936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014937if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014938 ac_cv_c_bigendian=no
14939else
Matthias Kloseb9621712010-04-24 17:59:49 +000014940 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014941fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014942rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14943 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945
Matthias Kloseb9621712010-04-24 17:59:49 +000014946 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014947fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14949$as_echo "$ac_cv_c_bigendian" >&6; }
14950 case $ac_cv_c_bigendian in #(
14951 yes)
14952 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14953;; #(
14954 no)
14955 ;; #(
14956 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014957
Matthias Kloseb9621712010-04-24 17:59:49 +000014958$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014959
Matthias Kloseb9621712010-04-24 17:59:49 +000014960 ;; #(
14961 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014962 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014963 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014964 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014965
Michael W. Hudson54241132001-12-07 15:38:26 +000014966
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014967# ABI version string for Python extension modules. This appears between the
14968# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14969# from the following attributes which affect the ABI of this Python build (in
14970# this order):
14971#
14972# * The Python implementation (always 'cpython-' for us)
14973# * The major and minor version numbers
14974# * --with-pydebug (adds a 'd')
14975# * --with-pymalloc (adds a 'm')
14976# * --with-wide-unicode (adds a 'u')
14977#
14978# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014979# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14980# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014981
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14983$as_echo_n "checking ABIFLAGS... " >&6; }
14984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14985$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14987$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014988SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14990$as_echo "$SOABI" >&6; }
14991
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014992
14993case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014994 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014995 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14996 *)
14997 EXT_SUFFIX=${SHLIB_SUFFIX};;
14998esac
14999
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15001$as_echo_n "checking LDVERSION... " >&6; }
15002LDVERSION='$(VERSION)$(ABIFLAGS)'
15003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15004$as_echo "$LDVERSION" >&6; }
15005
doko@python.org87421192013-01-26 11:39:31 +010015006
doko@ubuntu.com55532312016-06-14 08:55:19 +020015007if test x$PLATFORM_TRIPLET = x; then
15008 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15009else
15010 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15011fi
doko@python.org87421192013-01-26 11:39:31 +010015012
15013
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015014# Check whether right shifting a negative integer extends the sign bit
15015# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15017$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015018if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015019 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015020else
Martin v. Löwis11437992002-04-12 09:54:03 +000015021
Matthias Kloseb9621712010-04-24 17:59:49 +000015022if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015023 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015024else
Matthias Kloseb9621712010-04-24 17:59:49 +000015025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015026/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015027
15028int main()
15029{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015030 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015031}
15032
Martin v. Löwis11437992002-04-12 09:54:03 +000015033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015034if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015035 ac_cv_rshift_extends_sign=yes
15036else
Matthias Kloseb9621712010-04-24 17:59:49 +000015037 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015039rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15040 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015041fi
15042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015043fi
15044
Matthias Kloseb9621712010-04-24 17:59:49 +000015045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15046$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015047if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015048then
Martin v. Löwis11437992002-04-12 09:54:03 +000015049
Matthias Kloseb9621712010-04-24 17:59:49 +000015050$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015051
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015052fi
15053
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015054# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15056$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015057if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015058 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015059else
Martin v. Löwis11437992002-04-12 09:54:03 +000015060
Matthias Kloseb9621712010-04-24 17:59:49 +000015061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015062/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015063#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015064int
15065main ()
15066{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015067
15068 FILE *f = fopen("/dev/null", "r");
15069 flockfile(f);
15070 getc_unlocked(f);
15071 funlockfile(f);
15072
Martin v. Löwis11437992002-04-12 09:54:03 +000015073 ;
15074 return 0;
15075}
15076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015077if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015078 ac_cv_have_getc_unlocked=yes
15079else
Matthias Kloseb9621712010-04-24 17:59:49 +000015080 ac_cv_have_getc_unlocked=no
15081fi
15082rm -f core conftest.err conftest.$ac_objext \
15083 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015085
Matthias Kloseb9621712010-04-24 17:59:49 +000015086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15087$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015088if test "$ac_cv_have_getc_unlocked" = yes
15089then
Martin v. Löwis11437992002-04-12 09:54:03 +000015090
Matthias Kloseb9621712010-04-24 17:59:49 +000015091$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015092
15093fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015094
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015095# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015096# save the value of LIBS so we don't actually link Python with readline
15097LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015098
Gregory P. Smith18820942008-09-07 06:24:49 +000015099# On some systems we need to link readline to a termcap compatible
15100# library. NOTE: Keep the precedence of listed libraries synchronised
15101# with setup.py.
15102py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15104$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015105for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015106 if test -z "$py_libtermcap"; then
15107 READLINE_LIBS="-lreadline"
15108 else
15109 READLINE_LIBS="-lreadline -l$py_libtermcap"
15110 fi
15111 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015113/* end confdefs.h. */
15114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015115/* Override any GCC internal prototype to avoid an error.
15116 Use char because int might match the return type of a GCC
15117 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015118#ifdef __cplusplus
15119extern "C"
15120#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015121char readline ();
15122int
15123main ()
15124{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015125return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015126 ;
15127 return 0;
15128}
15129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015130if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015131 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015133rm -f core conftest.err conftest.$ac_objext \
15134 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015135 if test $py_cv_lib_readline = yes; then
15136 break
15137 fi
15138done
15139# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15140#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015141if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15143$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015144else
Matthias Kloseb9621712010-04-24 17:59:49 +000015145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15146$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015147
Matthias Kloseb9621712010-04-24 17:59:49 +000015148$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015149
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015150fi
15151
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015152# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000015153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
15154$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015155if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015156 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015157else
15158 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015159LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015161/* end confdefs.h. */
15162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015163/* Override any GCC internal prototype to avoid an error.
15164 Use char because int might match the return type of a GCC
15165 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015166#ifdef __cplusplus
15167extern "C"
15168#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015169char rl_callback_handler_install ();
15170int
15171main ()
15172{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015173return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015174 ;
15175 return 0;
15176}
15177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015178if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015179 ac_cv_lib_readline_rl_callback_handler_install=yes
15180else
Matthias Kloseb9621712010-04-24 17:59:49 +000015181 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015182fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015183rm -f core conftest.err conftest.$ac_objext \
15184 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015185LIBS=$ac_check_lib_save_LIBS
15186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
15188$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015189if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015190
Matthias Kloseb9621712010-04-24 17:59:49 +000015191$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015192
15193fi
15194
15195
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015196# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015198/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015199#include <readline/readline.h>
15200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015201if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015202 have_readline=yes
15203else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015204 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015205
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015206fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015207rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015208if test $have_readline = yes
15209then
Matthias Kloseb9621712010-04-24 17:59:49 +000015210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015211/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015212#include <readline/readline.h>
15213
15214_ACEOF
15215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015216 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015217
Matthias Kloseb9621712010-04-24 17:59:49 +000015218$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015219
15220fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015221rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015222
Matthias Kloseb9621712010-04-24 17:59:49 +000015223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015224/* end confdefs.h. */
15225#include <readline/readline.h>
15226
15227_ACEOF
15228if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015229 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015230
Matthias Kloseb9621712010-04-24 17:59:49 +000015231$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015232
15233fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015234rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015235
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015236fi
15237
Martin v. Löwis0daad592001-09-30 21:09:59 +000015238# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15240$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015241if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015242 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015243else
Martin v. Löwis11437992002-04-12 09:54:03 +000015244 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015245LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015249/* Override any GCC internal prototype to avoid an error.
15250 Use char because int might match the return type of a GCC
15251 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015252#ifdef __cplusplus
15253extern "C"
15254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015255char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015256int
15257main ()
15258{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015259return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015260 ;
15261 return 0;
15262}
15263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015264if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015265 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015266else
Matthias Kloseb9621712010-04-24 17:59:49 +000015267 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015268fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015269rm -f core conftest.err conftest.$ac_objext \
15270 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015271LIBS=$ac_check_lib_save_LIBS
15272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15274$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015275if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015276
Matthias Kloseb9621712010-04-24 17:59:49 +000015277$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015278
Martin v. Löwis0daad592001-09-30 21:09:59 +000015279fi
15280
Michael W. Hudson54241132001-12-07 15:38:26 +000015281
Thomas Wouters89d996e2007-09-08 17:39:28 +000015282# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15284$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015285if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015286 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015287else
15288 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015289LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015291/* end confdefs.h. */
15292
15293/* Override any GCC internal prototype to avoid an error.
15294 Use char because int might match the return type of a GCC
15295 builtin and then its argument prototype would still apply. */
15296#ifdef __cplusplus
15297extern "C"
15298#endif
15299char rl_completion_display_matches_hook ();
15300int
15301main ()
15302{
15303return rl_completion_display_matches_hook ();
15304 ;
15305 return 0;
15306}
15307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015308if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015309 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15310else
Matthias Kloseb9621712010-04-24 17:59:49 +000015311 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015312fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015313rm -f core conftest.err conftest.$ac_objext \
15314 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015315LIBS=$ac_check_lib_save_LIBS
15316fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15318$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015319if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015320
Matthias Kloseb9621712010-04-24 17:59:49 +000015321$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015322
15323fi
15324
15325
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015326# also in 4.0, but not in editline
15327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15328$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15329if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15330 $as_echo_n "(cached) " >&6
15331else
15332 ac_check_lib_save_LIBS=$LIBS
15333LIBS="-lreadline $READLINE_LIBS $LIBS"
15334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15335/* end confdefs.h. */
15336
15337/* Override any GCC internal prototype to avoid an error.
15338 Use char because int might match the return type of a GCC
15339 builtin and then its argument prototype would still apply. */
15340#ifdef __cplusplus
15341extern "C"
15342#endif
15343char rl_resize_terminal ();
15344int
15345main ()
15346{
15347return rl_resize_terminal ();
15348 ;
15349 return 0;
15350}
15351_ACEOF
15352if ac_fn_c_try_link "$LINENO"; then :
15353 ac_cv_lib_readline_rl_resize_terminal=yes
15354else
15355 ac_cv_lib_readline_rl_resize_terminal=no
15356fi
15357rm -f core conftest.err conftest.$ac_objext \
15358 conftest$ac_exeext conftest.$ac_ext
15359LIBS=$ac_check_lib_save_LIBS
15360fi
15361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15362$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15363if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15364
15365$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15366
15367fi
15368
15369
Martin v. Löwis0daad592001-09-30 21:09:59 +000015370# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15372$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015373if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015374 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015375else
Martin v. Löwis11437992002-04-12 09:54:03 +000015376 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015377LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015381/* Override any GCC internal prototype to avoid an error.
15382 Use char because int might match the return type of a GCC
15383 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015384#ifdef __cplusplus
15385extern "C"
15386#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015387char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015388int
15389main ()
15390{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015391return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015392 ;
15393 return 0;
15394}
15395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015396if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015397 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015398else
Matthias Kloseb9621712010-04-24 17:59:49 +000015399 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015401rm -f core conftest.err conftest.$ac_objext \
15402 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015403LIBS=$ac_check_lib_save_LIBS
15404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15406$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015407if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015408
Matthias Kloseb9621712010-04-24 17:59:49 +000015409$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015410
Guido van Rossum353ae582001-07-10 16:45:32 +000015411fi
15412
Jack Jansendd19cf82001-12-06 22:36:17 +000015413
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015414# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015416/* end confdefs.h. */
15417#include <readline/readline.h>
15418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015419if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015420 have_readline=yes
15421else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015422 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015423
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015424fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015425rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015426if test $have_readline = yes
15427then
Matthias Kloseb9621712010-04-24 17:59:49 +000015428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015429/* end confdefs.h. */
15430#include <readline/readline.h>
15431
15432_ACEOF
15433if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015434 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015435
Matthias Kloseb9621712010-04-24 17:59:49 +000015436$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015437
15438fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015439rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015440
15441fi
15442
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15444$as_echo_n "checking for append_history in -lreadline... " >&6; }
15445if ${ac_cv_lib_readline_append_history+:} false; then :
15446 $as_echo_n "(cached) " >&6
15447else
15448 ac_check_lib_save_LIBS=$LIBS
15449LIBS="-lreadline $READLINE_LIBS $LIBS"
15450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15451/* end confdefs.h. */
15452
15453/* Override any GCC internal prototype to avoid an error.
15454 Use char because int might match the return type of a GCC
15455 builtin and then its argument prototype would still apply. */
15456#ifdef __cplusplus
15457extern "C"
15458#endif
15459char append_history ();
15460int
15461main ()
15462{
15463return append_history ();
15464 ;
15465 return 0;
15466}
15467_ACEOF
15468if ac_fn_c_try_link "$LINENO"; then :
15469 ac_cv_lib_readline_append_history=yes
15470else
15471 ac_cv_lib_readline_append_history=no
15472fi
15473rm -f core conftest.err conftest.$ac_objext \
15474 conftest$ac_exeext conftest.$ac_ext
15475LIBS=$ac_check_lib_save_LIBS
15476fi
15477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15478$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15479if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15480
15481$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15482
15483fi
15484
15485
Martin v. Löwis82bca632006-02-10 20:49:30 +000015486# End of readline checks: restore LIBS
15487LIBS=$LIBS_no_readline
15488
Matthias Kloseb9621712010-04-24 17:59:49 +000015489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15490$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015491if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015492 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015493else
Martin v. Löwis11437992002-04-12 09:54:03 +000015494
Matthias Kloseb9621712010-04-24 17:59:49 +000015495if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015496 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015497else
Matthias Kloseb9621712010-04-24 17:59:49 +000015498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015499/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015500
15501int main()
15502{
15503 int val1 = nice(1);
15504 if (val1 != -1 && val1 == nice(2))
15505 exit(0);
15506 exit(1);
15507}
15508
Martin v. Löwis11437992002-04-12 09:54:03 +000015509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015510if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015511 ac_cv_broken_nice=yes
15512else
Matthias Kloseb9621712010-04-24 17:59:49 +000015513 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015514fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15516 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015517fi
15518
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015519fi
15520
Matthias Kloseb9621712010-04-24 17:59:49 +000015521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15522$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015523if test "$ac_cv_broken_nice" = yes
15524then
Martin v. Löwis11437992002-04-12 09:54:03 +000015525
Matthias Kloseb9621712010-04-24 17:59:49 +000015526$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015527
15528fi
15529
Matthias Kloseb9621712010-04-24 17:59:49 +000015530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15531$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015532if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015533 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015534else
Matthias Kloseb9621712010-04-24 17:59:49 +000015535 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015536 ac_cv_broken_poll=no
15537else
Matthias Kloseb9621712010-04-24 17:59:49 +000015538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015539/* end confdefs.h. */
15540
15541#include <poll.h>
15542
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015543int main()
15544{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015545 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015546 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015547
15548 close (42);
15549
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015550 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015551 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015552 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015553 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015554 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015555 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015556 return 1;
15557}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015558
15559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015560if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015561 ac_cv_broken_poll=yes
15562else
Matthias Kloseb9621712010-04-24 17:59:49 +000015563 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015565rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15566 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015568
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015569fi
15570
Matthias Kloseb9621712010-04-24 17:59:49 +000015571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15572$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015573if test "$ac_cv_broken_poll" = yes
15574then
15575
Matthias Kloseb9621712010-04-24 17:59:49 +000015576$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015577
15578fi
15579
Brett Cannon43802422005-02-10 20:48:03 +000015580# 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 +000015581# (which is not required by ISO C or UNIX spec) and/or if we support
15582# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015583ac_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 +000015584#include <$ac_cv_struct_tm>
15585
Matthias Kloseb9621712010-04-24 17:59:49 +000015586"
Victor Stinnere0be4232011-10-25 13:06:09 +020015587if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015588
15589cat >>confdefs.h <<_ACEOF
15590#define HAVE_STRUCT_TM_TM_ZONE 1
15591_ACEOF
15592
15593
15594fi
15595
15596if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15597
Matthias Kloseb9621712010-04-24 17:59:49 +000015598$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015599
15600else
Matthias Kloseb9621712010-04-24 17:59:49 +000015601 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15602"
Victor Stinnere0be4232011-10-25 13:06:09 +020015603if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015604 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015605else
Matthias Kloseb9621712010-04-24 17:59:49 +000015606 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015607fi
15608
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015609cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015610#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015611_ACEOF
15612
Matthias Kloseb9621712010-04-24 17:59:49 +000015613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15614$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015615if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015616 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015617else
Matthias Kloseb9621712010-04-24 17:59:49 +000015618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015619/* end confdefs.h. */
15620#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015621#if !HAVE_DECL_TZNAME
15622extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015623#endif
15624
15625int
15626main ()
15627{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015628return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015629 ;
15630 return 0;
15631}
15632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015633if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015634 ac_cv_var_tzname=yes
15635else
Matthias Kloseb9621712010-04-24 17:59:49 +000015636 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015638rm -f core conftest.err conftest.$ac_objext \
15639 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015640fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15642$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015643 if test $ac_cv_var_tzname = yes; then
15644
Matthias Kloseb9621712010-04-24 17:59:49 +000015645$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015646
15647 fi
15648fi
15649
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015650
Martin v. Löwis1d459062005-03-14 21:23:33 +000015651# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15653$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015654if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015655 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015656else
15657
Matthias Kloseb9621712010-04-24 17:59:49 +000015658if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015659 ac_cv_working_tzset=no
15660else
Matthias Kloseb9621712010-04-24 17:59:49 +000015661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015662/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015663
15664#include <stdlib.h>
15665#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015666#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015667
15668#if HAVE_TZNAME
15669extern char *tzname[];
15670#endif
15671
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015672int main()
15673{
Brett Cannon18367812003-09-19 00:59:16 +000015674 /* Note that we need to ensure that not only does tzset(3)
15675 do 'something' with localtime, but it works as documented
15676 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015677 This includes making sure that tzname is set properly if
15678 tm->tm_zone does not exist since it is the alternative way
15679 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015680
15681 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015682 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015683 */
15684
Martin v. Löwis1d459062005-03-14 21:23:33 +000015685 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015686 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15687
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015688 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015689 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015690 if (localtime(&groundhogday)->tm_hour != 0)
15691 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015692#if HAVE_TZNAME
15693 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15694 if (strcmp(tzname[0], "UTC") ||
15695 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15696 exit(1);
15697#endif
Brett Cannon18367812003-09-19 00:59:16 +000015698
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015699 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015700 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015701 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015702 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015703#if HAVE_TZNAME
15704 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15705 exit(1);
15706#endif
Brett Cannon18367812003-09-19 00:59:16 +000015707
15708 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15709 tzset();
15710 if (localtime(&groundhogday)->tm_hour != 11)
15711 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015712#if HAVE_TZNAME
15713 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15714 exit(1);
15715#endif
15716
15717#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015718 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15719 exit(1);
15720 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15721 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015722#endif
Brett Cannon18367812003-09-19 00:59:16 +000015723
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015724 exit(0);
15725}
15726
15727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015728if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015729 ac_cv_working_tzset=yes
15730else
Matthias Kloseb9621712010-04-24 17:59:49 +000015731 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15734 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015735fi
15736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015737fi
15738
Matthias Kloseb9621712010-04-24 17:59:49 +000015739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15740$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015741if test "$ac_cv_working_tzset" = yes
15742then
15743
Matthias Kloseb9621712010-04-24 17:59:49 +000015744$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015745
15746fi
15747
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015748# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15750$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015751if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015752 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015753else
Matthias Kloseb9621712010-04-24 17:59:49 +000015754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015755/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015756#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015757int
15758main ()
15759{
15760
15761struct stat st;
15762st.st_mtim.tv_nsec = 1;
15763
15764 ;
15765 return 0;
15766}
15767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015768if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015769 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015770else
Matthias Kloseb9621712010-04-24 17:59:49 +000015771 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15774fi
15775
Matthias Kloseb9621712010-04-24 17:59:49 +000015776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15777$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015778if test "$ac_cv_stat_tv_nsec" = yes
15779then
15780
Matthias Kloseb9621712010-04-24 17:59:49 +000015781$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015782
15783fi
15784
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015785# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15787$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015788if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015789 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015790else
Matthias Kloseb9621712010-04-24 17:59:49 +000015791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015792/* end confdefs.h. */
15793#include <sys/stat.h>
15794int
15795main ()
15796{
15797
15798struct stat st;
15799st.st_mtimespec.tv_nsec = 1;
15800
15801 ;
15802 return 0;
15803}
15804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015805if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015806 ac_cv_stat_tv_nsec2=yes
15807else
Matthias Kloseb9621712010-04-24 17:59:49 +000015808 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15811fi
15812
Matthias Kloseb9621712010-04-24 17:59:49 +000015813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15814$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015815if test "$ac_cv_stat_tv_nsec2" = yes
15816then
15817
Matthias Kloseb9621712010-04-24 17:59:49 +000015818$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015819
15820fi
15821
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015822# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015823ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015824if test "$cross_compiling" = no; then
15825 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15826fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015827
15828for ac_header in curses.h ncurses.h
15829do :
15830 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15831ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15832if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15833 cat >>confdefs.h <<_ACEOF
15834#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15835_ACEOF
15836
15837fi
15838
15839done
15840
15841
15842# On Solaris, term.h requires curses.h
15843for ac_header in term.h
15844do :
15845 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15846#ifdef HAVE_CURSES_H
15847#include <curses.h>
15848#endif
15849
15850"
15851if test "x$ac_cv_header_term_h" = xyes; then :
15852 cat >>confdefs.h <<_ACEOF
15853#define HAVE_TERM_H 1
15854_ACEOF
15855
15856fi
15857
15858done
15859
15860
Jack Jansen666b1e72001-10-31 12:11:48 +000015861# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15863$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015864if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015865 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015866else
Matthias Kloseb9621712010-04-24 17:59:49 +000015867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015868/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015869#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015870int
15871main ()
15872{
Jack Jansen666b1e72001-10-31 12:11:48 +000015873
15874 int rtn;
15875 rtn = mvwdelch(0,0,0);
15876
Martin v. Löwis11437992002-04-12 09:54:03 +000015877 ;
15878 return 0;
15879}
15880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015881if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015882 ac_cv_mvwdelch_is_expression=yes
15883else
Matthias Kloseb9621712010-04-24 17:59:49 +000015884 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15887fi
15888
Matthias Kloseb9621712010-04-24 17:59:49 +000015889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15890$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015891
15892if test "$ac_cv_mvwdelch_is_expression" = yes
15893then
Martin v. Löwis11437992002-04-12 09:54:03 +000015894
Matthias Kloseb9621712010-04-24 17:59:49 +000015895$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015896
15897fi
15898
Matthias Kloseb9621712010-04-24 17:59:49 +000015899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15900$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015901if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015902 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015903else
Matthias Kloseb9621712010-04-24 17:59:49 +000015904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015905/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015906#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015907int
15908main ()
15909{
Jack Jansen666b1e72001-10-31 12:11:48 +000015910
15911 WINDOW *w;
15912 w->_flags = 0;
15913
Martin v. Löwis11437992002-04-12 09:54:03 +000015914 ;
15915 return 0;
15916}
15917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015918if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015919 ac_cv_window_has_flags=yes
15920else
Matthias Kloseb9621712010-04-24 17:59:49 +000015921 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15924fi
15925
Matthias Kloseb9621712010-04-24 17:59:49 +000015926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15927$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015928
Jack Jansen666b1e72001-10-31 12:11:48 +000015929
15930if test "$ac_cv_window_has_flags" = yes
15931then
Martin v. Löwis11437992002-04-12 09:54:03 +000015932
Matthias Kloseb9621712010-04-24 17:59:49 +000015933$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015934
15935fi
15936
Matthias Kloseb9621712010-04-24 17:59:49 +000015937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15938$as_echo_n "checking for is_term_resized... " >&6; }
15939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015940/* end confdefs.h. */
15941#include <curses.h>
15942int
15943main ()
15944{
15945void *x=is_term_resized
15946 ;
15947 return 0;
15948}
15949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015950if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015951
Matthias Kloseb9621712010-04-24 17:59:49 +000015952$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015953
Matthias Kloseb159a552010-04-25 21:00:44 +000015954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015955$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015956else
Matthias Kloseb9621712010-04-24 17:59:49 +000015957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15958$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015959
15960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15962
Matthias Kloseb9621712010-04-24 17:59:49 +000015963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15964$as_echo_n "checking for resize_term... " >&6; }
15965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015966/* end confdefs.h. */
15967#include <curses.h>
15968int
15969main ()
15970{
15971void *x=resize_term
15972 ;
15973 return 0;
15974}
15975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015976if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015977
Matthias Kloseb9621712010-04-24 17:59:49 +000015978$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015979
Matthias Kloseb159a552010-04-25 21:00:44 +000015980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015981$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015982else
Matthias Kloseb9621712010-04-24 17:59:49 +000015983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15984$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015985
15986fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15988
Matthias Kloseb9621712010-04-24 17:59:49 +000015989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15990$as_echo_n "checking for resizeterm... " >&6; }
15991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015992/* end confdefs.h. */
15993#include <curses.h>
15994int
15995main ()
15996{
15997void *x=resizeterm
15998 ;
15999 return 0;
16000}
16001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016002if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016003
Matthias Kloseb9621712010-04-24 17:59:49 +000016004$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016005
Matthias Kloseb159a552010-04-25 21:00:44 +000016006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016007$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016008else
Matthias Kloseb9621712010-04-24 17:59:49 +000016009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16010$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016011
16012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016014# last curses configure check
16015CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016016
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16018$as_echo "$as_me: checking for device files" >&6;}
16019
16020if test "x$cross_compiling" = xyes; then
16021 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16023$as_echo_n "checking for /dev/ptmx... " >&6; }
16024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16025$as_echo "not set" >&6; }
16026 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16027 fi
16028 if test "${ac_cv_file__dev_ptc+set}" != set; then
16029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16030$as_echo_n "checking for /dev/ptc... " >&6; }
16031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16032$as_echo "not set" >&6; }
16033 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16034 fi
16035fi
16036
Matthias Kloseb9621712010-04-24 17:59:49 +000016037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16038$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016039if ${ac_cv_file__dev_ptmx+:} false; then :
16040 $as_echo_n "(cached) " >&6
16041else
16042 test "$cross_compiling" = yes &&
16043 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16044if test -r "/dev/ptmx"; then
16045 ac_cv_file__dev_ptmx=yes
16046else
16047 ac_cv_file__dev_ptmx=no
16048fi
16049fi
16050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16051$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16052if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016053
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016054fi
16055
16056if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016057
Matthias Kloseb9621712010-04-24 17:59:49 +000016058$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016059
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16062$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016063if ${ac_cv_file__dev_ptc+:} false; then :
16064 $as_echo_n "(cached) " >&6
16065else
16066 test "$cross_compiling" = yes &&
16067 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16068if test -r "/dev/ptc"; then
16069 ac_cv_file__dev_ptc=yes
16070else
16071 ac_cv_file__dev_ptc=no
16072fi
16073fi
16074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16075$as_echo "$ac_cv_file__dev_ptc" >&6; }
16076if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016077
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016078fi
16079
16080if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016081
Matthias Kloseb9621712010-04-24 17:59:49 +000016082$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016083
Neal Norwitz865400f2003-03-21 01:42:58 +000016084fi
16085
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016086if test $ac_sys_system = Darwin
16087then
16088 LIBS="$LIBS -framework CoreFoundation"
16089fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016090
Matthias Kloseb9621712010-04-24 17:59:49 +000016091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16092$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016093if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016094 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016095else
Matthias Kloseb9621712010-04-24 17:59:49 +000016096 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016097 ac_cv_have_size_t_format="cross -- assuming yes"
16098
Thomas Wouters477c8d52006-05-27 19:21:47 +000016099else
Matthias Kloseb9621712010-04-24 17:59:49 +000016100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016101/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016102
Thomas Wouters477c8d52006-05-27 19:21:47 +000016103#include <stdio.h>
16104#include <stddef.h>
16105#include <string.h>
16106
Christian Heimes2c181612007-12-17 20:04:13 +000016107#ifdef HAVE_SYS_TYPES_H
16108#include <sys/types.h>
16109#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016110
16111#ifdef HAVE_SSIZE_T
16112typedef ssize_t Py_ssize_t;
16113#elif SIZEOF_VOID_P == SIZEOF_LONG
16114typedef long Py_ssize_t;
16115#else
16116typedef int Py_ssize_t;
16117#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016118
Christian Heimes2c181612007-12-17 20:04:13 +000016119int main()
16120{
16121 char buffer[256];
16122
Thomas Wouters477c8d52006-05-27 19:21:47 +000016123 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16124 return 1;
16125
Thomas Wouters89f507f2006-12-13 04:49:30 +000016126 if (strcmp(buffer, "123"))
16127 return 1;
16128
16129 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16130 return 1;
16131
16132 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016133 return 1;
16134
16135 return 0;
16136}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016137
Thomas Wouters477c8d52006-05-27 19:21:47 +000016138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016139if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016140 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016141else
Matthias Kloseb9621712010-04-24 17:59:49 +000016142 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016144rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16145 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016146fi
16147
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16150$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016151if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016152
Matthias Kloseb9621712010-04-24 17:59:49 +000016153$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016154
16155fi
16156
Matthias Kloseb9621712010-04-24 17:59:49 +000016157ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016158#ifdef HAVE_SYS_TYPES_H
16159#include <sys/types.h>
16160#endif
16161#ifdef HAVE_SYS_SOCKET_H
16162#include <sys/socket.h>
16163#endif
16164
Matthias Kloseb9621712010-04-24 17:59:49 +000016165"
Victor Stinnere0be4232011-10-25 13:06:09 +020016166if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016167
Martin v. Löwis11437992002-04-12 09:54:03 +000016168else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016169
Matthias Kloseb9621712010-04-24 17:59:49 +000016170$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016171
16172fi
16173
Michael W. Hudson54241132001-12-07 15:38:26 +000016174
Matthias Kloseb9621712010-04-24 17:59:49 +000016175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16176$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016177if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016178 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016179else
Matthias Kloseb9621712010-04-24 17:59:49 +000016180 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016181 ac_cv_broken_mbstowcs=no
16182else
Matthias Kloseb9621712010-04-24 17:59:49 +000016183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016184/* end confdefs.h. */
16185
Stefan Krah19c21392012-11-22 23:47:32 +010016186#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016187#include<stdlib.h>
16188int main() {
16189 size_t len = -1;
16190 const char *str = "text";
16191 len = mbstowcs(NULL, str, 0);
16192 return (len != 4);
16193}
16194
16195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016196if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016197 ac_cv_broken_mbstowcs=no
16198else
Matthias Kloseb9621712010-04-24 17:59:49 +000016199 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16202 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016203fi
16204
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016205fi
16206
Matthias Kloseb9621712010-04-24 17:59:49 +000016207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16208$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016209if test "$ac_cv_broken_mbstowcs" = yes
16210then
16211
Matthias Kloseb9621712010-04-24 17:59:49 +000016212$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016213
16214fi
16215
Antoine Pitroub52ec782009-01-25 16:34:23 +000016216# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16218$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016219
16220# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016221if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016222 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016223if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016224then
16225
Matthias Kloseb9621712010-04-24 17:59:49 +000016226$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016227
Matthias Kloseb9621712010-04-24 17:59:49 +000016228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16229$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016230fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016231if test "$withval" = no
16232then
16233
16234$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16235
Matthias Kloseb9621712010-04-24 17:59:49 +000016236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16237$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016238fi
16239
Antoine Pitrou042b1282010-08-13 21:15:58 +000016240else
16241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16242$as_echo "no value specified" >&6; }
16243fi
16244
Antoine Pitroub52ec782009-01-25 16:34:23 +000016245
Matthias Kloseb17289e2012-03-15 19:51:34 +010016246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16247$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16248if ${ac_cv_computed_gotos+:} false; then :
16249 $as_echo_n "(cached) " >&6
16250else
16251 if test "$cross_compiling" = yes; then :
16252 if test "${with_computed_gotos+set}" = set; then
16253 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16254 else
16255 ac_cv_computed_gotos=no
16256 fi
16257else
16258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16259/* end confdefs.h. */
16260
16261int main(int argc, char **argv)
16262{
16263 static void *targets[1] = { &&LABEL1 };
16264 goto LABEL2;
16265LABEL1:
16266 return 0;
16267LABEL2:
16268 goto *targets[0];
16269 return 1;
16270}
16271
16272_ACEOF
16273if ac_fn_c_try_run "$LINENO"; then :
16274 ac_cv_computed_gotos=yes
16275else
16276 ac_cv_computed_gotos=no
16277fi
16278rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16279 conftest.$ac_objext conftest.beam conftest.$ac_ext
16280fi
16281
16282fi
16283
16284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16285$as_echo "$ac_cv_computed_gotos" >&6; }
16286case "$ac_cv_computed_gotos" in yes*)
16287
16288$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16289
16290esac
16291
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016292case $ac_sys_system in
16293AIX*)
16294
16295$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16296 ;;
16297esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016298
Michael W. Hudson54241132001-12-07 15:38:26 +000016299
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016300
16301
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016302for h in `(cd $srcdir;echo Python/thread_*.h)`
16303do
16304 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16305done
16306
Michael W. Hudson54241132001-12-07 15:38:26 +000016307
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016308SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16310$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016311for dir in $SRCDIRS; do
16312 if test ! -d $dir; then
16313 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016314 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016315done
Matthias Kloseb9621712010-04-24 17:59:49 +000016316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16317$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016318
Stefan Krah1919b7e2012-03-21 18:25:23 +010016319# Availability of -O2:
16320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16321$as_echo_n "checking for -O2... " >&6; }
16322saved_cflags="$CFLAGS"
16323CFLAGS="-O2"
16324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16325/* end confdefs.h. */
16326
16327int
16328main ()
16329{
16330
16331
16332 ;
16333 return 0;
16334}
16335_ACEOF
16336if ac_fn_c_try_compile "$LINENO"; then :
16337 have_O2=yes
16338else
16339 have_O2=no
16340fi
16341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16343$as_echo "$have_O2" >&6; }
16344CFLAGS="$saved_cflags"
16345
16346# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16347# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16349$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16350saved_cflags="$CFLAGS"
16351CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16352if test "$have_O2" = no; then
16353 CFLAGS=""
16354fi
16355if test "$cross_compiling" = yes; then :
16356 have_glibc_memmove_bug=undefined
16357else
16358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16359/* end confdefs.h. */
16360
16361#include <stdio.h>
16362#include <stdlib.h>
16363#include <string.h>
16364void foo(void *p, void *q) { memmove(p, q, 19); }
16365int main() {
16366 char a[32] = "123456789000000000";
16367 foo(&a[9], a);
16368 if (strcmp(a, "123456789123456789000000000") != 0)
16369 return 1;
16370 foo(a, &a[9]);
16371 if (strcmp(a, "123456789000000000") != 0)
16372 return 1;
16373 return 0;
16374}
16375
16376_ACEOF
16377if ac_fn_c_try_run "$LINENO"; then :
16378 have_glibc_memmove_bug=no
16379else
16380 have_glibc_memmove_bug=yes
16381fi
16382rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16383 conftest.$ac_objext conftest.beam conftest.$ac_ext
16384fi
16385
16386CFLAGS="$saved_cflags"
16387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16388$as_echo "$have_glibc_memmove_bug" >&6; }
16389if test "$have_glibc_memmove_bug" = yes; then
16390
16391$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16392
16393fi
16394
16395if test "$have_gcc_asm_for_x87" = yes; then
16396 # Some versions of gcc miscompile inline asm:
16397 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16398 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16399 case $CC in
16400 *gcc*)
16401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16402$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16403 saved_cflags="$CFLAGS"
16404 CFLAGS="-O2"
16405 if test "$cross_compiling" = yes; then :
16406 have_ipa_pure_const_bug=undefined
16407else
16408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16409/* end confdefs.h. */
16410
16411 __attribute__((noinline)) int
16412 foo(int *p) {
16413 int r;
16414 asm ( "movl \$6, (%1)\n\t"
16415 "xorl %0, %0\n\t"
16416 : "=r" (r) : "r" (p) : "memory"
16417 );
16418 return r;
16419 }
16420 int main() {
16421 int p = 8;
16422 if ((foo(&p) ? : p) != 6)
16423 return 1;
16424 return 0;
16425 }
16426
16427_ACEOF
16428if ac_fn_c_try_run "$LINENO"; then :
16429 have_ipa_pure_const_bug=no
16430else
16431 have_ipa_pure_const_bug=yes
16432fi
16433rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16434 conftest.$ac_objext conftest.beam conftest.$ac_ext
16435fi
16436
16437 CFLAGS="$saved_cflags"
16438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16439$as_echo "$have_ipa_pure_const_bug" >&6; }
16440 if test "$have_ipa_pure_const_bug" = yes; then
16441
16442$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16443
16444 fi
16445 ;;
16446 esac
16447fi
16448
Victor Stinner4f5366e2015-01-09 02:13:19 +010016449# Check for stdatomic.h
16450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16451$as_echo_n "checking for stdatomic.h... " >&6; }
16452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16453/* end confdefs.h. */
16454
16455
16456 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016457 atomic_int value = ATOMIC_VAR_INIT(1);
16458 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016459 int main() {
16460 int loaded_value = atomic_load(&value);
16461 return 0;
16462 }
16463
16464
16465_ACEOF
16466if ac_fn_c_try_link "$LINENO"; then :
16467 have_stdatomic_h=yes
16468else
16469 have_stdatomic_h=no
16470fi
16471rm -f core conftest.err conftest.$ac_objext \
16472 conftest$ac_exeext conftest.$ac_ext
16473
16474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16475$as_echo "$have_stdatomic_h" >&6; }
16476
16477if test "$have_stdatomic_h" = yes; then
16478
16479$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16480
16481fi
16482
16483# Check for GCC >= 4.7 __atomic builtins
16484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16485$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16487/* end confdefs.h. */
16488
16489
16490 volatile int val = 1;
16491 int main() {
16492 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16493 return 0;
16494 }
16495
16496
16497_ACEOF
16498if ac_fn_c_try_link "$LINENO"; then :
16499 have_builtin_atomic=yes
16500else
16501 have_builtin_atomic=no
16502fi
16503rm -f core conftest.err conftest.$ac_objext \
16504 conftest$ac_exeext conftest.$ac_ext
16505
16506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16507$as_echo "$have_builtin_atomic" >&6; }
16508
16509if test "$have_builtin_atomic" = yes; then
16510
16511$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16512
16513fi
16514
Ned Deily322f5ba2013-11-21 23:01:59 -080016515# ensurepip option
16516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16517$as_echo_n "checking for ensurepip... " >&6; }
16518
16519# Check whether --with-ensurepip was given.
16520if test "${with_ensurepip+set}" = set; then :
16521 withval=$with_ensurepip;
16522else
16523 with_ensurepip=upgrade
16524fi
16525
16526case $with_ensurepip in #(
16527 yes|upgrade) :
16528 ENSUREPIP=upgrade ;; #(
16529 install) :
16530 ENSUREPIP=install ;; #(
16531 no) :
16532 ENSUREPIP=no ;; #(
16533 *) :
16534 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16535esac
16536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16537$as_echo "$ENSUREPIP" >&6; }
16538
16539
Victor Stinner35a97c02015-03-08 02:59:09 +010016540# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16542$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16544/* end confdefs.h. */
16545
16546
16547 #include <dirent.h>
16548
16549 int main() {
16550 struct dirent entry;
16551 return entry.d_type == DT_UNKNOWN;
16552 }
16553
16554
16555_ACEOF
16556if ac_fn_c_try_link "$LINENO"; then :
16557 have_dirent_d_type=yes
16558else
16559 have_dirent_d_type=no
16560fi
16561rm -f core conftest.err conftest.$ac_objext \
16562 conftest$ac_exeext conftest.$ac_ext
16563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16564$as_echo "$have_dirent_d_type" >&6; }
16565
16566if test "$have_dirent_d_type" = yes; then
16567
16568$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16569
16570fi
16571
Victor Stinner9eb57c52015-03-19 22:21:49 +010016572# check if the Linux getrandom() syscall is available
16573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16574$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16576/* end confdefs.h. */
16577
16578
Victor Stinner1b80b242016-04-12 22:34:58 +020016579 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016580 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016581 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016582
16583 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016584 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016585 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016586 const int flags = GRND_NONBLOCK;
16587 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016588 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016589 return 0;
16590 }
16591
16592
16593_ACEOF
16594if ac_fn_c_try_link "$LINENO"; then :
16595 have_getrandom_syscall=yes
16596else
16597 have_getrandom_syscall=no
16598fi
16599rm -f core conftest.err conftest.$ac_objext \
16600 conftest$ac_exeext conftest.$ac_ext
16601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16602$as_echo "$have_getrandom_syscall" >&6; }
16603
16604if test "$have_getrandom_syscall" = yes; then
16605
16606$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16607
16608fi
16609
Victor Stinner3abf44e2015-09-18 15:38:37 +020016610# check if the getrandom() function is available
16611# the test was written for the Solaris function of <sys/random.h>
16612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16613$as_echo_n "checking for the getrandom() function... " >&6; }
16614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16615/* end confdefs.h. */
16616
16617
16618 #include <sys/random.h>
16619
16620 int main() {
16621 char buffer[1];
16622 const size_t buflen = sizeof(buffer);
16623 const int flags = 0;
16624 /* ignore the result, Python checks for ENOSYS at runtime */
16625 (void)getrandom(buffer, buflen, flags);
16626 return 0;
16627 }
16628
16629
16630_ACEOF
16631if ac_fn_c_try_link "$LINENO"; then :
16632 have_getrandom=yes
16633else
16634 have_getrandom=no
16635fi
16636rm -f core conftest.err conftest.$ac_objext \
16637 conftest$ac_exeext conftest.$ac_ext
16638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16639$as_echo "$have_getrandom" >&6; }
16640
16641if test "$have_getrandom" = yes; then
16642
16643$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16644
16645fi
16646
Guido van Rossum627b2d71993-12-24 10:39:16 +000016647# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016648ac_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 +000016649
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016650ac_config_files="$ac_config_files Modules/ld_so_aix"
16651
Martin v. Löwis11437992002-04-12 09:54:03 +000016652cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016653# This file is a shell script that caches the results of configure
16654# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016655# scripts and configure runs, see configure's option --config-cache.
16656# It is not useful on other systems. If it contains results you don't
16657# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016658#
Martin v. Löwis11437992002-04-12 09:54:03 +000016659# config.status only pays attention to the cache file if you give it
16660# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016661#
Skip Montanaro6dead952003-09-25 14:50:04 +000016662# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016663# loading this file, other *unset* `ac_cv_foo' will be assigned the
16664# following values.
16665
16666_ACEOF
16667
Guido van Rossumf78abae1997-01-21 22:02:36 +000016668# The following way of writing the cache mishandles newlines in values,
16669# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016670# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016671# Ultrix sh set writes to stderr and can't be redirected directly,
16672# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016673(
16674 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16675 eval ac_val=\$$ac_var
16676 case $ac_val in #(
16677 *${as_nl}*)
16678 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016679 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16680$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016681 esac
16682 case $ac_var in #(
16683 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016684 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16685 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016686 esac ;;
16687 esac
16688 done
16689
Martin v. Löwis11437992002-04-12 09:54:03 +000016690 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016691 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16692 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016693 # `set' does not quote correctly, so add quotes: double-quote
16694 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016695 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016696 "s/'/'\\\\''/g;
16697 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016698 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016699 *)
16700 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016701 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016702 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016703 esac |
16704 sort
16705) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016706 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016707 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016708 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016709 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016710 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16711 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016712 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16713 :end' >>confcache
16714if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16715 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016716 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016717 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16718$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016719 if test ! -f "$cache_file" || test -h "$cache_file"; then
16720 cat confcache >"$cache_file"
16721 else
16722 case $cache_file in #(
16723 */* | ?:*)
16724 mv -f confcache "$cache_file"$$ &&
16725 mv -f "$cache_file"$$ "$cache_file" ;; #(
16726 *)
16727 mv -f confcache "$cache_file" ;;
16728 esac
16729 fi
16730 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016731 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016732 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16733$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016734 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016735fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016736rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016737
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016738test "x$prefix" = xNONE && prefix=$ac_default_prefix
16739# Let make expand exec_prefix.
16740test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016741
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016742DEFS=-DHAVE_CONFIG_H
16743
Skip Montanaro6dead952003-09-25 14:50:04 +000016744ac_libobjs=
16745ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016746U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016747for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16748 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016749 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016750 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016751 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16752 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016753 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16754 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016755done
16756LIBOBJS=$ac_libobjs
16757
16758LTLIBOBJS=$ac_ltlibobjs
16759
16760
Martin v. Löwis11437992002-04-12 09:54:03 +000016761
Matthias Kloseb9621712010-04-24 17:59:49 +000016762
Victor Stinnere0be4232011-10-25 13:06:09 +020016763: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016764ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016765ac_clean_files_save=$ac_clean_files
16766ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016767{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16768$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16769as_write_fail=0
16770cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016771#! $SHELL
16772# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016773# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016774# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016775# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016776
Martin v. Löwis11437992002-04-12 09:54:03 +000016777debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016778ac_cs_recheck=false
16779ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016780
Matthias Kloseb9621712010-04-24 17:59:49 +000016781SHELL=\${CONFIG_SHELL-$SHELL}
16782export SHELL
16783_ASEOF
16784cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16785## -------------------- ##
16786## M4sh Initialization. ##
16787## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016788
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016789# Be more Bourne compatible
16790DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016791if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016792 emulate sh
16793 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016794 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016795 # is contrary to our usage. Disable this feature.
16796 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016797 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016798else
Matthias Kloseb9621712010-04-24 17:59:49 +000016799 case `(set -o) 2>/dev/null` in #(
16800 *posix*) :
16801 set -o posix ;; #(
16802 *) :
16803 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016804esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016805fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016806
16807
Matthias Kloseb9621712010-04-24 17:59:49 +000016808as_nl='
16809'
16810export as_nl
16811# Printing a long string crashes Solaris 7 /usr/bin/printf.
16812as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16813as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16814as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16815# Prefer a ksh shell builtin over an external printf program on Solaris,
16816# but without wasting forks for bash or zsh.
16817if test -z "$BASH_VERSION$ZSH_VERSION" \
16818 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16819 as_echo='print -r --'
16820 as_echo_n='print -rn --'
16821elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16822 as_echo='printf %s\n'
16823 as_echo_n='printf %s'
16824else
16825 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16826 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16827 as_echo_n='/usr/ucb/echo -n'
16828 else
16829 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16830 as_echo_n_body='eval
16831 arg=$1;
16832 case $arg in #(
16833 *"$as_nl"*)
16834 expr "X$arg" : "X\\(.*\\)$as_nl";
16835 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16836 esac;
16837 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16838 '
16839 export as_echo_n_body
16840 as_echo_n='sh -c $as_echo_n_body as_echo'
16841 fi
16842 export as_echo_body
16843 as_echo='sh -c $as_echo_body as_echo'
16844fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016845
16846# The user is always right.
16847if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016848 PATH_SEPARATOR=:
16849 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16850 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16851 PATH_SEPARATOR=';'
16852 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016853fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016855
16856# IFS
16857# We need space, tab and new line, in precisely that order. Quoting is
16858# there to prevent editors from complaining about space-tab.
16859# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16860# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016861IFS=" "" $as_nl"
16862
16863# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016864as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016865case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016866 *[\\/]* ) as_myself=$0 ;;
16867 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016868for as_dir in $PATH
16869do
16870 IFS=$as_save_IFS
16871 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016872 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16873 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016874IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016876 ;;
16877esac
16878# We did not find ourselves, most probably we were run as `sh COMMAND'
16879# in which case we are not to be found in the path.
16880if test "x$as_myself" = x; then
16881 as_myself=$0
16882fi
16883if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016884 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16885 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016886fi
16887
Matthias Kloseb9621712010-04-24 17:59:49 +000016888# Unset variables that we do not need and which cause bugs (e.g. in
16889# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16890# suppresses any "Segmentation fault" message there. '((' could
16891# trigger a bug in pdksh 5.2.14.
16892for as_var in BASH_ENV ENV MAIL MAILPATH
16893do eval test x\${$as_var+set} = xset \
16894 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016895done
16896PS1='$ '
16897PS2='> '
16898PS4='+ '
16899
16900# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016901LC_ALL=C
16902export LC_ALL
16903LANGUAGE=C
16904export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016905
Matthias Kloseb9621712010-04-24 17:59:49 +000016906# CDPATH.
16907(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16908
16909
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016910# as_fn_error STATUS ERROR [LINENO LOG_FD]
16911# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016912# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16913# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016914# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016915as_fn_error ()
16916{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016917 as_status=$1; test $as_status -eq 0 && as_status=1
16918 if test "$4"; then
16919 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16920 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016921 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016922 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016923 as_fn_exit $as_status
16924} # as_fn_error
16925
16926
16927# as_fn_set_status STATUS
16928# -----------------------
16929# Set $? to STATUS, without forking.
16930as_fn_set_status ()
16931{
16932 return $1
16933} # as_fn_set_status
16934
16935# as_fn_exit STATUS
16936# -----------------
16937# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16938as_fn_exit ()
16939{
16940 set +e
16941 as_fn_set_status $1
16942 exit $1
16943} # as_fn_exit
16944
16945# as_fn_unset VAR
16946# ---------------
16947# Portably unset VAR.
16948as_fn_unset ()
16949{
16950 { eval $1=; unset $1;}
16951}
16952as_unset=as_fn_unset
16953# as_fn_append VAR VALUE
16954# ----------------------
16955# Append the text in VALUE to the end of the definition contained in VAR. Take
16956# advantage of any shell optimizations that allow amortized linear growth over
16957# repeated appends, instead of the typical quadratic growth present in naive
16958# implementations.
16959if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16960 eval 'as_fn_append ()
16961 {
16962 eval $1+=\$2
16963 }'
16964else
16965 as_fn_append ()
16966 {
16967 eval $1=\$$1\$2
16968 }
16969fi # as_fn_append
16970
16971# as_fn_arith ARG...
16972# ------------------
16973# Perform arithmetic evaluation on the ARGs, and store the result in the
16974# global $as_val. Take advantage of shells that can avoid forks. The arguments
16975# must be portable across $(()) and expr.
16976if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16977 eval 'as_fn_arith ()
16978 {
16979 as_val=$(( $* ))
16980 }'
16981else
16982 as_fn_arith ()
16983 {
16984 as_val=`expr "$@" || test $? -eq 1`
16985 }
16986fi # as_fn_arith
16987
16988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016989if expr a : '\(a\)' >/dev/null 2>&1 &&
16990 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16991 as_expr=expr
16992else
16993 as_expr=false
16994fi
16995
16996if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16997 as_basename=basename
16998else
16999 as_basename=false
17000fi
17001
Matthias Kloseb9621712010-04-24 17:59:49 +000017002if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17003 as_dirname=dirname
17004else
17005 as_dirname=false
17006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017008as_me=`$as_basename -- "$0" ||
17009$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17010 X"$0" : 'X\(//\)$' \| \
17011 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017012$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017013 sed '/^.*\/\([^/][^/]*\)\/*$/{
17014 s//\1/
17015 q
17016 }
17017 /^X\/\(\/\/\)$/{
17018 s//\1/
17019 q
17020 }
17021 /^X\/\(\/\).*/{
17022 s//\1/
17023 q
17024 }
17025 s/.*/./; q'`
17026
Matthias Kloseb9621712010-04-24 17:59:49 +000017027# Avoid depending upon Character Ranges.
17028as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17029as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17030as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17031as_cr_digits='0123456789'
17032as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017033
17034ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017035case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017036-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017037 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017038 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017039 xy) ECHO_C='\c';;
17040 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17041 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017042 esac;;
17043*)
17044 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017045esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017046
Martin v. Löwis11437992002-04-12 09:54:03 +000017047rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017048if test -d conf$$.dir; then
17049 rm -f conf$$.dir/conf$$.file
17050else
17051 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017052 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017054if (echo >conf$$.file) 2>/dev/null; then
17055 if ln -s conf$$.file conf$$ 2>/dev/null; then
17056 as_ln_s='ln -s'
17057 # ... but there are two gotchas:
17058 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17059 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017060 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017061 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017062 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017063 elif ln conf$$.file conf$$ 2>/dev/null; then
17064 as_ln_s=ln
17065 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017066 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017067 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017068else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017069 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017071rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17072rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017073
Matthias Kloseb9621712010-04-24 17:59:49 +000017074
17075# as_fn_mkdir_p
17076# -------------
17077# Create "$as_dir" as a directory, including parents if necessary.
17078as_fn_mkdir_p ()
17079{
17080
17081 case $as_dir in #(
17082 -*) as_dir=./$as_dir;;
17083 esac
17084 test -d "$as_dir" || eval $as_mkdir_p || {
17085 as_dirs=
17086 while :; do
17087 case $as_dir in #(
17088 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17089 *) as_qdir=$as_dir;;
17090 esac
17091 as_dirs="'$as_qdir' $as_dirs"
17092 as_dir=`$as_dirname -- "$as_dir" ||
17093$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17094 X"$as_dir" : 'X\(//\)[^/]' \| \
17095 X"$as_dir" : 'X\(//\)$' \| \
17096 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17097$as_echo X"$as_dir" |
17098 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17099 s//\1/
17100 q
17101 }
17102 /^X\(\/\/\)[^/].*/{
17103 s//\1/
17104 q
17105 }
17106 /^X\(\/\/\)$/{
17107 s//\1/
17108 q
17109 }
17110 /^X\(\/\).*/{
17111 s//\1/
17112 q
17113 }
17114 s/.*/./; q'`
17115 test -d "$as_dir" && break
17116 done
17117 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017118 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017119
17120
17121} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017122if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017123 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017124else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017125 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017126 as_mkdir_p=false
17127fi
17128
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017129
17130# as_fn_executable_p FILE
17131# -----------------------
17132# Test if FILE is an executable regular file.
17133as_fn_executable_p ()
17134{
17135 test -f "$1" && test -x "$1"
17136} # as_fn_executable_p
17137as_test_x='test -x'
17138as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017139
17140# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017141as_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 +000017142
17143# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017144as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017145
17146
Martin v. Löwis11437992002-04-12 09:54:03 +000017147exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017148## ----------------------------------- ##
17149## Main body of $CONFIG_STATUS script. ##
17150## ----------------------------------- ##
17151_ASEOF
17152test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017153
Matthias Kloseb9621712010-04-24 17:59:49 +000017154cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17155# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017156# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017157# values after options handling.
17158ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017159This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017160generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017161
17162 CONFIG_FILES = $CONFIG_FILES
17163 CONFIG_HEADERS = $CONFIG_HEADERS
17164 CONFIG_LINKS = $CONFIG_LINKS
17165 CONFIG_COMMANDS = $CONFIG_COMMANDS
17166 $ $0 $@
17167
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017168on `(hostname || uname -n) 2>/dev/null | sed 1q`
17169"
17170
Martin v. Löwis11437992002-04-12 09:54:03 +000017171_ACEOF
17172
Matthias Kloseb9621712010-04-24 17:59:49 +000017173case $ac_config_files in *"
17174"*) set x $ac_config_files; shift; ac_config_files=$*;;
17175esac
17176
17177case $ac_config_headers in *"
17178"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17179esac
17180
17181
17182cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017183# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017184config_files="$ac_config_files"
17185config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017187_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017188
Matthias Kloseb9621712010-04-24 17:59:49 +000017189cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017190ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017191\`$as_me' instantiates files and other configuration actions
17192from templates according to the current configuration. Unless the files
17193and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017194
Matthias Kloseb9621712010-04-24 17:59:49 +000017195Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017196
17197 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017198 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017199 --config print configuration, then exit
17200 -q, --quiet, --silent
17201 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017202 -d, --debug don't remove temporary files
17203 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017204 --file=FILE[:TEMPLATE]
17205 instantiate the configuration file FILE
17206 --header=FILE[:TEMPLATE]
17207 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017208
17209Configuration files:
17210$config_files
17211
17212Configuration headers:
17213$config_headers
17214
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017215Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017218cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17219ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017220ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017221python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017222configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017223 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017224
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017225Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017226This config.status script is free software; the Free Software Foundation
17227gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017228
17229ac_pwd='$ac_pwd'
17230srcdir='$srcdir'
17231INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017232MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017233test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017234_ACEOF
17235
Matthias Kloseb9621712010-04-24 17:59:49 +000017236cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17237# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017238ac_need_defaults=:
17239while test $# != 0
17240do
17241 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017242 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017243 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17244 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017245 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017246 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017247 --*=)
17248 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17249 ac_optarg=
17250 ac_shift=:
17251 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017252 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017253 ac_option=$1
17254 ac_optarg=$2
17255 ac_shift=shift
17256 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017257 esac
17258
Skip Montanaro6dead952003-09-25 14:50:04 +000017259 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017260 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017261 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17262 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017263 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017264 $as_echo "$ac_cs_version"; exit ;;
17265 --config | --confi | --conf | --con | --co | --c )
17266 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017267 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017268 debug=: ;;
17269 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017270 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017271 case $ac_optarg in
17272 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017273 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017274 esac
17275 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017276 ac_need_defaults=false;;
17277 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017278 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017279 case $ac_optarg in
17280 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17281 esac
17282 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017283 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017284 --he | --h)
17285 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017286 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017287Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017288 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017289 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017290 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17291 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17292 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017293
17294 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017295 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017296Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017297
Matthias Kloseb9621712010-04-24 17:59:49 +000017298 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017299 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017300
17301 esac
17302 shift
17303done
17304
Skip Montanaro6dead952003-09-25 14:50:04 +000017305ac_configure_extra_args=
17306
17307if $ac_cs_silent; then
17308 exec 6>/dev/null
17309 ac_configure_extra_args="$ac_configure_extra_args --silent"
17310fi
17311
17312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017313cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017314if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017315 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017316 shift
17317 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17318 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017319 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017320 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017321fi
17322
Martin v. Löwis11437992002-04-12 09:54:03 +000017323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017324cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017325exec 5>>config.log
17326{
17327 echo
17328 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17329## Running $as_me. ##
17330_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017331 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017332} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017335cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017336_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017337
Matthias Kloseb9621712010-04-24 17:59:49 +000017338cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017339
17340# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017341for ac_config_target in $ac_config_targets
17342do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017343 case $ac_config_target in
17344 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17345 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17346 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017347 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17348 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017349 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17350 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017351 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017352 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017353 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017354
Victor Stinnere0be4232011-10-25 13:06:09 +020017355 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017356 esac
17357done
17358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017359
Martin v. Löwis11437992002-04-12 09:54:03 +000017360# If the user did not use the arguments to specify the items to instantiate,
17361# then the envvar interface is used. Set only those that are not.
17362# We use the long form for the default assignment because of an extremely
17363# bizarre bug on SunOS 4.1.3.
17364if $ac_need_defaults; then
17365 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17366 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17367fi
17368
Skip Montanaro6dead952003-09-25 14:50:04 +000017369# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017370# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017371# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017372# Hook for its removal unless debugging.
17373# Note that there is a small window in which the directory will not be cleaned:
17374# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017375$debug ||
17376{
Victor Stinnere0be4232011-10-25 13:06:09 +020017377 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017378 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017379 : "${ac_tmp:=$tmp}"
17380 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017381' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017382 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017383}
Martin v. Löwis11437992002-04-12 09:54:03 +000017384# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017385
Martin v. Löwis11437992002-04-12 09:54:03 +000017386{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017387 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017388 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017389} ||
17390{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017391 tmp=./conf$$-$RANDOM
17392 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017393} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017394ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017395
Matthias Kloseb9621712010-04-24 17:59:49 +000017396# Set up the scripts for CONFIG_FILES section.
17397# No need to generate them if there are no CONFIG_FILES.
17398# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017399if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017400
Matthias Kloseb9621712010-04-24 17:59:49 +000017401
17402ac_cr=`echo X | tr X '\015'`
17403# On cygwin, bash can eat \r inside `` if the user requested igncr.
17404# But we know of no other shell where ac_cr would be empty at this
17405# point, so we can use a bashism as a fallback.
17406if test "x$ac_cr" = x; then
17407 eval ac_cr=\$\'\\r\'
17408fi
17409ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17410if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017411 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017412else
17413 ac_cs_awk_cr=$ac_cr
17414fi
17415
Victor Stinnere0be4232011-10-25 13:06:09 +020017416echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017417_ACEOF
17418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017419
Matthias Kloseb9621712010-04-24 17:59:49 +000017420{
17421 echo "cat >conf$$subs.awk <<_ACEOF" &&
17422 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17423 echo "_ACEOF"
17424} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017425 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17426ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017427ac_delim='%!_!# '
17428for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017429 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017430 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017431
Matthias Kloseb9621712010-04-24 17:59:49 +000017432 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17433 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017434 break
17435 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017436 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017437 else
17438 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017439 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017440done
Matthias Kloseb9621712010-04-24 17:59:49 +000017441rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017442
Matthias Kloseb9621712010-04-24 17:59:49 +000017443cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017444cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017446sed -n '
17447h
17448s/^/S["/; s/!.*/"]=/
17449p
17450g
17451s/^[^!]*!//
17452:repl
17453t repl
17454s/'"$ac_delim"'$//
17455t delim
17456:nl
17457h
17458s/\(.\{148\}\)..*/\1/
17459t more1
17460s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17461p
17462n
17463b repl
17464:more1
17465s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17466p
17467g
17468s/.\{148\}//
17469t nl
17470:delim
17471h
17472s/\(.\{148\}\)..*/\1/
17473t more2
17474s/["\\]/\\&/g; s/^/"/; s/$/"/
17475p
17476b
17477:more2
17478s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17479p
17480g
17481s/.\{148\}//
17482t delim
17483' <conf$$subs.awk | sed '
17484/^[^""]/{
17485 N
17486 s/\n//
17487}
17488' >>$CONFIG_STATUS || ac_write_fail=1
17489rm -f conf$$subs.awk
17490cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17491_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017492cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017493 for (key in S) S_is_set[key] = 1
17494 FS = ""
17495
17496}
17497{
17498 line = $ 0
17499 nfields = split(line, field, "@")
17500 substed = 0
17501 len = length(field[1])
17502 for (i = 2; i < nfields; i++) {
17503 key = field[i]
17504 keylen = length(key)
17505 if (S_is_set[key]) {
17506 value = S[key]
17507 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17508 len += length(value) + length(field[++i])
17509 substed = 1
17510 } else
17511 len += 1 + keylen
17512 }
17513
17514 print line
17515}
17516
17517_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017519cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17520if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17521 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17522else
17523 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017524fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017525 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017526_ACEOF
17527
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017528# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17529# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017530# trailing colons and then remove the whole line if VPATH becomes empty
17531# (actually we leave an empty line to preserve line numbers).
17532if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017533 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17534h
17535s///
17536s/^/:/
17537s/[ ]*$/:/
17538s/:\$(srcdir):/:/g
17539s/:\${srcdir}:/:/g
17540s/:@srcdir@:/:/g
17541s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017542s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017543x
17544s/\(=[ ]*\).*/\1/
17545G
17546s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017547s/^[^=]*=[ ]*$//
17548}'
17549fi
17550
Matthias Kloseb9621712010-04-24 17:59:49 +000017551cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017552fi # test -n "$CONFIG_FILES"
17553
Matthias Kloseb9621712010-04-24 17:59:49 +000017554# Set up the scripts for CONFIG_HEADERS section.
17555# No need to generate them if there are no CONFIG_HEADERS.
17556# This happens for instance with `./config.status Makefile'.
17557if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017558cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017559BEGIN {
17560_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017561
Matthias Kloseb9621712010-04-24 17:59:49 +000017562# Transform confdefs.h into an awk script `defines.awk', embedded as
17563# here-document in config.status, that substitutes the proper values into
17564# config.h.in to produce config.h.
17565
17566# Create a delimiter string that does not exist in confdefs.h, to ease
17567# handling of long lines.
17568ac_delim='%!_!# '
17569for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017570 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17571 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017572 break
17573 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017574 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017575 else
17576 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17577 fi
17578done
17579
17580# For the awk script, D is an array of macro values keyed by name,
17581# likewise P contains macro parameters if any. Preserve backslash
17582# newline sequences.
17583
17584ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17585sed -n '
17586s/.\{148\}/&'"$ac_delim"'/g
17587t rset
17588:rset
17589s/^[ ]*#[ ]*define[ ][ ]*/ /
17590t def
17591d
17592:def
17593s/\\$//
17594t bsnl
17595s/["\\]/\\&/g
17596s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17597D["\1"]=" \3"/p
17598s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17599d
17600:bsnl
17601s/["\\]/\\&/g
17602s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17603D["\1"]=" \3\\\\\\n"\\/p
17604t cont
17605s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17606t cont
17607d
17608:cont
17609n
17610s/.\{148\}/&'"$ac_delim"'/g
17611t clear
17612:clear
17613s/\\$//
17614t bsnlc
17615s/["\\]/\\&/g; s/^/"/; s/$/"/p
17616d
17617:bsnlc
17618s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17619b cont
17620' <confdefs.h | sed '
17621s/'"$ac_delim"'/"\\\
17622"/g' >>$CONFIG_STATUS || ac_write_fail=1
17623
17624cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17625 for (key in D) D_is_set[key] = 1
17626 FS = ""
17627}
17628/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17629 line = \$ 0
17630 split(line, arg, " ")
17631 if (arg[1] == "#") {
17632 defundef = arg[2]
17633 mac1 = arg[3]
17634 } else {
17635 defundef = substr(arg[1], 2)
17636 mac1 = arg[2]
17637 }
17638 split(mac1, mac2, "(") #)
17639 macro = mac2[1]
17640 prefix = substr(line, 1, index(line, defundef) - 1)
17641 if (D_is_set[macro]) {
17642 # Preserve the white space surrounding the "#".
17643 print prefix "define", macro P[macro] D[macro]
17644 next
17645 } else {
17646 # Replace #undef with comments. This is necessary, for example,
17647 # in the case of _POSIX_SOURCE, which is predefined and required
17648 # on some systems where configure will not decide to define it.
17649 if (defundef == "undef") {
17650 print "/*", prefix defundef, macro, "*/"
17651 next
17652 }
17653 }
17654}
17655{ print }
17656_ACAWK
17657_ACEOF
17658cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017659 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017660fi # test -n "$CONFIG_HEADERS"
17661
17662
17663eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17664shift
17665for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017666do
17667 case $ac_tag in
17668 :[FHLC]) ac_mode=$ac_tag; continue;;
17669 esac
17670 case $ac_mode$ac_tag in
17671 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017672 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017673 :[FH]-) ac_tag=-:-;;
17674 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17675 esac
17676 ac_save_IFS=$IFS
17677 IFS=:
17678 set x $ac_tag
17679 IFS=$ac_save_IFS
17680 shift
17681 ac_file=$1
17682 shift
17683
17684 case $ac_mode in
17685 :L) ac_source=$1;;
17686 :[FH])
17687 ac_file_inputs=
17688 for ac_f
17689 do
17690 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017691 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017692 *) # Look for the file first in the build tree, then in the source tree
17693 # (if the path is not absolute). The absolute path cannot be DOS-style,
17694 # because $ac_f cannot contain `:'.
17695 test -f "$ac_f" ||
17696 case $ac_f in
17697 [\\/$]*) false;;
17698 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17699 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017700 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017701 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017702 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17703 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017704 done
17705
17706 # Let's still pretend it is `configure' which instantiates (i.e., don't
17707 # use $as_me), people would be surprised to read:
17708 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017709 configure_input='Generated from '`
17710 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17711 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017712 if test x"$ac_file" != x-; then
17713 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017714 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17715$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017716 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017717 # Neutralize special characters interpreted by sed in replacement strings.
17718 case $configure_input in #(
17719 *\&* | *\|* | *\\* )
17720 ac_sed_conf_input=`$as_echo "$configure_input" |
17721 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17722 *) ac_sed_conf_input=$configure_input;;
17723 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017724
17725 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017726 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17727 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017728 esac
17729 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017730 esac
17731
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017732 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017733$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017734 X"$ac_file" : 'X\(//\)[^/]' \| \
17735 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017736 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017737$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017738 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17739 s//\1/
17740 q
17741 }
17742 /^X\(\/\/\)[^/].*/{
17743 s//\1/
17744 q
17745 }
17746 /^X\(\/\/\)$/{
17747 s//\1/
17748 q
17749 }
17750 /^X\(\/\).*/{
17751 s//\1/
17752 q
17753 }
17754 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017755 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017756 ac_builddir=.
17757
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017758case "$ac_dir" in
17759.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17760*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017761 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017762 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017763 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017764 case $ac_top_builddir_sub in
17765 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17766 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17767 esac ;;
17768esac
17769ac_abs_top_builddir=$ac_pwd
17770ac_abs_builddir=$ac_pwd$ac_dir_suffix
17771# for backward compatibility:
17772ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017773
17774case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017775 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017776 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017777 ac_top_srcdir=$ac_top_builddir_sub
17778 ac_abs_top_srcdir=$ac_pwd ;;
17779 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017780 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017781 ac_top_srcdir=$srcdir
17782 ac_abs_top_srcdir=$srcdir ;;
17783 *) # Relative name.
17784 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17785 ac_top_srcdir=$ac_top_build_prefix$srcdir
17786 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017787esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017788ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017789
Martin v. Löwis11437992002-04-12 09:54:03 +000017790
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017791 case $ac_mode in
17792 :F)
17793 #
17794 # CONFIG_FILE
17795 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017796
17797 case $INSTALL in
17798 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017799 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017800 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017801 ac_MKDIR_P=$MKDIR_P
17802 case $MKDIR_P in
17803 [\\/$]* | ?:[\\/]* ) ;;
17804 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17805 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017806_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017807
Matthias Kloseb9621712010-04-24 17:59:49 +000017808cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017809# If the template does not know about datarootdir, expand it.
17810# FIXME: This hack should be removed a few years after 2.60.
17811ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017812ac_sed_dataroot='
17813/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017814 p
17815 q
17816}
17817/@datadir@/p
17818/@docdir@/p
17819/@infodir@/p
17820/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017821/@mandir@/p'
17822case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017823*datarootdir*) ac_datarootdir_seen=yes;;
17824*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17826$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017828cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017829 ac_datarootdir_hack='
17830 s&@datadir@&$datadir&g
17831 s&@docdir@&$docdir&g
17832 s&@infodir@&$infodir&g
17833 s&@localedir@&$localedir&g
17834 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017835 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017836esac
17837_ACEOF
17838
17839# Neutralize VPATH when `$srcdir' = `.'.
17840# Shell code in configure.ac might set extrasub.
17841# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017842cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17843ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017844$extrasub
17845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017846cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017847:t
17848/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017849s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017850s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017851s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017852s&@srcdir@&$ac_srcdir&;t t
17853s&@abs_srcdir@&$ac_abs_srcdir&;t t
17854s&@top_srcdir@&$ac_top_srcdir&;t t
17855s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17856s&@builddir@&$ac_builddir&;t t
17857s&@abs_builddir@&$ac_abs_builddir&;t t
17858s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17859s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017860s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017861$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017862"
Victor Stinnere0be4232011-10-25 13:06:09 +020017863eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17864 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017866test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017867 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17868 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17869 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017871which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017872$as_echo "$as_me: 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" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017874
Victor Stinnere0be4232011-10-25 13:06:09 +020017875 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017876 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017877 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17878 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017879 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017880 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017881 ;;
17882 :H)
17883 #
17884 # CONFIG_HEADER
17885 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017886 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017887 {
17888 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017889 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17890 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017891 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017892 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017893 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17894$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017895 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017896 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017897 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017898 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017899 fi
17900 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017901 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017902 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017903 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017904 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017905 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017907
17908 esac
17909
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017910
17911 case $ac_file$ac_mode in
17912 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17913
17914 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017915done # for ac_tag
17916
Guido van Rossum627b2d71993-12-24 10:39:16 +000017917
Matthias Kloseb9621712010-04-24 17:59:49 +000017918as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017919_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017920ac_clean_files=$ac_clean_files_save
17921
Matthias Kloseb9621712010-04-24 17:59:49 +000017922test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017923 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017924
Martin v. Löwis11437992002-04-12 09:54:03 +000017925
17926# configure is writing to config.log, and then calls config.status.
17927# config.status does its own redirection, appending to config.log.
17928# Unfortunately, on DOS this fails, as config.log is still kept open
17929# by configure, so config.status won't be able to write to it; its
17930# output is simply discarded. So we exec the FD to /dev/null,
17931# effectively closing config.log, so it can be properly (re)opened and
17932# appended to by config.status. When coming back to configure, we
17933# need to make the FD available again.
17934if test "$no_create" != yes; then
17935 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017936 ac_config_status_args=
17937 test "$silent" = yes &&
17938 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017939 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017940 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017941 exec 5>>config.log
17942 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17943 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017944 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017945fi
17946if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17947 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17948$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017949fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017950
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017951
Christian Heimes75ed8902013-11-20 01:11:18 +010017952echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017953if test ! -f Modules/Setup
17954then
17955 cp $srcdir/Modules/Setup.dist Modules/Setup
17956fi
17957
Christian Heimes75ed8902013-11-20 01:11:18 +010017958echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017959if test ! -f Modules/Setup.local
17960then
17961 echo "# Edit this file for local setup changes" >Modules/Setup.local
17962fi
17963
Christian Heimes75ed8902013-11-20 01:11:18 +010017964echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017965$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17966 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017967 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017968mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017969
17970if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17971 echo "" >&6
17972 echo "" >&6
Christian Heimes938da642016-09-24 12:34:25 +020017973 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 +000017974 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017975 echo "" >&6
17976 echo "" >&6
17977fi
17978