blob: a624d1cf95413887d4163238e4d6e90d665f6bf8 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ned Deily4829bc62016-09-12 17:29:04 -04003# Generated by GNU Autoconf 2.69 for python 3.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Ned Deily4829bc62016-09-12 17:29:04 -0400583PACKAGE_VERSION='3.7'
584PACKAGE_STRING='python 3.7'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700645DTRACE_OBJS
646DTRACE_HEADERS
647DFLAGS
648DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000649THREADOBJ
650LDLAST
651USE_THREAD_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700652TCLTK_LIBS
653TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000654LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100655PKG_CONFIG_LIBDIR
656PKG_CONFIG_PATH
657PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000658SHLIBS
659CFLAGSFORSHARED
660LINKFORSHARED
661CCSHARED
662BLDSHARED
663LDCXXSHARED
664LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700665SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000666LIBTOOL_CRUFT
667OTHER_LIBTOOL_OPT
668UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700669CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000670BASECFLAGS
671OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700672LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700673target_os
674target_vendor
675target_cpu
676target
677LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_ERR
679LLVM_PROF_FILE
680LLVM_PROF_MERGER
681PGO_PROF_USE_FLAG
682PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700683LTOFLAGS
Brett Cannon63d98bc2016-09-06 17:12:40 -0700684DEF_MAKE_RULE
685DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000686ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000687LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100688MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000689INSTALL_DATA
690INSTALL_SCRIPT
691INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200692ac_ct_READELF
693READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000694ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200695ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000696AR
697RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000698USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000699GNULD
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
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500763HAS_HG
764HGBRANCH
765HGTAG
766HGVERSION
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
787localstatedir
788sharedstatedir
789sysconfdir
790datadir
791datarootdir
792libexecdir
793sbindir
794bindir
795program_transform_name
796prefix
797exec_prefix
798PACKAGE_URL
799PACKAGE_BUGREPORT
800PACKAGE_STRING
801PACKAGE_VERSION
802PACKAGE_TARNAME
803PACKAGE_NAME
804PATH_SEPARATOR
805SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000806ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000807ac_user_opts='
808enable_option_checking
809enable_universalsdk
810with_universal_archs
811with_framework_name
812enable_framework
813with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600814with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_cxx_main
816with_suffix
817enable_shared
818enable_profiling
819with_pydebug
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000820enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700821with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100822with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100823with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_libs
825with_system_expat
826with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100827with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000828enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700829with_tcltk_includes
830with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_threads
833with_thread
834enable_ipv6
835with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_pymalloc
837with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700838with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_fpectl
840with_libm
841with_libc
842enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000843with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800844with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000845'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 ac_precious_vars='build_alias
847host_alias
848target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100849MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850CC
851CFLAGS
852LDFLAGS
853LIBS
854CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100855CPP
856PKG_CONFIG
857PKG_CONFIG_PATH
858PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859
Guido van Rossum627b2d71993-12-24 10:39:16 +0000860
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000862ac_init_help=
863ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000864ac_unrecognized_opts=
865ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866# The variables have the same names as the options, with
867# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000868cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871no_recursion=
872prefix=NONE
873program_prefix=NONE
874program_suffix=NONE
875program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880x_includes=NONE
881x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000882
883# Installation directory options.
884# These are left unexpanded so users can "make install exec_prefix=/foo"
885# and all the variables that are supposed to be based on exec_prefix
886# by default will actually change.
887# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889bindir='${exec_prefix}/bin'
890sbindir='${exec_prefix}/sbin'
891libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892datarootdir='${prefix}/share'
893datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894sysconfdir='${prefix}/etc'
895sharedstatedir='${prefix}/com'
896localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897includedir='${prefix}/include'
898oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000899docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
900infodir='${datarootdir}/info'
901htmldir='${docdir}'
902dvidir='${docdir}'
903pdfdir='${docdir}'
904psdir='${docdir}'
905libdir='${exec_prefix}/lib'
906localedir='${datarootdir}/locale'
907mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000912do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913 # If the previous option needs an argument, assign it.
914 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 ac_prev=
917 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000918 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200921 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
922 *=) ac_optarg= ;;
923 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926 # Accept the important Cygnus configure options, so we can diagnose typos.
927
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 case $ac_dashdash$ac_option in
929 --)
930 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932 -bindir | --bindir | --bindi | --bind | --bin | --bi)
933 ac_prev=bindir ;;
934 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936
937 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942 -cache-file | --cache-file | --cache-fil | --cache-fi \
943 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
944 ac_prev=cache_file ;;
945 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
946 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 cache_file=$ac_optarg ;;
948
949 --config-cache | -C)
950 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
958 | --dataroo | --dataro | --datar)
959 ac_prev=datarootdir ;;
960 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
961 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
962 datarootdir=$ac_optarg ;;
963
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000966 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200968 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt_orig=$ac_useropt
970 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
971 case $ac_user_opts in
972 *"
973"enable_$ac_useropt"
974"*) ;;
975 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
976 ac_unrecognized_sep=', ';;
977 esac
978 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000979
980 -docdir | --docdir | --docdi | --doc | --do)
981 ac_prev=docdir ;;
982 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
983 docdir=$ac_optarg ;;
984
985 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
986 ac_prev=dvidir ;;
987 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
988 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000991 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000992 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200994 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 ac_useropt_orig=$ac_useropt
996 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
997 case $ac_user_opts in
998 *"
999"enable_$ac_useropt"
1000"*) ;;
1001 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1002 ac_unrecognized_sep=', ';;
1003 esac
1004 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1007 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1008 | --exec | --exe | --ex)
1009 ac_prev=exec_prefix ;;
1010 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1011 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1012 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
1015 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001016 # Obsolete; use --with-gas.
1017 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 -help | --help | --hel | --he | -h)
1020 ac_init_help=long ;;
1021 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1022 ac_init_help=recursive ;;
1023 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1024 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001031 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1032 ac_prev=htmldir ;;
1033 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1034 | --ht=*)
1035 htmldir=$ac_optarg ;;
1036
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037 -includedir | --includedir | --includedi | --included | --include \
1038 | --includ | --inclu | --incl | --inc)
1039 ac_prev=includedir ;;
1040 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1041 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
1044 -infodir | --infodir | --infodi | --infod | --info | --inf)
1045 ac_prev=infodir ;;
1046 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
1049 -libdir | --libdir | --libdi | --libd)
1050 ac_prev=libdir ;;
1051 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
1054 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1055 | --libexe | --libex | --libe)
1056 ac_prev=libexecdir ;;
1057 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1058 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001061 -localedir | --localedir | --localedi | --localed | --locale)
1062 ac_prev=localedir ;;
1063 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1064 localedir=$ac_optarg ;;
1065
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001067 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 ac_prev=localstatedir ;;
1069 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
1073 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1074 ac_prev=mandir ;;
1075 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Obsolete; use --without-fp.
1080 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
1082 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084 no_create=yes ;;
1085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1087 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1088 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1091 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1092 | --oldin | --oldi | --old | --ol | --o)
1093 ac_prev=oldincludedir ;;
1094 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1095 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1096 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001098
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1100 ac_prev=prefix ;;
1101 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1105 | --program-pre | --program-pr | --program-p)
1106 ac_prev=program_prefix ;;
1107 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1108 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1112 | --program-suf | --program-su | --program-s)
1113 ac_prev=program_suffix ;;
1114 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1115 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117
1118 -program-transform-name | --program-transform-name \
1119 | --program-transform-nam | --program-transform-na \
1120 | --program-transform-n | --program-transform- \
1121 | --program-transform | --program-transfor \
1122 | --program-transfo | --program-transf \
1123 | --program-trans | --program-tran \
1124 | --progr-tra | --program-tr | --program-t)
1125 ac_prev=program_transform_name ;;
1126 -program-transform-name=* | --program-transform-name=* \
1127 | --program-transform-nam=* | --program-transform-na=* \
1128 | --program-transform-n=* | --program-transform-=* \
1129 | --program-transform=* | --program-transfor=* \
1130 | --program-transfo=* | --program-transf=* \
1131 | --program-trans=* | --program-tran=* \
1132 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001135 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1136 ac_prev=pdfdir ;;
1137 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1138 pdfdir=$ac_optarg ;;
1139
1140 -psdir | --psdir | --psdi | --psd | --ps)
1141 ac_prev=psdir ;;
1142 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1143 psdir=$ac_optarg ;;
1144
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1146 | -silent | --silent | --silen | --sile | --sil)
1147 silent=yes ;;
1148
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001149 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1150 ac_prev=sbindir ;;
1151 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1152 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001154
1155 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1156 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1157 | --sharedst | --shareds | --shared | --share | --shar \
1158 | --sha | --sh)
1159 ac_prev=sharedstatedir ;;
1160 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1161 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1162 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1163 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001166 -site | --site | --sit)
1167 ac_prev=site ;;
1168 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001170
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1172 ac_prev=srcdir ;;
1173 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1177 | --syscon | --sysco | --sysc | --sys | --sy)
1178 ac_prev=sysconfdir ;;
1179 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1180 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001182
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
1188 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1189 verbose=yes ;;
1190
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 -version | --version | --versio | --versi | --vers | -V)
1192 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
1194 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001195 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001198 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 ac_useropt_orig=$ac_useropt
1200 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1201 case $ac_user_opts in
1202 *"
1203"with_$ac_useropt"
1204"*) ;;
1205 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1206 ac_unrecognized_sep=', ';;
1207 esac
1208 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209
1210 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001214 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 ac_useropt_orig=$ac_useropt
1216 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1217 case $ac_user_opts in
1218 *"
1219"with_$ac_useropt"
1220"*) ;;
1221 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1222 ac_unrecognized_sep=', ';;
1223 esac
1224 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001226 --x)
1227 # Obsolete; use --with-x.
1228 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229
1230 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1231 | --x-incl | --x-inc | --x-in | --x-i)
1232 ac_prev=x_includes ;;
1233 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1234 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001235 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
1237 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1238 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1239 ac_prev=x_libraries ;;
1240 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1241 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001244 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1245Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246 ;;
1247
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 *=*)
1249 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1250 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001251 case $ac_envvar in #(
1252 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001253 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001255 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 export $ac_envvar ;;
1257
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001258 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001263 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264 ;;
1265
1266 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001267done
1268
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001271 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272fi
1273
Matthias Kloseb9621712010-04-24 17:59:49 +00001274if test -n "$ac_unrecognized_opts"; then
1275 case $enable_option_checking in
1276 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001277 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001278 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1279 esac
1280fi
1281
1282# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1284 datadir sysconfdir sharedstatedir localstatedir includedir \
1285 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Ned Deily8bb38a72016-12-06 17:31:32 -05001286 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001287do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001289 # Remove trailing slashes.
1290 case $ac_val in
1291 */ )
1292 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1293 eval $ac_var=\$ac_val;;
1294 esac
1295 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001296 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297 [\\/$]* | ?:[\\/]* ) continue;;
1298 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001299 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001300 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001301done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001302
Martin v. Löwis11437992002-04-12 09:54:03 +00001303# There might be people who depend on the old broken behavior: `$host'
1304# used to hold the argument of --host etc.
1305# FIXME: To remove some day.
1306build=$build_alias
1307host=$host_alias
1308target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001309
Martin v. Löwis11437992002-04-12 09:54:03 +00001310# FIXME: To remove some day.
1311if test "x$host_alias" != x; then
1312 if test "x$build_alias" = x; then
1313 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001314 elif test "x$build_alias" != "x$host_alias"; then
1315 cross_compiling=yes
1316 fi
1317fi
1318
1319ac_tool_prefix=
1320test -n "$host_alias" && ac_tool_prefix=$host_alias-
1321
1322test "$silent" = yes && exec 6>/dev/null
1323
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001325ac_pwd=`pwd` && test -n "$ac_pwd" &&
1326ac_ls_di=`ls -di .` &&
1327ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001328 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331
1332
Guido van Rossum627b2d71993-12-24 10:39:16 +00001333# Find the source files, if location was not specified.
1334if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001335 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001337 ac_confdir=`$as_dirname -- "$as_myself" ||
1338$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1339 X"$as_myself" : 'X\(//\)[^/]' \| \
1340 X"$as_myself" : 'X\(//\)$' \| \
1341 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1342$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1344 s//\1/
1345 q
1346 }
1347 /^X\(\/\/\)[^/].*/{
1348 s//\1/
1349 q
1350 }
1351 /^X\(\/\/\)$/{
1352 s//\1/
1353 q
1354 }
1355 /^X\(\/\).*/{
1356 s//\1/
1357 q
1358 }
1359 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001360 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001361 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001362 srcdir=..
1363 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001364else
1365 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001367if test ! -r "$srcdir/$ac_unique_file"; then
1368 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001369 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1372ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001373 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374 pwd)`
1375# When building in place, set srcdir=.
1376if test "$ac_abs_confdir" = "$ac_pwd"; then
1377 srcdir=.
1378fi
1379# Remove unnecessary trailing slashes from srcdir.
1380# Double slashes in file names in object file debugging info
1381# mess up M-x gdb in Emacs.
1382case $srcdir in
1383*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1384esac
1385for ac_var in $ac_precious_vars; do
1386 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1387 eval ac_env_${ac_var}_value=\$${ac_var}
1388 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1389 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1390done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001391
Martin v. Löwis11437992002-04-12 09:54:03 +00001392#
1393# Report the --help message.
1394#
1395if test "$ac_init_help" = "long"; then
1396 # Omit some internal or obsolete options to make the list less imposing.
1397 # This message is too long to be a string in the A/UX 3.1 sh.
1398 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001399\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001400
1401Usage: $0 [OPTION]... [VAR=VALUE]...
1402
1403To assign environment variables (e.g., CC, CFLAGS...), specify them as
1404VAR=VALUE. See below for descriptions of some of the useful variables.
1405
1406Defaults for the options are specified in brackets.
1407
1408Configuration:
1409 -h, --help display this help and exit
1410 --help=short display options specific to this package
1411 --help=recursive display the short help of all the included packages
1412 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001413 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 --cache-file=FILE cache test results in FILE [disabled]
1415 -C, --config-cache alias for \`--cache-file=config.cache'
1416 -n, --no-create do not create output files
1417 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1418
Martin v. Löwis11437992002-04-12 09:54:03 +00001419Installation directories:
1420 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001421 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001422 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001423 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001424
1425By default, \`make install' will install all the files in
1426\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1427an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1428for instance \`--prefix=\$HOME'.
1429
1430For better control, use the options below.
1431
1432Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 --bindir=DIR user executables [EPREFIX/bin]
1434 --sbindir=DIR system admin executables [EPREFIX/sbin]
1435 --libexecdir=DIR program executables [EPREFIX/libexec]
1436 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1437 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1438 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1439 --libdir=DIR object code libraries [EPREFIX/lib]
1440 --includedir=DIR C header files [PREFIX/include]
1441 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1442 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1443 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1444 --infodir=DIR info documentation [DATAROOTDIR/info]
1445 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1446 --mandir=DIR man documentation [DATAROOTDIR/man]
1447 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1448 --htmldir=DIR html documentation [DOCDIR]
1449 --dvidir=DIR dvi documentation [DOCDIR]
1450 --pdfdir=DIR pdf documentation [DOCDIR]
1451 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001452_ACEOF
1453
1454 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001455
1456System types:
1457 --build=BUILD configure for building on BUILD [guessed]
1458 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001459 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
1461fi
1462
1463if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001464 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001465 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001467 cat <<\_ACEOF
1468
1469Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001470 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1472 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001473 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001474 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --enable-framework[=INSTALLDIR]
1476 Build (MacOSX|Darwin) framework
1477 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001478 --enable-profiling enable C-level code profiling
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)164eea52016-11-20 21:13:16 +00001479 --enable-optimizations Enable expensive optimizations (PGO, etc). Disabled
1480 by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001481 --enable-loadable-sqlite-extensions
1482 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-ipv6 Enable ipv6 (with ipv4) support
1484 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001485 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001486 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488Optional Packages:
1489 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1490 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001491 --with-universal-archs=ARCH
1492 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001493 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001494 --with-framework-name=FRAMEWORK
1495 specify an alternate name of the framework built
1496 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001498 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001499 --with-cxx-main=<compiler>
1500 compile main() and link python executable with C++
1501 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-suffix=.exe set executable suffix
1503 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001504 --with-lto Enable Link Time Optimization in PGO builds.
1505 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001506 --with-hash-algorithm=[fnv|siphash24]
1507 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001508 --with-address-sanitizer
1509 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001510 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001511 --with-system-expat build pyexpat module using an installed expat
1512 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001513 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001514 --with-system-libmpdec build _decimal module using an installed libmpdec
1515 library
Ned Deilyd819b932013-09-06 01:07:05 -07001516 --with-tcltk-includes='-I...'
1517 override search for Tcl and Tk include files
1518 --with-tcltk-libs='-L...'
1519 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001520 --with-dbmliborder=db1:db2:...
1521 order to check db backends for dbm. Valid value is a
1522 colon separated string with the backend names
1523 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001524 --with(out)-threads[=DIRECTORY]
1525 disable/enable thread support
1526 --with(out)-thread[=DIRECTORY]
1527 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001528 --with(out)-doc-strings disable/enable documentation strings
1529 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001530 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001531 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001532 --with-fpectl enable SIGFPE catching
1533 --with-libm=STRING math library
1534 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001535 --with(out)-computed-gotos
1536 Use computed gotos in evaluation loop (enabled by
1537 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001538 --with(out)-ensurepip=[=upgrade]
1539 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001540
1541Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001542 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001543 CC C compiler command
1544 CFLAGS C compiler flags
1545 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1546 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001547 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001548 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001549 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001550 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001551 PKG_CONFIG path to pkg-config utility
1552 PKG_CONFIG_PATH
1553 directories to add to pkg-config's search path
1554 PKG_CONFIG_LIBDIR
1555 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001556
1557Use these variables to override the choices made by `configure' or to help
1558it to find libraries and programs with nonstandard names/locations.
1559
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001560Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001561_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001562ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001563fi
1564
1565if test "$ac_init_help" = "recursive"; then
1566 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001567 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001568 test -d "$ac_dir" ||
1569 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1570 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 ac_builddir=.
1572
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573case "$ac_dir" in
1574.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1575*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001576 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001577 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001578 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579 case $ac_top_builddir_sub in
1580 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1581 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1582 esac ;;
1583esac
1584ac_abs_top_builddir=$ac_pwd
1585ac_abs_builddir=$ac_pwd$ac_dir_suffix
1586# for backward compatibility:
1587ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001588
1589case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 ac_top_srcdir=$ac_top_builddir_sub
1593 ac_abs_top_srcdir=$ac_pwd ;;
1594 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001595 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 ac_top_srcdir=$srcdir
1597 ac_abs_top_srcdir=$srcdir ;;
1598 *) # Relative name.
1599 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1600 ac_top_srcdir=$ac_top_build_prefix$srcdir
1601 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001602esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001604
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001605 cd "$ac_dir" || { ac_status=$?; continue; }
1606 # Check for guested configure.
1607 if test -f "$ac_srcdir/configure.gnu"; then
1608 echo &&
1609 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1610 elif test -f "$ac_srcdir/configure"; then
1611 echo &&
1612 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001613 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001614 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615 fi || ac_status=$?
1616 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001617 done
1618fi
1619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001620test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001621if $ac_init_version; then
1622 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001623python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001624generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001625
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001626Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001627This configure script is free software; the Free Software Foundation
1628gives unlimited permission to copy, distribute and modify it.
1629_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001632
1633## ------------------------ ##
1634## Autoconf initialization. ##
1635## ------------------------ ##
1636
1637# ac_fn_c_try_compile LINENO
1638# --------------------------
1639# Try to compile conftest.$ac_ext, and return whether this succeeded.
1640ac_fn_c_try_compile ()
1641{
1642 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1643 rm -f conftest.$ac_objext
1644 if { { ac_try="$ac_compile"
1645case "(($ac_try" in
1646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1647 *) ac_try_echo=$ac_try;;
1648esac
1649eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1650$as_echo "$ac_try_echo"; } >&5
1651 (eval "$ac_compile") 2>conftest.err
1652 ac_status=$?
1653 if test -s conftest.err; then
1654 grep -v '^ *+' conftest.err >conftest.er1
1655 cat conftest.er1 >&5
1656 mv -f conftest.er1 conftest.err
1657 fi
1658 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1659 test $ac_status = 0; } && {
1660 test -z "$ac_c_werror_flag" ||
1661 test ! -s conftest.err
1662 } && test -s conftest.$ac_objext; then :
1663 ac_retval=0
1664else
1665 $as_echo "$as_me: failed program was:" >&5
1666sed 's/^/| /' conftest.$ac_ext >&5
1667
1668 ac_retval=1
1669fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001670 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001671 as_fn_set_status $ac_retval
1672
1673} # ac_fn_c_try_compile
1674
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001675# ac_fn_c_try_cpp LINENO
1676# ----------------------
1677# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1678ac_fn_c_try_cpp ()
1679{
1680 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1681 if { { ac_try="$ac_cpp conftest.$ac_ext"
1682case "(($ac_try" in
1683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1684 *) ac_try_echo=$ac_try;;
1685esac
1686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1687$as_echo "$ac_try_echo"; } >&5
1688 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1689 ac_status=$?
1690 if test -s conftest.err; then
1691 grep -v '^ *+' conftest.err >conftest.er1
1692 cat conftest.er1 >&5
1693 mv -f conftest.er1 conftest.err
1694 fi
1695 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1696 test $ac_status = 0; } > conftest.i && {
1697 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1698 test ! -s conftest.err
1699 }; then :
1700 ac_retval=0
1701else
1702 $as_echo "$as_me: failed program was:" >&5
1703sed 's/^/| /' conftest.$ac_ext >&5
1704
1705 ac_retval=1
1706fi
1707 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1708 as_fn_set_status $ac_retval
1709
1710} # ac_fn_c_try_cpp
1711
Matthias Kloseb9621712010-04-24 17:59:49 +00001712# ac_fn_c_try_link LINENO
1713# -----------------------
1714# Try to link conftest.$ac_ext, and return whether this succeeded.
1715ac_fn_c_try_link ()
1716{
1717 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1718 rm -f conftest.$ac_objext conftest$ac_exeext
1719 if { { ac_try="$ac_link"
1720case "(($ac_try" in
1721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1722 *) ac_try_echo=$ac_try;;
1723esac
1724eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1725$as_echo "$ac_try_echo"; } >&5
1726 (eval "$ac_link") 2>conftest.err
1727 ac_status=$?
1728 if test -s conftest.err; then
1729 grep -v '^ *+' conftest.err >conftest.er1
1730 cat conftest.er1 >&5
1731 mv -f conftest.er1 conftest.err
1732 fi
1733 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1734 test $ac_status = 0; } && {
1735 test -z "$ac_c_werror_flag" ||
1736 test ! -s conftest.err
1737 } && test -s conftest$ac_exeext && {
1738 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001739 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001740 }; then :
1741 ac_retval=0
1742else
1743 $as_echo "$as_me: failed program was:" >&5
1744sed 's/^/| /' conftest.$ac_ext >&5
1745
1746 ac_retval=1
1747fi
1748 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1749 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1750 # interfere with the next link command; also delete a directory that is
1751 # left behind by Apple's compiler. We do this before executing the actions.
1752 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001753 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001754 as_fn_set_status $ac_retval
1755
1756} # ac_fn_c_try_link
1757
Matthias Kloseb9621712010-04-24 17:59:49 +00001758# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1759# -------------------------------------------------------
1760# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1761# the include files in INCLUDES and setting the cache variable VAR
1762# accordingly.
1763ac_fn_c_check_header_mongrel ()
1764{
1765 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001766 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1768$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001769if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001770 $as_echo_n "(cached) " >&6
1771fi
1772eval ac_res=\$$3
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1774$as_echo "$ac_res" >&6; }
1775else
1776 # Is the header compilable?
1777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1778$as_echo_n "checking $2 usability... " >&6; }
1779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1780/* end confdefs.h. */
1781$4
1782#include <$2>
1783_ACEOF
1784if ac_fn_c_try_compile "$LINENO"; then :
1785 ac_header_compiler=yes
1786else
1787 ac_header_compiler=no
1788fi
1789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1791$as_echo "$ac_header_compiler" >&6; }
1792
1793# Is the header present?
1794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1795$as_echo_n "checking $2 presence... " >&6; }
1796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1797/* end confdefs.h. */
1798#include <$2>
1799_ACEOF
1800if ac_fn_c_try_cpp "$LINENO"; then :
1801 ac_header_preproc=yes
1802else
1803 ac_header_preproc=no
1804fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001805rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1807$as_echo "$ac_header_preproc" >&6; }
1808
1809# So? What about this header?
1810case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1811 yes:no: )
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1813$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1815$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1816 ;;
1817 no:yes:* )
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1819$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1821$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1823$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1825$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&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;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001828( $as_echo "## --------------------------------------- ##
1829## Report this to https://bugs.python.org/ ##
1830## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001831 ) | sed "s/^/$as_me: WARNING: /" >&2
1832 ;;
1833esac
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1835$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001836if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001837 $as_echo_n "(cached) " >&6
1838else
1839 eval "$3=\$ac_header_compiler"
1840fi
1841eval ac_res=\$$3
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1843$as_echo "$ac_res" >&6; }
1844fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001845 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001846
1847} # ac_fn_c_check_header_mongrel
1848
1849# ac_fn_c_try_run LINENO
1850# ----------------------
1851# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1852# that executables *can* be run.
1853ac_fn_c_try_run ()
1854{
1855 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1856 if { { ac_try="$ac_link"
1857case "(($ac_try" in
1858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1859 *) ac_try_echo=$ac_try;;
1860esac
1861eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1862$as_echo "$ac_try_echo"; } >&5
1863 (eval "$ac_link") 2>&5
1864 ac_status=$?
1865 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1866 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1867 { { case "(($ac_try" in
1868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1869 *) ac_try_echo=$ac_try;;
1870esac
1871eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1872$as_echo "$ac_try_echo"; } >&5
1873 (eval "$ac_try") 2>&5
1874 ac_status=$?
1875 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1876 test $ac_status = 0; }; }; then :
1877 ac_retval=0
1878else
1879 $as_echo "$as_me: program exited with status $ac_status" >&5
1880 $as_echo "$as_me: failed program was:" >&5
1881sed 's/^/| /' conftest.$ac_ext >&5
1882
1883 ac_retval=$ac_status
1884fi
1885 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001886 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001887 as_fn_set_status $ac_retval
1888
1889} # ac_fn_c_try_run
1890
1891# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1892# -------------------------------------------------------
1893# Tests whether HEADER exists and can be compiled using the include files in
1894# INCLUDES, setting the cache variable VAR accordingly.
1895ac_fn_c_check_header_compile ()
1896{
1897 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1899$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001900if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001901 $as_echo_n "(cached) " >&6
1902else
1903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1904/* end confdefs.h. */
1905$4
1906#include <$2>
1907_ACEOF
1908if ac_fn_c_try_compile "$LINENO"; then :
1909 eval "$3=yes"
1910else
1911 eval "$3=no"
1912fi
1913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1914fi
1915eval ac_res=\$$3
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1917$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001918 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001919
1920} # ac_fn_c_check_header_compile
1921
Matthias Kloseb9621712010-04-24 17:59:49 +00001922# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1923# -------------------------------------------
1924# Tests whether TYPE exists after having included INCLUDES, setting cache
1925# variable VAR accordingly.
1926ac_fn_c_check_type ()
1927{
1928 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1930$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001931if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001932 $as_echo_n "(cached) " >&6
1933else
1934 eval "$3=no"
1935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1936/* end confdefs.h. */
1937$4
1938int
1939main ()
1940{
1941if (sizeof ($2))
1942 return 0;
1943 ;
1944 return 0;
1945}
1946_ACEOF
1947if ac_fn_c_try_compile "$LINENO"; then :
1948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1949/* end confdefs.h. */
1950$4
1951int
1952main ()
1953{
1954if (sizeof (($2)))
1955 return 0;
1956 ;
1957 return 0;
1958}
1959_ACEOF
1960if ac_fn_c_try_compile "$LINENO"; then :
1961
1962else
1963 eval "$3=yes"
1964fi
1965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1966fi
1967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1968fi
1969eval ac_res=\$$3
1970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1971$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001972 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001973
1974} # ac_fn_c_check_type
1975
Matthias Kloseb9621712010-04-24 17:59:49 +00001976# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1977# --------------------------------------------
1978# Tries to find the compile-time value of EXPR in a program that includes
1979# INCLUDES, setting VAR accordingly. Returns whether the value could be
1980# computed
1981ac_fn_c_compute_int ()
1982{
1983 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984 if test "$cross_compiling" = yes; then
1985 # Depending upon the size, compute the lo and hi bounds.
1986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1987/* end confdefs.h. */
1988$4
1989int
1990main ()
1991{
1992static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001993test_array [0] = 0;
1994return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001995
1996 ;
1997 return 0;
1998}
1999_ACEOF
2000if ac_fn_c_try_compile "$LINENO"; then :
2001 ac_lo=0 ac_mid=0
2002 while :; do
2003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2004/* end confdefs.h. */
2005$4
2006int
2007main ()
2008{
2009static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002010test_array [0] = 0;
2011return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002012
2013 ;
2014 return 0;
2015}
2016_ACEOF
2017if ac_fn_c_try_compile "$LINENO"; then :
2018 ac_hi=$ac_mid; break
2019else
2020 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2021 if test $ac_lo -le $ac_mid; then
2022 ac_lo= ac_hi=
2023 break
2024 fi
2025 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2026fi
2027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2028 done
2029else
2030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031/* end confdefs.h. */
2032$4
2033int
2034main ()
2035{
2036static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002037test_array [0] = 0;
2038return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002039
2040 ;
2041 return 0;
2042}
2043_ACEOF
2044if ac_fn_c_try_compile "$LINENO"; then :
2045 ac_hi=-1 ac_mid=-1
2046 while :; do
2047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048/* end confdefs.h. */
2049$4
2050int
2051main ()
2052{
2053static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002054test_array [0] = 0;
2055return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002056
2057 ;
2058 return 0;
2059}
2060_ACEOF
2061if ac_fn_c_try_compile "$LINENO"; then :
2062 ac_lo=$ac_mid; break
2063else
2064 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2065 if test $ac_mid -le $ac_hi; then
2066 ac_lo= ac_hi=
2067 break
2068 fi
2069 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2070fi
2071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2072 done
2073else
2074 ac_lo= ac_hi=
2075fi
2076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079# Binary search between lo and hi bounds.
2080while test "x$ac_lo" != "x$ac_hi"; do
2081 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2083/* end confdefs.h. */
2084$4
2085int
2086main ()
2087{
2088static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002089test_array [0] = 0;
2090return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002091
2092 ;
2093 return 0;
2094}
2095_ACEOF
2096if ac_fn_c_try_compile "$LINENO"; then :
2097 ac_hi=$ac_mid
2098else
2099 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2100fi
2101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102done
2103case $ac_lo in #((
2104?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2105'') ac_retval=1 ;;
2106esac
2107 else
2108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2109/* end confdefs.h. */
2110$4
2111static long int longval () { return $2; }
2112static unsigned long int ulongval () { return $2; }
2113#include <stdio.h>
2114#include <stdlib.h>
2115int
2116main ()
2117{
2118
2119 FILE *f = fopen ("conftest.val", "w");
2120 if (! f)
2121 return 1;
2122 if (($2) < 0)
2123 {
2124 long int i = longval ();
2125 if (i != ($2))
2126 return 1;
2127 fprintf (f, "%ld", i);
2128 }
2129 else
2130 {
2131 unsigned long int i = ulongval ();
2132 if (i != ($2))
2133 return 1;
2134 fprintf (f, "%lu", i);
2135 }
2136 /* Do not output a trailing newline, as this causes \r\n confusion
2137 on some platforms. */
2138 return ferror (f) || fclose (f) != 0;
2139
2140 ;
2141 return 0;
2142}
2143_ACEOF
2144if ac_fn_c_try_run "$LINENO"; then :
2145 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2146else
2147 ac_retval=1
2148fi
2149rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2150 conftest.$ac_objext conftest.beam conftest.$ac_ext
2151rm -f conftest.val
2152
2153 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002154 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002155 as_fn_set_status $ac_retval
2156
2157} # ac_fn_c_compute_int
2158
2159# ac_fn_c_check_func LINENO FUNC VAR
2160# ----------------------------------
2161# Tests whether FUNC exists, setting the cache variable VAR accordingly
2162ac_fn_c_check_func ()
2163{
2164 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2166$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002167if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002168 $as_echo_n "(cached) " >&6
2169else
2170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2171/* end confdefs.h. */
2172/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2173 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2174#define $2 innocuous_$2
2175
2176/* System header to define __stub macros and hopefully few prototypes,
2177 which can conflict with char $2 (); below.
2178 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2179 <limits.h> exists even on freestanding compilers. */
2180
2181#ifdef __STDC__
2182# include <limits.h>
2183#else
2184# include <assert.h>
2185#endif
2186
2187#undef $2
2188
2189/* Override any GCC internal prototype to avoid an error.
2190 Use char because int might match the return type of a GCC
2191 builtin and then its argument prototype would still apply. */
2192#ifdef __cplusplus
2193extern "C"
2194#endif
2195char $2 ();
2196/* The GNU C library defines this for functions which it implements
2197 to always fail with ENOSYS. Some functions are actually named
2198 something starting with __ and the normal name is an alias. */
2199#if defined __stub_$2 || defined __stub___$2
2200choke me
2201#endif
2202
2203int
2204main ()
2205{
2206return $2 ();
2207 ;
2208 return 0;
2209}
2210_ACEOF
2211if ac_fn_c_try_link "$LINENO"; then :
2212 eval "$3=yes"
2213else
2214 eval "$3=no"
2215fi
2216rm -f core conftest.err conftest.$ac_objext \
2217 conftest$ac_exeext conftest.$ac_ext
2218fi
2219eval ac_res=\$$3
2220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2221$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002222 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002223
2224} # ac_fn_c_check_func
2225
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002226# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2227# ---------------------------------------------
2228# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2229# accordingly.
2230ac_fn_c_check_decl ()
2231{
2232 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2233 as_decl_name=`echo $2|sed 's/ *(.*//'`
2234 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2236$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2237if eval \${$3+:} false; then :
2238 $as_echo_n "(cached) " >&6
2239else
2240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2241/* end confdefs.h. */
2242$4
2243int
2244main ()
2245{
2246#ifndef $as_decl_name
2247#ifdef __cplusplus
2248 (void) $as_decl_use;
2249#else
2250 (void) $as_decl_name;
2251#endif
2252#endif
2253
2254 ;
2255 return 0;
2256}
2257_ACEOF
2258if ac_fn_c_try_compile "$LINENO"; then :
2259 eval "$3=yes"
2260else
2261 eval "$3=no"
2262fi
2263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2264fi
2265eval ac_res=\$$3
2266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2267$as_echo "$ac_res" >&6; }
2268 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2269
2270} # ac_fn_c_check_decl
2271
Matthias Kloseb9621712010-04-24 17:59:49 +00002272# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2273# ----------------------------------------------------
2274# Tries to find if the field MEMBER exists in type AGGR, after including
2275# INCLUDES, setting cache variable VAR accordingly.
2276ac_fn_c_check_member ()
2277{
2278 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2280$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002281if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002282 $as_echo_n "(cached) " >&6
2283else
2284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2285/* end confdefs.h. */
2286$5
2287int
2288main ()
2289{
2290static $2 ac_aggr;
2291if (ac_aggr.$3)
2292return 0;
2293 ;
2294 return 0;
2295}
2296_ACEOF
2297if ac_fn_c_try_compile "$LINENO"; then :
2298 eval "$4=yes"
2299else
2300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2301/* end confdefs.h. */
2302$5
2303int
2304main ()
2305{
2306static $2 ac_aggr;
2307if (sizeof ac_aggr.$3)
2308return 0;
2309 ;
2310 return 0;
2311}
2312_ACEOF
2313if ac_fn_c_try_compile "$LINENO"; then :
2314 eval "$4=yes"
2315else
2316 eval "$4=no"
2317fi
2318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2319fi
2320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2321fi
2322eval ac_res=\$$4
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2324$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002325 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002326
2327} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002328cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002329This file contains any messages produced by compilers while
2330running configure, to aid debugging if configure makes a mistake.
2331
Ned Deily4829bc62016-09-12 17:29:04 -04002332It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002333generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002334
2335 $ $0 $@
2336
2337_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002339{
2340cat <<_ASUNAME
2341## --------- ##
2342## Platform. ##
2343## --------- ##
2344
2345hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2346uname -m = `(uname -m) 2>/dev/null || echo unknown`
2347uname -r = `(uname -r) 2>/dev/null || echo unknown`
2348uname -s = `(uname -s) 2>/dev/null || echo unknown`
2349uname -v = `(uname -v) 2>/dev/null || echo unknown`
2350
2351/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2352/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2353
2354/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2355/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2356/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002357/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002358/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2359/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2360/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2361
2362_ASUNAME
2363
2364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2365for as_dir in $PATH
2366do
2367 IFS=$as_save_IFS
2368 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002369 $as_echo "PATH: $as_dir"
2370 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002371IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002372
2373} >&5
2374
2375cat >&5 <<_ACEOF
2376
2377
2378## ----------- ##
2379## Core tests. ##
2380## ----------- ##
2381
2382_ACEOF
2383
2384
2385# Keep a trace of the command line.
2386# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002387# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002388# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002389# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002390ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002391ac_configure_args0=
2392ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002393ac_must_keep_next=false
2394for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002395do
Skip Montanaro6dead952003-09-25 14:50:04 +00002396 for ac_arg
2397 do
2398 case $ac_arg in
2399 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2400 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2401 | -silent | --silent | --silen | --sile | --sil)
2402 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002403 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002404 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002405 esac
2406 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002407 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002409 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002410 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002411 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002413 case $ac_arg in
2414 *=* | --config-cache | -C | -disable-* | --disable-* \
2415 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2416 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2417 | -with-* | --with-* | -without-* | --without-* | --x)
2418 case "$ac_configure_args0 " in
2419 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2420 esac
2421 ;;
2422 -* ) ac_must_keep_next=true ;;
2423 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 ;;
2427 esac
2428 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002429done
Matthias Kloseb9621712010-04-24 17:59:49 +00002430{ ac_configure_args0=; unset ac_configure_args0;}
2431{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002432
2433# When interrupted or exit'd, cleanup temporary files, and complete
2434# config.log. We remove comments because anyway the quotes in there
2435# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002436# WARNING: Use '\'' to represent an apostrophe within the trap.
2437# 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 +00002438trap 'exit_status=$?
2439 # Save into config.log some information that might help in debugging.
2440 {
2441 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002442
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002443 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002444## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002445## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002446 echo
2447 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448(
2449 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2450 eval ac_val=\$$ac_var
2451 case $ac_val in #(
2452 *${as_nl}*)
2453 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002454 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2455$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456 esac
2457 case $ac_var in #(
2458 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002459 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2460 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461 esac ;;
2462 esac
2463 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002464 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2466 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 "s/'\''/'\''\\\\'\'''\''/g;
2469 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2470 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002471 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002473 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 esac |
2475 sort
2476)
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002478
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002479 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002480## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002481## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002482 echo
2483 for ac_var in $ac_subst_vars
2484 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 eval ac_val=\$$ac_var
2486 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002487 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 done | sort
2491 echo
2492
2493 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002494 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002496## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 echo
2498 for ac_var in $ac_subst_files
2499 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 eval ac_val=\$$ac_var
2501 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002504 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 done | sort
2506 echo
2507 fi
2508
Martin v. Löwis11437992002-04-12 09:54:03 +00002509 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002510 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002511## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002512## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 echo
2516 fi
2517 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002518 $as_echo "$as_me: caught signal $ac_signal"
2519 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 rm -f core *.core core.conftest.* &&
2522 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002525for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002527done
2528ac_signal=0
2529
2530# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002532
Matthias Kloseb9621712010-04-24 17:59:49 +00002533$as_echo "/* confdefs.h */" > confdefs.h
2534
Martin v. Löwis11437992002-04-12 09:54:03 +00002535# Predefined preprocessor variables.
2536
2537cat >>confdefs.h <<_ACEOF
2538#define PACKAGE_NAME "$PACKAGE_NAME"
2539_ACEOF
2540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541cat >>confdefs.h <<_ACEOF
2542#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2543_ACEOF
2544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545cat >>confdefs.h <<_ACEOF
2546#define PACKAGE_VERSION "$PACKAGE_VERSION"
2547_ACEOF
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_STRING "$PACKAGE_STRING"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2555_ACEOF
2556
Matthias Kloseb9621712010-04-24 17:59:49 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_URL "$PACKAGE_URL"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561
2562# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002563# Prefer an explicitly selected file to automatically selected ones.
2564ac_site_file1=NONE
2565ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002567 # We do not want a PATH search for config.site.
2568 case $CONFIG_SITE in #((
2569 -*) ac_site_file1=./$CONFIG_SITE;;
2570 */*) ac_site_file1=$CONFIG_SITE;;
2571 *) ac_site_file1=./$CONFIG_SITE;;
2572 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002574 ac_site_file1=$prefix/share/config.site
2575 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576else
Matthias Kloseb9621712010-04-24 17:59:49 +00002577 ac_site_file1=$ac_default_prefix/share/config.site
2578 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002580for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581do
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 test "x$ac_site_file" = xNONE && continue
2583 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2584 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2585$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002587 . "$ac_site_file" \
2588 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2589$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2590as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002591See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002592 fi
2593done
2594
2595if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 # Some versions of bash will fail to source /dev/null (special files
2597 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2598 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2599 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2600$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2603 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 esac
2605 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002606else
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2608$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 >$cache_file
2610fi
2611
2612# Check that the precious variables saved in the cache have kept the same
2613# value.
2614ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2617 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2619 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 case $ac_old_set,$ac_new_set in
2621 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002622 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2623$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 +00002624 ac_cache_corrupted=: ;;
2625 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002626 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2627$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 ac_cache_corrupted=: ;;
2629 ,);;
2630 *)
2631 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 # differences in whitespace do not lead to failure.
2633 ac_old_val_w=`echo x $ac_old_val`
2634 ac_new_val_w=`echo x $ac_new_val`
2635 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2636 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2637$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2638 ac_cache_corrupted=:
2639 else
2640 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2641$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2642 eval $ac_var=\$ac_old_val
2643 fi
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2645$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2647$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 fi;;
2649 esac
2650 # Pass precious variables to config.status.
2651 if test "$ac_new_set" = set; then
2652 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002653 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 *) ac_arg=$ac_var=$ac_new_val ;;
2655 esac
2656 case " $ac_configure_args " in
2657 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002658 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 esac
2660 fi
2661done
2662if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2666$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002667 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002669## -------------------- ##
2670## Main body of script. ##
2671## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002672
Guido van Rossum7f43da71994-08-01 12:15:30 +00002673ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002675ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2676ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2677ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678
Guido van Rossum627b2d71993-12-24 10:39:16 +00002679
Michael W. Hudson54241132001-12-07 15:38:26 +00002680
Trent Nelson4d4ec652012-10-16 08:51:24 -04002681
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002682if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002683 # If we're building out-of-tree, we need to make sure the following
2684 # resources get picked up before their $srcdir counterparts.
2685 # Objects/ -> typeslots.inc
2686 # Include/ -> Python-ast.h, graminit.h
2687 # Python/ -> importlib.h
2688 # (A side effect of this is that these resources will automatically be
2689 # regenerated when building out-of-tree, regardless of whether or not
2690 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2691 # off.)
2692 BASECPPFLAGS="-IObjects -IInclude -IPython"
2693else
2694 BASECPPFLAGS=""
2695fi
2696
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002697
2698
2699
2700
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002701if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002702then
2703# Extract the first word of "hg", so it can be a program name with args.
2704set dummy hg; ac_word=$2
2705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2706$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002707if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002708 $as_echo_n "(cached) " >&6
2709else
2710 if test -n "$HAS_HG"; then
2711 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2712else
2713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2714for as_dir in $PATH
2715do
2716 IFS=$as_save_IFS
2717 test -z "$as_dir" && as_dir=.
2718 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002719 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002720 ac_cv_prog_HAS_HG="found"
2721 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2722 break 2
2723 fi
2724done
2725 done
2726IFS=$as_save_IFS
2727
2728 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2729fi
2730fi
2731HAS_HG=$ac_cv_prog_HAS_HG
2732if test -n "$HAS_HG"; then
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2734$as_echo "$HAS_HG" >&6; }
2735else
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2737$as_echo "no" >&6; }
2738fi
2739
2740
2741else
2742HAS_HG=no-repository
2743fi
2744if test $HAS_HG = found
2745then
2746 HGVERSION="hg id -i \$(srcdir)"
2747 HGTAG="hg id -t \$(srcdir)"
2748 HGBRANCH="hg id -b \$(srcdir)"
2749else
2750 HGVERSION=""
2751 HGTAG=""
2752 HGBRANCH=""
2753fi
2754
2755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002756ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002757
2758
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002759ac_aux_dir=
2760for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2761 if test -f "$ac_dir/install-sh"; then
2762 ac_aux_dir=$ac_dir
2763 ac_install_sh="$ac_aux_dir/install-sh -c"
2764 break
2765 elif test -f "$ac_dir/install.sh"; then
2766 ac_aux_dir=$ac_dir
2767 ac_install_sh="$ac_aux_dir/install.sh -c"
2768 break
2769 elif test -f "$ac_dir/shtool"; then
2770 ac_aux_dir=$ac_dir
2771 ac_install_sh="$ac_aux_dir/shtool install -c"
2772 break
2773 fi
2774done
2775if test -z "$ac_aux_dir"; then
2776 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2777fi
2778
2779# These three variables are undocumented and unsupported,
2780# and are intended to be withdrawn in a future Autoconf release.
2781# They can cause serious problems if a builder's source tree is in a directory
2782# whose full name contains unusual characters.
2783ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2784ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2785ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2786
2787
2788# Make sure we can run config.sub.
2789$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2790 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2791
2792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2793$as_echo_n "checking build system type... " >&6; }
2794if ${ac_cv_build+:} false; then :
2795 $as_echo_n "(cached) " >&6
2796else
2797 ac_build_alias=$build_alias
2798test "x$ac_build_alias" = x &&
2799 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2800test "x$ac_build_alias" = x &&
2801 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2802ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2803 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2804
2805fi
2806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2807$as_echo "$ac_cv_build" >&6; }
2808case $ac_cv_build in
2809*-*-*) ;;
2810*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2811esac
2812build=$ac_cv_build
2813ac_save_IFS=$IFS; IFS='-'
2814set x $ac_cv_build
2815shift
2816build_cpu=$1
2817build_vendor=$2
2818shift; shift
2819# Remember, the first character of IFS is used to create $*,
2820# except with old shells:
2821build_os=$*
2822IFS=$ac_save_IFS
2823case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2824
2825
2826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2827$as_echo_n "checking host system type... " >&6; }
2828if ${ac_cv_host+:} false; then :
2829 $as_echo_n "(cached) " >&6
2830else
2831 if test "x$host_alias" = x; then
2832 ac_cv_host=$ac_cv_build
2833else
2834 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2835 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2836fi
2837
2838fi
2839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2840$as_echo "$ac_cv_host" >&6; }
2841case $ac_cv_host in
2842*-*-*) ;;
2843*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2844esac
2845host=$ac_cv_host
2846ac_save_IFS=$IFS; IFS='-'
2847set x $ac_cv_host
2848shift
2849host_cpu=$1
2850host_vendor=$2
2851shift; shift
2852# Remember, the first character of IFS is used to create $*,
2853# except with old shells:
2854host_os=$*
2855IFS=$ac_save_IFS
2856case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2857
2858
2859
doko@python.orga10e4a92013-01-25 18:45:12 +01002860
2861
Ned Deilyfcbc2462014-08-22 13:32:49 -07002862# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2863rm -f pybuilddir.txt
2864
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002865for ac_prog in python$PACKAGE_VERSION python3 python
2866do
2867 # Extract the first word of "$ac_prog", so it can be a program name with args.
2868set dummy $ac_prog; ac_word=$2
2869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2870$as_echo_n "checking for $ac_word... " >&6; }
2871if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2872 $as_echo_n "(cached) " >&6
2873else
2874 if test -n "$PYTHON_FOR_GEN"; then
2875 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2876else
2877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2878for as_dir in $PATH
2879do
2880 IFS=$as_save_IFS
2881 test -z "$as_dir" && as_dir=.
2882 for ac_exec_ext in '' $ac_executable_extensions; do
2883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2884 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
2885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2886 break 2
2887 fi
2888done
2889 done
2890IFS=$as_save_IFS
2891
2892fi
2893fi
2894PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
2895if test -n "$PYTHON_FOR_GEN"; then
2896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
2897$as_echo "$PYTHON_FOR_GEN" >&6; }
2898else
2899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2900$as_echo "no" >&6; }
2901fi
2902
2903
2904 test -n "$PYTHON_FOR_GEN" && break
2905done
2906test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
2907
2908if test "$PYTHON_FOR_GEN" = not-found; then
2909 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
2910 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
2911 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
2912fi
2913
2914
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002915if test "$cross_compiling" = yes; then
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2917$as_echo_n "checking for python interpreter for cross build... " >&6; }
2918 if test -z "$PYTHON_FOR_BUILD"; then
2919 for interp in python$PACKAGE_VERSION python3 python; do
2920 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002921 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 +02002922 break
2923 fi
2924 interp=
2925 done
2926 if test x$interp = x; then
2927 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2928 fi
2929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2930$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002931 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 +02002932 fi
Martin Panter43a94a72016-07-29 05:52:32 +00002933 # Used to comment out stuff for rebuilding generated files
2934 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01002935elif test "$cross_compiling" = maybe; then
2936 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002937else
2938 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00002939 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002940fi
2941
2942
Martin v. Löwis11437992002-04-12 09:54:03 +00002943
Martin Pantereac67be2016-07-28 01:28:27 +00002944
Benjamin Petersond23f8222009-04-05 19:13:16 +00002945if test "$prefix" != "/"; then
2946 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2947fi
2948
2949
Martin v. Löwis11437992002-04-12 09:54:03 +00002950
2951
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002952# We don't use PACKAGE_ variables, and they cause conflicts
2953# with other autoconf-based packages that include Python.h
2954grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2955rm confdefs.h
2956mv confdefs.h.new confdefs.h
2957
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002958
Ned Deily4829bc62016-09-12 17:29:04 -04002959VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002960
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002961# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002962
2963SOVERSION=1.0
2964
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002965# The later defininition of _XOPEN_SOURCE disables certain features
2966# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2967
Matthias Kloseb9621712010-04-24 17:59:49 +00002968$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002969
2970
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002971# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2972# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2973# them.
2974
Matthias Kloseb9621712010-04-24 17:59:49 +00002975$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002976
2977
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002978# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2979# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2980# them.
2981
Matthias Kloseb9621712010-04-24 17:59:49 +00002982$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002983
2984
Martin v. Löwisd6320502004-08-12 13:45:08 +00002985# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2986# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2987
Matthias Kloseb9621712010-04-24 17:59:49 +00002988$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002989
2990
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002991# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2992# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2993# them.
2994
Matthias Kloseb9621712010-04-24 17:59:49 +00002995$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002996
2997
2998
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002999define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003000
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003001# Arguments passed to configure.
3002
3003CONFIG_ARGS="$ac_configure_args"
3004
Matthias Kloseb9621712010-04-24 17:59:49 +00003005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3006$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003007# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003008if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003009 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003010 case $enableval in
3011 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003012 # Locate the best usable SDK, see Mac/README.txt for more
3013 # information
3014 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003015 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003016 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003017 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3018 if test ! -d "${enableval}"
3019 then
3020 enableval=/
3021 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003022 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003023 ;;
3024 esac
3025 case $enableval in
3026 no)
3027 UNIVERSALSDK=
3028 enable_universalsdk=
3029 ;;
3030 *)
3031 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003032 if test ! -d "${UNIVERSALSDK}"
3033 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003034 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003035 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003036 ;;
3037 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003038
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003039
Thomas Wouters477c8d52006-05-27 19:21:47 +00003040else
3041
3042 UNIVERSALSDK=
3043 enable_universalsdk=
3044
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003045fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003046
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047if test -n "${UNIVERSALSDK}"
3048then
Matthias Kloseb9621712010-04-24 17:59:49 +00003049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3050$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051else
Matthias Kloseb9621712010-04-24 17:59:49 +00003052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3053$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003054fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003056
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003057
Ned Deily87adb6e2013-10-18 21:09:56 -07003058ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003059
Ned Deilycbfb9a52012-06-23 16:02:19 -07003060# For backward compatibility reasons we prefer to select '32-bit' if available,
3061# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003062UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003063if test "`uname -s`" = "Darwin"
3064then
3065 if test -n "${UNIVERSALSDK}"
3066 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003067 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003068 then
3069 UNIVERSAL_ARCHS="intel"
3070 fi
3071 fi
3072fi
3073
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003074
Matthias Kloseb9621712010-04-24 17:59:49 +00003075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3076$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003077
3078# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003079if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003080 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003081 UNIVERSAL_ARCHS="$withval"
3082
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003083fi
3084
Ned Deily87adb6e2013-10-18 21:09:56 -07003085if test -n "${UNIVERSALSDK}"
3086then
3087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3088$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3089else
3090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3091$as_echo "no" >&6; }
3092fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003093
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003094
3095# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003096if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003097 withval=$with_framework_name;
3098 PYTHONFRAMEWORK=${withval}
3099 PYTHONFRAMEWORKDIR=${withval}.framework
3100 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3101
3102else
3103
3104 PYTHONFRAMEWORK=Python
3105 PYTHONFRAMEWORKDIR=Python.framework
3106 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3107
3108fi
3109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003110# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003111if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003112 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003113 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003114 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003115 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003116 esac
3117 case $enableval in
3118 no)
3119 PYTHONFRAMEWORK=
3120 PYTHONFRAMEWORKDIR=no-framework
3121 PYTHONFRAMEWORKPREFIX=
3122 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003123 FRAMEWORKINSTALLFIRST=
3124 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003125 FRAMEWORKALTINSTALLFIRST=
3126 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003127 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003128 if test "x${prefix}" = "xNONE"; then
3129 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3130 else
3131 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3132 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003133 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003134 ;;
3135 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003136 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003137 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003138 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003139 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003140 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3141 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003142 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003143 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003144
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003145 if test "x${prefix}" = "xNONE" ; then
3146 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003147
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003148 else
3149 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3150 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003151
3152 case "${enableval}" in
3153 /System*)
3154 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3155 if test "${prefix}" = "NONE" ; then
3156 # See below
3157 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3158 fi
3159 ;;
3160
3161 /Library*)
3162 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3163 ;;
3164
3165 */Library/Frameworks)
3166 MDIR="`dirname "${enableval}"`"
3167 MDIR="`dirname "${MDIR}"`"
3168 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3169
3170 if test "${prefix}" = "NONE"; then
3171 # User hasn't specified the
3172 # --prefix option, but wants to install
3173 # the framework in a non-default location,
3174 # ensure that the compatibility links get
3175 # installed relative to that prefix as well
3176 # instead of in /usr/local.
3177 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3178 fi
3179 ;;
3180
3181 *)
3182 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3183 ;;
3184 esac
3185
Jack Jansen127e56e2001-09-11 14:41:54 +00003186 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003188 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003189 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003190 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003192 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003194 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3195
3196 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3197
Jack Jansene578a632001-08-15 01:27:14 +00003198 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003199
Guido van Rossum563e7081996-09-10 18:20:48 +00003200else
Martin v. Löwis11437992002-04-12 09:54:03 +00003201
Jack Jansene578a632001-08-15 01:27:14 +00003202 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003203 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003204 PYTHONFRAMEWORKPREFIX=
3205 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003206 FRAMEWORKINSTALLFIRST=
3207 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003208 FRAMEWORKALTINSTALLFIRST=
3209 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003210 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003211 if test "x${prefix}" = "xNONE" ; then
3212 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3213 else
3214 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3215 fi
Jack Jansene578a632001-08-15 01:27:14 +00003216 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003217
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003218
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003219fi
3220
Thomas Wouters477c8d52006-05-27 19:21:47 +00003221
3222
Michael W. Hudson54241132001-12-07 15:38:26 +00003223
3224
3225
3226
Jack Jansene578a632001-08-15 01:27:14 +00003227
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003228
3229
3230
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003231
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003232
Ned Deilyb8f944f2013-11-21 22:42:25 -08003233
Jack Jansene578a632001-08-15 01:27:14 +00003234##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003235## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003236## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003237##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003238# Set name for machine-dependent library files
3239
Matthias Kloseb9621712010-04-24 17:59:49 +00003240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3241$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003242if test -z "$MACHDEP"
3243then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003244 # avoid using uname for cross builds
3245 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003246 # ac_sys_system and ac_sys_release are used for setting
3247 # a lot of different things including 'define_xopen_source'
3248 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003249 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003250 *-*-linux-android*)
3251 ac_sys_system=Linux-android
3252 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003253 *-*-linux*)
3254 ac_sys_system=Linux
3255 ;;
3256 *-*-cygwin*)
3257 ac_sys_system=Cygwin
3258 ;;
3259 *)
3260 # for now, limit cross builds to known configurations
3261 MACHDEP="unknown"
3262 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3263 esac
3264 ac_sys_release=
3265 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003266 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003267 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003268 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003269 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003270 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003271 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003272 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003273 fi
3274 ac_md_system=`echo $ac_sys_system |
3275 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3276 ac_md_release=`echo $ac_sys_release |
3277 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3278 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003279
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003280 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003281 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003282 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003283 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003284 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003285 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287fi
Guido van Rossum91922671997-10-09 20:24:13 +00003288
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003289
3290if test "$cross_compiling" = yes; then
3291 case "$host" in
3292 *-*-linux*)
3293 case "$host_cpu" in
3294 arm*)
3295 _host_cpu=arm
3296 ;;
3297 *)
3298 _host_cpu=$host_cpu
3299 esac
3300 ;;
3301 *-*-cygwin*)
3302 _host_cpu=
3303 ;;
3304 *)
3305 # for now, limit cross builds to known configurations
3306 MACHDEP="unknown"
3307 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3308 esac
3309 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3310fi
3311
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003312# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3313# disable features if it is defined, without any means to access these
3314# features as extensions. For these systems, we skip the definition of
3315# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3316# some feature, make sure there is no alternative way to access this
3317# feature. Also, when using wildcards, make sure you have verified the
3318# need for not defining _XOPEN_SOURCE on all systems matching the
3319# wildcard, and that the wildcard does not include future systems
3320# (which may remove their limitations).
3321case $ac_sys_system/$ac_sys_release in
3322 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3323 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003324 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003325 # In addition, Stefan Krah confirms that issue #1244610 exists through
3326 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003327 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003328 define_xopen_source=no
3329 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3330 # also defined. This can be overridden by defining _BSD_SOURCE
3331 # As this has a different meaning on Linux, only define it on OpenBSD
3332
Matthias Kloseb9621712010-04-24 17:59:49 +00003333$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003334
3335 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003336 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003337 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3338 # also defined. This can be overridden by defining _BSD_SOURCE
3339 # As this has a different meaning on Linux, only define it on OpenBSD
3340
Matthias Kloseb9621712010-04-24 17:59:49 +00003341$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003342
3343 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003344 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3345 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3346 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003347 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 +00003348 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003349 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3350 # request to enable features supported by the standard as a request
3351 # to disable features not supported by the standard. The best way
3352 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3353 # entirely and define __EXTENSIONS__ instead.
3354 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003355 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003356 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3357 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003358 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003359 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003360 define_xopen_source=no;;
3361 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003362 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003363 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003364 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003365 # On FreeBSD 4, the math functions C89 does not cover are never defined
3366 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3367 FreeBSD/4.*)
3368 define_xopen_source=no;;
3369 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3370 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3371 # identifies itself as Darwin/7.*
3372 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3373 # disables platform specific features beyond repair.
3374 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3375 # has no effect, don't bother defining them
3376 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003377 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003378 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003379 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003380 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3381 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3382 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003383 AIX/4)
3384 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003385 AIX/5)
3386 if test `uname -r` -eq 1; then
3387 define_xopen_source=no
3388 fi
3389 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003390 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3391 # defining NI_NUMERICHOST.
3392 QNX/6.3.2)
3393 define_xopen_source=no
3394 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003395
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003396esac
3397
3398if test $define_xopen_source = yes
3399then
Victor Stinner14d098d2011-09-07 22:29:43 +02003400 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003401
Victor Stinner14d098d2011-09-07 22:29:43 +02003402$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003403
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
3405 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3406 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3407 # several APIs are not declared. Since this is also needed in some
3408 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
Matthias Kloseb9621712010-04-24 17:59:49 +00003410$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
3412
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003413
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003414$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003415
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003416fi
3417
Christian Heimes647cd872013-12-07 23:39:33 +01003418# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3419case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003420 hp*|HP*)
3421 define_stdc_a1=yes;;
3422 *)
3423 define_stdc_a1=no;;
3424esac
3425
3426if test $define_stdc_a1 = yes
3427then
Christian Heimes647cd872013-12-07 23:39:33 +01003428
3429$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3430
Christian Heimesb02bcae2013-12-08 15:21:08 +01003431fi
Christian Heimes647cd872013-12-07 23:39:33 +01003432
Guido van Rossum91922671997-10-09 20:24:13 +00003433#
3434# SGI compilers allow the specification of the both the ABI and the
3435# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003436# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003437#
3438# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3439# thus supply support for various ABI/ISA combinations. The MACHDEP
3440# variable is also adjusted.
3441#
3442
3443if test ! -z "$SGI_ABI"
3444then
3445 CC="cc $SGI_ABI"
3446 LDFLAGS="$SGI_ABI $LDFLAGS"
3447 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3450$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003451
Jack Jansen6b08a402004-06-03 12:41:45 +00003452# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3453# it may influence the way we can build extensions, so distutils
3454# needs to check it
3455
Thomas Wouters477c8d52006-05-27 19:21:47 +00003456
Jack Jansen6b08a402004-06-03 12:41:45 +00003457CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003458EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003459
Guido van Rossum627b2d71993-12-24 10:39:16 +00003460# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003461
3462# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3463# for debug/optimization stuff. BASECFLAGS is for flags that are required
3464# just to get things to compile and link. Users are free to override OPT
3465# when running configure or make. The build should not break if they do.
3466# BASECFLAGS should generally not be messed with, however.
3467
3468# XXX shouldn't some/most/all of this code be merged with the stuff later
3469# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3471$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003472
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003474if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003475 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003476 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003477 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003478 without_gcc=yes;;
3479 yes) CC=gcc
3480 without_gcc=no;;
3481 *) CC=$withval
3482 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003483 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003484else
Martin v. Löwis11437992002-04-12 09:54:03 +00003485
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003486 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003487 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003488 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003489 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003490 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003491fi
3492
Matthias Kloseb9621712010-04-24 17:59:49 +00003493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3494$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003495
Zachary Ware5af85642015-12-21 12:09:17 -06003496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3497$as_echo_n "checking for --with-icc... " >&6; }
3498
3499# Check whether --with-icc was given.
3500if test "${with_icc+set}" = set; then :
3501 withval=$with_icc;
3502 case $withval in
3503 no) CC=${CC:-cc}
3504 with_icc=no;;
3505 yes) CC=icc
3506 CXX=icpc
3507 with_icc=yes;;
3508 *) CC=$withval
3509 with_icc=$withval;;
3510 esac
3511else
3512
3513 with_icc=no
3514fi
3515
3516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3517$as_echo "$with_icc" >&6; }
3518
Guido van Rossum8b131c51995-03-09 14:10:13 +00003519# If the user switches compilers, we can't believe the cache
3520if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3521then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003522 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003523(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003524fi
3525
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003526# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3527# when the compiler supports them, but we don't always want -O2, and
3528# we set -g later.
3529if test -z "$CFLAGS"; then
3530 CFLAGS=
3531fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003532
3533if test "$ac_sys_system" = "Darwin"
3534then
3535 # Compiler selection on MacOSX is more complicated than
3536 # AC_PROG_CC can handle, see Mac/README.txt for more
3537 # information
3538 if test -z "${CC}"
3539 then
3540 found_gcc=
3541 found_clang=
3542 as_save_IFS=$IFS; IFS=:
3543 for as_dir in $PATH
3544 do
3545 IFS=$as_save_IFS
3546 if test -x $as_dir/gcc; then
3547 if test -z "${found_gcc}"; then
3548 found_gcc=$as_dir/gcc
3549 fi
3550 fi
3551 if test -x $as_dir/clang; then
3552 if test -z "${found_clang}"; then
3553 found_clang=$as_dir/clang
3554 fi
3555 fi
3556 done
3557 IFS=$as_save_IFS
3558
3559 if test -n "$found_gcc" -a -n "$found_clang"
3560 then
3561 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3562 then
3563 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3564$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3565 CC="$found_clang"
3566 CXX="$found_clang++"
3567 fi
3568
3569
3570 elif test -z "$found_gcc" -a -n "$found_clang"
3571 then
3572 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3573$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3574 CC="$found_clang"
3575 CXX="$found_clang++"
3576
3577 elif test -z "$found_gcc" -a -z "$found_clang"
3578 then
3579 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3580 if test -n "${found_clang}"
3581 then
3582 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3583$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3584 CC="${found_clang}"
3585 CXX="`/usr/bin/xcrun -find clang++`"
3586
3587 # else: use default behaviour
3588 fi
3589 fi
3590 fi
3591fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003592ac_ext=c
3593ac_cpp='$CPP $CPPFLAGS'
3594ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3595ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3596ac_compiler_gnu=$ac_cv_c_compiler_gnu
3597if test -n "$ac_tool_prefix"; then
3598 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3599set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3601$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003602if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003603 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003604else
3605 if test -n "$CC"; then
3606 ac_cv_prog_CC="$CC" # Let the user override the test.
3607else
Martin v. Löwis11437992002-04-12 09:54:03 +00003608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3609for as_dir in $PATH
3610do
3611 IFS=$as_save_IFS
3612 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003613 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003614 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003616 $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 +00003617 break 2
3618 fi
3619done
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003621IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003622
Jack Jansendd19cf82001-12-06 22:36:17 +00003623fi
3624fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003625CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003626if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3628$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003629else
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3631$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003632fi
3633
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003634
Martin v. Löwis11437992002-04-12 09:54:03 +00003635fi
3636if test -z "$ac_cv_prog_CC"; then
3637 ac_ct_CC=$CC
3638 # Extract the first word of "gcc", so it can be a program name with args.
3639set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3641$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003642if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003644else
3645 if test -n "$ac_ct_CC"; then
3646 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3647else
3648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3649for as_dir in $PATH
3650do
3651 IFS=$as_save_IFS
3652 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003653 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003654 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003655 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003656 $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 +00003657 break 2
3658 fi
3659done
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003662
3663fi
3664fi
3665ac_ct_CC=$ac_cv_prog_ac_ct_CC
3666if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3668$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003669else
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3671$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003672fi
3673
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003674 if test "x$ac_ct_CC" = x; then
3675 CC=""
3676 else
3677 case $cross_compiling:$ac_tool_warned in
3678yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003679{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3680$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681ac_tool_warned=yes ;;
3682esac
3683 CC=$ac_ct_CC
3684 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003685else
3686 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003687fi
3688
Jack Jansendd19cf82001-12-06 22:36:17 +00003689if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003690 if test -n "$ac_tool_prefix"; then
3691 # 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 +00003692set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3694$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003695if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003696 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003697else
3698 if test -n "$CC"; then
3699 ac_cv_prog_CC="$CC" # Let the user override the test.
3700else
Martin v. Löwis11437992002-04-12 09:54:03 +00003701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3702for as_dir in $PATH
3703do
3704 IFS=$as_save_IFS
3705 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003707 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003708 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003709 $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 +00003710 break 2
3711 fi
3712done
Matthias Kloseb9621712010-04-24 17:59:49 +00003713 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003715
3716fi
3717fi
3718CC=$ac_cv_prog_CC
3719if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3721$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003722else
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3724$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003725fi
3726
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727
Martin v. Löwis11437992002-04-12 09:54:03 +00003728 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003729fi
3730if test -z "$CC"; then
3731 # Extract the first word of "cc", so it can be a program name with args.
3732set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3734$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003735if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003737else
3738 if test -n "$CC"; then
3739 ac_cv_prog_CC="$CC" # Let the user override the test.
3740else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003741 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3743for as_dir in $PATH
3744do
3745 IFS=$as_save_IFS
3746 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003748 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3750 ac_prog_rejected=yes
3751 continue
3752 fi
3753 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003754 $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 +00003755 break 2
3756 fi
3757done
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003759IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003760
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003761if test $ac_prog_rejected = yes; then
3762 # We found a bogon in the path, so make sure we never use it.
3763 set dummy $ac_cv_prog_CC
3764 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003765 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003766 # We chose a different compiler from the bogus one.
3767 # However, it has the same basename, so the bogon will be chosen
3768 # first if we set CC to just the basename; use the full file name.
3769 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003770 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003771 fi
3772fi
3773fi
3774fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003775CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003776if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3778$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003779else
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3781$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003782fi
3783
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003784
Martin v. Löwis11437992002-04-12 09:54:03 +00003785fi
3786if test -z "$CC"; then
3787 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003788 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 do
3790 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3791set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3793$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003794if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003796else
3797 if test -n "$CC"; then
3798 ac_cv_prog_CC="$CC" # Let the user override the test.
3799else
Martin v. Löwis11437992002-04-12 09:54:03 +00003800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3801for as_dir in $PATH
3802do
3803 IFS=$as_save_IFS
3804 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003806 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 $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 +00003809 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003810 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003811done
Matthias Kloseb9621712010-04-24 17:59:49 +00003812 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003814
3815fi
3816fi
3817CC=$ac_cv_prog_CC
3818if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3820$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003821else
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3823$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003824fi
3825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826
Martin v. Löwis11437992002-04-12 09:54:03 +00003827 test -n "$CC" && break
3828 done
3829fi
3830if test -z "$CC"; then
3831 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003832 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003833do
3834 # Extract the first word of "$ac_prog", so it can be a program name with args.
3835set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3837$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003838if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003839 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003840else
3841 if test -n "$ac_ct_CC"; then
3842 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3843else
3844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3845for as_dir in $PATH
3846do
3847 IFS=$as_save_IFS
3848 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003849 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003851 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003852 $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 +00003853 break 2
3854 fi
3855done
Matthias Kloseb9621712010-04-24 17:59:49 +00003856 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003857IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003858
Martin v. Löwis11437992002-04-12 09:54:03 +00003859fi
3860fi
3861ac_ct_CC=$ac_cv_prog_ac_ct_CC
3862if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3864$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003865else
Matthias Kloseb9621712010-04-24 17:59:49 +00003866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3867$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003868fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003870
Martin v. Löwis11437992002-04-12 09:54:03 +00003871 test -n "$ac_ct_CC" && break
3872done
Michael W. Hudson54241132001-12-07 15:38:26 +00003873
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003874 if test "x$ac_ct_CC" = x; then
3875 CC=""
3876 else
3877 case $cross_compiling:$ac_tool_warned in
3878yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003879{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3880$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003881ac_tool_warned=yes ;;
3882esac
3883 CC=$ac_ct_CC
3884 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003885fi
3886
3887fi
3888
3889
Matthias Kloseb9621712010-04-24 17:59:49 +00003890test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003892as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003893See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003894
3895# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003896$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3897set X $ac_compile
3898ac_compiler=$2
3899for ac_option in --version -v -V -qversion; do
3900 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901case "(($ac_try" in
3902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3903 *) ac_try_echo=$ac_try;;
3904esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003905eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3906$as_echo "$ac_try_echo"; } >&5
3907 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003908 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003909 if test -s conftest.err; then
3910 sed '10a\
3911... rest of stderr output deleted ...
3912 10q' conftest.err >conftest.er1
3913 cat conftest.er1 >&5
3914 fi
3915 rm -f conftest.er1 conftest.err
3916 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3917 test $ac_status = 0; }
3918done
Martin v. Löwis11437992002-04-12 09:54:03 +00003919
Matthias Kloseb9621712010-04-24 17:59:49 +00003920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003921/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003922
Martin v. Löwis11437992002-04-12 09:54:03 +00003923int
3924main ()
3925{
3926
3927 ;
3928 return 0;
3929}
3930_ACEOF
3931ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003932ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003933# Try to create an executable without -o first, disregard a.out.
3934# It will help us diagnose broken compilers, and finding out an intuition
3935# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3937$as_echo_n "checking whether the C compiler works... " >&6; }
3938ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3939
3940# The possible output files:
3941ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943ac_rmfiles=
3944for ac_file in $ac_files
3945do
3946 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003947 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3949 esac
3950done
3951rm -f $ac_rmfiles
3952
Matthias Kloseb9621712010-04-24 17:59:49 +00003953if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954case "(($ac_try" in
3955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3956 *) ac_try_echo=$ac_try;;
3957esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003958eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3959$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003961 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003962 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3963 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3965# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3966# in a Makefile. We should not override ac_cv_exeext if it was cached,
3967# so that the user can short-circuit this test for compilers unknown to
3968# Autoconf.
3969for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003970do
3971 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003973 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003974 ;;
3975 [ab].out )
3976 # We found the default executable, but exeext='' is most
3977 # certainly right.
3978 break;;
3979 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003980 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003981 then :; else
3982 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3983 fi
3984 # We set ac_cv_exeext here because the later test for it is not
3985 # safe: cross compilers may not add the suffix if given an `-o'
3986 # argument, so we may need to know it at that point already.
3987 # Even if this section looks crufty: it has the advantage of
3988 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003989 break;;
3990 * )
3991 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003992 esac
3993done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994test "$ac_cv_exeext" = no && ac_cv_exeext=
3995
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003996else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003997 ac_file=''
3998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003999if test -z "$ac_file"; then :
4000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4001$as_echo "no" >&6; }
4002$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004003sed 's/^/| /' conftest.$ac_ext >&5
4004
Matthias Kloseb9621712010-04-24 17:59:49 +00004005{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4006$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004007as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004008See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004009else
4010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4011$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4014$as_echo_n "checking for C compiler default output file name... " >&6; }
4015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4016$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004017ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004018
Matthias Kloseb9621712010-04-24 17:59:49 +00004019rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004020ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4022$as_echo_n "checking for suffix of executables... " >&6; }
4023if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004024case "(($ac_try" in
4025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4026 *) ac_try_echo=$ac_try;;
4027esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004028eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4029$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004030 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004031 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004032 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4033 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004034 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4035# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4036# work properly (i.e., refer to `conftest.exe'), while it won't with
4037# `rm'.
4038for ac_file in conftest.exe conftest conftest.*; do
4039 test -f "$ac_file" || continue
4040 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004041 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004042 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4043 break;;
4044 * ) break;;
4045 esac
4046done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004047else
Matthias Kloseb9621712010-04-24 17:59:49 +00004048 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4049$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004050as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004051See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004053rm -f conftest conftest$ac_cv_exeext
4054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4055$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004056
4057rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004058EXEEXT=$ac_cv_exeext
4059ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4061/* end confdefs.h. */
4062#include <stdio.h>
4063int
4064main ()
4065{
4066FILE *f = fopen ("conftest.out", "w");
4067 return ferror (f) || fclose (f) != 0;
4068
4069 ;
4070 return 0;
4071}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004073ac_clean_files="$ac_clean_files conftest.out"
4074# Check that the compiler produces executables we can run. If not, either
4075# the compiler is broken, or we cross compile.
4076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4077$as_echo_n "checking whether we are cross compiling... " >&6; }
4078if test "$cross_compiling" != yes; then
4079 { { ac_try="$ac_link"
4080case "(($ac_try" in
4081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4082 *) ac_try_echo=$ac_try;;
4083esac
4084eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4085$as_echo "$ac_try_echo"; } >&5
4086 (eval "$ac_link") 2>&5
4087 ac_status=$?
4088 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4089 test $ac_status = 0; }
4090 if { ac_try='./conftest$ac_cv_exeext'
4091 { { case "(($ac_try" in
4092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4093 *) ac_try_echo=$ac_try;;
4094esac
4095eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4096$as_echo "$ac_try_echo"; } >&5
4097 (eval "$ac_try") 2>&5
4098 ac_status=$?
4099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4100 test $ac_status = 0; }; }; then
4101 cross_compiling=no
4102 else
4103 if test "$cross_compiling" = maybe; then
4104 cross_compiling=yes
4105 else
4106 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4107$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004108as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004109If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004110See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 fi
4112 fi
4113fi
4114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4115$as_echo "$cross_compiling" >&6; }
4116
4117rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4118ac_clean_files=$ac_clean_files_save
4119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4120$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004121if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 $as_echo_n "(cached) " >&6
4123else
4124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004125/* end confdefs.h. */
4126
4127int
4128main ()
4129{
4130
4131 ;
4132 return 0;
4133}
4134_ACEOF
4135rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004136if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004137case "(($ac_try" in
4138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4139 *) ac_try_echo=$ac_try;;
4140esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004141eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4142$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004143 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004144 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004145 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4146 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004147 for ac_file in conftest.o conftest.obj conftest.*; do
4148 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004149 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004150 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004151 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4152 break;;
4153 esac
4154done
4155else
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004157sed 's/^/| /' conftest.$ac_ext >&5
4158
Matthias Kloseb9621712010-04-24 17:59:49 +00004159{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4160$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004161as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004162See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004163fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004164rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4167$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004168OBJEXT=$ac_cv_objext
4169ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4171$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004172if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004174else
Matthias Kloseb9621712010-04-24 17:59:49 +00004175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004176/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004177
Martin v. Löwis11437992002-04-12 09:54:03 +00004178int
4179main ()
4180{
4181#ifndef __GNUC__
4182 choke me
4183#endif
4184
4185 ;
4186 return 0;
4187}
4188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004189if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004190 ac_compiler_gnu=yes
4191else
Matthias Kloseb9621712010-04-24 17:59:49 +00004192 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004195ac_cv_c_compiler_gnu=$ac_compiler_gnu
4196
4197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4199$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4200if test $ac_compiler_gnu = yes; then
4201 GCC=yes
4202else
4203 GCC=
4204fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004205ac_test_CFLAGS=${CFLAGS+set}
4206ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4208$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004209if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004210 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004211else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212 ac_save_c_werror_flag=$ac_c_werror_flag
4213 ac_c_werror_flag=yes
4214 ac_cv_prog_cc_g=no
4215 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004218
Martin v. Löwis11437992002-04-12 09:54:03 +00004219int
4220main ()
4221{
4222
4223 ;
4224 return 0;
4225}
4226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004227if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004228 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004229else
Matthias Kloseb9621712010-04-24 17:59:49 +00004230 CFLAGS=""
4231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004232/* end confdefs.h. */
4233
4234int
4235main ()
4236{
4237
4238 ;
4239 return 0;
4240}
4241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004242if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243
Matthias Kloseb9621712010-04-24 17:59:49 +00004244else
4245 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004246 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004248/* end confdefs.h. */
4249
4250int
4251main ()
4252{
4253
4254 ;
4255 return 0;
4256}
4257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004258if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4266 ac_c_werror_flag=$ac_save_c_werror_flag
4267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4269$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004270if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004271 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004272elif test $ac_cv_prog_cc_g = yes; then
4273 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004274 CFLAGS="-g -O2"
4275 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004276 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004277 fi
4278else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004279 if test "$GCC" = yes; then
4280 CFLAGS="-O2"
4281 else
4282 CFLAGS=
4283 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4286$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004287if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004288 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004289else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004291ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004293/* end confdefs.h. */
4294#include <stdarg.h>
4295#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004296struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004297/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4298struct buf { int x; };
4299FILE * (*rcsopen) (struct buf *, struct stat *, int);
4300static char *e (p, i)
4301 char **p;
4302 int i;
4303{
4304 return p[i];
4305}
4306static char *f (char * (*g) (char **, int), char **p, ...)
4307{
4308 char *s;
4309 va_list v;
4310 va_start (v,p);
4311 s = g (p, va_arg (v,int));
4312 va_end (v);
4313 return s;
4314}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004315
4316/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4317 function prototypes and stuff, but not '\xHH' hex character constants.
4318 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004320 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4321 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004323int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4324
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4326 inside strings and character constants. */
4327#define FOO(x) 'x'
4328int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4329
Skip Montanaro6dead952003-09-25 14:50:04 +00004330int test (int i, double x);
4331struct s1 {int (*f) (int a);};
4332struct s2 {int (*f) (double a);};
4333int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4334int argc;
4335char **argv;
4336int
4337main ()
4338{
4339return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4340 ;
4341 return 0;
4342}
4343_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4345 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004346do
4347 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004348 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351rm -f core conftest.err conftest.$ac_objext
4352 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004353done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004355CC=$ac_save_CC
4356
4357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358# AC_CACHE_VAL
4359case "x$ac_cv_prog_cc_c89" in
4360 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4362$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4365$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004366 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4369$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004370esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004371if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004372
Matthias Kloseb9621712010-04-24 17:59:49 +00004373fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004374
Martin v. Löwis11437992002-04-12 09:54:03 +00004375ac_ext=c
4376ac_cpp='$CPP $CPPFLAGS'
4377ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4378ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4379ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004380
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004381ac_ext=c
4382ac_cpp='$CPP $CPPFLAGS'
4383ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4384ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4385ac_compiler_gnu=$ac_cv_c_compiler_gnu
4386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4387$as_echo_n "checking how to run the C preprocessor... " >&6; }
4388# On Suns, sometimes $CPP names a directory.
4389if test -n "$CPP" && test -d "$CPP"; then
4390 CPP=
4391fi
4392if test -z "$CPP"; then
4393 if ${ac_cv_prog_CPP+:} false; then :
4394 $as_echo_n "(cached) " >&6
4395else
4396 # Double quotes because CPP needs to be expanded
4397 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4398 do
4399 ac_preproc_ok=false
4400for ac_c_preproc_warn_flag in '' yes
4401do
4402 # Use a header file that comes with gcc, so configuring glibc
4403 # with a fresh cross-compiler works.
4404 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4405 # <limits.h> exists even on freestanding compilers.
4406 # On the NeXT, cc -E runs the code through the compiler's parser,
4407 # not just through cpp. "Syntax error" is here to catch this case.
4408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4409/* end confdefs.h. */
4410#ifdef __STDC__
4411# include <limits.h>
4412#else
4413# include <assert.h>
4414#endif
4415 Syntax error
4416_ACEOF
4417if ac_fn_c_try_cpp "$LINENO"; then :
4418
4419else
4420 # Broken: fails on valid input.
4421continue
4422fi
4423rm -f conftest.err conftest.i conftest.$ac_ext
4424
4425 # OK, works on sane cases. Now check whether nonexistent headers
4426 # can be detected and how.
4427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4428/* end confdefs.h. */
4429#include <ac_nonexistent.h>
4430_ACEOF
4431if ac_fn_c_try_cpp "$LINENO"; then :
4432 # Broken: success on invalid input.
4433continue
4434else
4435 # Passes both tests.
4436ac_preproc_ok=:
4437break
4438fi
4439rm -f conftest.err conftest.i conftest.$ac_ext
4440
4441done
4442# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4443rm -f conftest.i conftest.err conftest.$ac_ext
4444if $ac_preproc_ok; then :
4445 break
4446fi
4447
4448 done
4449 ac_cv_prog_CPP=$CPP
4450
4451fi
4452 CPP=$ac_cv_prog_CPP
4453else
4454 ac_cv_prog_CPP=$CPP
4455fi
4456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4457$as_echo "$CPP" >&6; }
4458ac_preproc_ok=false
4459for ac_c_preproc_warn_flag in '' yes
4460do
4461 # Use a header file that comes with gcc, so configuring glibc
4462 # with a fresh cross-compiler works.
4463 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4464 # <limits.h> exists even on freestanding compilers.
4465 # On the NeXT, cc -E runs the code through the compiler's parser,
4466 # not just through cpp. "Syntax error" is here to catch this case.
4467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4468/* end confdefs.h. */
4469#ifdef __STDC__
4470# include <limits.h>
4471#else
4472# include <assert.h>
4473#endif
4474 Syntax error
4475_ACEOF
4476if ac_fn_c_try_cpp "$LINENO"; then :
4477
4478else
4479 # Broken: fails on valid input.
4480continue
4481fi
4482rm -f conftest.err conftest.i conftest.$ac_ext
4483
4484 # OK, works on sane cases. Now check whether nonexistent headers
4485 # can be detected and how.
4486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4487/* end confdefs.h. */
4488#include <ac_nonexistent.h>
4489_ACEOF
4490if ac_fn_c_try_cpp "$LINENO"; then :
4491 # Broken: success on invalid input.
4492continue
4493else
4494 # Passes both tests.
4495ac_preproc_ok=:
4496break
4497fi
4498rm -f conftest.err conftest.i conftest.$ac_ext
4499
4500done
4501# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4502rm -f conftest.i conftest.err conftest.$ac_ext
4503if $ac_preproc_ok; then :
4504
4505else
4506 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4507$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4508as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4509See \`config.log' for more details" "$LINENO" 5; }
4510fi
4511
4512ac_ext=c
4513ac_cpp='$CPP $CPPFLAGS'
4514ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4515ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4516ac_compiler_gnu=$ac_cv_c_compiler_gnu
4517
4518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4519$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4520if ${ac_cv_path_GREP+:} false; then :
4521 $as_echo_n "(cached) " >&6
4522else
4523 if test -z "$GREP"; then
4524 ac_path_GREP_found=false
4525 # Loop through the user's path and test for each of PROGNAME-LIST
4526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4527for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4528do
4529 IFS=$as_save_IFS
4530 test -z "$as_dir" && as_dir=.
4531 for ac_prog in grep ggrep; do
4532 for ac_exec_ext in '' $ac_executable_extensions; do
4533 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4534 as_fn_executable_p "$ac_path_GREP" || continue
4535# Check for GNU ac_path_GREP and select it if it is found.
4536 # Check for GNU $ac_path_GREP
4537case `"$ac_path_GREP" --version 2>&1` in
4538*GNU*)
4539 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4540*)
4541 ac_count=0
4542 $as_echo_n 0123456789 >"conftest.in"
4543 while :
4544 do
4545 cat "conftest.in" "conftest.in" >"conftest.tmp"
4546 mv "conftest.tmp" "conftest.in"
4547 cp "conftest.in" "conftest.nl"
4548 $as_echo 'GREP' >> "conftest.nl"
4549 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4550 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4551 as_fn_arith $ac_count + 1 && ac_count=$as_val
4552 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4553 # Best one so far, save it but keep looking for a better one
4554 ac_cv_path_GREP="$ac_path_GREP"
4555 ac_path_GREP_max=$ac_count
4556 fi
4557 # 10*(2^10) chars as input seems more than enough
4558 test $ac_count -gt 10 && break
4559 done
4560 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4561esac
4562
4563 $ac_path_GREP_found && break 3
4564 done
4565 done
4566 done
4567IFS=$as_save_IFS
4568 if test -z "$ac_cv_path_GREP"; then
4569 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4570 fi
4571else
4572 ac_cv_path_GREP=$GREP
4573fi
4574
4575fi
4576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4577$as_echo "$ac_cv_path_GREP" >&6; }
4578 GREP="$ac_cv_path_GREP"
4579
4580
Łukasz Langaa785c872016-09-09 17:37:37 -07004581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4582$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4583if ${ac_cv_path_SED+:} false; then :
4584 $as_echo_n "(cached) " >&6
4585else
4586 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4587 for ac_i in 1 2 3 4 5 6 7; do
4588 ac_script="$ac_script$as_nl$ac_script"
4589 done
4590 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4591 { ac_script=; unset ac_script;}
4592 if test -z "$SED"; then
4593 ac_path_SED_found=false
4594 # Loop through the user's path and test for each of PROGNAME-LIST
4595 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4596for as_dir in $PATH
4597do
4598 IFS=$as_save_IFS
4599 test -z "$as_dir" && as_dir=.
4600 for ac_prog in sed gsed; do
4601 for ac_exec_ext in '' $ac_executable_extensions; do
4602 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4603 as_fn_executable_p "$ac_path_SED" || continue
4604# Check for GNU ac_path_SED and select it if it is found.
4605 # Check for GNU $ac_path_SED
4606case `"$ac_path_SED" --version 2>&1` in
4607*GNU*)
4608 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4609*)
4610 ac_count=0
4611 $as_echo_n 0123456789 >"conftest.in"
4612 while :
4613 do
4614 cat "conftest.in" "conftest.in" >"conftest.tmp"
4615 mv "conftest.tmp" "conftest.in"
4616 cp "conftest.in" "conftest.nl"
4617 $as_echo '' >> "conftest.nl"
4618 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4619 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4620 as_fn_arith $ac_count + 1 && ac_count=$as_val
4621 if test $ac_count -gt ${ac_path_SED_max-0}; then
4622 # Best one so far, save it but keep looking for a better one
4623 ac_cv_path_SED="$ac_path_SED"
4624 ac_path_SED_max=$ac_count
4625 fi
4626 # 10*(2^10) chars as input seems more than enough
4627 test $ac_count -gt 10 && break
4628 done
4629 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4630esac
4631
4632 $ac_path_SED_found && break 3
4633 done
4634 done
4635 done
4636IFS=$as_save_IFS
4637 if test -z "$ac_cv_path_SED"; then
4638 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4639 fi
4640else
4641 ac_cv_path_SED=$SED
4642fi
4643
4644fi
4645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4646$as_echo "$ac_cv_path_SED" >&6; }
4647 SED="$ac_cv_path_SED"
4648 rm -f conftest.sed
4649
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004650
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004651
4652
Matthias Kloseb9621712010-04-24 17:59:49 +00004653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4654$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004655
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004656# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004657if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004658 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004659
4660 case $withval in
4661 no) with_cxx_main=no
4662 MAINCC='$(CC)';;
4663 yes) with_cxx_main=yes
4664 MAINCC='$(CXX)';;
4665 *) with_cxx_main=yes
4666 MAINCC=$withval
4667 if test -z "$CXX"
4668 then
4669 CXX=$withval
4670 fi;;
4671 esac
4672else
4673
4674 with_cxx_main=no
4675 MAINCC='$(CC)'
4676
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004677fi
4678
Matthias Kloseb9621712010-04-24 17:59:49 +00004679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4680$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004681
4682preset_cxx="$CXX"
4683if test -z "$CXX"
4684then
4685 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004686 gcc) if test -n "$ac_tool_prefix"; then
4687 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4688set dummy ${ac_tool_prefix}g++; ac_word=$2
4689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4690$as_echo_n "checking for $ac_word... " >&6; }
4691if ${ac_cv_path_CXX+:} false; then :
4692 $as_echo_n "(cached) " >&6
4693else
4694 case $CXX in
4695 [\\/]* | ?:[\\/]*)
4696 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4697 ;;
4698 *)
4699 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4700for as_dir in notfound
4701do
4702 IFS=$as_save_IFS
4703 test -z "$as_dir" && as_dir=.
4704 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004705 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004706 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4707 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4708 break 2
4709 fi
4710done
4711 done
4712IFS=$as_save_IFS
4713
4714 ;;
4715esac
4716fi
4717CXX=$ac_cv_path_CXX
4718if test -n "$CXX"; then
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4720$as_echo "$CXX" >&6; }
4721else
4722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4723$as_echo "no" >&6; }
4724fi
4725
4726
4727fi
4728if test -z "$ac_cv_path_CXX"; then
4729 ac_pt_CXX=$CXX
4730 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004731set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4733$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004734if ${ac_cv_path_ac_pt_CXX+:} false; then :
4735 $as_echo_n "(cached) " >&6
4736else
4737 case $ac_pt_CXX in
4738 [\\/]* | ?:[\\/]*)
4739 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4740 ;;
4741 *)
4742 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4743for as_dir in notfound
4744do
4745 IFS=$as_save_IFS
4746 test -z "$as_dir" && as_dir=.
4747 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004748 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004749 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4750 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4751 break 2
4752 fi
4753done
4754 done
4755IFS=$as_save_IFS
4756
4757 ;;
4758esac
4759fi
4760ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4761if test -n "$ac_pt_CXX"; then
4762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4763$as_echo "$ac_pt_CXX" >&6; }
4764else
4765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4766$as_echo "no" >&6; }
4767fi
4768
4769 if test "x$ac_pt_CXX" = x; then
4770 CXX="g++"
4771 else
4772 case $cross_compiling:$ac_tool_warned in
4773yes:)
4774{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4775$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4776ac_tool_warned=yes ;;
4777esac
4778 CXX=$ac_pt_CXX
4779 fi
4780else
4781 CXX="$ac_cv_path_CXX"
4782fi
4783 ;;
4784 cc) if test -n "$ac_tool_prefix"; then
4785 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4786set dummy ${ac_tool_prefix}c++; ac_word=$2
4787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4788$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004789if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004790 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004791else
4792 case $CXX in
4793 [\\/]* | ?:[\\/]*)
4794 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4795 ;;
4796 *)
4797 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4798for as_dir in notfound
4799do
4800 IFS=$as_save_IFS
4801 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004803 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004804 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004805 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004806 break 2
4807 fi
4808done
Matthias Kloseb9621712010-04-24 17:59:49 +00004809 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004810IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004811
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812 ;;
4813esac
4814fi
4815CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004816if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4818$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004819else
Matthias Kloseb9621712010-04-24 17:59:49 +00004820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4821$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004823
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004824
4825fi
4826if test -z "$ac_cv_path_CXX"; then
4827 ac_pt_CXX=$CXX
4828 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004829set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4831$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004832if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004833 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004834else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004835 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004836 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004837 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 +00004838 ;;
4839 *)
4840 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4841for as_dir in notfound
4842do
4843 IFS=$as_save_IFS
4844 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004845 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004846 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004847 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004848 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004849 break 2
4850 fi
4851done
Matthias Kloseb9621712010-04-24 17:59:49 +00004852 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004853IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004854
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004855 ;;
4856esac
4857fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004858ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4859if test -n "$ac_pt_CXX"; then
4860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4861$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004862else
Matthias Kloseb9621712010-04-24 17:59:49 +00004863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4864$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004866
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004867 if test "x$ac_pt_CXX" = x; then
4868 CXX="c++"
4869 else
4870 case $cross_compiling:$ac_tool_warned in
4871yes:)
4872{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4873$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4874ac_tool_warned=yes ;;
4875esac
4876 CXX=$ac_pt_CXX
4877 fi
4878else
4879 CXX="$ac_cv_path_CXX"
4880fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004881 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004882 clang|*/clang) if test -n "$ac_tool_prefix"; then
4883 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4884set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4886$as_echo_n "checking for $ac_word... " >&6; }
4887if ${ac_cv_path_CXX+:} false; then :
4888 $as_echo_n "(cached) " >&6
4889else
4890 case $CXX in
4891 [\\/]* | ?:[\\/]*)
4892 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4893 ;;
4894 *)
4895 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4896for as_dir in notfound
4897do
4898 IFS=$as_save_IFS
4899 test -z "$as_dir" && as_dir=.
4900 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004901 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004902 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4903 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4904 break 2
4905 fi
4906done
4907 done
4908IFS=$as_save_IFS
4909
Ned Deilycbfb9a52012-06-23 16:02:19 -07004910 ;;
4911esac
4912fi
4913CXX=$ac_cv_path_CXX
4914if test -n "$CXX"; then
4915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4916$as_echo "$CXX" >&6; }
4917else
4918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4919$as_echo "no" >&6; }
4920fi
4921
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004922
4923fi
4924if test -z "$ac_cv_path_CXX"; then
4925 ac_pt_CXX=$CXX
4926 # Extract the first word of "clang++", so it can be a program name with args.
4927set dummy clang++; ac_word=$2
4928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4929$as_echo_n "checking for $ac_word... " >&6; }
4930if ${ac_cv_path_ac_pt_CXX+:} false; then :
4931 $as_echo_n "(cached) " >&6
4932else
4933 case $ac_pt_CXX in
4934 [\\/]* | ?:[\\/]*)
4935 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4936 ;;
4937 *)
4938 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4939for as_dir in notfound
4940do
4941 IFS=$as_save_IFS
4942 test -z "$as_dir" && as_dir=.
4943 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004944 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004945 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4946 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4947 break 2
4948 fi
4949done
4950 done
4951IFS=$as_save_IFS
4952
4953 ;;
4954esac
4955fi
4956ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4957if test -n "$ac_pt_CXX"; then
4958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4959$as_echo "$ac_pt_CXX" >&6; }
4960else
4961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4962$as_echo "no" >&6; }
4963fi
4964
4965 if test "x$ac_pt_CXX" = x; then
4966 CXX="clang++"
4967 else
4968 case $cross_compiling:$ac_tool_warned in
4969yes:)
4970{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4971$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4972ac_tool_warned=yes ;;
4973esac
4974 CXX=$ac_pt_CXX
4975 fi
4976else
4977 CXX="$ac_cv_path_CXX"
4978fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004979 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004980 icc|*/icc) if test -n "$ac_tool_prefix"; then
4981 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4982set dummy ${ac_tool_prefix}icpc; ac_word=$2
4983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4984$as_echo_n "checking for $ac_word... " >&6; }
4985if ${ac_cv_path_CXX+:} false; then :
4986 $as_echo_n "(cached) " >&6
4987else
4988 case $CXX in
4989 [\\/]* | ?:[\\/]*)
4990 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4991 ;;
4992 *)
4993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4994for as_dir in notfound
4995do
4996 IFS=$as_save_IFS
4997 test -z "$as_dir" && as_dir=.
4998 for ac_exec_ext in '' $ac_executable_extensions; do
4999 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5000 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5002 break 2
5003 fi
5004done
5005 done
5006IFS=$as_save_IFS
5007
5008 ;;
5009esac
5010fi
5011CXX=$ac_cv_path_CXX
5012if test -n "$CXX"; then
5013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5014$as_echo "$CXX" >&6; }
5015else
5016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5017$as_echo "no" >&6; }
5018fi
5019
5020
5021fi
5022if test -z "$ac_cv_path_CXX"; then
5023 ac_pt_CXX=$CXX
5024 # Extract the first word of "icpc", so it can be a program name with args.
5025set dummy icpc; ac_word=$2
5026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5027$as_echo_n "checking for $ac_word... " >&6; }
5028if ${ac_cv_path_ac_pt_CXX+:} false; then :
5029 $as_echo_n "(cached) " >&6
5030else
5031 case $ac_pt_CXX in
5032 [\\/]* | ?:[\\/]*)
5033 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5034 ;;
5035 *)
5036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5037for as_dir in notfound
5038do
5039 IFS=$as_save_IFS
5040 test -z "$as_dir" && as_dir=.
5041 for ac_exec_ext in '' $ac_executable_extensions; do
5042 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5043 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5045 break 2
5046 fi
5047done
5048 done
5049IFS=$as_save_IFS
5050
5051 ;;
5052esac
5053fi
5054ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5055if test -n "$ac_pt_CXX"; then
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5057$as_echo "$ac_pt_CXX" >&6; }
5058else
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5060$as_echo "no" >&6; }
5061fi
5062
5063 if test "x$ac_pt_CXX" = x; then
5064 CXX="icpc"
5065 else
5066 case $cross_compiling:$ac_tool_warned in
5067yes:)
5068{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5069$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5070ac_tool_warned=yes ;;
5071esac
5072 CXX=$ac_pt_CXX
5073 fi
5074else
5075 CXX="$ac_cv_path_CXX"
5076fi
5077 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005078 esac
5079 if test "$CXX" = "notfound"
5080 then
5081 CXX=""
5082 fi
5083fi
5084if test -z "$CXX"
5085then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005086 if test -n "$ac_tool_prefix"; then
5087 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5088 do
5089 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5090set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5092$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005093if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005094 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005095else
5096 if test -n "$CXX"; then
5097 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5098else
5099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5100for as_dir in $PATH
5101do
5102 IFS=$as_save_IFS
5103 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005104 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005105 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005106 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005108 break 2
5109 fi
5110done
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005112IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005113
5114fi
5115fi
5116CXX=$ac_cv_prog_CXX
5117if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5119$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005120else
Matthias Kloseb9621712010-04-24 17:59:49 +00005121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5122$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005123fi
5124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005125
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005126 test -n "$CXX" && break
5127 done
5128fi
5129if test -z "$CXX"; then
5130 ac_ct_CXX=$CXX
5131 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5132do
5133 # Extract the first word of "$ac_prog", so it can be a program name with args.
5134set dummy $ac_prog; ac_word=$2
5135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5136$as_echo_n "checking for $ac_word... " >&6; }
5137if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5138 $as_echo_n "(cached) " >&6
5139else
5140 if test -n "$ac_ct_CXX"; then
5141 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5142else
5143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5144for as_dir in $PATH
5145do
5146 IFS=$as_save_IFS
5147 test -z "$as_dir" && as_dir=.
5148 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005149 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005150 ac_cv_prog_ac_ct_CXX="$ac_prog"
5151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5152 break 2
5153 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005154done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005155 done
5156IFS=$as_save_IFS
5157
5158fi
5159fi
5160ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5161if test -n "$ac_ct_CXX"; then
5162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5163$as_echo "$ac_ct_CXX" >&6; }
5164else
5165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5166$as_echo "no" >&6; }
5167fi
5168
5169
5170 test -n "$ac_ct_CXX" && break
5171done
5172
5173 if test "x$ac_ct_CXX" = x; then
5174 CXX="notfound"
5175 else
5176 case $cross_compiling:$ac_tool_warned in
5177yes:)
5178{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5179$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5180ac_tool_warned=yes ;;
5181esac
5182 CXX=$ac_ct_CXX
5183 fi
5184fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005185
5186 if test "$CXX" = "notfound"
5187 then
5188 CXX=""
5189 fi
5190fi
5191if test "$preset_cxx" != "$CXX"
5192then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005193 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005194
5195 By default, distutils will build C++ extension modules with \"$CXX\".
5196 If this is not intended, then set CXX on the configure command line.
5197 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005198$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005199
5200 By default, distutils will build C++ extension modules with \"$CXX\".
5201 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005202 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005203fi
5204
5205
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005206MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5207
5208
5209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5210$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5211cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005212#undef bfin
5213#undef cris
5214#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005215#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005216#undef hppa
5217#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005218#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005219#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005220#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005221#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005222#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005223#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005224 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005225#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005226# if defined(__x86_64__) && defined(__LP64__)
5227 x86_64-linux-gnu
5228# elif defined(__x86_64__) && defined(__ILP32__)
5229 x86_64-linux-gnux32
5230# elif defined(__i386__)
5231 i386-linux-gnu
5232# elif defined(__aarch64__) && defined(__AARCH64EL__)
5233# if defined(__ILP32__)
5234 aarch64_ilp32-linux-gnu
5235# else
5236 aarch64-linux-gnu
5237# endif
5238# elif defined(__aarch64__) && defined(__AARCH64EB__)
5239# if defined(__ILP32__)
5240 aarch64_be_ilp32-linux-gnu
5241# else
5242 aarch64_be-linux-gnu
5243# endif
5244# elif defined(__alpha__)
5245 alpha-linux-gnu
5246# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5247# if defined(__ARMEL__)
5248 arm-linux-gnueabihf
5249# else
5250 armeb-linux-gnueabihf
5251# endif
5252# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5253# if defined(__ARMEL__)
5254 arm-linux-gnueabi
5255# else
5256 armeb-linux-gnueabi
5257# endif
5258# elif defined(__hppa__)
5259 hppa-linux-gnu
5260# elif defined(__ia64__)
5261 ia64-linux-gnu
5262# elif defined(__m68k__) && !defined(__mcoldfire__)
5263 m68k-linux-gnu
5264# elif defined(__mips_hard_float) && defined(_MIPSEL)
5265# if _MIPS_SIM == _ABIO32
5266 mipsel-linux-gnu
5267# elif _MIPS_SIM == _ABIN32
5268 mips64el-linux-gnuabin32
5269# elif _MIPS_SIM == _ABI64
5270 mips64el-linux-gnuabi64
5271# else
5272# error unknown platform triplet
5273# endif
5274# elif defined(__mips_hard_float)
5275# if _MIPS_SIM == _ABIO32
5276 mips-linux-gnu
5277# elif _MIPS_SIM == _ABIN32
5278 mips64-linux-gnuabin32
5279# elif _MIPS_SIM == _ABI64
5280 mips64-linux-gnuabi64
5281# else
5282# error unknown platform triplet
5283# endif
5284# elif defined(__or1k__)
5285 or1k-linux-gnu
5286# elif defined(__powerpc__) && defined(__SPE__)
5287 powerpc-linux-gnuspe
5288# elif defined(__powerpc64__)
5289# if defined(__LITTLE_ENDIAN__)
5290 powerpc64le-linux-gnu
5291# else
5292 powerpc64-linux-gnu
5293# endif
5294# elif defined(__powerpc__)
5295 powerpc-linux-gnu
5296# elif defined(__s390x__)
5297 s390x-linux-gnu
5298# elif defined(__s390__)
5299 s390-linux-gnu
5300# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5301 sh4-linux-gnu
5302# elif defined(__sparc__) && defined(__arch64__)
5303 sparc64-linux-gnu
5304# elif defined(__sparc__)
5305 sparc-linux-gnu
5306# else
5307# error unknown platform triplet
5308# endif
5309#elif defined(__FreeBSD_kernel__)
5310# if defined(__LP64__)
5311 x86_64-kfreebsd-gnu
5312# elif defined(__i386__)
5313 i386-kfreebsd-gnu
5314# else
5315# error unknown platform triplet
5316# endif
5317#elif defined(__gnu_hurd__)
5318 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005319#elif defined(__APPLE__)
5320 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005321#else
5322# error unknown platform triplet
5323#endif
5324
5325EOF
5326
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005327if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005328 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5330$as_echo "$PLATFORM_TRIPLET" >&6; }
5331else
5332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5333$as_echo "none" >&6; }
5334fi
5335rm -f conftest.c conftest.out
5336
5337if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5338 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5339 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5340 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005341elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5342 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005343fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005344
doko@ubuntu.com55532312016-06-14 08:55:19 +02005345if test x$MULTIARCH != x; then
5346 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5347fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005348
5349
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5351$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5352save_LDFLAGS="$LDFLAGS"
5353LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005354
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5356/* end confdefs.h. */
5357
5358int
5359main ()
5360{
5361
5362 ;
5363 return 0;
5364}
5365_ACEOF
5366if ac_fn_c_try_link "$LINENO"; then :
5367 NO_AS_NEEDED="-Wl,--no-as-needed"
5368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5369$as_echo "yes" >&6; }
5370else
5371 NO_AS_NEEDED=""
5372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5373$as_echo "no" >&6; }
5374fi
5375rm -f core conftest.err conftest.$ac_objext \
5376 conftest$ac_exeext conftest.$ac_ext
5377LDFLAGS="$save_LDFLAGS"
5378
5379
5380
5381# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005382
Matthias Kloseb9621712010-04-24 17:59:49 +00005383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5384$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005385if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005386 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005387else
5388 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5389 then ac_cv_path_EGREP="$GREP -E"
5390 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005392 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 # Loop through the user's path and test for each of PROGNAME-LIST
5394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005395for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5396do
5397 IFS=$as_save_IFS
5398 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005399 for ac_prog in egrep; do
5400 for ac_exec_ext in '' $ac_executable_extensions; do
5401 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005402 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005403# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404 # Check for GNU $ac_path_EGREP
5405case `"$ac_path_EGREP" --version 2>&1` in
5406*GNU*)
5407 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5408*)
5409 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005411 while :
5412 do
5413 cat "conftest.in" "conftest.in" >"conftest.tmp"
5414 mv "conftest.tmp" "conftest.in"
5415 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005416 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005417 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5418 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005419 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005420 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5421 # Best one so far, save it but keep looking for a better one
5422 ac_cv_path_EGREP="$ac_path_EGREP"
5423 ac_path_EGREP_max=$ac_count
5424 fi
5425 # 10*(2^10) chars as input seems more than enough
5426 test $ac_count -gt 10 && break
5427 done
5428 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5429esac
5430
Matthias Kloseb9621712010-04-24 17:59:49 +00005431 $ac_path_EGREP_found && break 3
5432 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005433 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005434 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005435IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005436 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005437 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 +00005438 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005439else
5440 ac_cv_path_EGREP=$EGREP
5441fi
5442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005443 fi
5444fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5446$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005447 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005448
5449
Matthias Kloseb9621712010-04-24 17:59:49 +00005450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5451$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005452if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005453 $as_echo_n "(cached) " >&6
5454else
5455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005456/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005457#include <stdlib.h>
5458#include <stdarg.h>
5459#include <string.h>
5460#include <float.h>
5461
5462int
5463main ()
5464{
5465
5466 ;
5467 return 0;
5468}
5469_ACEOF
5470if ac_fn_c_try_compile "$LINENO"; then :
5471 ac_cv_header_stdc=yes
5472else
5473 ac_cv_header_stdc=no
5474fi
5475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476
5477if test $ac_cv_header_stdc = yes; then
5478 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5480/* end confdefs.h. */
5481#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005482
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005483_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005484if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005485 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005486
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005487else
Matthias Kloseb9621712010-04-24 17:59:49 +00005488 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005489fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005490rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005491
Matthias Kloseb9621712010-04-24 17:59:49 +00005492fi
5493
5494if test $ac_cv_header_stdc = yes; then
5495 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5497/* end confdefs.h. */
5498#include <stdlib.h>
5499
5500_ACEOF
5501if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5502 $EGREP "free" >/dev/null 2>&1; then :
5503
5504else
5505 ac_cv_header_stdc=no
5506fi
5507rm -f conftest*
5508
5509fi
5510
5511if test $ac_cv_header_stdc = yes; then
5512 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5513 if test "$cross_compiling" = yes; then :
5514 :
5515else
5516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5517/* end confdefs.h. */
5518#include <ctype.h>
5519#include <stdlib.h>
5520#if ((' ' & 0x0FF) == 0x020)
5521# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5522# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5523#else
5524# define ISLOWER(c) \
5525 (('a' <= (c) && (c) <= 'i') \
5526 || ('j' <= (c) && (c) <= 'r') \
5527 || ('s' <= (c) && (c) <= 'z'))
5528# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5529#endif
5530
5531#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5532int
5533main ()
5534{
5535 int i;
5536 for (i = 0; i < 256; i++)
5537 if (XOR (islower (i), ISLOWER (i))
5538 || toupper (i) != TOUPPER (i))
5539 return 2;
5540 return 0;
5541}
5542_ACEOF
5543if ac_fn_c_try_run "$LINENO"; then :
5544
5545else
5546 ac_cv_header_stdc=no
5547fi
5548rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5549 conftest.$ac_objext conftest.beam conftest.$ac_ext
5550fi
5551
5552fi
5553fi
5554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5555$as_echo "$ac_cv_header_stdc" >&6; }
5556if test $ac_cv_header_stdc = yes; then
5557
5558$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5559
5560fi
5561
5562# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5563for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5564 inttypes.h stdint.h unistd.h
5565do :
5566 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5567ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5568"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005569if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005570 cat >>confdefs.h <<_ACEOF
5571#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5572_ACEOF
5573
5574fi
5575
5576done
5577
5578
5579
5580 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 +02005581if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005582 MINIX=yes
5583else
5584 MINIX=
5585fi
5586
5587
5588 if test "$MINIX" = yes; then
5589
5590$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5591
5592
5593$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5594
5595
5596$as_echo "#define _MINIX 1" >>confdefs.h
5597
5598 fi
5599
5600
5601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5602$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005603if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005604 $as_echo_n "(cached) " >&6
5605else
5606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5607/* end confdefs.h. */
5608
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005609# define __EXTENSIONS__ 1
5610 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005611int
5612main ()
5613{
5614
5615 ;
5616 return 0;
5617}
5618_ACEOF
5619if ac_fn_c_try_compile "$LINENO"; then :
5620 ac_cv_safe_to_define___extensions__=yes
5621else
5622 ac_cv_safe_to_define___extensions__=no
5623fi
5624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5625fi
5626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5627$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5628 test $ac_cv_safe_to_define___extensions__ = yes &&
5629 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5630
5631 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5632
5633 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5634
5635 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5636
5637 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5638
5639
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640
Xavier de Gaye95750b12016-07-09 11:05:42 +02005641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5642$as_echo_n "checking for the Android API level... " >&6; }
5643cat >> conftest.c <<EOF
5644#ifdef __ANDROID__
5645#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005646android_api = __ANDROID_API__
5647arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005648#else
5649#error not Android
5650#endif
5651EOF
5652
5653if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005654 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5655 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5657$as_echo "$ANDROID_API_LEVEL" >&6; }
5658
5659cat >>confdefs.h <<_ACEOF
5660#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5661_ACEOF
5662
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005663
5664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5665$as_echo_n "checking for the Android arm ABI... " >&6; }
5666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5667$as_echo "$_arm_arch" >&6; }
5668 if test "$_arm_arch" = 7; then
5669 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5670 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5671 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005672else
5673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5674$as_echo "not Android" >&6; }
5675fi
5676rm -f conftest.c conftest.out
5677
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678# Check for unsupported systems
5679case $ac_sys_system/$ac_sys_release in
5680atheos*|Linux*/1*)
5681 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5682 echo See README for details.
5683 exit 1;;
5684esac
5685
5686
Matthias Kloseb9621712010-04-24 17:59:49 +00005687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5688$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
5690# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005691if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692 withval=$with_suffix;
5693 case $withval in
5694 no) EXEEXT=;;
5695 yes) EXEEXT=.exe;;
5696 *) EXEEXT=$withval;;
5697 esac
5698fi
5699
Matthias Kloseb9621712010-04-24 17:59:49 +00005700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5701$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702
5703# Test whether we're running on a non-case-sensitive system, in which
5704# case we give a warning if no ext is given
5705
Matthias Kloseb9621712010-04-24 17:59:49 +00005706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5707$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708if test ! -d CaseSensitiveTestDir; then
5709mkdir CaseSensitiveTestDir
5710fi
5711
5712if test -d casesensitivetestdir
5713then
Matthias Kloseb9621712010-04-24 17:59:49 +00005714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5715$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716 BUILDEXEEXT=.exe
5717else
Matthias Kloseb9621712010-04-24 17:59:49 +00005718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5719$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720 BUILDEXEEXT=$EXEEXT
5721fi
5722rmdir CaseSensitiveTestDir
5723
5724case $MACHDEP in
5725bsdos*)
5726 case $CC in
5727 gcc) CC="$CC -D_HAVE_BSDI";;
5728 esac;;
5729esac
5730
5731case $ac_sys_system in
5732hp*|HP*)
5733 case $CC in
5734 cc|*/cc) CC="$CC -Ae";;
5735 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736esac
5737
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738
Matthias Kloseb9621712010-04-24 17:59:49 +00005739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5740$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741if test -z "$LIBRARY"
5742then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005743 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5746$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747
5748# LDLIBRARY is the name of the library to link against (as opposed to the
5749# name of the library into which to insert object files). BLDLIBRARY is also
5750# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5751# is blank as the main program is not linked directly against LDLIBRARY.
5752# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5753# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5754# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5755# DLLLIBRARY is the shared (i.e., DLL) library.
5756#
5757# RUNSHARED is used to run shared python without installed libraries
5758#
5759# INSTSONAME is the name of the shared library that will be use to install
5760# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005761#
5762# LDVERSION is the shared library version number, normally the Python version
5763# with the ABI build flags appended.
5764
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765
5766
5767
5768
5769
5770
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005771
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772LDLIBRARY="$LIBRARY"
5773BLDLIBRARY='$(LDLIBRARY)'
5774INSTSONAME='$(LDLIBRARY)'
5775DLLLIBRARY=''
5776LDLIBRARYDIR=''
5777RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005778LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779
5780# LINKCC is the command that links the python executable -- default is $(CC).
5781# If CXX is set, and if it is needed to link a main function that was
5782# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5783# python might then depend on the C++ runtime
5784# This is altered for AIX in order to build the export list before
5785# linking.
5786
Matthias Kloseb9621712010-04-24 17:59:49 +00005787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5788$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789if test -z "$LINKCC"
5790then
5791 LINKCC='$(PURIFY) $(MAINCC)'
5792 case $ac_sys_system in
5793 AIX*)
5794 exp_extra="\"\""
5795 if test $ac_sys_release -ge 5 -o \
5796 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5797 exp_extra="."
5798 fi
5799 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800 QNX*)
5801 # qcc must be used because the other compilers do not
5802 # support -N.
5803 LINKCC=qcc;;
5804 esac
5805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5807$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808
5809# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5810# make sure we default having it set to "no": this is used by
5811# distutils.unixccompiler to know if it should add --enable-new-dtags
5812# to linker command lines, and failing to detect GNU ld simply results
5813# in the same bahaviour as before.
5814
Matthias Kloseb9621712010-04-24 17:59:49 +00005815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5816$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817ac_prog=ld
5818if test "$GCC" = yes; then
5819 ac_prog=`$CC -print-prog-name=ld`
5820fi
5821case `"$ac_prog" -V 2>&1 < /dev/null` in
5822 *GNU*)
5823 GNULD=yes;;
5824 *)
5825 GNULD=no;;
5826esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5828$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5831$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005832if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005833 $as_echo_n "(cached) " >&6
5834else
5835 ac_cv_c_inline=no
5836for ac_kw in inline __inline__ __inline; do
5837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5838/* end confdefs.h. */
5839#ifndef __cplusplus
5840typedef int foo_t;
5841static $ac_kw foo_t static_foo () {return 0; }
5842$ac_kw foo_t foo () {return 0; }
5843#endif
5844
5845_ACEOF
5846if ac_fn_c_try_compile "$LINENO"; then :
5847 ac_cv_c_inline=$ac_kw
5848fi
5849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5850 test "$ac_cv_c_inline" != no && break
5851done
5852
5853fi
5854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5855$as_echo "$ac_cv_c_inline" >&6; }
5856
5857case $ac_cv_c_inline in
5858 inline | yes) ;;
5859 *)
5860 case $ac_cv_c_inline in
5861 no) ac_val=;;
5862 *) ac_val=$ac_cv_c_inline;;
5863 esac
5864 cat >>confdefs.h <<_ACEOF
5865#ifndef __cplusplus
5866#define inline $ac_val
5867#endif
5868_ACEOF
5869 ;;
5870esac
5871
5872if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005873
5874$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005875
5876
5877fi
5878
5879
Matthias Kloseb9621712010-04-24 17:59:49 +00005880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5881$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005883if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884 enableval=$enable_shared;
5885fi
5886
5887
5888if test -z "$enable_shared"
5889then
5890 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005891 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892 enable_shared="yes";;
5893 *)
5894 enable_shared="no";;
5895 esac
5896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5898$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899
Matthias Kloseb9621712010-04-24 17:59:49 +00005900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5901$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005903if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005904 enableval=$enable_profiling;
5905fi
5906
5907if test "x$enable_profiling" = xyes; then
5908 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005909 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911/* end confdefs.h. */
5912int main() { return 0; }
5913_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005914if ac_fn_c_try_link "$LINENO"; then :
5915
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005917 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005919rm -f core conftest.err conftest.$ac_objext \
5920 conftest$ac_exeext conftest.$ac_ext
5921 CC="$ac_save_cc"
5922else
5923 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5926$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927
doko@ubuntu.comba015832012-06-30 16:52:05 +02005928if test "x$enable_profiling" = xyes; then
5929 BASECFLAGS="-pg $BASECFLAGS"
5930 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931fi
5932
Matthias Kloseb9621712010-04-24 17:59:49 +00005933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5934$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935
5936# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5937# library that we build, but we do not want to link against it (we
5938# will find it with a -framework option). For this reason there is an
5939# extra variable BLDLIBRARY against which Python and the extension
5940# modules are linked, BLDLIBRARY. This is normally the same as
5941# LDLIBRARY, but empty for MacOSX framework builds.
5942if test "$enable_framework"
5943then
5944 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005945 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946 BLDLIBRARY=''
5947else
5948 BLDLIBRARY='$(LDLIBRARY)'
5949fi
5950
5951# Other platforms follow
5952if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005953 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954
Matthias Kloseb9621712010-04-24 17:59:49 +00005955$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956
5957 case $ac_sys_system in
5958 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005959 LDLIBRARY='libpython$(LDVERSION).dll.a'
5960 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961 ;;
5962 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005963 LDLIBRARY='libpython$(LDVERSION).so'
5964 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005965 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005967 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005968 then
5969 PY3LIBRARY=libpython3.so
5970 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005972 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005973 LDLIBRARY='libpython$(LDVERSION).so'
5974 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005975 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005977 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005978 then
5979 PY3LIBRARY=libpython3.so
5980 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981 ;;
5982 hp*|HP*)
5983 case `uname -m` in
5984 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005985 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986 ;;
5987 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005988 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989 ;;
5990 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005991 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005992 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005995 LDLIBRARY='libpython$(LDVERSION).dylib'
5996 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005997 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005999 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006000 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006001 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006002 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003
6004 esac
6005else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006006 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007 case $ac_sys_system in
6008 CYGWIN*)
6009 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006010 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011 ;;
6012 esac
6013fi
6014
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006015if test "$cross_compiling" = yes; then
6016 RUNSHARED=
6017fi
6018
Matthias Kloseb9621712010-04-24 17:59:49 +00006019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6020$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021
6022if test -n "$ac_tool_prefix"; then
6023 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6024set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6026$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006027if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006028 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006029else
6030 if test -n "$RANLIB"; then
6031 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6032else
6033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6034for as_dir in $PATH
6035do
6036 IFS=$as_save_IFS
6037 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006038 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006039 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042 break 2
6043 fi
6044done
Matthias Kloseb9621712010-04-24 17:59:49 +00006045 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046IFS=$as_save_IFS
6047
6048fi
6049fi
6050RANLIB=$ac_cv_prog_RANLIB
6051if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6053$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006054else
Matthias Kloseb9621712010-04-24 17:59:49 +00006055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6056$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057fi
6058
6059
6060fi
6061if test -z "$ac_cv_prog_RANLIB"; then
6062 ac_ct_RANLIB=$RANLIB
6063 # Extract the first word of "ranlib", so it can be a program name with args.
6064set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6066$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006067if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006068 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069else
6070 if test -n "$ac_ct_RANLIB"; then
6071 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6072else
6073as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6074for as_dir in $PATH
6075do
6076 IFS=$as_save_IFS
6077 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006078 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006079 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006080 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006081 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006082 break 2
6083 fi
6084done
Matthias Kloseb9621712010-04-24 17:59:49 +00006085 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006086IFS=$as_save_IFS
6087
6088fi
6089fi
6090ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6091if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6093$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006094else
Matthias Kloseb9621712010-04-24 17:59:49 +00006095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6096$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006097fi
6098
6099 if test "x$ac_ct_RANLIB" = x; then
6100 RANLIB=":"
6101 else
6102 case $cross_compiling:$ac_tool_warned in
6103yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006104{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6105$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106ac_tool_warned=yes ;;
6107esac
6108 RANLIB=$ac_ct_RANLIB
6109 fi
6110else
6111 RANLIB="$ac_cv_prog_RANLIB"
6112fi
6113
6114
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006115if test -n "$ac_tool_prefix"; then
6116 for ac_prog in ar aal
6117 do
6118 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6119set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6121$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006122if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006123 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006124else
6125 if test -n "$AR"; then
6126 ac_cv_prog_AR="$AR" # Let the user override the test.
6127else
6128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6129for as_dir in $PATH
6130do
6131 IFS=$as_save_IFS
6132 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006133 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006134 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006135 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006136 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006137 break 2
6138 fi
6139done
Matthias Kloseb9621712010-04-24 17:59:49 +00006140 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006141IFS=$as_save_IFS
6142
6143fi
6144fi
6145AR=$ac_cv_prog_AR
6146if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6148$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006149else
Matthias Kloseb9621712010-04-24 17:59:49 +00006150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6151$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006152fi
6153
6154
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006155 test -n "$AR" && break
6156 done
6157fi
6158if test -z "$AR"; then
6159 ac_ct_AR=$AR
6160 for ac_prog in ar aal
6161do
6162 # Extract the first word of "$ac_prog", so it can be a program name with args.
6163set dummy $ac_prog; ac_word=$2
6164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6165$as_echo_n "checking for $ac_word... " >&6; }
6166if ${ac_cv_prog_ac_ct_AR+:} false; then :
6167 $as_echo_n "(cached) " >&6
6168else
6169 if test -n "$ac_ct_AR"; then
6170 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6171else
6172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6173for as_dir in $PATH
6174do
6175 IFS=$as_save_IFS
6176 test -z "$as_dir" && as_dir=.
6177 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006178 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006179 ac_cv_prog_ac_ct_AR="$ac_prog"
6180 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6181 break 2
6182 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006183done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006184 done
6185IFS=$as_save_IFS
6186
6187fi
6188fi
6189ac_ct_AR=$ac_cv_prog_ac_ct_AR
6190if test -n "$ac_ct_AR"; then
6191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6192$as_echo "$ac_ct_AR" >&6; }
6193else
6194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6195$as_echo "no" >&6; }
6196fi
6197
6198
6199 test -n "$ac_ct_AR" && break
6200done
6201
6202 if test "x$ac_ct_AR" = x; then
6203 AR="ar"
6204 else
6205 case $cross_compiling:$ac_tool_warned in
6206yes:)
6207{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6208$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6209ac_tool_warned=yes ;;
6210esac
6211 AR=$ac_ct_AR
6212 fi
6213fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006214
6215
6216# tweak ARFLAGS only if the user didn't set it on the command line
6217
6218if test -z "$ARFLAGS"
6219then
6220 ARFLAGS="rc"
6221fi
6222
doko@ubuntu.com58844492012-06-30 18:25:32 +02006223if test -n "$ac_tool_prefix"; then
6224 for ac_prog in readelf
6225 do
6226 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6227set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6229$as_echo_n "checking for $ac_word... " >&6; }
6230if ${ac_cv_prog_READELF+:} false; then :
6231 $as_echo_n "(cached) " >&6
6232else
6233 if test -n "$READELF"; then
6234 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6235else
6236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6237for as_dir in $PATH
6238do
6239 IFS=$as_save_IFS
6240 test -z "$as_dir" && as_dir=.
6241 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006242 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006243 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6244 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6245 break 2
6246 fi
6247done
6248 done
6249IFS=$as_save_IFS
6250
6251fi
6252fi
6253READELF=$ac_cv_prog_READELF
6254if test -n "$READELF"; then
6255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6256$as_echo "$READELF" >&6; }
6257else
6258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6259$as_echo "no" >&6; }
6260fi
6261
6262
6263 test -n "$READELF" && break
6264 done
6265fi
6266if test -z "$READELF"; then
6267 ac_ct_READELF=$READELF
6268 for ac_prog in readelf
6269do
6270 # Extract the first word of "$ac_prog", so it can be a program name with args.
6271set dummy $ac_prog; ac_word=$2
6272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6273$as_echo_n "checking for $ac_word... " >&6; }
6274if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6275 $as_echo_n "(cached) " >&6
6276else
6277 if test -n "$ac_ct_READELF"; then
6278 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6279else
6280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6281for as_dir in $PATH
6282do
6283 IFS=$as_save_IFS
6284 test -z "$as_dir" && as_dir=.
6285 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006286 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006287 ac_cv_prog_ac_ct_READELF="$ac_prog"
6288 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6289 break 2
6290 fi
6291done
6292 done
6293IFS=$as_save_IFS
6294
6295fi
6296fi
6297ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6298if test -n "$ac_ct_READELF"; then
6299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6300$as_echo "$ac_ct_READELF" >&6; }
6301else
6302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6303$as_echo "no" >&6; }
6304fi
6305
6306
6307 test -n "$ac_ct_READELF" && break
6308done
6309
6310 if test "x$ac_ct_READELF" = x; then
6311 READELF=":"
6312 else
6313 case $cross_compiling:$ac_tool_warned in
6314yes:)
6315{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6316$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6317ac_tool_warned=yes ;;
6318esac
6319 READELF=$ac_ct_READELF
6320 fi
6321fi
6322
6323if test "$cross_compiling" = yes; then
6324 case "$READELF" in
6325 readelf|:)
6326 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6327 ;;
6328 esac
6329fi
6330
6331
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333case $MACHDEP in
6334bsdos*|hp*|HP*)
6335 # install -d does not work on BSDI or HP-UX
6336 if test -z "$INSTALL"
6337 then
6338 INSTALL="${srcdir}/install-sh -c"
6339 fi
6340esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006341# Find a good install program. We prefer a C program (faster),
6342# so one script is as good as another. But avoid the broken or
6343# incompatible versions:
6344# SysV /etc/install, /usr/sbin/install
6345# SunOS /usr/etc/install
6346# IRIX /sbin/install
6347# AIX /bin/install
6348# AmigaOS /C/install, which installs bootblocks on floppy discs
6349# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6350# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6351# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6352# OS/2's system install, which has a completely different semantic
6353# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006354# Reject install programs that cannot install multiple files.
6355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6356$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006357if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006358if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006359 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006360else
6361 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6362for as_dir in $PATH
6363do
6364 IFS=$as_save_IFS
6365 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006366 # Account for people who put trailing slashes in PATH elements.
6367case $as_dir/ in #((
6368 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006369 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006370 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371 /usr/ucb/* ) ;;
6372 *)
6373 # OSF1 and SCO ODT 3.0 have their own names for install.
6374 # Don't use installbsd from OSF since it installs stuff as root
6375 # by default.
6376 for ac_prog in ginstall scoinst install; do
6377 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006378 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379 if test $ac_prog = install &&
6380 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6381 # AIX install. It has an incompatible calling convention.
6382 :
6383 elif test $ac_prog = install &&
6384 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6385 # program-specific install script used by HP pwplus--don't use.
6386 :
6387 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006388 rm -rf conftest.one conftest.two conftest.dir
6389 echo one > conftest.one
6390 echo two > conftest.two
6391 mkdir conftest.dir
6392 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6393 test -s conftest.one && test -s conftest.two &&
6394 test -s conftest.dir/conftest.one &&
6395 test -s conftest.dir/conftest.two
6396 then
6397 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6398 break 3
6399 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006400 fi
6401 fi
6402 done
6403 done
6404 ;;
6405esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006406
6407 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408IFS=$as_save_IFS
6409
Matthias Kloseb9621712010-04-24 17:59:49 +00006410rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006411
6412fi
6413 if test "${ac_cv_path_install+set}" = set; then
6414 INSTALL=$ac_cv_path_install
6415 else
6416 # As a last resort, use the slow shell script. Don't cache a
6417 # value for INSTALL within a source directory, because that will
6418 # break other packages using the cache if that directory is
6419 # removed, or if the value is a relative name.
6420 INSTALL=$ac_install_sh
6421 fi
6422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6424$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006425
6426# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6427# It thinks the first close brace ends the variable substitution.
6428test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6429
6430test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6431
6432test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6433
Matthias Klose93a0ef12012-03-15 18:08:34 +01006434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6435$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6436if test -z "$MKDIR_P"; then
6437 if ${ac_cv_path_mkdir+:} false; then :
6438 $as_echo_n "(cached) " >&6
6439else
6440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6441for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6442do
6443 IFS=$as_save_IFS
6444 test -z "$as_dir" && as_dir=.
6445 for ac_prog in mkdir gmkdir; do
6446 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006447 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006448 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6449 'mkdir (GNU coreutils) '* | \
6450 'mkdir (coreutils) '* | \
6451 'mkdir (fileutils) '4.1*)
6452 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6453 break 3;;
6454 esac
6455 done
6456 done
6457 done
6458IFS=$as_save_IFS
6459
6460fi
6461
6462 test -d ./--version && rmdir ./--version
6463 if test "${ac_cv_path_mkdir+set}" = set; then
6464 MKDIR_P="$ac_cv_path_mkdir -p"
6465 else
6466 # As a last resort, use the slow shell script. Don't cache a
6467 # value for MKDIR_P within a source directory, because that will
6468 # break other packages using the cache if that directory is
6469 # removed, or if the value is a relative name.
6470 MKDIR_P="$ac_install_sh -d"
6471 fi
6472fi
6473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6474$as_echo "$MKDIR_P" >&6; }
6475
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006476
6477# Not every filesystem supports hard links
6478
6479if test -z "$LN" ; then
6480 case $ac_sys_system in
6481 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006482 *) LN=ln;;
6483 esac
6484fi
6485
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006486# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006487
6488ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006489
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006490# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6492$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006493
6494# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006495if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006496 withval=$with_pydebug;
6497if test "$withval" != no
6498then
6499
Matthias Kloseb9621712010-04-24 17:59:49 +00006500$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006501
Matthias Kloseb9621712010-04-24 17:59:49 +00006502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6503$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006504 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006505 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006506else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6507$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006508fi
6509else
Matthias Kloseb9621712010-04-24 17:59:49 +00006510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6511$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006512fi
6513
6514
Brett Cannon63d98bc2016-09-06 17:12:40 -07006515# Enable optimization flags
6516
6517
6518Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6520$as_echo_n "checking for --enable-optimizations... " >&6; }
6521# Check whether --enable-optimizations was given.
6522if test "${enable_optimizations+set}" = set; then :
6523 enableval=$enable_optimizations;
Brett Cannon63d98bc2016-09-06 17:12:40 -07006524if test "$withval" != no
6525then
6526 Py_OPT='true'
6527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6528$as_echo "yes" >&6; };
6529else
6530 Py_OPT='false'
6531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6532$as_echo "no" >&6; };
6533fi
6534else
6535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6536$as_echo "no" >&6; }
6537fi
6538
6539if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006540 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6541 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006542 # 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 +00006543 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006544 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006545 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006546 DEF_MAKE_RULE="build_all"
6547else
6548 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006549 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006550 DEF_MAKE_RULE="all"
6551fi
6552
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006553# Enable LTO flags
6554
6555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6556$as_echo_n "checking for --with-lto... " >&6; }
6557
6558# Check whether --with-lto was given.
6559if test "${with_lto+set}" = set; then :
6560 withval=$with_lto;
6561if test "$withval" != no
6562then
6563 Py_LTO='true'
6564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6565$as_echo "yes" >&6; };
6566else
6567 Py_LTO='false'
6568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6569$as_echo "no" >&6; };
6570fi
6571else
6572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6573$as_echo "no" >&6; }
6574fi
6575
6576if test "$Py_LTO" = 'true' ; then
6577 case $CC in
6578 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006579 case $ac_sys_system in
6580 Darwin*)
6581 # Any changes made here should be reflected in the GCC+Darwin case below
6582 LTOFLAGS="-flto -Wl,-export_dynamic"
6583 ;;
6584 *)
6585 LTOFLAGS="-flto"
6586 ;;
6587 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006588 ;;
6589 *gcc*)
6590 case $ac_sys_system in
6591 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006592 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006593 ;;
6594 *)
6595 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6596 ;;
6597 esac
6598 ;;
6599 esac
6600fi
6601
Brett Cannon7188a3e2015-09-18 15:13:44 -07006602# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006603
6604
6605
6606
6607
Gregory P. Smith799520c2016-09-07 16:10:00 -07006608# Make this work on systems where llvm tools are not installed with their
6609# normal names in the default $PATH (ie: Ubuntu). They exist under the
6610# non-suffixed name in their versioned llvm directory.
6611llvm_bin_dir=''
6612llvm_path="${PATH}"
6613if test "${CC}" = "clang"
6614then
6615 clang_bin=`which clang`
6616 # Some systems install clang elsewhere as a symlink to the real path
6617 # which is where the related llvm tools are located.
6618 if test -L "${clang_bin}"
6619 then
6620 clang_dir=`dirname "${clang_bin}"`
6621 clang_bin=`readlink "${clang_bin}"`
6622 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6623 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6624 fi
6625fi
Zachary Ware5af85642015-12-21 12:09:17 -06006626
Gregory P. Smith799520c2016-09-07 16:10:00 -07006627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6628$as_echo_n "checking target system type... " >&6; }
6629if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006630 $as_echo_n "(cached) " >&6
6631else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006632 if test "x$target_alias" = x; then
6633 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006634else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006635 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6636 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6637fi
6638
6639fi
6640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6641$as_echo "$ac_cv_target" >&6; }
6642case $ac_cv_target in
6643*-*-*) ;;
6644*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6645esac
6646target=$ac_cv_target
6647ac_save_IFS=$IFS; IFS='-'
6648set x $ac_cv_target
6649shift
6650target_cpu=$1
6651target_vendor=$2
6652shift; shift
6653# Remember, the first character of IFS is used to create $*,
6654# except with old shells:
6655target_os=$*
6656IFS=$ac_save_IFS
6657case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6658
6659
6660# The aliases save the names the user supplied, while $host etc.
6661# will get canonicalized.
6662test -n "$target_alias" &&
6663 test "$program_prefix$program_suffix$program_transform_name" = \
6664 NONENONEs,x,x, &&
6665 program_prefix=${target_alias}-
6666# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6667set dummy $target_alias-llvm-profdata; ac_word=$2
6668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6669$as_echo_n "checking for $ac_word... " >&6; }
6670if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6671 $as_echo_n "(cached) " >&6
6672else
6673 case $LLVM_PROFDATA in
6674 [\\/]* | ?:[\\/]*)
6675 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6676 ;;
6677 *)
6678 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6679for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006680do
6681 IFS=$as_save_IFS
6682 test -z "$as_dir" && as_dir=.
6683 for ac_exec_ext in '' $ac_executable_extensions; do
6684 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006685 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006686 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6687 break 2
6688 fi
6689done
6690 done
6691IFS=$as_save_IFS
6692
Gregory P. Smith799520c2016-09-07 16:10:00 -07006693 ;;
6694esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006695fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006696LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6697if test -n "$LLVM_PROFDATA"; then
6698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6699$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006700else
6701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6702$as_echo "no" >&6; }
6703fi
6704
6705
Gregory P. Smith799520c2016-09-07 16:10:00 -07006706if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6707 if test "$build" = "$target"; then
6708 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6709 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6710set dummy llvm-profdata; ac_word=$2
6711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6712$as_echo_n "checking for $ac_word... " >&6; }
6713if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6714 $as_echo_n "(cached) " >&6
6715else
6716 case $ac_pt_LLVM_PROFDATA in
6717 [\\/]* | ?:[\\/]*)
6718 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6719 ;;
6720 *)
6721 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6722for as_dir in ${llvm_path}
6723do
6724 IFS=$as_save_IFS
6725 test -z "$as_dir" && as_dir=.
6726 for ac_exec_ext in '' $ac_executable_extensions; do
6727 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6728 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6729 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6730 break 2
6731 fi
6732done
6733 done
6734IFS=$as_save_IFS
6735
6736 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6737 ;;
6738esac
6739fi
6740ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6741if test -n "$ac_pt_LLVM_PROFDATA"; then
6742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6743$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6744else
6745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6746$as_echo "no" >&6; }
6747fi
6748
6749 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6750 else
6751 LLVM_PROFDATA="''"
6752 fi
6753else
6754 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6755fi
6756
6757
6758if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6759then
6760 LLVM_PROF_FOUND="found"
6761else
6762 LLVM_PROF_FOUND="not-found"
6763fi
6764if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6765then
6766 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6767 if test -n "${found_llvm_profdata}"
6768 then
6769 # llvm-profdata isn't directly in $PATH in some cases.
6770 # https://apple.stackexchange.com/questions/197053/
6771 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6772 LLVM_PROF_FOUND=found
6773 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6774$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6775 fi
6776fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006777LLVM_PROF_ERR=no
6778case $CC in
6779 *clang*)
6780 # Any changes made here should be reflected in the GCC+Darwin case below
6781 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6782 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006783 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006784 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6785 if test $LLVM_PROF_FOUND = not-found
6786 then
6787 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006788 if test "${REQUIRE_PGO}" = "yes"
6789 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006790 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 -07006791 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006792 fi
6793 ;;
6794 *gcc*)
6795 case $ac_sys_system in
6796 Darwin*)
6797 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6798 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006799 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006800 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006801 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006802 then
6803 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006804 if test "${REQUIRE_PGO}" = "yes"
6805 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006806 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 -07006807 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006808 fi
6809 ;;
6810 *)
6811 PGO_PROF_GEN_FLAG="-fprofile-generate"
6812 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6813 LLVM_PROF_MERGER="true"
6814 LLVM_PROF_FILE=""
6815 ;;
6816 esac
6817 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006818 *icc*)
6819 PGO_PROF_GEN_FLAG="-prof-gen"
6820 PGO_PROF_USE_FLAG="-prof-use"
6821 LLVM_PROF_MERGER="true"
6822 LLVM_PROF_FILE=""
6823 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006824esac
6825
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006826# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6827# merged with this chunk of code?
6828
6829# Optimizer/debugger flags
6830# ------------------------
6831# (The following bit of code is complicated enough - please keep things
6832# indented properly. Just pretend you're editing Python code. ;-)
6833
6834# There are two parallel sets of case statements below, one that checks to
6835# see if OPT was set and one that does BASECFLAGS setting based upon
6836# compiler and platform. BASECFLAGS tweaks need to be made even if the
6837# user set OPT.
6838
6839# tweak OPT based on compiler and platform, only if the user didn't set
6840# it on the command line
6841
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006842if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006843then
6844 case $GCC in
6845 yes)
6846 if test "$CC" != 'g++' ; then
6847 STRICT_PROTO="-Wstrict-prototypes"
6848 fi
6849 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6850 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6851 WRAP="-fwrapv"
6852 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006853
6854 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006855 case $CC in
6856 *clang*) WRAP="-fwrapv"
6857 ;;
6858 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006859
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860 case $ac_cv_prog_cc_g in
6861 yes)
6862 if test "$Py_DEBUG" = 'true' ; then
6863 # Optimization messes up debuggers, so turn it off for
6864 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006865 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6866 OPT="-g -Og -Wall $STRICT_PROTO"
6867 else
6868 OPT="-g -O0 -Wall $STRICT_PROTO"
6869 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006870 else
6871 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6872 fi
6873 ;;
6874 *)
6875 OPT="-O3 -Wall $STRICT_PROTO"
6876 ;;
6877 esac
6878 case $ac_sys_system in
6879 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6880 ;;
6881 esac
6882 ;;
6883
6884 *)
6885 OPT="-O"
6886 ;;
6887 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006888fi
6889
6890
6891
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006892
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006893# The -arch flags for universal builds on OSX
6894UNIVERSAL_ARCH_FLAGS=
6895
6896
6897# tweak BASECFLAGS based on compiler and platform
6898case $GCC in
6899yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006900 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006901
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6903$as_echo_n "checking for -Wextra... " >&6; }
6904 ac_save_cc="$CC"
6905 CC="$CC -Wextra -Werror"
6906 if ${ac_cv_extra_warnings+:} false; then :
6907 $as_echo_n "(cached) " >&6
6908else
6909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6910/* end confdefs.h. */
6911
6912
6913int
6914main ()
6915{
6916
6917 ;
6918 return 0;
6919}
6920
6921_ACEOF
6922if ac_fn_c_try_compile "$LINENO"; then :
6923
6924 ac_cv_extra_warnings=yes
6925
6926else
6927
6928 ac_cv_extra_warnings=no
6929
6930fi
6931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6932fi
6933
6934 CC="$ac_save_cc"
6935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6936$as_echo "$ac_cv_extra_warnings" >&6; }
6937
6938 if test $ac_cv_extra_warnings = yes
6939 then
6940 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6941 fi
6942
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006943 # Python doesn't violate C99 aliasing rules, but older versions of
6944 # GCC produce warnings for legal Python code. Enable
6945 # -fno-strict-aliasing on versions of GCC that support but produce
6946 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6948$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006949 ac_save_cc="$CC"
6950 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006951 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006952 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006953 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006954else
Matthias Kloseb9621712010-04-24 17:59:49 +00006955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006956/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006957
Matthias Kloseb159a552010-04-25 21:00:44 +00006958
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006959int
6960main ()
6961{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006962
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006963 ;
6964 return 0;
6965}
Matthias Kloseb159a552010-04-25 21:00:44 +00006966
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006968if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006969
6970 CC="$ac_save_cc -fstrict-aliasing"
6971 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006973/* end confdefs.h. */
6974
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006975 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006976int
6977main ()
6978{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006979double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006980 ;
6981 return 0;
6982}
Matthias Kloseb159a552010-04-25 21:00:44 +00006983
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006985if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006986
6987 ac_cv_no_strict_aliasing=no
6988
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006989else
Matthias Kloseb159a552010-04-25 21:00:44 +00006990
6991 ac_cv_no_strict_aliasing=yes
6992
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006993fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006995
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006996else
Matthias Kloseb159a552010-04-25 21:00:44 +00006997
6998 ac_cv_no_strict_aliasing=no
6999
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007000fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007002fi
7003
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007004 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007005 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7007$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007008 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007009 then
7010 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7011 fi
7012
Zachary Ware5af85642015-12-21 12:09:17 -06007013 # ICC doesn't recognize the option, but only emits a warning
7014 ## XXX does it emit an unused result warning and can it be disabled?
7015 case "$CC" in
7016 *icc*)
7017 ac_cv_disable_unused_result_warning=no
7018 ;;
7019 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7021$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7022 ac_save_cc="$CC"
7023 CC="$CC -Wunused-result -Werror"
7024 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007025 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007026 $as_echo_n "(cached) " >&6
7027else
7028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7029/* end confdefs.h. */
7030
7031
7032int
7033main ()
7034{
7035
7036 ;
7037 return 0;
7038}
7039
7040_ACEOF
7041if ac_fn_c_try_compile "$LINENO"; then :
7042
7043 ac_cv_disable_unused_result_warning=yes
7044
7045else
7046
7047 ac_cv_disable_unused_result_warning=no
7048
7049fi
7050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7051fi
7052
7053 CFLAGS="$save_CFLAGS"
7054 CC="$ac_save_cc"
7055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7056$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007057 ;;
7058 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007059
7060 if test $ac_cv_disable_unused_result_warning = yes
7061 then
7062 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007063 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7064 fi
7065
7066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7067$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7068 ac_save_cc="$CC"
7069 CC="$CC -Wunused-parameter -Werror"
7070 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7071 $as_echo_n "(cached) " >&6
7072else
7073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7074/* end confdefs.h. */
7075
7076
7077int
7078main ()
7079{
7080
7081 ;
7082 return 0;
7083}
7084
7085_ACEOF
7086if ac_fn_c_try_compile "$LINENO"; then :
7087
7088 ac_cv_disable_unused_parameter_warning=yes
7089
7090else
7091
7092 ac_cv_disable_unused_parameter_warning=no
7093
7094fi
7095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7096fi
7097
7098 CC="$ac_save_cc"
7099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7100$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7101
7102 if test $ac_cv_disable_unused_parameter_warning = yes
7103 then
7104 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7105 fi
7106
7107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7108$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7109 ac_save_cc="$CC"
7110 CC="$CC -Wmissing-field-initializers -Werror"
7111 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7112 $as_echo_n "(cached) " >&6
7113else
7114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7115/* end confdefs.h. */
7116
7117
7118int
7119main ()
7120{
7121
7122 ;
7123 return 0;
7124}
7125
7126_ACEOF
7127if ac_fn_c_try_compile "$LINENO"; then :
7128
7129 ac_cv_disable_missing_field_initializers=yes
7130
7131else
7132
7133 ac_cv_disable_missing_field_initializers=no
7134
7135fi
7136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7137fi
7138
7139 CC="$ac_save_cc"
7140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7141$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7142
7143 if test $ac_cv_disable_missing_field_initializers = yes
7144 then
7145 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007146 fi
7147
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7149$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7150 ac_save_cc="$CC"
7151 CC="$CC -Wsign-compare"
7152 save_CFLAGS="$CFLAGS"
7153 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7154 $as_echo_n "(cached) " >&6
7155else
7156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7157/* end confdefs.h. */
7158
7159
7160int
7161main ()
7162{
7163
7164 ;
7165 return 0;
7166}
7167
7168_ACEOF
7169if ac_fn_c_try_compile "$LINENO"; then :
7170
7171 ac_cv_enable_sign_compare_warning=yes
7172
7173else
7174
7175 ac_cv_enable_sign_compare_warning=no
7176
7177fi
7178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7179fi
7180
7181 CFLAGS="$save_CFLAGS"
7182 CC="$ac_save_cc"
7183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7184$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7185
7186 if test $ac_cv_enable_sign_compare_warning = yes
7187 then
7188 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7189 fi
7190
7191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7192$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7193 ac_save_cc="$CC"
7194 CC="$CC -Wunreachable-code"
7195 save_CFLAGS="$CFLAGS"
7196 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7197 $as_echo_n "(cached) " >&6
7198else
7199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7200/* end confdefs.h. */
7201
7202
7203int
7204main ()
7205{
7206
7207 ;
7208 return 0;
7209}
7210
7211_ACEOF
7212if ac_fn_c_try_compile "$LINENO"; then :
7213
7214 ac_cv_enable_unreachable_code_warning=yes
7215
7216else
7217
7218 ac_cv_enable_unreachable_code_warning=no
7219
7220fi
7221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7222fi
7223
7224 CFLAGS="$save_CFLAGS"
7225 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007226
7227 # Don't enable unreachable code warning in debug mode, since it usually
7228 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007229 # Issue #24324: Unfortunately, the unreachable code warning does not work
7230 # correctly on gcc and has been silently removed from the compiler.
7231 # It is supported on clang but on OS X systems gcc may be an alias
7232 # for clang. Try to determine if the compiler is not really gcc and,
7233 # if so, only then enable the warning.
7234 if test $ac_cv_enable_unreachable_code_warning = yes && \
7235 test "$Py_DEBUG" != "true" && \
7236 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007237 then
7238 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007239 else
7240 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007241 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7243$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007244
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007245 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7246 # support. Without this, treatment of subnormals doesn't follow
7247 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007248 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007249 alpha*)
7250 BASECFLAGS="$BASECFLAGS -mieee"
7251 ;;
7252 esac
7253
7254 case $ac_sys_system in
7255 SCO_SV*)
7256 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7257 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007258
7259 # is there any other compiler on Darwin besides gcc?
7260 Darwin*)
7261 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7262 # used to be here, but non-Apple gcc doesn't accept them.
7263 if test "${CC}" = gcc
7264 then
7265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007266$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007267 case "${UNIVERSALSDK}" in
7268 */MacOSX10.4u.sdk)
7269 # Build using 10.4 SDK, force usage of gcc when the
7270 # compiler is gcc, otherwise the user will get very
7271 # confusing error messages when building on OSX 10.6
7272 CC=gcc-4.0
7273 CPP=cpp-4.0
7274 ;;
7275 esac
7276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007277$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007278 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007279
Ned Deily87adb6e2013-10-18 21:09:56 -07007280 if test "${enable_universalsdk}"
7281 then
7282 case "$UNIVERSAL_ARCHS" in
7283 32-bit)
7284 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7285 LIPO_32BIT_FLAGS=""
7286 ARCH_RUN_32BIT=""
7287 ;;
7288 64-bit)
7289 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7290 LIPO_32BIT_FLAGS=""
7291 ARCH_RUN_32BIT="true"
7292 ;;
7293 all)
7294 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7295 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7296 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7297 ;;
7298 intel)
7299 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7300 LIPO_32BIT_FLAGS="-extract i386"
7301 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7302 ;;
7303 intel-32)
7304 UNIVERSAL_ARCH_FLAGS="-arch i386"
7305 LIPO_32BIT_FLAGS=""
7306 ARCH_RUN_32BIT=""
7307 ;;
7308 3-way)
7309 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7310 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7311 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7312 ;;
7313 *)
7314 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7315 ;;
7316 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007317
Ned Deily87adb6e2013-10-18 21:09:56 -07007318 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7319 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7320 if test "${UNIVERSALSDK}" != "/"
7321 then
7322 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7323 fi
7324 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007325
Ned Deily87adb6e2013-10-18 21:09:56 -07007326 # Calculate an appropriate deployment target for this build:
7327 # The deployment target value is used explicitly to enable certain
7328 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007329 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007330 # component of the string returned by distutils.get_platform().
7331 #
7332 # Use the value from:
7333 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7334 # 2. the operating system version of the build machine if >= 10.6
7335 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7336 # below to pick either 10.3, 10.4, or 10.5 as the target.
7337 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007338
Ned Deily87adb6e2013-10-18 21:09:56 -07007339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7340$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007341 cur_target_major=`sw_vers -productVersion | \
7342 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7343 cur_target_minor=`sw_vers -productVersion | \
7344 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7345 cur_target="${cur_target_major}.${cur_target_minor}"
7346 if test ${cur_target_major} -eq 10 && \
7347 test ${cur_target_minor} -ge 3 && \
7348 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007349 then
Ned Deily36820b62014-06-25 13:44:22 -07007350 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007351 cur_target=10.3
7352 if test ${enable_universalsdk}
7353 then
7354 case "$UNIVERSAL_ARCHS" in
7355 all|3-way|intel|64-bit)
7356 # These configurations were first supported in 10.5
7357 cur_target='10.5'
7358 ;;
7359 esac
7360 else
7361 if test `/usr/bin/arch` = "i386"
7362 then
7363 # 10.4 was the first release to support Intel archs
7364 cur_target="10.4"
7365 fi
7366 fi
7367 fi
7368 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007369
Ned Deily87adb6e2013-10-18 21:09:56 -07007370 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7371 # environment with a value that is the same as what we'll use
7372 # in the Makefile to ensure that we'll get the same compiler
7373 # environment during configure and build time.
7374 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7375 export MACOSX_DEPLOYMENT_TARGET
7376 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7378$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007379
Ned Deily87adb6e2013-10-18 21:09:56 -07007380 # end of Darwin* tests
7381 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007382 esac
7383 ;;
7384
7385*)
7386 case $ac_sys_system in
7387 OpenUNIX*|UnixWare*)
7388 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7389 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007390 SCO_SV*)
7391 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7392 ;;
7393 esac
7394 ;;
7395esac
7396
Zachary Ware5af85642015-12-21 12:09:17 -06007397# ICC needs -fp-model strict or floats behave badly
7398case "$CC" in
7399*icc*)
7400 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7401 ;;
7402esac
7403
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007404if test "$Py_DEBUG" = 'true'; then
7405 :
7406else
7407 OPT="-DNDEBUG $OPT"
7408fi
7409
7410if test "$ac_arch_flags"
7411then
7412 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7413fi
7414
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007415# On some compilers, pthreads are available without further options
7416# (e.g. MacOS X). On some of these systems, the compiler will not
7417# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7418# So we have to see first whether pthreads are available without
7419# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7421$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007422if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007423 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007424else
Matthias Kloseb9621712010-04-24 17:59:49 +00007425 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007426 ac_cv_pthread_is_default=no
7427else
Matthias Kloseb9621712010-04-24 17:59:49 +00007428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007429/* end confdefs.h. */
7430
Stefan Krah7dba5942012-11-22 22:49:11 +01007431#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007432#include <pthread.h>
7433
7434void* routine(void* p){return NULL;}
7435
7436int main(){
7437 pthread_t p;
7438 if(pthread_create(&p,NULL,routine,NULL)!=0)
7439 return 1;
7440 (void)pthread_detach(p);
7441 return 0;
7442}
7443
7444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007445if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446
7447 ac_cv_pthread_is_default=yes
7448 ac_cv_kthread=no
7449 ac_cv_pthread=no
7450
7451else
Matthias Kloseb9621712010-04-24 17:59:49 +00007452 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007453fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007454rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7455 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007456fi
7457
7458
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007459fi
7460
Matthias Kloseb9621712010-04-24 17:59:49 +00007461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7462$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007463
7464
7465if test $ac_cv_pthread_is_default = yes
7466then
7467 ac_cv_kpthread=no
7468else
7469# -Kpthread, if available, provides the right #defines
7470# and linker options to make pthread_create available
7471# Some compilers won't report that they do not support -Kpthread,
7472# so we need to run a program to see whether it really made the
7473# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7475$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007476if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007477 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007478else
7479 ac_save_cc="$CC"
7480CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007481if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007482 ac_cv_kpthread=no
7483else
Matthias Kloseb9621712010-04-24 17:59:49 +00007484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007485/* end confdefs.h. */
7486
Stefan Krah7dba5942012-11-22 22:49:11 +01007487#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007488#include <pthread.h>
7489
7490void* routine(void* p){return NULL;}
7491
7492int main(){
7493 pthread_t p;
7494 if(pthread_create(&p,NULL,routine,NULL)!=0)
7495 return 1;
7496 (void)pthread_detach(p);
7497 return 0;
7498}
7499
7500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007501if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007502 ac_cv_kpthread=yes
7503else
Matthias Kloseb9621712010-04-24 17:59:49 +00007504 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007505fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7507 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007508fi
7509
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007510CC="$ac_save_cc"
7511fi
7512
Matthias Kloseb9621712010-04-24 17:59:49 +00007513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7514$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007515fi
7516
7517if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7518then
7519# -Kthread, if available, provides the right #defines
7520# and linker options to make pthread_create available
7521# Some compilers won't report that they do not support -Kthread,
7522# so we need to run a program to see whether it really made the
7523# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7525$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007526if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007527 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007528else
7529 ac_save_cc="$CC"
7530CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007531if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007532 ac_cv_kthread=no
7533else
Matthias Kloseb9621712010-04-24 17:59:49 +00007534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007535/* end confdefs.h. */
7536
Stefan Krah7dba5942012-11-22 22:49:11 +01007537#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007538#include <pthread.h>
7539
7540void* routine(void* p){return NULL;}
7541
7542int main(){
7543 pthread_t p;
7544 if(pthread_create(&p,NULL,routine,NULL)!=0)
7545 return 1;
7546 (void)pthread_detach(p);
7547 return 0;
7548}
7549
7550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007551if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552 ac_cv_kthread=yes
7553else
Matthias Kloseb9621712010-04-24 17:59:49 +00007554 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007555fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7557 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007558fi
7559
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007560CC="$ac_save_cc"
7561fi
7562
Matthias Kloseb9621712010-04-24 17:59:49 +00007563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7564$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007565fi
7566
7567if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7568then
7569# -pthread, if available, provides the right #defines
7570# and linker options to make pthread_create available
7571# Some compilers won't report that they do not support -pthread,
7572# so we need to run a program to see whether it really made the
7573# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7575$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007576if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007577 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007578else
7579 ac_save_cc="$CC"
7580CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007581if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007582 ac_cv_pthread=no
7583else
Matthias Kloseb9621712010-04-24 17:59:49 +00007584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007585/* end confdefs.h. */
7586
Stefan Krah7dba5942012-11-22 22:49:11 +01007587#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588#include <pthread.h>
7589
7590void* routine(void* p){return NULL;}
7591
7592int main(){
7593 pthread_t p;
7594 if(pthread_create(&p,NULL,routine,NULL)!=0)
7595 return 1;
7596 (void)pthread_detach(p);
7597 return 0;
7598}
7599
7600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007601if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007602 ac_cv_pthread=yes
7603else
Matthias Kloseb9621712010-04-24 17:59:49 +00007604 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007605fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007606rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7607 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608fi
7609
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007610CC="$ac_save_cc"
7611fi
7612
Matthias Kloseb9621712010-04-24 17:59:49 +00007613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7614$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007615fi
7616
7617# If we have set a CC compiler flag for thread support then
7618# check if it works for CXX, too.
7619ac_cv_cxx_thread=no
7620if test ! -z "$CXX"
7621then
Matthias Kloseb9621712010-04-24 17:59:49 +00007622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7623$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007624ac_save_cxx="$CXX"
7625
7626if test "$ac_cv_kpthread" = "yes"
7627then
7628 CXX="$CXX -Kpthread"
7629 ac_cv_cxx_thread=yes
7630elif test "$ac_cv_kthread" = "yes"
7631then
7632 CXX="$CXX -Kthread"
7633 ac_cv_cxx_thread=yes
7634elif test "$ac_cv_pthread" = "yes"
7635then
7636 CXX="$CXX -pthread"
7637 ac_cv_cxx_thread=yes
7638fi
7639
7640if test $ac_cv_cxx_thread = yes
7641then
7642 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7643 $CXX -c conftest.$ac_ext 2>&5
7644 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7645 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7646 then
7647 ac_cv_cxx_thread=yes
7648 else
7649 ac_cv_cxx_thread=no
7650 fi
7651 rm -fr conftest*
7652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7654$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007655fi
7656CXX="$ac_save_cxx"
7657
7658
7659# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7661$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007662if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007663 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007664else
Matthias Kloseb9621712010-04-24 17:59:49 +00007665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666/* end confdefs.h. */
7667#include <stdlib.h>
7668#include <stdarg.h>
7669#include <string.h>
7670#include <float.h>
7671
7672int
7673main ()
7674{
7675
7676 ;
7677 return 0;
7678}
7679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007680if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007681 ac_cv_header_stdc=yes
7682else
Matthias Kloseb9621712010-04-24 17:59:49 +00007683 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007684fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7686
7687if test $ac_cv_header_stdc = yes; then
7688 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007690/* end confdefs.h. */
7691#include <string.h>
7692
7693_ACEOF
7694if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007695 $EGREP "memchr" >/dev/null 2>&1; then :
7696
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007697else
7698 ac_cv_header_stdc=no
7699fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007700rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007701
7702fi
7703
7704if test $ac_cv_header_stdc = yes; then
7705 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707/* end confdefs.h. */
7708#include <stdlib.h>
7709
7710_ACEOF
7711if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007712 $EGREP "free" >/dev/null 2>&1; then :
7713
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007714else
7715 ac_cv_header_stdc=no
7716fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007717rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007718
7719fi
7720
7721if test $ac_cv_header_stdc = yes; then
7722 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007723 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007724 :
7725else
Matthias Kloseb9621712010-04-24 17:59:49 +00007726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007727/* end confdefs.h. */
7728#include <ctype.h>
7729#include <stdlib.h>
7730#if ((' ' & 0x0FF) == 0x020)
7731# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7732# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7733#else
7734# define ISLOWER(c) \
7735 (('a' <= (c) && (c) <= 'i') \
7736 || ('j' <= (c) && (c) <= 'r') \
7737 || ('s' <= (c) && (c) <= 'z'))
7738# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7739#endif
7740
7741#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7742int
7743main ()
7744{
7745 int i;
7746 for (i = 0; i < 256; i++)
7747 if (XOR (islower (i), ISLOWER (i))
7748 || toupper (i) != TOUPPER (i))
7749 return 2;
7750 return 0;
7751}
7752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007753if ac_fn_c_try_run "$LINENO"; then :
7754
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007755else
Matthias Kloseb9621712010-04-24 17:59:49 +00007756 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007758rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7759 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007760fi
7761
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007762fi
7763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7765$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007766if test $ac_cv_header_stdc = yes; then
7767
Matthias Kloseb9621712010-04-24 17:59:49 +00007768$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007769
7770fi
7771
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007772for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007773fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007774ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007775sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007776unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007777poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007778sys/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 +01007779sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007780sys/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 +01007781sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007782sys/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 -07007783libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007784linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007785sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007786do :
7787 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7788ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007789if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007790 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007791#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007792_ACEOF
7793
7794fi
7795
Guido van Rossum627b2d71993-12-24 10:39:16 +00007796done
7797
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007798ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007799for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007800 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7802$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007803if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007804 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007805else
Matthias Kloseb9621712010-04-24 17:59:49 +00007806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007807/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007808#include <sys/types.h>
7809#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007810
Martin v. Löwis11437992002-04-12 09:54:03 +00007811int
7812main ()
7813{
7814if ((DIR *) 0)
7815return 0;
7816 ;
7817 return 0;
7818}
7819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007820if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007821 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007822else
Matthias Kloseb9621712010-04-24 17:59:49 +00007823 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007827eval ac_res=\$$as_ac_Header
7828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7829$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007830if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007831 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007832#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007833_ACEOF
7834
7835ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007836fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007837
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007838done
7839# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7840if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7842$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007843if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007844 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007845else
Martin v. Löwis11437992002-04-12 09:54:03 +00007846 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007848/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007850/* Override any GCC internal prototype to avoid an error.
7851 Use char because int might match the return type of a GCC
7852 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007853#ifdef __cplusplus
7854extern "C"
7855#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007856char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007857int
7858main ()
7859{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007860return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007861 ;
7862 return 0;
7863}
7864_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007865for ac_lib in '' dir; do
7866 if test -z "$ac_lib"; then
7867 ac_res="none required"
7868 else
7869 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007870 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007871 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007872 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007873 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007875rm -f core conftest.err conftest.$ac_objext \
7876 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007877 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007878 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880done
Victor Stinnere0be4232011-10-25 13:06:09 +02007881if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007883else
7884 ac_cv_search_opendir=no
7885fi
7886rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007887LIBS=$ac_func_search_save_LIBS
7888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7890$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007891ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007892if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007893 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007894
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007895fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007896
Michael W. Hudson54241132001-12-07 15:38:26 +00007897else
Matthias Kloseb9621712010-04-24 17:59:49 +00007898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7899$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007900if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007901 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007902else
7903 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007906
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007907/* Override any GCC internal prototype to avoid an error.
7908 Use char because int might match the return type of a GCC
7909 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007910#ifdef __cplusplus
7911extern "C"
7912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007913char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007914int
7915main ()
7916{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007917return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007918 ;
7919 return 0;
7920}
7921_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007922for ac_lib in '' x; do
7923 if test -z "$ac_lib"; then
7924 ac_res="none required"
7925 else
7926 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007927 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007928 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007929 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007930 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007932rm -f core conftest.err conftest.$ac_objext \
7933 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007934 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007935 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007937done
Victor Stinnere0be4232011-10-25 13:06:09 +02007938if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007939
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007940else
7941 ac_cv_search_opendir=no
7942fi
7943rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007944LIBS=$ac_func_search_save_LIBS
7945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7947$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007948ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007949if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007950 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007951
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007952fi
7953
7954fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007955
Matthias Kloseb9621712010-04-24 17:59:49 +00007956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7957$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007958if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007959 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007960else
Matthias Kloseb9621712010-04-24 17:59:49 +00007961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007962/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007963#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007964int
7965main ()
7966{
7967return makedev(0, 0);
7968 ;
7969 return 0;
7970}
7971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007972if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007973 ac_cv_header_sys_types_h_makedev=yes
7974else
Matthias Kloseb9621712010-04-24 17:59:49 +00007975 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007977rm -f core conftest.err conftest.$ac_objext \
7978 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007979
7980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7982$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007983
7984if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007985ac_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 +02007986if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007987
Matthias Kloseb9621712010-04-24 17:59:49 +00007988$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007989
7990fi
7991
7992
7993
7994 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007995 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 +02007996if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007997
Matthias Kloseb9621712010-04-24 17:59:49 +00007998$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007999
8000fi
8001
8002
8003 fi
8004fi
8005
Michael W. Hudson54241132001-12-07 15:38:26 +00008006
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008007# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8008# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8009SAVE_CFLAGS=$CFLAGS
8010CFLAGS="-std=c99 $CFLAGS"
8011for ac_header in bluetooth/bluetooth.h
8012do :
8013 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8014if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8015 cat >>confdefs.h <<_ACEOF
8016#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8017_ACEOF
8018
8019fi
8020
8021done
8022
8023CFLAGS=$SAVE_CFLAGS
8024
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008025# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8026for ac_header in net/if.h
8027do :
8028 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8029#ifdef STDC_HEADERS
8030# include <stdlib.h>
8031# include <stddef.h>
8032#else
8033# ifdef HAVE_STDLIB_H
8034# include <stdlib.h>
8035# endif
8036#endif
8037#ifdef HAVE_SYS_SOCKET_H
8038# include <sys/socket.h>
8039#endif
8040
8041"
Victor Stinnere0be4232011-10-25 13:06:09 +02008042if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008043 cat >>confdefs.h <<_ACEOF
8044#define HAVE_NET_IF_H 1
8045_ACEOF
8046
8047fi
8048
8049done
8050
8051
Martin v. Löwis11017b12006-01-14 18:12:57 +00008052# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008053for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008054do :
8055 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 +00008056#ifdef HAVE_ASM_TYPES_H
8057#include <asm/types.h>
8058#endif
8059#ifdef HAVE_SYS_SOCKET_H
8060#include <sys/socket.h>
8061#endif
8062
Matthias Kloseb9621712010-04-24 17:59:49 +00008063"
Victor Stinnere0be4232011-10-25 13:06:09 +02008064if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008065 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008066#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008067_ACEOF
8068
8069fi
8070
8071done
8072
8073
Charles-François Natali47413c12011-10-06 19:47:44 +02008074# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008075for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008076do :
8077 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8078ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8079#ifdef HAVE_SYS_SOCKET_H
8080#include <sys/socket.h>
8081#endif
8082
8083"
8084if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8085 cat >>confdefs.h <<_ACEOF
8086#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8087_ACEOF
8088
8089fi
8090
8091done
8092
8093
Guido van Rossum627b2d71993-12-24 10:39:16 +00008094# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008095was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8097$as_echo_n "checking for clock_t in time.h... " >&6; }
8098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008099/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008100#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008101
8102_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008103if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008104 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008105 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008106else
Martin v. Löwis11437992002-04-12 09:54:03 +00008107
8108
Matthias Kloseb9621712010-04-24 17:59:49 +00008109$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008110
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008111
Guido van Rossum627b2d71993-12-24 10:39:16 +00008112fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008113rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008114
Matthias Kloseb9621712010-04-24 17:59:49 +00008115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8116$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008117
Matthias Kloseb9621712010-04-24 17:59:49 +00008118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8119$as_echo_n "checking for makedev... " >&6; }
8120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008121/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008122
Jesus Cea740f53a2010-04-28 11:35:30 +00008123#if defined(MAJOR_IN_MKDEV)
8124#include <sys/mkdev.h>
8125#elif defined(MAJOR_IN_SYSMACROS)
8126#include <sys/sysmacros.h>
8127#else
8128#include <sys/types.h>
8129#endif
8130
Neal Norwitz11690112002-07-30 01:08:28 +00008131int
8132main ()
8133{
Jesus Cea740f53a2010-04-28 11:35:30 +00008134
8135 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008136 ;
8137 return 0;
8138}
Matthias Kloseb159a552010-04-25 21:00:44 +00008139
Neal Norwitz11690112002-07-30 01:08:28 +00008140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008141if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008142 ac_cv_has_makedev=yes
8143else
Matthias Kloseb9621712010-04-24 17:59:49 +00008144 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008145fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008146rm -f core conftest.err conftest.$ac_objext \
8147 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8149$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008150if test "$ac_cv_has_makedev" = "yes"; then
8151
Matthias Kloseb9621712010-04-24 17:59:49 +00008152$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008153
8154fi
8155
Christian Heimes985ecdc2013-11-20 11:46:18 +01008156# byte swapping
8157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8158$as_echo_n "checking for le64toh... " >&6; }
8159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8160/* end confdefs.h. */
8161
8162#ifdef HAVE_ENDIAN_H
8163#include <endian.h>
8164#elif defined(HAVE_SYS_ENDIAN_H)
8165#include <sys/endian.h>
8166#endif
8167
8168int
8169main ()
8170{
8171
8172 le64toh(1)
8173 ;
8174 return 0;
8175}
8176
8177_ACEOF
8178if ac_fn_c_try_link "$LINENO"; then :
8179 ac_cv_has_le64toh=yes
8180else
8181 ac_cv_has_le64toh=no
8182fi
8183rm -f core conftest.err conftest.$ac_objext \
8184 conftest$ac_exeext conftest.$ac_ext
8185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8186$as_echo "$ac_cv_has_le64toh" >&6; }
8187if test "$ac_cv_has_le64toh" = "yes"; then
8188
8189$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8190
8191fi
8192
Martin v. Löwis399a6892002-10-04 10:22:02 +00008193# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8194# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8195# defined, but the compiler does not support pragma redefine_extname,
8196# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8197# structures (such as rlimit64) without declaring them. As a
8198# work-around, disable LFS on such configurations
8199
8200use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8202$as_echo_n "checking Solaris LFS bug... " >&6; }
8203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008204/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008205
8206#define _LARGEFILE_SOURCE 1
8207#define _FILE_OFFSET_BITS 64
8208#include <sys/resource.h>
8209
Martin v. Löwis399a6892002-10-04 10:22:02 +00008210int
8211main ()
8212{
8213struct rlimit foo;
8214 ;
8215 return 0;
8216}
8217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008218if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008219 sol_lfs_bug=no
8220else
Matthias Kloseb9621712010-04-24 17:59:49 +00008221 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8225$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008226if test "$sol_lfs_bug" = "yes"; then
8227 use_lfs=no
8228fi
8229
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008230# Don't use largefile support for GNU/Hurd
8231case $ac_sys_system in GNU*)
8232 use_lfs=no
8233esac
8234
Martin v. Löwis399a6892002-10-04 10:22:02 +00008235if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008236# Two defines needed to enable largefile support on various platforms
8237# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008238case $ac_sys_system/$ac_sys_release in
8239AIX*)
8240
8241$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8242
8243 ;;
8244esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008245
Matthias Kloseb9621712010-04-24 17:59:49 +00008246$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008247
8248
Matthias Kloseb9621712010-04-24 17:59:49 +00008249$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008250
Martin v. Löwis399a6892002-10-04 10:22:02 +00008251fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008252
Guido van Rossum84e7b241996-08-19 21:59:00 +00008253# Add some code to confdefs.h so that the test for off_t works on SCO
8254cat >> confdefs.h <<\EOF
8255#if defined(SCO_DS)
8256#undef _OFF_T
8257#endif
8258EOF
8259
Guido van Rossumef2255b2000-03-10 22:30:29 +00008260# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008261ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008262if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008263
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008264else
Martin v. Löwis11437992002-04-12 09:54:03 +00008265
8266cat >>confdefs.h <<_ACEOF
8267#define mode_t int
8268_ACEOF
8269
8270fi
8271
Matthias Kloseb9621712010-04-24 17:59:49 +00008272ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008273if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008274
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008275else
Martin v. Löwis11437992002-04-12 09:54:03 +00008276
8277cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008278#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008279_ACEOF
8280
8281fi
8282
Matthias Kloseb9621712010-04-24 17:59:49 +00008283ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008284if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008285
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008286else
Martin v. Löwis11437992002-04-12 09:54:03 +00008287
8288cat >>confdefs.h <<_ACEOF
8289#define pid_t int
8290_ACEOF
8291
8292fi
8293
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008294
Martin v. Löwis11437992002-04-12 09:54:03 +00008295cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008296#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008297_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008298
Matthias Kloseb9621712010-04-24 17:59:49 +00008299ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008300if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008301
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008302else
Martin v. Löwis11437992002-04-12 09:54:03 +00008303
8304cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008305#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008306_ACEOF
8307
8308fi
8309
Matthias Kloseb9621712010-04-24 17:59:49 +00008310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8311$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008312if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008313 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008314else
Matthias Kloseb9621712010-04-24 17:59:49 +00008315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008316/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008317#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008318
8319_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008320if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008321 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008322 ac_cv_type_uid_t=yes
8323else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008324 ac_cv_type_uid_t=no
8325fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008326rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008327
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008328fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8330$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008331if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008332
Matthias Kloseb9621712010-04-24 17:59:49 +00008333$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008334
8335
Matthias Kloseb9621712010-04-24 17:59:49 +00008336$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008337
8338fi
8339
Mark Dickinson983bc162012-12-02 12:11:38 +00008340
Matthias Kloseb9621712010-04-24 17:59:49 +00008341ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008342if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008343
Matthias Kloseb9621712010-04-24 17:59:49 +00008344$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008345
8346fi
8347
Stefan Krah1919b7e2012-03-21 18:25:23 +01008348ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8349if test "x$ac_cv_type___uint128_t" = xyes; then :
8350
8351$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8352
8353fi
8354
Jack Jansendd19cf82001-12-06 22:36:17 +00008355
Michael W. Hudson54241132001-12-07 15:38:26 +00008356# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008357# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008358# The cast to long int works around a bug in the HP C Compiler
8359# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8360# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8361# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8363$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008364if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008365 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008366else
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 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 +00008368
Martin v. Löwis11437992002-04-12 09:54:03 +00008369else
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 if test "$ac_cv_type_int" = yes; then
8371 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8372$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008373as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008374See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008375 else
8376 ac_cv_sizeof_int=0
8377 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008378fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008379
Martin v. Löwis11437992002-04-12 09:54:03 +00008380fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8382$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008383
8384
8385
Martin v. Löwis11437992002-04-12 09:54:03 +00008386cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008387#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008388_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008389
8390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008391# The cast to long int works around a bug in the HP C Compiler
8392# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8393# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8394# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8396$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008397if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008399else
Matthias Kloseb9621712010-04-24 17:59:49 +00008400 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 +00008401
Martin v. Löwis11437992002-04-12 09:54:03 +00008402else
Matthias Kloseb9621712010-04-24 17:59:49 +00008403 if test "$ac_cv_type_long" = yes; then
8404 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8405$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008406as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008407See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008408 else
8409 ac_cv_sizeof_long=0
8410 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008412
Martin v. Löwis11437992002-04-12 09:54:03 +00008413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8415$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008416
8417
8418
Martin v. Löwis11437992002-04-12 09:54:03 +00008419cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008420#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008421_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008422
8423
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008424# The cast to long int works around a bug in the HP C Compiler
8425# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8426# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8427# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8429$as_echo_n "checking size of long long... " >&6; }
8430if ${ac_cv_sizeof_long_long+:} false; then :
8431 $as_echo_n "(cached) " >&6
8432else
8433 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8434
8435else
8436 if test "$ac_cv_type_long_long" = yes; then
8437 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8438$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8439as_fn_error 77 "cannot compute sizeof (long long)
8440See \`config.log' for more details" "$LINENO" 5; }
8441 else
8442 ac_cv_sizeof_long_long=0
8443 fi
8444fi
8445
8446fi
8447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8448$as_echo "$ac_cv_sizeof_long_long" >&6; }
8449
8450
8451
8452cat >>confdefs.h <<_ACEOF
8453#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8454_ACEOF
8455
8456
8457# The cast to long int works around a bug in the HP C Compiler
8458# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8459# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8460# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8462$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008463if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008464 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008465else
Matthias Kloseb9621712010-04-24 17:59:49 +00008466 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 +00008467
Martin v. Löwis11437992002-04-12 09:54:03 +00008468else
Matthias Kloseb9621712010-04-24 17:59:49 +00008469 if test "$ac_cv_type_void_p" = yes; then
8470 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8471$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008472as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008473See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008474 else
8475 ac_cv_sizeof_void_p=0
8476 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008478
Martin v. Löwis11437992002-04-12 09:54:03 +00008479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8481$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008482
8483
8484
Martin v. Löwis11437992002-04-12 09:54:03 +00008485cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008486#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008487_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008488
8489
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008490# The cast to long int works around a bug in the HP C Compiler
8491# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8492# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8493# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8495$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008496if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008498else
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 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 +00008500
Martin v. Löwis11437992002-04-12 09:54:03 +00008501else
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 if test "$ac_cv_type_short" = yes; then
8503 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8504$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008505as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008506See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008507 else
8508 ac_cv_sizeof_short=0
8509 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008511
Martin v. Löwis11437992002-04-12 09:54:03 +00008512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8514$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515
8516
8517
Martin v. Löwis11437992002-04-12 09:54:03 +00008518cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008519#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008520_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008521
8522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523# The cast to long int works around a bug in the HP C Compiler
8524# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8525# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8526# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8528$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008529if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008531else
Matthias Kloseb9621712010-04-24 17:59:49 +00008532 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 +00008533
Martin v. Löwis11437992002-04-12 09:54:03 +00008534else
Matthias Kloseb9621712010-04-24 17:59:49 +00008535 if test "$ac_cv_type_float" = yes; then
8536 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8537$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008538as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008539See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008540 else
8541 ac_cv_sizeof_float=0
8542 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008544
Martin v. Löwis11437992002-04-12 09:54:03 +00008545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8547$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548
8549
8550
Martin v. Löwis11437992002-04-12 09:54:03 +00008551cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008552#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008553_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008554
8555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556# The cast to long int works around a bug in the HP C Compiler
8557# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8558# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8559# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8561$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008562if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008564else
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 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 +00008566
Martin v. Löwis11437992002-04-12 09:54:03 +00008567else
Matthias Kloseb9621712010-04-24 17:59:49 +00008568 if test "$ac_cv_type_double" = yes; then
8569 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8570$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008571as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008572See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573 else
8574 ac_cv_sizeof_double=0
8575 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008577
Martin v. Löwis11437992002-04-12 09:54:03 +00008578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8580$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581
8582
8583
Martin v. Löwis11437992002-04-12 09:54:03 +00008584cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008585#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008586_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008587
8588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008589# The cast to long int works around a bug in the HP C Compiler
8590# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8591# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8592# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8594$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008595if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008597else
Matthias Kloseb9621712010-04-24 17:59:49 +00008598 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 +00008599
Martin v. Löwis11437992002-04-12 09:54:03 +00008600else
Matthias Kloseb9621712010-04-24 17:59:49 +00008601 if test "$ac_cv_type_fpos_t" = yes; then
8602 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8603$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008604as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008605See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606 else
8607 ac_cv_sizeof_fpos_t=0
8608 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008610
Martin v. Löwis11437992002-04-12 09:54:03 +00008611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8613$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008614
8615
8616
Martin v. Löwis11437992002-04-12 09:54:03 +00008617cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008618#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008619_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008620
Michael W. Hudson54241132001-12-07 15:38:26 +00008621
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622# The cast to long int works around a bug in the HP C Compiler
8623# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8624# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8625# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8627$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008628if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008629 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008630else
Matthias Kloseb9621712010-04-24 17:59:49 +00008631 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 +00008632
Martin v. Löwis18e16552006-02-15 17:27:45 +00008633else
Matthias Kloseb9621712010-04-24 17:59:49 +00008634 if test "$ac_cv_type_size_t" = yes; then
8635 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8636$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008637as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008638See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008639 else
8640 ac_cv_sizeof_size_t=0
8641 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008643
Martin v. Löwis18e16552006-02-15 17:27:45 +00008644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8646$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008647
8648
8649
Martin v. Löwis18e16552006-02-15 17:27:45 +00008650cat >>confdefs.h <<_ACEOF
8651#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8652_ACEOF
8653
8654
Christian Heimes400adb02008-02-01 08:12:03 +00008655# The cast to long int works around a bug in the HP C Compiler
8656# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8657# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8658# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8660$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008661if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008663else
Matthias Kloseb9621712010-04-24 17:59:49 +00008664 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 +00008665
Christian Heimes400adb02008-02-01 08:12:03 +00008666else
Matthias Kloseb9621712010-04-24 17:59:49 +00008667 if test "$ac_cv_type_pid_t" = yes; then
8668 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8669$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008670as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008671See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008672 else
8673 ac_cv_sizeof_pid_t=0
8674 fi
8675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008676
Christian Heimes400adb02008-02-01 08:12:03 +00008677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8679$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008680
8681
8682
8683cat >>confdefs.h <<_ACEOF
8684#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8685_ACEOF
8686
8687
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008688# The cast to long int works around a bug in the HP C Compiler
8689# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8690# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8691# This bug is HP SR number 8606223364.
8692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8693$as_echo_n "checking size of uintptr_t... " >&6; }
8694if ${ac_cv_sizeof_uintptr_t+:} false; then :
8695 $as_echo_n "(cached) " >&6
8696else
8697 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8698
8699else
8700 if test "$ac_cv_type_uintptr_t" = yes; then
8701 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8702$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8703as_fn_error 77 "cannot compute sizeof (uintptr_t)
8704See \`config.log' for more details" "$LINENO" 5; }
8705 else
8706 ac_cv_sizeof_uintptr_t=0
8707 fi
8708fi
8709
8710fi
8711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8712$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8713
8714
8715
8716cat >>confdefs.h <<_ACEOF
8717#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8718_ACEOF
8719
8720
Michael W. Hudson54241132001-12-07 15:38:26 +00008721
Matthias Kloseb9621712010-04-24 17:59:49 +00008722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8723$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008724have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008726/* end confdefs.h. */
8727
8728int
8729main ()
8730{
8731long double x; x = (long double)0;
8732 ;
8733 return 0;
8734}
8735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008736if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008737
8738
Matthias Kloseb9621712010-04-24 17:59:49 +00008739$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008740
8741 have_long_double=yes
8742
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008743fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8746$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008747if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008748# The cast to long int works around a bug in the HP C Compiler
8749# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8750# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8751# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8753$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008754if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008755 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008756else
Matthias Kloseb9621712010-04-24 17:59:49 +00008757 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 +00008758
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008759else
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 if test "$ac_cv_type_long_double" = yes; then
8761 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8762$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008763as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008764See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008765 else
8766 ac_cv_sizeof_long_double=0
8767 fi
8768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008769
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8772$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008773
8774
8775
8776cat >>confdefs.h <<_ACEOF
8777#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8778_ACEOF
8779
8780
8781fi
8782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008783# The cast to long int works around a bug in the HP C Compiler
8784# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8785# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8786# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8788$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008789if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008790 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008791else
Matthias Kloseb9621712010-04-24 17:59:49 +00008792 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 +00008793
Thomas Woutersb2137042007-02-01 18:02:27 +00008794else
Matthias Kloseb9621712010-04-24 17:59:49 +00008795 if test "$ac_cv_type__Bool" = yes; then
8796 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8797$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008798as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008799See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008800 else
8801 ac_cv_sizeof__Bool=0
8802 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008804
Thomas Woutersb2137042007-02-01 18:02:27 +00008805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8807$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008808
8809
8810
Thomas Woutersb2137042007-02-01 18:02:27 +00008811cat >>confdefs.h <<_ACEOF
8812#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8813_ACEOF
8814
8815
Thomas Woutersb2137042007-02-01 18:02:27 +00008816
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008817# The cast to long int works around a bug in the HP C Compiler
8818# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8819# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8820# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8822$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008823if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008824 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008825else
Matthias Kloseb9621712010-04-24 17:59:49 +00008826 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008827#ifdef HAVE_SYS_TYPES_H
8828#include <sys/types.h>
8829#endif
8830
Matthias Kloseb9621712010-04-24 17:59:49 +00008831"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008832
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008833else
Matthias Kloseb9621712010-04-24 17:59:49 +00008834 if test "$ac_cv_type_off_t" = yes; then
8835 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8836$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008837as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008838See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008839 else
8840 ac_cv_sizeof_off_t=0
8841 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008843
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8846$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008847
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008848
8849
Martin v. Löwis11437992002-04-12 09:54:03 +00008850cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008851#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008852_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008853
Michael W. Hudson54241132001-12-07 15:38:26 +00008854
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008855
Matthias Kloseb9621712010-04-24 17:59:49 +00008856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8857$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008858if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008859 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008860
Matthias Kloseb9621712010-04-24 17:59:49 +00008861$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008862
Matthias Kloseb9621712010-04-24 17:59:49 +00008863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8864$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008865else
Matthias Kloseb9621712010-04-24 17:59:49 +00008866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8867$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008868fi
8869
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008870# The cast to long int works around a bug in the HP C Compiler
8871# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8872# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8873# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8875$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008876if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008877 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008878else
Matthias Kloseb9621712010-04-24 17:59:49 +00008879 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008880#ifdef HAVE_SYS_TYPES_H
8881#include <sys/types.h>
8882#endif
8883#ifdef HAVE_TIME_H
8884#include <time.h>
8885#endif
8886
Matthias Kloseb9621712010-04-24 17:59:49 +00008887"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008888
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008889else
Matthias Kloseb9621712010-04-24 17:59:49 +00008890 if test "$ac_cv_type_time_t" = yes; then
8891 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8892$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008893as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008894See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008895 else
8896 ac_cv_sizeof_time_t=0
8897 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008899
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8902$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008903
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008904
8905
Martin v. Löwis11437992002-04-12 09:54:03 +00008906cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008907#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008908_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008909
Michael W. Hudson54241132001-12-07 15:38:26 +00008910
8911
Trent Mick635f6fb2000-08-23 21:33:05 +00008912# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008913ac_save_cc="$CC"
8914if test "$ac_cv_kpthread" = "yes"
8915then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008916elif test "$ac_cv_kthread" = "yes"
8917then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008918elif test "$ac_cv_pthread" = "yes"
8919then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008920fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008921
Matthias Kloseb9621712010-04-24 17:59:49 +00008922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8923$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008924have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008926/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008927
8928 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008929int
8930main ()
8931{
Guido van Rossum12580492000-09-24 16:47:19 +00008932pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008933 ;
8934 return 0;
8935}
Matthias Kloseb159a552010-04-25 21:00:44 +00008936
Martin v. Löwis11437992002-04-12 09:54:03 +00008937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008938if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008939 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8943$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008944if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008945 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008946# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8947# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8948# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8950$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008951if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008952 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008953else
Matthias Kloseb9621712010-04-24 17:59:49 +00008954 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008955#ifdef HAVE_PTHREAD_H
8956#include <pthread.h>
8957#endif
8958
Matthias Kloseb9621712010-04-24 17:59:49 +00008959"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008960
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008961else
Matthias Kloseb9621712010-04-24 17:59:49 +00008962 if test "$ac_cv_type_pthread_t" = yes; then
8963 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8964$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008965as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008966See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008967 else
8968 ac_cv_sizeof_pthread_t=0
8969 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008971
Trent Mick635f6fb2000-08-23 21:33:05 +00008972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8974$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008975
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008976
8977
Martin v. Löwis11437992002-04-12 09:54:03 +00008978cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008979#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008980_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008981
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008982
Trent Mick635f6fb2000-08-23 21:33:05 +00008983fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008984CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008985
Michael W. Hudson54241132001-12-07 15:38:26 +00008986
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008987case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008988 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008989 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8990 ;;
8991 Darwin/*)
8992 OTHER_LIBTOOL_OPT=""
8993 ;;
8994esac
8995
8996
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008997
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008998case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008999 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009000 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9001 if test "${enable_universalsdk}"; then
9002 :
9003 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009004 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009005 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009006 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009007 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009008 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009009 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009010 if test ${gcc_version} '<' 4.0
9011 then
9012 LIBTOOL_CRUFT="-lcc_dynamic"
9013 else
9014 LIBTOOL_CRUFT=""
9015 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009016 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009017 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009018else
Matthias Kloseb9621712010-04-24 17:59:49 +00009019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009020/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009021
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009022 #include <unistd.h>
9023 int main(int argc, char*argv[])
9024 {
9025 if (sizeof(long) == 4) {
9026 return 0;
9027 } else {
9028 return 1;
9029 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009030 }
9031
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009033if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009034 ac_osx_32bit=yes
9035else
Matthias Kloseb9621712010-04-24 17:59:49 +00009036 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009038rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9039 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009040fi
9041
9042
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009043 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009044 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009045 i386)
9046 MACOSX_DEFAULT_ARCH="i386"
9047 ;;
9048 ppc)
9049 MACOSX_DEFAULT_ARCH="ppc"
9050 ;;
9051 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009052 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009053 ;;
9054 esac
9055 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009056 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009057 i386)
9058 MACOSX_DEFAULT_ARCH="x86_64"
9059 ;;
9060 ppc)
9061 MACOSX_DEFAULT_ARCH="ppc64"
9062 ;;
9063 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009064 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009065 ;;
9066 esac
9067
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009068 fi
9069
9070 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009071 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009072 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009073esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9075$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009076if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009077then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009078 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009079 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009080 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009081
Matthias Kloseb9621712010-04-24 17:59:49 +00009082$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009083
Matthias Kloseb9621712010-04-24 17:59:49 +00009084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9085$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009086 if test $enable_shared = "yes"
9087 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009088 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 +00009089 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009090else
Matthias Kloseb9621712010-04-24 17:59:49 +00009091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9092$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009093fi
9094
Matthias Kloseb9621712010-04-24 17:59:49 +00009095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9096$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009097case $ac_sys_system/$ac_sys_release in
9098 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009099
Matthias Kloseb9621712010-04-24 17:59:49 +00009100$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009101
Matthias Kloseb9621712010-04-24 17:59:49 +00009102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9103$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009104 ;;
9105 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9107$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009108 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009109esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009110
Guido van Rossum0a516c91994-09-12 10:58:40 +00009111# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009112
Michael W. Hudson54241132001-12-07 15:38:26 +00009113
9114
9115
9116
Benjamin Peterson99f03762010-04-11 22:15:28 +00009117
Thomas Wouters477c8d52006-05-27 19:21:47 +00009118
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009119# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9120# -- usually .so, .sl on HP-UX, .dll on Cygwin
9121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9122$as_echo_n "checking the extension of shared libraries... " >&6; }
9123if test -z "$SHLIB_SUFFIX"; then
9124 case $ac_sys_system in
9125 hp*|HP*)
9126 case `uname -m` in
9127 ia64) SHLIB_SUFFIX=.so;;
9128 *) SHLIB_SUFFIX=.sl;;
9129 esac
9130 ;;
9131 CYGWIN*) SHLIB_SUFFIX=.dll;;
9132 *) SHLIB_SUFFIX=.so;;
9133 esac
9134fi
9135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9136$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009137
Guido van Rossum0a516c91994-09-12 10:58:40 +00009138# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009139# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009140# (Shared libraries in this instance are shared modules to be loaded into
9141# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9143$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009144if test -z "$LDSHARED"
9145then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009146 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009147 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009148 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009149 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009150 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009151 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009152 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009153 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009154 if test "$GCC" = "yes" ; then
9155 LDSHARED='$(CC) -shared'
9156 LDCXXSHARED='$(CXX) -shared'
9157 else
9158 LDSHARED='$(CC) -G'
9159 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009160 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009161 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009162 if test "$GCC" = "yes" ; then
9163 LDSHARED='$(CC) -shared'
9164 LDCXXSHARED='$(CXX) -shared'
9165 else
9166 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009167 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009168 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009169 LDSHARED='$(CC) -bundle'
9170 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009171 if test "$enable_framework" ; then
9172 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009173 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9174 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009175 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009176 else
9177 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009178 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009179 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009180 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009181 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009182 LDSHARED='$(CC) -bundle'
9183 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009184 if test "$enable_framework" ; then
9185 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009186 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9187 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009188 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009189 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009190 # No framework, use the Python app as bundle-loader
9191 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009192 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009193 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009194 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009195 Darwin/*)
9196 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9197 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009198
Ned Deily36820b62014-06-25 13:44:22 -07009199 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9200 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9201 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9202 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9203 if test ${dep_target_major} -eq 10 && \
9204 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009205 then
Ned Deily36820b62014-06-25 13:44:22 -07009206 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009207 LDSHARED='$(CC) -bundle'
9208 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009209 if test "$enable_framework" ; then
9210 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009211 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9212 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009213 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009214 else
9215 # No framework, use the Python app as bundle-loader
9216 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9217 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009218 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009219 fi
Ned Deily36820b62014-06-25 13:44:22 -07009220 else
9221 # building for OS X 10.3 and later
9222 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9223 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9224 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009225 fi
9226 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009227 Linux*|GNU*|QNX*)
9228 LDSHARED='$(CC) -shared'
9229 LDCXXSHARED='$(CXX) -shared';;
9230 BSD/OS*/4*)
9231 LDSHARED="gcc -shared"
9232 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009233 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009234 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009235 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009236 LDSHARED='$(CC) -shared'
9237 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009238 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009239 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009240 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009241 OpenBSD*)
9242 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9243 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009244 LDSHARED='$(CC) -shared $(CCSHARED)'
9245 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009246 else
9247 case `uname -r` in
9248 [01].* | 2.[0-7] | 2.[0-7].*)
9249 LDSHARED="ld -Bshareable ${LDFLAGS}"
9250 ;;
9251 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009252 LDSHARED='$(CC) -shared $(CCSHARED)'
9253 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009254 ;;
9255 esac
9256 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009257 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009258 LDSHARED='$(CC) -shared'
9259 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009260 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009261 if test "$GCC" = "yes" ; then
9262 LDSHARED='$(CC) -shared'
9263 LDCXXSHARED='$(CXX) -shared'
9264 else
9265 LDSHARED='$(CC) -G'
9266 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009267 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009268 SCO_SV*)
9269 LDSHARED='$(CC) -Wl,-G,-Bexport'
9270 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9271 CYGWIN*)
9272 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9273 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009274 *) LDSHARED="ld";;
9275 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9278$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009279LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009280BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009281# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009282# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9284$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009285if test -z "$CCSHARED"
9286then
Guido van Rossum07397971997-04-29 21:49:50 +00009287 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009288 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009289 then CCSHARED="-fPIC";
9290 elif test `uname -p` = sparc;
9291 then CCSHARED="-xcode=pic32";
9292 else CCSHARED="-Kpic";
9293 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009294 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009295 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009296 else CCSHARED="+z";
9297 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009298 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009299 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009300 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009301 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009302 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009303 if test "$GCC" = "yes"
9304 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009305 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009306 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009307 SCO_SV*)
9308 if test "$GCC" = "yes"
9309 then CCSHARED="-fPIC"
9310 else CCSHARED="-Kpic -belf"
9311 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009312 IRIX*/6*) case $CC in
9313 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009314 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009315 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009316 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9319$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009320# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009321# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9323$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009324if test -z "$LINKFORSHARED"
9325then
Guido van Rossum07397971997-04-29 21:49:50 +00009326 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009327 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009328 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009329 LINKFORSHARED="-Wl,-E -Wl,+s";;
9330# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009331 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009332 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009333 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009334 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009335 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009336 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009337
9338 # Issue #18075: the default maximum stack size (8MBytes) is too
9339 # small for the default recursion limit. Increase the stack size
9340 # to ensure that tests don't crash
9341 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9342
Jack Jansene578a632001-08-15 01:27:14 +00009343 if test "$enable_framework"
9344 then
Jack Jansenda49e192005-01-07 13:08:22 +00009345 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009346 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009347 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009348 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009349 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009350 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009351 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009352 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9353 then
9354 LINKFORSHARED="-Wl,--export-dynamic"
9355 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009356 SunOS/5*) case $CC in
9357 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009358 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009359 then
9360 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009361 fi;;
9362 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009363 CYGWIN*)
9364 if test $enable_shared = "no"
9365 then
9366 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9367 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009368 QNX*)
9369 # -Wl,-E causes the symbols to be added to the dynamic
9370 # symbol table so that they can be found when a module
9371 # is loaded. -N 2048K causes the stack size to be set
9372 # to 2048 kilobytes so that the stack doesn't overflow
9373 # when running test_compile.py.
9374 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009375 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009376fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9378$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009379
Michael W. Hudson54241132001-12-07 15:38:26 +00009380
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009381
Matthias Kloseb9621712010-04-24 17:59:49 +00009382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9383$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009384if test ! "$LIBRARY" = "$LDLIBRARY"
9385then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009386 case $ac_sys_system in
9387 CYGWIN*)
9388 # Cygwin needs CCSHARED when building extension DLLs
9389 # but not when building the interpreter DLL.
9390 CFLAGSFORSHARED='';;
9391 *)
9392 CFLAGSFORSHARED='$(CCSHARED)'
9393 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009394fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9396$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009397
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009398# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9399# library (with --enable-shared).
9400# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009401# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9402# if it is not required, since it creates a dependency of the shared library
9403# to LIBS. This, in turn, means that applications linking the shared libpython
9404# don't need to link LIBS explicitly. The default should be only changed
9405# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009406
Matthias Kloseb9621712010-04-24 17:59:49 +00009407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9408$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009409case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009410 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009411 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009412esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9414$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009415
9416
Guido van Rossum627b2d71993-12-24 10:39:16 +00009417# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9419$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009420if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009421 $as_echo_n "(cached) " >&6
9422else
9423 ac_check_lib_save_LIBS=$LIBS
9424LIBS="-lsendfile $LIBS"
9425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9426/* end confdefs.h. */
9427
9428/* Override any GCC internal prototype to avoid an error.
9429 Use char because int might match the return type of a GCC
9430 builtin and then its argument prototype would still apply. */
9431#ifdef __cplusplus
9432extern "C"
9433#endif
9434char sendfile ();
9435int
9436main ()
9437{
9438return sendfile ();
9439 ;
9440 return 0;
9441}
9442_ACEOF
9443if ac_fn_c_try_link "$LINENO"; then :
9444 ac_cv_lib_sendfile_sendfile=yes
9445else
9446 ac_cv_lib_sendfile_sendfile=no
9447fi
9448rm -f core conftest.err conftest.$ac_objext \
9449 conftest$ac_exeext conftest.$ac_ext
9450LIBS=$ac_check_lib_save_LIBS
9451fi
9452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9453$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009454if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009455 cat >>confdefs.h <<_ACEOF
9456#define HAVE_LIBSENDFILE 1
9457_ACEOF
9458
9459 LIBS="-lsendfile $LIBS"
9460
9461fi
9462
Matthias Kloseb9621712010-04-24 17:59:49 +00009463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9464$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009465if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009466 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009467else
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009469LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009472
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009473/* Override any GCC internal prototype to avoid an error.
9474 Use char because int might match the return type of a GCC
9475 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009476#ifdef __cplusplus
9477extern "C"
9478#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009479char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009480int
9481main ()
9482{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009483return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009484 ;
9485 return 0;
9486}
9487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009488if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009489 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009490else
Matthias Kloseb9621712010-04-24 17:59:49 +00009491 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009493rm -f core conftest.err conftest.$ac_objext \
9494 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009495LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9498$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009499if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009500 cat >>confdefs.h <<_ACEOF
9501#define HAVE_LIBDL 1
9502_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009503
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009504 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009505
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009506fi
9507 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9509$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009510if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009511 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009512else
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009514LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009518/* Override any GCC internal prototype to avoid an error.
9519 Use char because int might match the return type of a GCC
9520 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009521#ifdef __cplusplus
9522extern "C"
9523#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009524char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009525int
9526main ()
9527{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009528return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009529 ;
9530 return 0;
9531}
9532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009533if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009534 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009535else
Matthias Kloseb9621712010-04-24 17:59:49 +00009536 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009538rm -f core conftest.err conftest.$ac_objext \
9539 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009540LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9543$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009544if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009545 cat >>confdefs.h <<_ACEOF
9546#define HAVE_LIBDLD 1
9547_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009548
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009549 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009550
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009551fi
9552 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009553
Georg Brandlb1441c72009-01-03 22:33:39 +00009554# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009555if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9557$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009558if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009559 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009560else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009561 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009564
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009565/* Override any GCC internal prototype to avoid an error.
9566 Use char because int might match the return type of a GCC
9567 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009568#ifdef __cplusplus
9569extern "C"
9570#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009571char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009572int
9573main ()
9574{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009575return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 ;
9577 return 0;
9578}
9579_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009580for ac_lib in '' pthread rt posix4; do
9581 if test -z "$ac_lib"; then
9582 ac_res="none required"
9583 else
9584 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009585 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009586 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009587 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009588 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009590rm -f core conftest.err conftest.$ac_objext \
9591 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009592 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009593 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009595done
Victor Stinnere0be4232011-10-25 13:06:09 +02009596if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009598else
9599 ac_cv_search_sem_init=no
9600fi
9601rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009602LIBS=$ac_func_search_save_LIBS
9603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9605$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009606ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009607if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009608 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009609
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009610fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009611 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009612 # posix4 on Solaris 2.6
9613 # pthread (first!) on Linux
9614fi
9615
Martin v. Löwis19d17342003-06-14 21:03:05 +00009616# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9618$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009619if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009620 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009621else
9622 ac_check_lib_save_LIBS=$LIBS
9623LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009625/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009627/* Override any GCC internal prototype to avoid an error.
9628 Use char because int might match the return type of a GCC
9629 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009630#ifdef __cplusplus
9631extern "C"
9632#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009633char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009634int
9635main ()
9636{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009637return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009638 ;
9639 return 0;
9640}
9641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009642if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009643 ac_cv_lib_intl_textdomain=yes
9644else
Matthias Kloseb9621712010-04-24 17:59:49 +00009645 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009647rm -f core conftest.err conftest.$ac_objext \
9648 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009649LIBS=$ac_check_lib_save_LIBS
9650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9652$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009653if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009654
Matthias Kloseb9621712010-04-24 17:59:49 +00009655$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009656
Brett Cannonc6d936e2009-06-07 20:09:53 +00009657 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009658fi
9659
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009660
9661# checks for system dependent C++ extensions support
9662case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009663 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9664$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009666/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009667
Georg Brandl59e87bd2011-02-15 19:48:59 +00009668 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009669int
9670main ()
9671{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009672loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009673 ;
9674 return 0;
9675}
Matthias Kloseb159a552010-04-25 21:00:44 +00009676
Martin v. Löwis11437992002-04-12 09:54:03 +00009677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009678if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009679
Matthias Kloseb159a552010-04-25 21:00:44 +00009680
Matthias Kloseb9621712010-04-24 17:59:49 +00009681$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009682
Matthias Kloseb159a552010-04-25 21:00:44 +00009683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009684$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009685
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009686else
Matthias Kloseb159a552010-04-25 21:00:44 +00009687
9688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009689$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009690
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009692rm -f core conftest.err conftest.$ac_objext \
9693 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009694 *) ;;
9695esac
9696
Christian Heimes985ecdc2013-11-20 11:46:18 +01009697# check for systems that require aligned memory access
9698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9699$as_echo_n "checking aligned memory access is required... " >&6; }
9700if test "$cross_compiling" = yes; then :
9701 aligned_required=yes
9702else
9703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9704/* end confdefs.h. */
9705
9706int main()
9707{
9708 char s[16];
9709 int i, *p1, *p2;
9710 for (i=0; i < 16; i++)
9711 s[i] = i;
9712 p1 = (int*)(s+1);
9713 p2 = (int*)(s+2);
9714 if (*p1 == *p2)
9715 return 1;
9716 return 0;
9717}
9718
9719_ACEOF
9720if ac_fn_c_try_run "$LINENO"; then :
9721 aligned_required=no
9722else
9723 aligned_required=yes
9724fi
9725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9726 conftest.$ac_objext conftest.beam conftest.$ac_ext
9727fi
9728
9729
9730if test "$aligned_required" = yes ; then
9731
9732$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9733
9734fi
9735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9736$as_echo "$aligned_required" >&6; }
9737
9738
9739# str, bytes and memoryview hash algorithm
9740
9741
9742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9743$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9744
9745# Check whether --with-hash_algorithm was given.
9746if test "${with_hash_algorithm+set}" = set; then :
9747 withval=$with_hash_algorithm;
9748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9749$as_echo "$withval" >&6; }
9750case "$withval" in
9751 siphash24)
9752 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9753
9754 ;;
9755 fnv)
9756 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9757
9758 ;;
9759 *)
9760 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9761 ;;
9762esac
9763
9764else
9765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9766$as_echo "default" >&6; }
9767fi
9768
9769
Charles-François Natalid30b0222014-05-08 23:08:51 +01009770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9771$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9772
9773# Check whether --with-address_sanitizer was given.
9774if test "${with_address_sanitizer+set}" = set; then :
9775 withval=$with_address_sanitizer;
9776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9777$as_echo "$withval" >&6; }
9778BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9779LDFLAGS="-fsanitize=address $LDFLAGS"
9780
9781else
9782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9783$as_echo "no" >&6; }
9784fi
9785
9786
Guido van Rossum70c7f481998-03-26 18:44:10 +00009787# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9789$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009790if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009791 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009792else
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009794LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009798/* Override any GCC internal prototype to avoid an error.
9799 Use char because int might match the return type of a GCC
9800 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009801#ifdef __cplusplus
9802extern "C"
9803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009804char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009805int
9806main ()
9807{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009808return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009809 ;
9810 return 0;
9811}
9812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009813if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009814 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009815else
Matthias Kloseb9621712010-04-24 17:59:49 +00009816 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009818rm -f core conftest.err conftest.$ac_objext \
9819 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009820LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9823$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009824if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009825 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009826fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009827 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9829$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009830if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009831 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009832else
Martin v. Löwis11437992002-04-12 09:54:03 +00009833 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009834LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838/* Override any GCC internal prototype to avoid an error.
9839 Use char because int might match the return type of a GCC
9840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009841#ifdef __cplusplus
9842extern "C"
9843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009844char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009845int
9846main ()
9847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 ;
9850 return 0;
9851}
9852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009853if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009855else
Matthias Kloseb9621712010-04-24 17:59:49 +00009856 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009858rm -f core conftest.err conftest.$ac_objext \
9859 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009860LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9863$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009864if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009865 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009866fi
9867 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009868
Matthias Kloseb9621712010-04-24 17:59:49 +00009869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9870$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009871
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009872# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009873if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009874 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9876$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009877LIBS="$withval $LIBS"
9878
9879else
Matthias Kloseb9621712010-04-24 17:59:49 +00009880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9881$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009882fi
9883
Guido van Rossum7f43da71994-08-01 12:15:30 +00009884
Victor Stinner8291b5e2015-03-20 16:03:14 +01009885
9886
9887
9888
9889
9890
9891
9892if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9893 if test -n "$ac_tool_prefix"; then
9894 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9895set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9897$as_echo_n "checking for $ac_word... " >&6; }
9898if ${ac_cv_path_PKG_CONFIG+:} false; then :
9899 $as_echo_n "(cached) " >&6
9900else
9901 case $PKG_CONFIG in
9902 [\\/]* | ?:[\\/]*)
9903 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9904 ;;
9905 *)
9906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9907for as_dir in $PATH
9908do
9909 IFS=$as_save_IFS
9910 test -z "$as_dir" && as_dir=.
9911 for ac_exec_ext in '' $ac_executable_extensions; do
9912 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9913 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9915 break 2
9916 fi
9917done
9918 done
9919IFS=$as_save_IFS
9920
9921 ;;
9922esac
9923fi
9924PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9925if test -n "$PKG_CONFIG"; then
9926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9927$as_echo "$PKG_CONFIG" >&6; }
9928else
9929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9930$as_echo "no" >&6; }
9931fi
9932
9933
9934fi
9935if test -z "$ac_cv_path_PKG_CONFIG"; then
9936 ac_pt_PKG_CONFIG=$PKG_CONFIG
9937 # Extract the first word of "pkg-config", so it can be a program name with args.
9938set dummy pkg-config; ac_word=$2
9939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9940$as_echo_n "checking for $ac_word... " >&6; }
9941if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9942 $as_echo_n "(cached) " >&6
9943else
9944 case $ac_pt_PKG_CONFIG in
9945 [\\/]* | ?:[\\/]*)
9946 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9947 ;;
9948 *)
9949 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9950for as_dir in $PATH
9951do
9952 IFS=$as_save_IFS
9953 test -z "$as_dir" && as_dir=.
9954 for ac_exec_ext in '' $ac_executable_extensions; do
9955 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9956 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9957 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9958 break 2
9959 fi
9960done
9961 done
9962IFS=$as_save_IFS
9963
9964 ;;
9965esac
9966fi
9967ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9968if test -n "$ac_pt_PKG_CONFIG"; then
9969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9970$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9971else
9972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9973$as_echo "no" >&6; }
9974fi
9975
9976 if test "x$ac_pt_PKG_CONFIG" = x; then
9977 PKG_CONFIG=""
9978 else
9979 case $cross_compiling:$ac_tool_warned in
9980yes:)
9981{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9982$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9983ac_tool_warned=yes ;;
9984esac
9985 PKG_CONFIG=$ac_pt_PKG_CONFIG
9986 fi
9987else
9988 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9989fi
9990
9991fi
9992if test -n "$PKG_CONFIG"; then
9993 _pkg_min_version=0.9.0
9994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9995$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9996 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9998$as_echo "yes" >&6; }
9999 else
10000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10001$as_echo "no" >&6; }
10002 PKG_CONFIG=""
10003 fi
10004fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010005
10006# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10008$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010009
10010# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010011if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010012 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010013else
10014 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010015fi
10016
10017
Matthias Kloseb9621712010-04-24 17:59:49 +000010018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10019$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010020
10021# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10023$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010024
10025# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010026if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010027 withval=$with_system_ffi;
10028fi
10029
10030
Zachary Waref40d4dd2016-09-17 01:25:24 -050010031if test "$ac_sys_system" = "Darwin"
10032then
10033 case "$with_system_ffi" in
10034 "")
10035 with_system_ffi="no"
10036 ;;
10037 yes|no)
10038 ;;
10039 *)
10040 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10041 ;;
10042 esac
10043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10044$as_echo "$with_system_ffi" >&6; }
10045else
10046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10047$as_echo "yes" >&6; }
10048 if test "$with_system_ffi" != ""
10049 then
10050 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10051$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10052 fi
10053 with_system_ffi="yes"
10054fi
Zachary Ware935043d2016-09-09 17:01:21 -070010055
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010056if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010057 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10058else
10059 LIBFFI_INCLUDEDIR=""
10060fi
10061
10062
Stefan Krah60187b52012-03-23 19:06:27 +010010063# Check for use of the system libmpdec library
10064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10065$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10066
10067# Check whether --with-system_libmpdec was given.
10068if test "${with_system_libmpdec+set}" = set; then :
10069 withval=$with_system_libmpdec;
10070else
10071 with_system_libmpdec="no"
10072fi
10073
10074
10075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10076$as_echo "$with_system_libmpdec" >&6; }
10077
Benjamin Peterson076ed002010-10-31 17:11:02 +000010078# Check for support for loadable sqlite extensions
10079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10080$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10081# Check whether --enable-loadable-sqlite-extensions was given.
10082if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10083 enableval=$enable_loadable_sqlite_extensions;
10084else
10085 enable_loadable_sqlite_extensions="no"
10086fi
10087
10088
10089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10090$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10091
Ned Deilyd819b932013-09-06 01:07:05 -070010092# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10093
10094
10095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10096$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10097
10098# Check whether --with-tcltk-includes was given.
10099if test "${with_tcltk_includes+set}" = set; then :
10100 withval=$with_tcltk_includes;
10101else
10102 with_tcltk_includes="default"
10103fi
10104
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10106$as_echo "$with_tcltk_includes" >&6; }
10107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10108$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10109
10110# Check whether --with-tcltk-libs was given.
10111if test "${with_tcltk_libs+set}" = set; then :
10112 withval=$with_tcltk_libs;
10113else
10114 with_tcltk_libs="default"
10115fi
10116
10117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10118$as_echo "$with_tcltk_libs" >&6; }
10119if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10120then
10121 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10122 then
10123 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10124 fi
10125 TCLTK_INCLUDES=""
10126 TCLTK_LIBS=""
10127else
10128 TCLTK_INCLUDES="$with_tcltk_includes"
10129 TCLTK_LIBS="$with_tcltk_libs"
10130fi
10131
Matthias Klose55708cc2009-04-30 08:06:49 +000010132# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10134$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010135
10136# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010137if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010138 withval=$with_dbmliborder;
10139if test x$with_dbmliborder = xyes
10140then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010141as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010142else
10143 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10144 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10145 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010146 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010147 fi
10148 done
10149fi
10150fi
10151
Matthias Kloseb9621712010-04-24 17:59:49 +000010152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10153$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010154
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010155# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010156
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010157USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010158
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010159
Martin v. Löwis11437992002-04-12 09:54:03 +000010160
10161# Templates for things AC_DEFINEd more than once.
10162# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010163
10164
Martin v. Löwis11437992002-04-12 09:54:03 +000010165
Matthias Kloseb9621712010-04-24 17:59:49 +000010166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10167$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010169# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010170if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010171 withval=$with_threads;
10172fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010173
10174
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010175# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010177# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010178if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010179 withval=$with_thread; with_threads=$with_thread
10180fi
10181
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010182
10183if test -z "$with_threads"
10184then with_threads="yes"
10185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10187$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010188
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010189
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010190if test "$with_threads" = "no"
10191then
10192 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010193elif test "$ac_cv_pthread_is_default" = yes
10194then
Matthias Kloseb9621712010-04-24 17:59:49 +000010195 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010196
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010197 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010198 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010199
10200 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010201 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010202elif test "$ac_cv_kpthread" = "yes"
10203then
10204 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010205 if test "$ac_cv_cxx_thread" = "yes"; then
10206 CXX="$CXX -Kpthread"
10207 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010209
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010210 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010211 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010212elif test "$ac_cv_kthread" = "yes"
10213then
10214 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010215 if test "$ac_cv_cxx_thread" = "yes"; then
10216 CXX="$CXX -Kthread"
10217 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010218 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010219
10220 posix_threads=yes
10221 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010222elif test "$ac_cv_pthread" = "yes"
10223then
10224 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010225 if test "$ac_cv_cxx_thread" = "yes"; then
10226 CXX="$CXX -pthread"
10227 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010228 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010229
10230 posix_threads=yes
10231 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010232else
10233 if test ! -z "$with_threads" -a -d "$with_threads"
10234 then LDFLAGS="$LDFLAGS -L$with_threads"
10235 fi
10236 if test ! -z "$withval" -a -d "$withval"
10237 then LDFLAGS="$LDFLAGS -L$withval"
10238 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010239
10240 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010241 # define _POSIX_THREADS in unistd.h. Some apparently don't
10242 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10244$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010246/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010247
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010248#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010249#ifdef _POSIX_THREADS
10250yes
10251#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010252
10253_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010254if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010255 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010256 unistd_defines_pthreads=yes
10257else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010258 unistd_defines_pthreads=no
10259fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010260rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010261
Matthias Kloseb9621712010-04-24 17:59:49 +000010262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10263$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010264
Matthias Kloseb9621712010-04-24 17:59:49 +000010265 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010266
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010267 # Just looking for pthread_create in libpthread is not enough:
10268 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10269 # So we really have to include pthread.h, and then link.
10270 _libs=$LIBS
10271 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10273$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010275/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010276
10277#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010278#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010279
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010280void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010281int
10282main ()
10283{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010284
10285pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010286 ;
10287 return 0;
10288}
10289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010290if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010291
Matthias Kloseb9621712010-04-24 17:59:49 +000010292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10293$as_echo "yes" >&6; }
10294 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010295
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010296 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010297 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010298else
Martin v. Löwis11437992002-04-12 09:54:03 +000010299
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010300 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010301 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010302if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010303 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010304
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010305 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010306 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010307else
Guido van Rossumad678af1998-10-02 14:42:15 +000010308
Matthias Kloseb9621712010-04-24 17:59:49 +000010309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10310$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010311if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010312 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010313else
Martin v. Löwis11437992002-04-12 09:54:03 +000010314 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010315LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010317/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010318
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010319/* Override any GCC internal prototype to avoid an error.
10320 Use char because int might match the return type of a GCC
10321 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010322#ifdef __cplusplus
10323extern "C"
10324#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010325char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010326int
10327main ()
10328{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010329return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010330 ;
10331 return 0;
10332}
10333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010334if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010335 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010336else
Matthias Kloseb9621712010-04-24 17:59:49 +000010337 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010339rm -f core conftest.err conftest.$ac_objext \
10340 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010341LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010342fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10344$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010345if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010346 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010347
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010348 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010349 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010350 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010351else
Greg Steinadf63d62000-07-05 10:38:09 +000010352
Matthias Kloseb9621712010-04-24 17:59:49 +000010353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10354$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010355if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010356 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010357else
Martin v. Löwis11437992002-04-12 09:54:03 +000010358 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010359LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010361/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010362
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010363/* Override any GCC internal prototype to avoid an error.
10364 Use char because int might match the return type of a GCC
10365 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010366#ifdef __cplusplus
10367extern "C"
10368#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010369char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010370int
10371main ()
10372{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010373return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010374 ;
10375 return 0;
10376}
10377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010378if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010379 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010380else
Matthias Kloseb9621712010-04-24 17:59:49 +000010381 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010383rm -f core conftest.err conftest.$ac_objext \
10384 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010385LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10388$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010389if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010390 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010391
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010392 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010393 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010394 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010395else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010396
Matthias Kloseb9621712010-04-24 17:59:49 +000010397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10398$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010399if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010400 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010401else
Martin v. Löwis11437992002-04-12 09:54:03 +000010402 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010403LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010405/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010407/* Override any GCC internal prototype to avoid an error.
10408 Use char because int might match the return type of a GCC
10409 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010410#ifdef __cplusplus
10411extern "C"
10412#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010413char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010414int
10415main ()
10416{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010417return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010418 ;
10419 return 0;
10420}
10421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010422if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010423 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010424else
Matthias Kloseb9621712010-04-24 17:59:49 +000010425 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010426fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010427rm -f core conftest.err conftest.$ac_objext \
10428 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010429LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010430fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10432$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010433if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010434 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010435
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010436 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010437 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010438 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010439else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010440
Matthias Kloseb9621712010-04-24 17:59:49 +000010441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10442$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010443if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010444 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010445else
Martin v. Löwis11437992002-04-12 09:54:03 +000010446 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010447LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010449/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010450
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010451/* Override any GCC internal prototype to avoid an error.
10452 Use char because int might match the return type of a GCC
10453 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010454#ifdef __cplusplus
10455extern "C"
10456#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010457char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010458int
10459main ()
10460{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010461return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010462 ;
10463 return 0;
10464}
10465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010466if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010467 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010468else
Matthias Kloseb9621712010-04-24 17:59:49 +000010469 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010470fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010471rm -f core conftest.err conftest.$ac_objext \
10472 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010473LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010474fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10476$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010477if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010478 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010479
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010480 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010481 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010482 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010483else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010484
Martin v. Löwis130fb172001-07-19 11:00:41 +000010485 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010486fi
10487
Guido van Rossum627b2d71993-12-24 10:39:16 +000010488
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010489fi
10490
Guido van Rossum0be3e491997-05-22 20:33:33 +000010491fi
10492
Guido van Rossum49545951997-12-02 19:28:29 +000010493fi
10494
Guido van Rossumb93a8621998-05-07 13:27:32 +000010495fi
10496
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010497fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010498rm -f core conftest.err conftest.$ac_objext \
10499 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010500
Matthias Kloseb9621712010-04-24 17:59:49 +000010501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10502$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010503if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010504 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010505else
Martin v. Löwis11437992002-04-12 09:54:03 +000010506 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010507LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010509/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010510
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010511/* Override any GCC internal prototype to avoid an error.
10512 Use char because int might match the return type of a GCC
10513 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010514#ifdef __cplusplus
10515extern "C"
10516#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010517char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010518int
10519main ()
10520{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010521return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010522 ;
10523 return 0;
10524}
10525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010526if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010527 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010528else
Matthias Kloseb9621712010-04-24 17:59:49 +000010529 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010530fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010531rm -f core conftest.err conftest.$ac_objext \
10532 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010533LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010534fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10536$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010537if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010538 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010539
Martin v. Löwis130fb172001-07-19 11:00:41 +000010540 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010541 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010542 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010543fi
10544
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010545
Neal Norwitza978ab02002-11-02 16:58:05 +000010546 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10548$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010549if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010550 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010551else
Martin v. Löwis11437992002-04-12 09:54:03 +000010552 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010553LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010555/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010556
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010557/* Override any GCC internal prototype to avoid an error.
10558 Use char because int might match the return type of a GCC
10559 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010560#ifdef __cplusplus
10561extern "C"
10562#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010563char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010564int
10565main ()
10566{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010567return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010568 ;
10569 return 0;
10570}
10571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010572if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010573 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010574else
Matthias Kloseb9621712010-04-24 17:59:49 +000010575 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010576fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010577rm -f core conftest.err conftest.$ac_objext \
10578 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010579LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010580fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10582$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010583if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010584 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010585
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010586 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010587 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010588 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010589fi
10590
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010591 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010592fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010593
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010594if test "$posix_threads" = "yes"; then
10595 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010596
Matthias Kloseb9621712010-04-24 17:59:49 +000010597$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010598
10599 fi
10600
10601 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10602 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010603 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010604$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010605
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010606 ;;
10607 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010608$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010609
10610 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010611 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010612$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010613
10614 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010615 esac
10616
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10618$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010619 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010620 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010621else
Matthias Kloseb9621712010-04-24 17:59:49 +000010622 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010623 ac_cv_pthread_system_supported=no
10624else
Matthias Kloseb9621712010-04-24 17:59:49 +000010625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010626/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010627
10628 #include <stdio.h>
10629 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010630 void *foo(void *parm) {
10631 return NULL;
10632 }
10633 main() {
10634 pthread_attr_t attr;
10635 pthread_t id;
10636 if (pthread_attr_init(&attr)) exit(-1);
10637 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10638 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10639 exit(0);
10640 }
10641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010642if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010643 ac_cv_pthread_system_supported=yes
10644else
Matthias Kloseb9621712010-04-24 17:59:49 +000010645 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010646fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010647rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10648 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010649fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010650
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010651
Guido van Rossum627b2d71993-12-24 10:39:16 +000010652fi
10653
Matthias Kloseb9621712010-04-24 17:59:49 +000010654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10655$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010656 if test "$ac_cv_pthread_system_supported" = "yes"; then
10657
Matthias Kloseb9621712010-04-24 17:59:49 +000010658$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010659
10660 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010661 for ac_func in pthread_sigmask
10662do :
10663 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010664if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010665 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010666#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010667_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010668 case $ac_sys_system in
10669 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010670
Matthias Kloseb9621712010-04-24 17:59:49 +000010671$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010672
10673 ;;
10674 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010675fi
10676done
10677
Christian Heimesf77b4b22013-08-21 13:26:05 +020010678 for ac_func in pthread_atfork
10679do :
10680 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10681if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10682 cat >>confdefs.h <<_ACEOF
10683#define HAVE_PTHREAD_ATFORK 1
10684_ACEOF
10685
10686fi
10687done
10688
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010689fi
10690
10691
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010692# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010693
Matthias Kloseb9621712010-04-24 17:59:49 +000010694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10695$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010696# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010697if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010698 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010699 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10701$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010702 ipv6=no
10703 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010704 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10705$as_echo "yes" >&6; }
10706 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010707
10708 ipv6=yes
10709 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010710 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010711else
Martin v. Löwis11437992002-04-12 09:54:03 +000010712
Matthias Kloseb9621712010-04-24 17:59:49 +000010713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010714/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010715 /* AF_INET6 available check */
10716#include <sys/types.h>
10717#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010718int
10719main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010720{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010721int domain = AF_INET6;
10722 ;
10723 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010724}
Martin v. Löwis11437992002-04-12 09:54:03 +000010725_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010726if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010727
Matthias Kloseb9621712010-04-24 17:59:49 +000010728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10729$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010730 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010731
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010732else
Matthias Kloseb159a552010-04-25 21:00:44 +000010733
Matthias Kloseb9621712010-04-24 17:59:49 +000010734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10735$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010736 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010737
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010738fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010740
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010741if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10743$as_echo_n "checking if RFC2553 API is available... " >&6; }
10744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010745/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010746
10747 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010748#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010749int
10750main ()
10751{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010752struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010753 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010754 ;
10755 return 0;
10756}
Matthias Kloseb159a552010-04-25 21:00:44 +000010757
Martin v. Löwis11437992002-04-12 09:54:03 +000010758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010759if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010760
10761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010762$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010763 ipv6=yes
10764
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010765else
Matthias Kloseb159a552010-04-25 21:00:44 +000010766
10767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010768$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010769 ipv6=no
10770
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010773fi
10774
10775if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010776 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010777
10778fi
10779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010780fi
10781
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010782
10783ipv6type=unknown
10784ipv6lib=none
10785ipv6trylibc=no
10786
10787if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10789$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010790 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10791 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792 case $i in
10793 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010795/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010796
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010797#include <netinet/in.h>
10798#ifdef IPV6_INRIA_VERSION
10799yes
10800#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010801_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010802if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010804 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010805fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010806rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010807
10808 ;;
10809 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010811/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010812
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010813#include <netinet/in.h>
10814#ifdef __KAME__
10815yes
10816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010817_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010818if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010820 ipv6type=$i;
10821 ipv6lib=inet6
10822 ipv6libdir=/usr/local/v6/lib
10823 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010824fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010825rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010826
10827 ;;
10828 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010830/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010831
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010832#include <features.h>
10833#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10834yes
10835#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010836_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010837if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010838 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010839 ipv6type=$i;
10840 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010841fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010842rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010843
10844 ;;
10845 linux-inet6)
10846 if test -d /usr/inet6; then
10847 ipv6type=$i
10848 ipv6lib=inet6
10849 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010850 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010851 fi
10852 ;;
10853 solaris)
10854 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010855 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010856 ipv6type=$i
10857 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010858 fi
10859 fi
10860 ;;
10861 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010863/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010864
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010865#include <sys/param.h>
10866#ifdef _TOSHIBA_INET6
10867yes
10868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010869_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010870if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010871 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010872 ipv6type=$i;
10873 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010874 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010875fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010876rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010877
10878 ;;
10879 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010881/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010882
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010883#include </usr/local/v6/include/sys/v6config.h>
10884#ifdef __V6D__
10885yes
10886#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010887_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010888if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010889 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010890 ipv6type=$i;
10891 ipv6lib=v6;
10892 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010893 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010894fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010895rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010896
10897 ;;
10898 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010900/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010901
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010902#include <sys/param.h>
10903#ifdef _ZETA_MINAMI_INET6
10904yes
10905#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010906_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010907if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010908 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010909 ipv6type=$i;
10910 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010911 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010912fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010913rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010914
10915 ;;
10916 esac
10917 if test "$ipv6type" != "unknown"; then
10918 break
10919 fi
10920 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10922$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010923fi
10924
10925if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10926 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10927 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10928 echo "using lib$ipv6lib"
10929 else
10930 if test $ipv6trylibc = "yes"; then
10931 echo "using libc"
10932 else
10933 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10934 echo "You need to fetch lib$ipv6lib.a from appropriate"
10935 echo 'ipv6 kit and compile beforehand.'
10936 exit 1
10937 fi
10938 fi
10939fi
10940
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10942$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10944/* end confdefs.h. */
10945 /* CAN_RAW_FD_FRAMES available check */
10946#include <linux/can/raw.h>
10947int
10948main ()
10949{
10950int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10951 ;
10952 return 0;
10953}
10954_ACEOF
10955if ac_fn_c_try_compile "$LINENO"; then :
10956
10957
10958$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10959
10960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10961$as_echo "yes" >&6; }
10962
10963else
10964
10965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10966$as_echo "no" >&6; }
10967
10968fi
10969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10970
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010971# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10973$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010975# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010976if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010977 withval=$with_doc_strings;
10978fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010979
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010980
10981if test -z "$with_doc_strings"
10982then with_doc_strings="yes"
10983fi
10984if test "$with_doc_strings" != "no"
10985then
10986
Matthias Kloseb9621712010-04-24 17:59:49 +000010987$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010988
10989fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10991$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010992
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010993# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10995$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010996
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010997# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010998if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010999 withval=$with_pymalloc;
11000fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011001
Neil Schemenauera35c6882001-02-27 04:45:05 +000011002
Neil Schemenauer16c22972002-03-22 15:34:49 +000011003if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011004then
11005 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011006fi
11007if test "$with_pymalloc" != "no"
11008then
Martin v. Löwis11437992002-04-12 09:54:03 +000011009
Matthias Kloseb9621712010-04-24 17:59:49 +000011010$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011011
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011012 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11015$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011016
Benjamin Peterson05159c42009-12-03 03:01:27 +000011017# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11019$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011020
11021# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011022if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011023 withval=$with_valgrind;
11024else
11025 with_valgrind=no
11026fi
11027
Matthias Kloseb9621712010-04-24 17:59:49 +000011028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11029$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011030if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011031 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 +020011032if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011033
Matthias Kloseb9621712010-04-24 17:59:49 +000011034$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011035
11036else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011037 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011038
11039fi
11040
11041
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011042 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011043fi
11044
Łukasz Langaa785c872016-09-09 17:37:37 -070011045# Check for DTrace support
11046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11047$as_echo_n "checking for --with-dtrace... " >&6; }
11048
11049# Check whether --with-dtrace was given.
11050if test "${with_dtrace+set}" = set; then :
11051 withval=$with_dtrace;
11052else
11053 with_dtrace=no
11054fi
11055
11056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11057$as_echo "$with_dtrace" >&6; }
11058
11059
11060
11061
11062
11063DTRACE=
11064DFLAGS=
11065DTRACE_HEADERS=
11066DTRACE_OBJS=
11067
11068if test "$with_dtrace" = "yes"
11069then
11070 # Extract the first word of "dtrace", so it can be a program name with args.
11071set dummy dtrace; ac_word=$2
11072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11073$as_echo_n "checking for $ac_word... " >&6; }
11074if ${ac_cv_path_DTRACE+:} false; then :
11075 $as_echo_n "(cached) " >&6
11076else
11077 case $DTRACE in
11078 [\\/]* | ?:[\\/]*)
11079 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11080 ;;
11081 *)
11082 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11083for as_dir in $PATH
11084do
11085 IFS=$as_save_IFS
11086 test -z "$as_dir" && as_dir=.
11087 for ac_exec_ext in '' $ac_executable_extensions; do
11088 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11089 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11090 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11091 break 2
11092 fi
11093done
11094 done
11095IFS=$as_save_IFS
11096
11097 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11098 ;;
11099esac
11100fi
11101DTRACE=$ac_cv_path_DTRACE
11102if test -n "$DTRACE"; then
11103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11104$as_echo "$DTRACE" >&6; }
11105else
11106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11107$as_echo "no" >&6; }
11108fi
11109
11110
11111 if test "$DTRACE" = "not found"; then
11112 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11113 fi
11114
11115$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11116
11117 DTRACE_HEADERS="Include/pydtrace_probes.h"
11118
11119 # On OS X, DTrace providers do not need to be explicitly compiled and
11120 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11121 # generation flag '-G'. We check for presence of this flag, rather than
11122 # hardcoding support by OS, in the interest of robustness.
11123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11124$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11125if ${ac_cv_dtrace_link+:} false; then :
11126 $as_echo_n "(cached) " >&6
11127else
11128 ac_cv_dtrace_link=no
11129 echo 'BEGIN' > conftest.d
11130 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11131 ac_cv_dtrace_link=yes
11132
11133fi
11134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11135$as_echo "$ac_cv_dtrace_link" >&6; }
11136 if test "$ac_cv_dtrace_link" = "yes"; then
11137 DTRACE_OBJS="Python/pydtrace.o"
11138 fi
11139fi
11140
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011141# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011142
Guido van Rossum98935bf2001-09-05 19:13:16 +000011143DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011144
Guido van Rossume97ee181999-12-20 21:27:22 +000011145# the dlopen() function means we might want to use dynload_shlib.o. some
11146# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011147for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011148do :
11149 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011150if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011151 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011152#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011153_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011154
Guido van Rossume97ee181999-12-20 21:27:22 +000011155fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011156done
Guido van Rossume97ee181999-12-20 21:27:22 +000011157
Michael W. Hudson54241132001-12-07 15:38:26 +000011158
Guido van Rossume97ee181999-12-20 21:27:22 +000011159# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11160# loading of modules.
11161
Matthias Kloseb9621712010-04-24 17:59:49 +000011162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11163$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011164if test -z "$DYNLOADFILE"
11165then
11166 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011167 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11168 if test "$ac_cv_func_dlopen" = yes
11169 then DYNLOADFILE="dynload_shlib.o"
11170 else DYNLOADFILE="dynload_aix.o"
11171 fi
11172 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011173 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011174 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11175 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011176 *)
11177 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11178 # out any dynamic loading
11179 if test "$ac_cv_func_dlopen" = yes
11180 then DYNLOADFILE="dynload_shlib.o"
11181 else DYNLOADFILE="dynload_stub.o"
11182 fi
11183 ;;
11184 esac
11185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11187$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011188if test "$DYNLOADFILE" != "dynload_stub.o"
11189then
Martin v. Löwis11437992002-04-12 09:54:03 +000011190
Matthias Kloseb9621712010-04-24 17:59:49 +000011191$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011192
11193fi
11194
Neil Schemenauer4e425612001-06-19 15:44:15 +000011195# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11196
Michael W. Hudson54241132001-12-07 15:38:26 +000011197
Matthias Kloseb9621712010-04-24 17:59:49 +000011198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11199$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011200if test -z "$MACHDEP_OBJS"
11201then
Jack Jansene578a632001-08-15 01:27:14 +000011202 MACHDEP_OBJS=$extra_machdep_objs
11203else
11204 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011205fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011206if test -z "$MACHDEP_OBJS"; then
11207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11208$as_echo "none" >&6; }
11209else
11210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11211$as_echo "$MACHDEP_OBJS" >&6; }
11212fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011213
Guido van Rossum627b2d71993-12-24 10:39:16 +000011214# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011215for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011216 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011217 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011218 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011219 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011220 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011221 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011222 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011223 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011224 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011225 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011226 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011227 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011228 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011229 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11230 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011231 sigaction sigaltstack siginterrupt sigpending sigrelse \
11232 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011233 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011234 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011235 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011236do :
11237 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11238ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011239if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011240 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011241#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011242_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011243
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011244fi
11245done
11246
Michael W. Hudson54241132001-12-07 15:38:26 +000011247
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011248ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11249 #include <dirent.h>
11250"
11251if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11252
11253$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11254
11255fi
11256
11257
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011258# For some functions, having a definition is not sufficient, since
11259# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11261$as_echo_n "checking for chroot... " >&6; }
11262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011263/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011264#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011265int
11266main ()
11267{
11268void *x=chroot
11269 ;
11270 return 0;
11271}
11272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011273if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011274
Matthias Kloseb9621712010-04-24 17:59:49 +000011275$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011276
Matthias Kloseb159a552010-04-25 21:00:44 +000011277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011278$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011279else
Matthias Kloseb9621712010-04-24 17:59:49 +000011280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11281$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011282
11283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11286$as_echo_n "checking for link... " >&6; }
11287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011288/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011289#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011290int
11291main ()
11292{
11293void *x=link
11294 ;
11295 return 0;
11296}
11297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011298if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011299
Matthias Kloseb9621712010-04-24 17:59:49 +000011300$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011301
Matthias Kloseb159a552010-04-25 21:00:44 +000011302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011303$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011304else
Matthias Kloseb9621712010-04-24 17:59:49 +000011305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11306$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011307
11308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11311$as_echo_n "checking for symlink... " >&6; }
11312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011313/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011314#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011315int
11316main ()
11317{
11318void *x=symlink
11319 ;
11320 return 0;
11321}
11322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011323if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011324
Matthias Kloseb9621712010-04-24 17:59:49 +000011325$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011326
Matthias Kloseb159a552010-04-25 21:00:44 +000011327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011328$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011329else
Matthias Kloseb9621712010-04-24 17:59:49 +000011330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11331$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011332
11333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11336$as_echo_n "checking for fchdir... " >&6; }
11337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011338/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011339#include <unistd.h>
11340int
11341main ()
11342{
11343void *x=fchdir
11344 ;
11345 return 0;
11346}
11347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011348if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011349
Matthias Kloseb9621712010-04-24 17:59:49 +000011350$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011351
Matthias Kloseb159a552010-04-25 21:00:44 +000011352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011353$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011354else
Matthias Kloseb9621712010-04-24 17:59:49 +000011355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11356$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011357
11358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11361$as_echo_n "checking for fsync... " >&6; }
11362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011363/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011364#include <unistd.h>
11365int
11366main ()
11367{
11368void *x=fsync
11369 ;
11370 return 0;
11371}
11372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011373if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011374
Matthias Kloseb9621712010-04-24 17:59:49 +000011375$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011376
Matthias Kloseb159a552010-04-25 21:00:44 +000011377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011378$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011379else
Matthias Kloseb9621712010-04-24 17:59:49 +000011380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11381$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011382
11383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11386$as_echo_n "checking for fdatasync... " >&6; }
11387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011388/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011389#include <unistd.h>
11390int
11391main ()
11392{
11393void *x=fdatasync
11394 ;
11395 return 0;
11396}
11397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011398if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011399
Matthias Kloseb9621712010-04-24 17:59:49 +000011400$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011401
Matthias Kloseb159a552010-04-25 21:00:44 +000011402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011403$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011404else
Matthias Kloseb9621712010-04-24 17:59:49 +000011405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11406$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011407
11408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11411$as_echo_n "checking for epoll... " >&6; }
11412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011413/* end confdefs.h. */
11414#include <sys/epoll.h>
11415int
11416main ()
11417{
11418void *x=epoll_create
11419 ;
11420 return 0;
11421}
11422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011423if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011424
Matthias Kloseb9621712010-04-24 17:59:49 +000011425$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011426
Matthias Kloseb159a552010-04-25 21:00:44 +000011427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011428$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011429else
Matthias Kloseb9621712010-04-24 17:59:49 +000011430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11431$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011432
11433fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11436$as_echo_n "checking for epoll_create1... " >&6; }
11437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11438/* end confdefs.h. */
11439#include <sys/epoll.h>
11440int
11441main ()
11442{
11443void *x=epoll_create1
11444 ;
11445 return 0;
11446}
11447_ACEOF
11448if ac_fn_c_try_compile "$LINENO"; then :
11449
11450$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11451
11452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11453$as_echo "yes" >&6; }
11454else
11455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11456$as_echo "no" >&6; }
11457
11458fi
11459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11461$as_echo_n "checking for kqueue... " >&6; }
11462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011463/* end confdefs.h. */
11464
11465#include <sys/types.h>
11466#include <sys/event.h>
11467
11468int
11469main ()
11470{
11471int x=kqueue()
11472 ;
11473 return 0;
11474}
11475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011476if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011477
Matthias Kloseb9621712010-04-24 17:59:49 +000011478$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011479
Matthias Kloseb159a552010-04-25 21:00:44 +000011480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011481$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011482else
Matthias Kloseb9621712010-04-24 17:59:49 +000011483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11484$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011485
11486fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11489$as_echo_n "checking for prlimit... " >&6; }
11490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11491/* end confdefs.h. */
11492
11493#include <sys/time.h>
11494#include <sys/resource.h>
11495
11496int
11497main ()
11498{
11499void *x=prlimit
11500 ;
11501 return 0;
11502}
11503_ACEOF
11504if ac_fn_c_try_compile "$LINENO"; then :
11505
11506$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11507
11508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11509$as_echo "yes" >&6; }
11510else
11511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11512$as_echo "no" >&6; }
11513
11514fi
11515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11516
Martin v. Löwisd5843682002-11-21 20:41:28 +000011517# On some systems (eg. FreeBSD 5), we would find a definition of the
11518# functions ctermid_r, setgroups in the library, but no prototype
11519# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11520# address to avoid compiler warnings and potential miscompilations
11521# because of the missing prototypes.
11522
Matthias Kloseb9621712010-04-24 17:59:49 +000011523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11524$as_echo_n "checking for ctermid_r... " >&6; }
11525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011526/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011527
Martin v. Löwisd5843682002-11-21 20:41:28 +000011528#include <stdio.h>
11529
Martin v. Löwisd5843682002-11-21 20:41:28 +000011530int
11531main ()
11532{
11533void* p = ctermid_r
11534 ;
11535 return 0;
11536}
11537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011538if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011539
Matthias Kloseb9621712010-04-24 17:59:49 +000011540$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011541
Matthias Kloseb159a552010-04-25 21:00:44 +000011542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011543$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011544else
Matthias Kloseb9621712010-04-24 17:59:49 +000011545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11546$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011547
11548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11550
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11552$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011553if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011554 $as_echo_n "(cached) " >&6
11555else
11556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011557/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011558#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011559int
11560main ()
11561{
11562void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011563
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011564 ;
11565 return 0;
11566}
11567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011568if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011569 ac_cv_flock_decl=yes
11570else
11571 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011572
11573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011575
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011576fi
11577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11578$as_echo "$ac_cv_flock_decl" >&6; }
11579if test "x${ac_cv_flock_decl}" = xyes; then
11580 for ac_func in flock
11581do :
11582 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011583if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011584 cat >>confdefs.h <<_ACEOF
11585#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011586_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011587
Antoine Pitroua3000072010-09-07 14:52:42 +000011588else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011590$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011591if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011592 $as_echo_n "(cached) " >&6
11593else
11594 ac_check_lib_save_LIBS=$LIBS
11595LIBS="-lbsd $LIBS"
11596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11597/* end confdefs.h. */
11598
11599/* Override any GCC internal prototype to avoid an error.
11600 Use char because int might match the return type of a GCC
11601 builtin and then its argument prototype would still apply. */
11602#ifdef __cplusplus
11603extern "C"
11604#endif
11605char flock ();
11606int
11607main ()
11608{
11609return flock ();
11610 ;
11611 return 0;
11612}
11613_ACEOF
11614if ac_fn_c_try_link "$LINENO"; then :
11615 ac_cv_lib_bsd_flock=yes
11616else
11617 ac_cv_lib_bsd_flock=no
11618fi
11619rm -f core conftest.err conftest.$ac_objext \
11620 conftest$ac_exeext conftest.$ac_ext
11621LIBS=$ac_check_lib_save_LIBS
11622fi
11623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11624$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011625if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011626 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011627
11628
11629$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11630
11631
11632fi
11633
11634
11635fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011636done
11637
Antoine Pitroua3000072010-09-07 14:52:42 +000011638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011639
Matthias Kloseb9621712010-04-24 17:59:49 +000011640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11641$as_echo_n "checking for getpagesize... " >&6; }
11642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011643/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011644
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011645#include <unistd.h>
11646
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011647int
11648main ()
11649{
11650void* p = getpagesize
11651 ;
11652 return 0;
11653}
11654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011655if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011656
Matthias Kloseb9621712010-04-24 17:59:49 +000011657$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011658
Matthias Kloseb159a552010-04-25 21:00:44 +000011659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011660$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011661else
Matthias Kloseb9621712010-04-24 17:59:49 +000011662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11663$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011664
11665fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011667
Victor Stinner984890f2011-11-24 13:53:38 +010011668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11669$as_echo_n "checking for broken unsetenv... " >&6; }
11670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11671/* end confdefs.h. */
11672
11673#include <stdlib.h>
11674
11675int
11676main ()
11677{
11678int res = unsetenv("DUMMY")
11679 ;
11680 return 0;
11681}
11682_ACEOF
11683if ac_fn_c_try_compile "$LINENO"; then :
11684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11685$as_echo "no" >&6; }
11686else
11687
11688$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11689
11690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11691$as_echo "yes" >&6; }
11692
11693fi
11694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11695
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011696for ac_prog in true
11697do
11698 # Extract the first word of "$ac_prog", so it can be a program name with args.
11699set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11701$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011702if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011703 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011704else
11705 if test -n "$TRUE"; then
11706 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11707else
11708as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11709for as_dir in $PATH
11710do
11711 IFS=$as_save_IFS
11712 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011713 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011714 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011715 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011716 $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 +000011717 break 2
11718 fi
11719done
Matthias Kloseb9621712010-04-24 17:59:49 +000011720 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011721IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011722
11723fi
11724fi
11725TRUE=$ac_cv_prog_TRUE
11726if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11728$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011729else
Matthias Kloseb9621712010-04-24 17:59:49 +000011730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11731$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011732fi
11733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011734
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011735 test -n "$TRUE" && break
11736done
11737test -n "$TRUE" || TRUE="/bin/true"
11738
11739
Matthias Kloseb9621712010-04-24 17:59:49 +000011740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11741$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011742if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011744else
11745 ac_check_lib_save_LIBS=$LIBS
11746LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011748/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011750/* Override any GCC internal prototype to avoid an error.
11751 Use char because int might match the return type of a GCC
11752 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011753#ifdef __cplusplus
11754extern "C"
11755#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011756char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011757int
11758main ()
11759{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011760return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011761 ;
11762 return 0;
11763}
11764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011765if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011766 ac_cv_lib_c_inet_aton=yes
11767else
Matthias Kloseb9621712010-04-24 17:59:49 +000011768 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011769fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011770rm -f core conftest.err conftest.$ac_objext \
11771 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011772LIBS=$ac_check_lib_save_LIBS
11773fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11775$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011776if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011777 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011778else
Matthias Kloseb9621712010-04-24 17:59:49 +000011779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11780$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011781if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011782 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011783else
11784 ac_check_lib_save_LIBS=$LIBS
11785LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011787/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011788
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011789/* Override any GCC internal prototype to avoid an error.
11790 Use char because int might match the return type of a GCC
11791 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011792#ifdef __cplusplus
11793extern "C"
11794#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011795char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011796int
11797main ()
11798{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011799return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011800 ;
11801 return 0;
11802}
11803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011804if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011805 ac_cv_lib_resolv_inet_aton=yes
11806else
Matthias Kloseb9621712010-04-24 17:59:49 +000011807 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011809rm -f core conftest.err conftest.$ac_objext \
11810 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011811LIBS=$ac_check_lib_save_LIBS
11812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11814$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011815if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011816 cat >>confdefs.h <<_ACEOF
11817#define HAVE_LIBRESOLV 1
11818_ACEOF
11819
11820 LIBS="-lresolv $LIBS"
11821
11822fi
11823
11824
11825fi
11826
11827
Christian Heimesd0764e22007-12-04 15:00:33 +000011828# On Tru64, chflags seems to be present, but calling it will
11829# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11831$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011832if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011833 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011834else
Matthias Kloseb9621712010-04-24 17:59:49 +000011835 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011836 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011837else
Matthias Kloseb9621712010-04-24 17:59:49 +000011838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011839/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011840
Christian Heimesd0764e22007-12-04 15:00:33 +000011841#include <sys/stat.h>
11842#include <unistd.h>
11843int main(int argc, char*argv[])
11844{
11845 if(chflags(argv[0], 0) != 0)
11846 return 1;
11847 return 0;
11848}
Ned Deily3eb67d52011-06-28 00:00:28 -070011849
Christian Heimesd0764e22007-12-04 15:00:33 +000011850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011851if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011852 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011853else
Matthias Kloseb9621712010-04-24 17:59:49 +000011854 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011855fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011856rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11857 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011858fi
11859
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011860
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011861fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11863$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011864if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011865 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011866if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011867 ac_cv_have_chflags="yes"
11868else
11869 ac_cv_have_chflags="no"
11870fi
11871
11872fi
11873if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011874
Matthias Kloseb9621712010-04-24 17:59:49 +000011875$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011876
11877fi
11878
Matthias Kloseb9621712010-04-24 17:59:49 +000011879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11880$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011881if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011882 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011883else
Matthias Kloseb9621712010-04-24 17:59:49 +000011884 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011885 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011886else
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011888/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011889
Christian Heimesd0764e22007-12-04 15:00:33 +000011890#include <sys/stat.h>
11891#include <unistd.h>
11892int main(int argc, char*argv[])
11893{
11894 if(lchflags(argv[0], 0) != 0)
11895 return 1;
11896 return 0;
11897}
Ned Deily3eb67d52011-06-28 00:00:28 -070011898
Christian Heimesd0764e22007-12-04 15:00:33 +000011899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011900if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011901 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011902else
Matthias Kloseb9621712010-04-24 17:59:49 +000011903 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011904fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11906 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011907fi
11908
11909
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11912$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011913if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011914 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011915if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011916 ac_cv_have_lchflags="yes"
11917else
11918 ac_cv_have_lchflags="no"
11919fi
11920
11921fi
11922if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011923
Matthias Kloseb9621712010-04-24 17:59:49 +000011924$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011925
11926fi
11927
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011928case $ac_sys_system/$ac_sys_release in
11929Darwin/*)
11930 _CUR_CFLAGS="${CFLAGS}"
11931 _CUR_LDFLAGS="${LDFLAGS}"
11932 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11933 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11934 ;;
11935esac
11936
Matthias Kloseb9621712010-04-24 17:59:49 +000011937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11938$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011939if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011940 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011941else
11942 ac_check_lib_save_LIBS=$LIBS
11943LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011945/* end confdefs.h. */
11946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011947/* Override any GCC internal prototype to avoid an error.
11948 Use char because int might match the return type of a GCC
11949 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011950#ifdef __cplusplus
11951extern "C"
11952#endif
11953char inflateCopy ();
11954int
11955main ()
11956{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011957return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011958 ;
11959 return 0;
11960}
11961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011962if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011963 ac_cv_lib_z_inflateCopy=yes
11964else
Matthias Kloseb9621712010-04-24 17:59:49 +000011965 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011967rm -f core conftest.err conftest.$ac_objext \
11968 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011969LIBS=$ac_check_lib_save_LIBS
11970fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11972$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011973if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011974
Matthias Kloseb9621712010-04-24 17:59:49 +000011975$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011976
11977fi
11978
11979
11980case $ac_sys_system/$ac_sys_release in
11981Darwin/*)
11982 CFLAGS="${_CUR_CFLAGS}"
11983 LDFLAGS="${_CUR_LDFLAGS}"
11984 ;;
11985esac
11986
Matthias Kloseb9621712010-04-24 17:59:49 +000011987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11988$as_echo_n "checking for hstrerror... " >&6; }
11989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011990/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011991
Martin v. Löwise9416172003-05-03 10:12:45 +000011992#include <netdb.h>
11993
Martin v. Löwise9416172003-05-03 10:12:45 +000011994int
11995main ()
11996{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011997void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011998 ;
11999 return 0;
12000}
12001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012002if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012003
Matthias Kloseb9621712010-04-24 17:59:49 +000012004$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012005
Matthias Kloseb159a552010-04-25 21:00:44 +000012006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012007$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012008else
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12010$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012011
12012fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012013rm -f core conftest.err conftest.$ac_objext \
12014 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012015
Matthias Kloseb9621712010-04-24 17:59:49 +000012016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12017$as_echo_n "checking for inet_aton... " >&6; }
12018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012019/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012020
Martin v. Löwis86d66262006-02-17 08:40:11 +000012021#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012022#include <sys/socket.h>
12023#include <netinet/in.h>
12024#include <arpa/inet.h>
12025
Martin v. Löwise9416172003-05-03 10:12:45 +000012026int
12027main ()
12028{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012029void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012030 ;
12031 return 0;
12032}
12033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012034if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012035
Matthias Kloseb9621712010-04-24 17:59:49 +000012036$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012037
Matthias Kloseb159a552010-04-25 21:00:44 +000012038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012039$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012040else
Matthias Kloseb9621712010-04-24 17:59:49 +000012041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12042$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012043
12044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012045rm -f core conftest.err conftest.$ac_objext \
12046 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012047
Matthias Kloseb9621712010-04-24 17:59:49 +000012048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12049$as_echo_n "checking for inet_pton... " >&6; }
12050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012051/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012052
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012053#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012054#include <sys/socket.h>
12055#include <netinet/in.h>
12056#include <arpa/inet.h>
12057
Martin v. Löwise9416172003-05-03 10:12:45 +000012058int
12059main ()
12060{
12061void* p = inet_pton
12062 ;
12063 return 0;
12064}
12065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012066if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012067
Matthias Kloseb9621712010-04-24 17:59:49 +000012068$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012069
Matthias Kloseb159a552010-04-25 21:00:44 +000012070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012071$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012072else
Matthias Kloseb9621712010-04-24 17:59:49 +000012073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12074$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012075
12076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012078
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012079# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12081$as_echo_n "checking for setgroups... " >&6; }
12082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012083/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012084
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012085#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012086#ifdef HAVE_GRP_H
12087#include <grp.h>
12088#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012089
Martin v. Löwisd5843682002-11-21 20:41:28 +000012090int
12091main ()
12092{
12093void* p = setgroups
12094 ;
12095 return 0;
12096}
12097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012098if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012099
Matthias Kloseb9621712010-04-24 17:59:49 +000012100$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012101
Matthias Kloseb159a552010-04-25 21:00:44 +000012102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012103$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012104else
Matthias Kloseb9621712010-04-24 17:59:49 +000012105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12106$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012107
12108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012110
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012111# check for openpty and forkpty
12112
12113for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012114do :
12115 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012116if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012117 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012118#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012119_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012120
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012121else
Matthias Kloseb9621712010-04-24 17:59:49 +000012122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12123$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012124if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012125 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012126else
Martin v. Löwis11437992002-04-12 09:54:03 +000012127 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012128LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012132/* Override any GCC internal prototype to avoid an error.
12133 Use char because int might match the return type of a GCC
12134 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012135#ifdef __cplusplus
12136extern "C"
12137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012138char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012139int
12140main ()
12141{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012142return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012143 ;
12144 return 0;
12145}
12146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012147if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012148 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012149else
Matthias Kloseb9621712010-04-24 17:59:49 +000012150 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012152rm -f core conftest.err conftest.$ac_objext \
12153 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012154LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12157$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012158if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012159 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012160 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012161else
Matthias Kloseb9621712010-04-24 17:59:49 +000012162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12163$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012164if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012165 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012166else
12167 ac_check_lib_save_LIBS=$LIBS
12168LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012170/* end confdefs.h. */
12171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012172/* Override any GCC internal prototype to avoid an error.
12173 Use char because int might match the return type of a GCC
12174 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012175#ifdef __cplusplus
12176extern "C"
12177#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012178char openpty ();
12179int
12180main ()
12181{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012182return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012183 ;
12184 return 0;
12185}
12186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012187if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012188 ac_cv_lib_bsd_openpty=yes
12189else
Matthias Kloseb9621712010-04-24 17:59:49 +000012190 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012192rm -f core conftest.err conftest.$ac_objext \
12193 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012194LIBS=$ac_check_lib_save_LIBS
12195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12197$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012198if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012200 LIBS="$LIBS -lbsd"
12201fi
12202
12203
12204fi
12205
Fred Drake8cef4cf2000-06-28 16:40:38 +000012206
12207fi
12208done
12209
12210for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012211do :
12212 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012213if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012214 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012215#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012216_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012217
Fred Drake8cef4cf2000-06-28 16:40:38 +000012218else
Matthias Kloseb9621712010-04-24 17:59:49 +000012219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12220$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012221if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012222 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012223else
Martin v. Löwis11437992002-04-12 09:54:03 +000012224 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012225LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012227/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012229/* Override any GCC internal prototype to avoid an error.
12230 Use char because int might match the return type of a GCC
12231 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012232#ifdef __cplusplus
12233extern "C"
12234#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012235char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012236int
12237main ()
12238{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012239return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012240 ;
12241 return 0;
12242}
12243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012244if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012245 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012246else
Matthias Kloseb9621712010-04-24 17:59:49 +000012247 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012249rm -f core conftest.err conftest.$ac_objext \
12250 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012251LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012252fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12254$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012255if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012256 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012257 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012258else
Matthias Kloseb9621712010-04-24 17:59:49 +000012259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12260$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012261if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012262 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012263else
12264 ac_check_lib_save_LIBS=$LIBS
12265LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012267/* end confdefs.h. */
12268
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012269/* Override any GCC internal prototype to avoid an error.
12270 Use char because int might match the return type of a GCC
12271 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012272#ifdef __cplusplus
12273extern "C"
12274#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012275char forkpty ();
12276int
12277main ()
12278{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012279return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012280 ;
12281 return 0;
12282}
12283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012284if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012285 ac_cv_lib_bsd_forkpty=yes
12286else
Matthias Kloseb9621712010-04-24 17:59:49 +000012287 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012289rm -f core conftest.err conftest.$ac_objext \
12290 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012291LIBS=$ac_check_lib_save_LIBS
12292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12294$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012295if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012296 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012297 LIBS="$LIBS -lbsd"
12298fi
12299
12300
12301fi
12302
Fred Drake8cef4cf2000-06-28 16:40:38 +000012303
12304fi
12305done
12306
Jack Jansendd19cf82001-12-06 22:36:17 +000012307
Christian Heimesb186d002008-03-18 15:15:01 +000012308# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012309for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012310do :
12311 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012312if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012313 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012314#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012315_ACEOF
12316
12317fi
12318done
12319
12320
Michael W. Hudson54241132001-12-07 15:38:26 +000012321# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012322for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012323do :
12324 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12325ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012326if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012327 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012328#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012329_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012330
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012331fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012332done
12333
Michael W. Hudson54241132001-12-07 15:38:26 +000012334
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012335ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012336if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012337 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012338
Martin v. Löwis1142de32002-03-29 16:28:31 +000012339else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012340 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012341 *" dup2.$ac_objext "* ) ;;
12342 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012343 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012344esac
12345
Martin v. Löwis1142de32002-03-29 16:28:31 +000012346fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012347
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012348ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012349if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012350 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12351
12352else
12353 case " $LIBOBJS " in
12354 *" strdup.$ac_objext "* ) ;;
12355 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12356 ;;
12357esac
12358
12359fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012360
12361
12362for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012363do :
12364 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012365if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012366 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012367#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012370/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012371#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012372int
12373main ()
12374{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012375getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012376 ;
12377 return 0;
12378}
12379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012380if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012381
Matthias Kloseb9621712010-04-24 17:59:49 +000012382$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012383
Guido van Rossum627b2d71993-12-24 10:39:16 +000012384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012386
Guido van Rossum627b2d71993-12-24 10:39:16 +000012387fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012388done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012389
Jack Jansen150753c2003-03-29 22:07:47 +000012390for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012391do :
12392 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012393if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012394 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012395#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012398/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012399#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012400int
12401main ()
12402{
12403setpgrp(0,0);
12404 ;
12405 return 0;
12406}
12407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012408if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012409
Matthias Kloseb9621712010-04-24 17:59:49 +000012410$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012411
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012414
12415fi
12416done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012417
Thomas Wouters3a584202000-08-05 23:28:51 +000012418for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012419do :
12420 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012421if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012422 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012423#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012426/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012427#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012428int
12429main ()
12430{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012431gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012432 ;
12433 return 0;
12434}
12435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012436if ac_fn_c_try_compile "$LINENO"; then :
12437
Guido van Rossum627b2d71993-12-24 10:39:16 +000012438else
Skip Montanaro6dead952003-09-25 14:50:04 +000012439
Matthias Kloseb9621712010-04-24 17:59:49 +000012440$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012441
Martin v. Löwis11437992002-04-12 09:54:03 +000012442
Guido van Rossum627b2d71993-12-24 10:39:16 +000012443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012445
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012446fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012447done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012448
Michael W. Hudson54241132001-12-07 15:38:26 +000012449
Victor Stinnere0be4232011-10-25 13:06:09 +020012450for ac_func in clock_gettime
12451do :
12452 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12453if test "x$ac_cv_func_clock_gettime" = xyes; then :
12454 cat >>confdefs.h <<_ACEOF
12455#define HAVE_CLOCK_GETTIME 1
12456_ACEOF
12457
12458else
12459
12460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12461$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12462if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12463 $as_echo_n "(cached) " >&6
12464else
12465 ac_check_lib_save_LIBS=$LIBS
12466LIBS="-lrt $LIBS"
12467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12468/* end confdefs.h. */
12469
12470/* Override any GCC internal prototype to avoid an error.
12471 Use char because int might match the return type of a GCC
12472 builtin and then its argument prototype would still apply. */
12473#ifdef __cplusplus
12474extern "C"
12475#endif
12476char clock_gettime ();
12477int
12478main ()
12479{
12480return clock_gettime ();
12481 ;
12482 return 0;
12483}
12484_ACEOF
12485if ac_fn_c_try_link "$LINENO"; then :
12486 ac_cv_lib_rt_clock_gettime=yes
12487else
12488 ac_cv_lib_rt_clock_gettime=no
12489fi
12490rm -f core conftest.err conftest.$ac_objext \
12491 conftest$ac_exeext conftest.$ac_ext
12492LIBS=$ac_check_lib_save_LIBS
12493fi
12494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12495$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12496if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12497
Victor Stinner7efb8332014-08-29 15:41:08 +020012498 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012499 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12500
12501
12502$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12503
12504
12505fi
12506
12507
12508fi
12509done
12510
12511
12512for ac_func in clock_getres
12513do :
12514 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12515if test "x$ac_cv_func_clock_getres" = xyes; then :
12516 cat >>confdefs.h <<_ACEOF
12517#define HAVE_CLOCK_GETRES 1
12518_ACEOF
12519
12520else
12521
12522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12523$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12524if ${ac_cv_lib_rt_clock_getres+:} false; then :
12525 $as_echo_n "(cached) " >&6
12526else
12527 ac_check_lib_save_LIBS=$LIBS
12528LIBS="-lrt $LIBS"
12529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12530/* end confdefs.h. */
12531
12532/* Override any GCC internal prototype to avoid an error.
12533 Use char because int might match the return type of a GCC
12534 builtin and then its argument prototype would still apply. */
12535#ifdef __cplusplus
12536extern "C"
12537#endif
12538char clock_getres ();
12539int
12540main ()
12541{
12542return clock_getres ();
12543 ;
12544 return 0;
12545}
12546_ACEOF
12547if ac_fn_c_try_link "$LINENO"; then :
12548 ac_cv_lib_rt_clock_getres=yes
12549else
12550 ac_cv_lib_rt_clock_getres=no
12551fi
12552rm -f core conftest.err conftest.$ac_objext \
12553 conftest$ac_exeext conftest.$ac_ext
12554LIBS=$ac_check_lib_save_LIBS
12555fi
12556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12557$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12558if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12559
12560 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12561
12562
12563fi
12564
12565
12566fi
12567done
12568
12569
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012570for ac_func in clock_settime
12571do :
12572 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12573if test "x$ac_cv_func_clock_settime" = xyes; then :
12574 cat >>confdefs.h <<_ACEOF
12575#define HAVE_CLOCK_SETTIME 1
12576_ACEOF
12577
12578else
12579
12580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12581$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12582if ${ac_cv_lib_rt_clock_settime+:} false; then :
12583 $as_echo_n "(cached) " >&6
12584else
12585 ac_check_lib_save_LIBS=$LIBS
12586LIBS="-lrt $LIBS"
12587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12588/* end confdefs.h. */
12589
12590/* Override any GCC internal prototype to avoid an error.
12591 Use char because int might match the return type of a GCC
12592 builtin and then its argument prototype would still apply. */
12593#ifdef __cplusplus
12594extern "C"
12595#endif
12596char clock_settime ();
12597int
12598main ()
12599{
12600return clock_settime ();
12601 ;
12602 return 0;
12603}
12604_ACEOF
12605if ac_fn_c_try_link "$LINENO"; then :
12606 ac_cv_lib_rt_clock_settime=yes
12607else
12608 ac_cv_lib_rt_clock_settime=no
12609fi
12610rm -f core conftest.err conftest.$ac_objext \
12611 conftest$ac_exeext conftest.$ac_ext
12612LIBS=$ac_check_lib_save_LIBS
12613fi
12614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12615$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12616if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12617
12618 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12619
12620
12621fi
12622
12623
12624fi
12625done
12626
12627
Matthias Kloseb9621712010-04-24 17:59:49 +000012628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12629$as_echo_n "checking for major... " >&6; }
12630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012631/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012632
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012633#if defined(MAJOR_IN_MKDEV)
12634#include <sys/mkdev.h>
12635#elif defined(MAJOR_IN_SYSMACROS)
12636#include <sys/sysmacros.h>
12637#else
12638#include <sys/types.h>
12639#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012640
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012641int
12642main ()
12643{
12644
12645 makedev(major(0),minor(0));
12646
12647 ;
12648 return 0;
12649}
12650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012651if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012652
12653
Matthias Kloseb9621712010-04-24 17:59:49 +000012654$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012655
Matthias Kloseb9621712010-04-24 17:59:49 +000012656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12657$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012658
12659else
Skip Montanaro6dead952003-09-25 14:50:04 +000012660
Matthias Kloseb9621712010-04-24 17:59:49 +000012661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12662$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012663
12664fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012665rm -f core conftest.err conftest.$ac_objext \
12666 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012667
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012668# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12669# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12671$as_echo_n "checking for if_nameindex... " >&6; }
12672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12673/* end confdefs.h. */
12674
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012675#include <stdio.h>
12676#ifdef STDC_HEADERS
12677# include <stdlib.h>
12678# include <stddef.h>
12679#else
12680# ifdef HAVE_STDLIB_H
12681# include <stdlib.h>
12682# endif
12683#endif
12684#ifdef HAVE_SYS_SOCKET_H
12685# include <sys/socket.h>
12686#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012687#ifdef HAVE_NET_IF_H
12688# include <net/if.h>
12689#endif
12690
12691int
12692main ()
12693{
12694struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12695 ;
12696 return 0;
12697}
12698_ACEOF
12699if ac_fn_c_try_link "$LINENO"; then :
12700
12701$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12702
12703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12704$as_echo "yes" >&6; }
12705else
12706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12707$as_echo "no" >&6; }
12708
12709fi
12710rm -f core conftest.err conftest.$ac_objext \
12711 conftest$ac_exeext conftest.$ac_ext
12712
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012713# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12714# macro is not defined in android-ndk-r13.
12715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12716$as_echo_n "checking for lockf... " >&6; }
12717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12718/* end confdefs.h. */
12719#include <unistd.h>
12720int
12721main ()
12722{
12723lockf(0, F_LOCK, 0);
12724 ;
12725 return 0;
12726}
12727_ACEOF
12728if ac_fn_c_try_link "$LINENO"; then :
12729
12730$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12731
12732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12733$as_echo "yes" >&6; }
12734else
12735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12736$as_echo "no" >&6; }
12737
12738fi
12739rm -f core conftest.err conftest.$ac_objext \
12740 conftest$ac_exeext conftest.$ac_ext
12741
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012742# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012743# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12745$as_echo_n "checking for getaddrinfo... " >&6; }
12746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012747/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012748
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012749#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012750#include <sys/socket.h>
12751#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012752#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012753
Martin v. Löwis11437992002-04-12 09:54:03 +000012754int
12755main ()
12756{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012757getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012758 ;
12759 return 0;
12760}
12761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012762if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012763 have_getaddrinfo=yes
12764else
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012766fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012767rm -f core conftest.err conftest.$ac_objext \
12768 conftest$ac_exeext conftest.$ac_ext
12769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12770$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012771if test $have_getaddrinfo = yes
12772then
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12774$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012775 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012776 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012777else
Matthias Kloseb9621712010-04-24 17:59:49 +000012778 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012779
12780if test "${enable_ipv6+set}" = set; then
12781 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12782else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012783 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012784fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012785else
Matthias Kloseb9621712010-04-24 17:59:49 +000012786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012787/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012788
Stefan Krah19c21392012-11-22 23:47:32 +010012789#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012790#include <sys/types.h>
12791#include <netdb.h>
12792#include <string.h>
12793#include <sys/socket.h>
12794#include <netinet/in.h>
12795
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012796int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012797{
12798 int passive, gaierr, inet4 = 0, inet6 = 0;
12799 struct addrinfo hints, *ai, *aitop;
12800 char straddr[INET6_ADDRSTRLEN], strport[16];
12801
12802 for (passive = 0; passive <= 1; passive++) {
12803 memset(&hints, 0, sizeof(hints));
12804 hints.ai_family = AF_UNSPEC;
12805 hints.ai_flags = passive ? AI_PASSIVE : 0;
12806 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012807 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012808 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12809 (void)gai_strerror(gaierr);
12810 goto bad;
12811 }
12812 for (ai = aitop; ai; ai = ai->ai_next) {
12813 if (ai->ai_addr == NULL ||
12814 ai->ai_addrlen == 0 ||
12815 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12816 straddr, sizeof(straddr), strport, sizeof(strport),
12817 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12818 goto bad;
12819 }
12820 switch (ai->ai_family) {
12821 case AF_INET:
12822 if (strcmp(strport, "54321") != 0) {
12823 goto bad;
12824 }
12825 if (passive) {
12826 if (strcmp(straddr, "0.0.0.0") != 0) {
12827 goto bad;
12828 }
12829 } else {
12830 if (strcmp(straddr, "127.0.0.1") != 0) {
12831 goto bad;
12832 }
12833 }
12834 inet4++;
12835 break;
12836 case AF_INET6:
12837 if (strcmp(strport, "54321") != 0) {
12838 goto bad;
12839 }
12840 if (passive) {
12841 if (strcmp(straddr, "::") != 0) {
12842 goto bad;
12843 }
12844 } else {
12845 if (strcmp(straddr, "::1") != 0) {
12846 goto bad;
12847 }
12848 }
12849 inet6++;
12850 break;
12851 case AF_UNSPEC:
12852 goto bad;
12853 break;
12854 default:
12855 /* another family support? */
12856 break;
12857 }
12858 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012859 freeaddrinfo(aitop);
12860 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012861 }
12862
12863 if (!(inet4 == 0 || inet4 == 2))
12864 goto bad;
12865 if (!(inet6 == 0 || inet6 == 2))
12866 goto bad;
12867
12868 if (aitop)
12869 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012870 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012871
12872 bad:
12873 if (aitop)
12874 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012875 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012876}
12877
Martin v. Löwis11437992002-04-12 09:54:03 +000012878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012879if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012880 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012881else
Matthias Kloseb9621712010-04-24 17:59:49 +000012882 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012883fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12885 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012887
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012888fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012889
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012891
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12893$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12894
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012895if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012896then
12897 if test $ipv6 = yes
12898 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012899 echo 'Fatal: You must get working getaddrinfo() function.'
12900 echo ' or you can specify "--disable-ipv6"'.
12901 exit 1
12902 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012903else
Martin v. Löwis11437992002-04-12 09:54:03 +000012904
Matthias Kloseb9621712010-04-24 17:59:49 +000012905$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012906
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012907fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012908
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012909for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012910do :
12911 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012912if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012913 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012914#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012915_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012916
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012917fi
12918done
12919
Michael W. Hudson54241132001-12-07 15:38:26 +000012920
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012921# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12923$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012924if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012925 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012926else
Matthias Kloseb9621712010-04-24 17:59:49 +000012927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012928/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012929#include <sys/types.h>
12930#include <sys/time.h>
12931#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012932
Martin v. Löwis11437992002-04-12 09:54:03 +000012933int
12934main ()
12935{
12936if ((struct tm *) 0)
12937return 0;
12938 ;
12939 return 0;
12940}
12941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012942if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012943 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012944else
Matthias Kloseb9621712010-04-24 17:59:49 +000012945 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012948fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12950$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012951if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012952
Matthias Kloseb9621712010-04-24 17:59:49 +000012953$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012954
12955fi
12956
Matthias Kloseb9621712010-04-24 17:59:49 +000012957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12958$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012959if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012960 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012961else
Matthias Kloseb9621712010-04-24 17:59:49 +000012962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012963/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012964#include <sys/types.h>
12965#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012966
Martin v. Löwis11437992002-04-12 09:54:03 +000012967int
12968main ()
12969{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012970struct tm tm;
12971 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012972 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012973 ;
12974 return 0;
12975}
12976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012977if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012978 ac_cv_struct_tm=time.h
12979else
Matthias Kloseb9621712010-04-24 17:59:49 +000012980 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012983fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12985$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012986if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012987
Matthias Kloseb9621712010-04-24 17:59:49 +000012988$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012989
12990fi
12991
Matthias Kloseb9621712010-04-24 17:59:49 +000012992ac_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 +000012993#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012994
Matthias Kloseb9621712010-04-24 17:59:49 +000012995"
Victor Stinnere0be4232011-10-25 13:06:09 +020012996if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012997
12998cat >>confdefs.h <<_ACEOF
12999#define HAVE_STRUCT_TM_TM_ZONE 1
13000_ACEOF
13001
13002
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013003fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013004
Martin v. Löwis11437992002-04-12 09:54:03 +000013005if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13006
Matthias Kloseb9621712010-04-24 17:59:49 +000013007$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013008
13009else
Matthias Kloseb9621712010-04-24 17:59:49 +000013010 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13011"
Victor Stinnere0be4232011-10-25 13:06:09 +020013012if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013013 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013014else
Matthias Kloseb9621712010-04-24 17:59:49 +000013015 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013016fi
13017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013018cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013019#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013020_ACEOF
13021
Matthias Kloseb9621712010-04-24 17:59:49 +000013022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13023$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013024if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013025 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013026else
Matthias Kloseb9621712010-04-24 17:59:49 +000013027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013028/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013029#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013030#if !HAVE_DECL_TZNAME
13031extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013033
Martin v. Löwis11437992002-04-12 09:54:03 +000013034int
13035main ()
13036{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013037return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013038 ;
13039 return 0;
13040}
13041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013042if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013043 ac_cv_var_tzname=yes
13044else
Matthias Kloseb9621712010-04-24 17:59:49 +000013045 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013047rm -f core conftest.err conftest.$ac_objext \
13048 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013049fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13051$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013052 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013053
Matthias Kloseb9621712010-04-24 17:59:49 +000013054$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013055
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013056 fi
13057fi
13058
Matthias Kloseb9621712010-04-24 17:59:49 +000013059ac_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 +020013060if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013061
13062cat >>confdefs.h <<_ACEOF
13063#define HAVE_STRUCT_STAT_ST_RDEV 1
13064_ACEOF
13065
13066
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013067fi
13068
Matthias Kloseb9621712010-04-24 17:59:49 +000013069ac_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 +020013070if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013071
Martin v. Löwis11437992002-04-12 09:54:03 +000013072cat >>confdefs.h <<_ACEOF
13073#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13074_ACEOF
13075
13076
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013077fi
13078
Matthias Kloseb9621712010-04-24 17:59:49 +000013079ac_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 +020013080if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013081
13082cat >>confdefs.h <<_ACEOF
13083#define HAVE_STRUCT_STAT_ST_FLAGS 1
13084_ACEOF
13085
13086
13087fi
13088
Matthias Kloseb9621712010-04-24 17:59:49 +000013089ac_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 +020013090if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013091
13092cat >>confdefs.h <<_ACEOF
13093#define HAVE_STRUCT_STAT_ST_GEN 1
13094_ACEOF
13095
13096
13097fi
13098
Matthias Kloseb9621712010-04-24 17:59:49 +000013099ac_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 +020013100if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013101
13102cat >>confdefs.h <<_ACEOF
13103#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13104_ACEOF
13105
13106
13107fi
13108
Matthias Kloseb9621712010-04-24 17:59:49 +000013109ac_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 +020013110if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013111
Martin v. Löwis11437992002-04-12 09:54:03 +000013112cat >>confdefs.h <<_ACEOF
13113#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13114_ACEOF
13115
13116
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013117fi
13118
Stefan Krah267b6392016-04-26 01:09:18 +020013119ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13120 #include <sys/types.h>
13121 #include <pwd.h>
13122
13123"
13124if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13125
13126cat >>confdefs.h <<_ACEOF
13127#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13128_ACEOF
13129
13130
13131fi
13132ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13133 #include <sys/types.h>
13134 #include <pwd.h>
13135
13136"
13137if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13138
13139cat >>confdefs.h <<_ACEOF
13140#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13141_ACEOF
13142
13143
13144fi
13145
Zachary Ware6a6967e2016-10-01 00:47:27 -050013146# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13147ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13148"
13149if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13150
13151cat >>confdefs.h <<_ACEOF
13152#define HAVE_SIGINFO_T_SI_BAND 1
13153_ACEOF
13154
13155
13156fi
13157
Michael W. Hudson54241132001-12-07 15:38:26 +000013158
Matthias Kloseb9621712010-04-24 17:59:49 +000013159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13160$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013161if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013162 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013163else
Matthias Kloseb159a552010-04-25 21:00:44 +000013164
Matthias Kloseb9621712010-04-24 17:59:49 +000013165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013166/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013167#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013168int
13169main ()
13170{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013171return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013172 ;
13173 return 0;
13174}
13175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013176if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013177 ac_cv_header_time_altzone=yes
13178else
Matthias Kloseb9621712010-04-24 17:59:49 +000013179 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013183fi
13184
Matthias Kloseb9621712010-04-24 17:59:49 +000013185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13186$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013187if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013188
Matthias Kloseb9621712010-04-24 17:59:49 +000013189$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013190
13191fi
13192
Guido van Rossumda88dad1995-01-26 00:46:29 +000013193was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13195$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013197/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013198
13199#include <sys/types.h>
13200#include <sys/select.h>
13201#include <sys/time.h>
13202
Martin v. Löwis11437992002-04-12 09:54:03 +000013203int
13204main ()
13205{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013206;
Martin v. Löwis11437992002-04-12 09:54:03 +000013207 ;
13208 return 0;
13209}
13210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013211if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013212
13213
Matthias Kloseb9621712010-04-24 17:59:49 +000013214$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013215
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013216 was_it_defined=yes
13217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13221$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013222
Matthias Kloseb9621712010-04-24 17:59:49 +000013223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13224$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013225if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013226 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013227else
Matthias Kloseb9621712010-04-24 17:59:49 +000013228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013229/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013230#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013231int
13232main ()
13233{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013234struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013235 ;
13236 return 0;
13237}
13238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013239if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013240 ac_cv_struct_addrinfo=yes
13241else
Matthias Kloseb9621712010-04-24 17:59:49 +000013242 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13245fi
13246
Matthias Kloseb9621712010-04-24 17:59:49 +000013247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13248$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013249if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013250
Matthias Kloseb9621712010-04-24 17:59:49 +000013251$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013252
13253fi
13254
Matthias Kloseb9621712010-04-24 17:59:49 +000013255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13256$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013257if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013258 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013259else
Matthias Kloseb9621712010-04-24 17:59:49 +000013260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013261/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013262
13263# include <sys/types.h>
13264# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013265int
13266main ()
13267{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013268struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013269 ;
13270 return 0;
13271}
13272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013273if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013274 ac_cv_struct_sockaddr_storage=yes
13275else
Matthias Kloseb9621712010-04-24 17:59:49 +000013276 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13279fi
13280
Matthias Kloseb9621712010-04-24 17:59:49 +000013281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13282$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013283if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013284
Matthias Kloseb9621712010-04-24 17:59:49 +000013285$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013286
13287fi
13288
Christian Heimesdffa3942016-09-05 23:54:41 +020013289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13290$as_echo_n "checking for sockaddr_alg... " >&6; }
13291if ${ac_cv_struct_sockaddr_alg+:} false; then :
13292 $as_echo_n "(cached) " >&6
13293else
13294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13295/* end confdefs.h. */
13296
13297# include <sys/types.h>
13298# include <sys/socket.h>
13299# include <linux/if_alg.h>
13300int
13301main ()
13302{
13303struct sockaddr_alg s
13304 ;
13305 return 0;
13306}
13307_ACEOF
13308if ac_fn_c_try_compile "$LINENO"; then :
13309 ac_cv_struct_sockaddr_alg=yes
13310else
13311 ac_cv_struct_sockaddr_alg=no
13312fi
13313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13314fi
13315
13316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13317$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13318if test $ac_cv_struct_sockaddr_alg = yes; then
13319
13320$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13321
13322fi
13323
Guido van Rossum627b2d71993-12-24 10:39:16 +000013324# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013325
Matthias Kloseb9621712010-04-24 17:59:49 +000013326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13327$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013328if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013329 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013330else
Matthias Kloseb9621712010-04-24 17:59:49 +000013331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013333$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013334int
13335main ()
13336{
13337static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013338test_array [0] = 0;
13339return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013340
13341 ;
13342 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013343}
Martin v. Löwis11437992002-04-12 09:54:03 +000013344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013345if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013346 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013347else
Matthias Kloseb9621712010-04-24 17:59:49 +000013348 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013351fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13353$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013354if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013355 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013356
13357fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013358
Matthias Kloseb9621712010-04-24 17:59:49 +000013359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13360$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013361if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013362 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013363else
Matthias Kloseb9621712010-04-24 17:59:49 +000013364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013365/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013366
Martin v. Löwis11437992002-04-12 09:54:03 +000013367int
13368main ()
13369{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013370
Martin v. Löwis11437992002-04-12 09:54:03 +000013371#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013372 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013373 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013374 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013375 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013376 char const *const *pcpcc;
13377 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013378 /* NEC SVR4.0.2 mips cc rejects this. */
13379 struct point {int x, y;};
13380 static struct point const zero = {0,0};
13381 /* AIX XL C 1.02.0.0 rejects this.
13382 It does not let you subtract one const X* pointer from another in
13383 an arm of an if-expression whose if-part is not a constant
13384 expression */
13385 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013386 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013387 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013388 ++pcpcc;
13389 ppc = (char**) pcpcc;
13390 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013391 { /* SCO 3.2v4 cc rejects this sort of thing. */
13392 char tx;
13393 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013394 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013395
Martin v. Löwis11437992002-04-12 09:54:03 +000013396 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013397 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013398 }
13399 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13400 int x[] = {25, 17};
13401 const int *foo = &x[0];
13402 ++foo;
13403 }
13404 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13405 typedef const int *iptr;
13406 iptr p = 0;
13407 ++p;
13408 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013409 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013410 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013411 struct s { int j; const int *ap[3]; } bx;
13412 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013413 }
13414 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13415 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013416 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013417 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013418 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013419#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013420
Martin v. Löwis11437992002-04-12 09:54:03 +000013421 ;
13422 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013423}
Martin v. Löwis11437992002-04-12 09:54:03 +000013424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013425if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013426 ac_cv_c_const=yes
13427else
Matthias Kloseb9621712010-04-24 17:59:49 +000013428 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013431fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13433$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013434if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013435
Matthias Kloseb9621712010-04-24 17:59:49 +000013436$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013437
13438fi
13439
Michael W. Hudson54241132001-12-07 15:38:26 +000013440
Guido van Rossumda88dad1995-01-26 00:46:29 +000013441works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13443$as_echo_n "checking for working volatile... " >&6; }
13444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013445/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013446
Martin v. Löwis11437992002-04-12 09:54:03 +000013447int
13448main ()
13449{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013450volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013451 ;
13452 return 0;
13453}
13454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013455if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013456 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013457else
Skip Montanaro6dead952003-09-25 14:50:04 +000013458
Matthias Kloseb9621712010-04-24 17:59:49 +000013459$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013460
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013461
Guido van Rossum627b2d71993-12-24 10:39:16 +000013462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13465$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +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 signed char" >&5
13469$as_echo_n "checking for working signed char... " >&6; }
13470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013471/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013472
Martin v. Löwis11437992002-04-12 09:54:03 +000013473int
13474main ()
13475{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013476signed char c;
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 Rossumdabb11b1994-10-11 15:04:27 +000013483else
Skip Montanaro6dead952003-09-25 14:50:04 +000013484
Matthias Kloseb9621712010-04-24 17:59:49 +000013485$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013486
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013487
Guido van Rossum7f43da71994-08-01 12:15:30 +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 +000013493have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13495$as_echo_n "checking for prototypes... " >&6; }
13496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013497/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013498int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013499int
13500main ()
13501{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013502return foo(10);
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 :
Martin v. Löwis11437992002-04-12 09:54:03 +000013508
Matthias Kloseb9621712010-04-24 17:59:49 +000013509$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013510
Matthias Kloseb159a552010-04-25 21:00:44 +000013511 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013512fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13515$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013516
Guido van Rossumda88dad1995-01-26 00:46:29 +000013517works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13519$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013521/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013522
13523#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013524int foo(int x, ...) {
13525 va_list va;
13526 va_start(va, x);
13527 va_arg(va, int);
13528 va_arg(va, char *);
13529 va_arg(va, double);
13530 return 0;
13531}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013532
Martin v. Löwis11437992002-04-12 09:54:03 +000013533int
13534main ()
13535{
Guido van Rossum90eea071996-08-30 20:58:57 +000013536return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013537 ;
13538 return 0;
13539}
13540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013541if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013542
13543
Matthias Kloseb9621712010-04-24 17:59:49 +000013544$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013545
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013546 works=yes
13547
Guido van Rossum627b2d71993-12-24 10:39:16 +000013548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13551$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013552
Martin v. Löwisd6320502004-08-12 13:45:08 +000013553# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13555$as_echo_n "checking for socketpair... " >&6; }
13556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013557/* end confdefs.h. */
13558
13559#include <sys/types.h>
13560#include <sys/socket.h>
13561
13562int
13563main ()
13564{
13565void *x=socketpair
13566 ;
13567 return 0;
13568}
13569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013570if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013571
Matthias Kloseb9621712010-04-24 17:59:49 +000013572$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013573
Matthias Kloseb159a552010-04-25 21:00:44 +000013574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013575$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013576else
Matthias Kloseb9621712010-04-24 17:59:49 +000013577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13578$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013579
13580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013582
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013583# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13585$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013587/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013588#include <sys/types.h>
13589#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013590int
13591main ()
13592{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013593struct sockaddr x;
13594x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013595 ;
13596 return 0;
13597}
13598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013599if ac_fn_c_try_compile "$LINENO"; then :
13600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13601$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013602
Matthias Kloseb9621712010-04-24 17:59:49 +000013603$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013604
13605else
Matthias Kloseb9621712010-04-24 17:59:49 +000013606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13607$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013608
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013609fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013611
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013612# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013613
13614
Matthias Kloseb9621712010-04-24 17:59:49 +000013615ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013616if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013617
Matthias Kloseb9621712010-04-24 17:59:49 +000013618 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013619
Matthias Kloseb9621712010-04-24 17:59:49 +000013620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13621$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013622 OLD_CFLAGS=$CFLAGS
13623 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013625/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013626
13627# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013628
Martin v. Löwis11437992002-04-12 09:54:03 +000013629int
13630main ()
13631{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013632
13633 char *name;
13634 struct hostent *he, *res;
13635 char buffer[2048];
13636 int buflen = 2048;
13637 int h_errnop;
13638
13639 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013640
13641 ;
13642 return 0;
13643}
13644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013645if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013646
Matthias Kloseb9621712010-04-24 17:59:49 +000013647 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013648
Martin v. Löwis11437992002-04-12 09:54:03 +000013649
Matthias Kloseb9621712010-04-24 17:59:49 +000013650$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013651
Matthias Kloseb9621712010-04-24 17:59:49 +000013652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13653$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013654
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013655else
Skip Montanaro6dead952003-09-25 14:50:04 +000013656
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13658$as_echo "no" >&6; }
13659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13660$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013662/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013663
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013664# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013665
Martin v. Löwis11437992002-04-12 09:54:03 +000013666int
13667main ()
13668{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013669
13670 char *name;
13671 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013672 char buffer[2048];
13673 int buflen = 2048;
13674 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013675
Matthias Kloseb159a552010-04-25 21:00:44 +000013676 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013677
13678 ;
13679 return 0;
13680}
13681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013682if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013683
Matthias Kloseb9621712010-04-24 17:59:49 +000013684 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013685
Martin v. Löwis11437992002-04-12 09:54:03 +000013686
Matthias Kloseb159a552010-04-25 21:00:44 +000013687$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013688
Matthias Kloseb9621712010-04-24 17:59:49 +000013689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13690$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013691
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013692else
Skip Montanaro6dead952003-09-25 14:50:04 +000013693
Matthias Kloseb9621712010-04-24 17:59:49 +000013694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13695$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13697$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13699/* end confdefs.h. */
13700
13701# include <netdb.h>
13702
13703int
13704main ()
13705{
13706
13707 char *name;
13708 struct hostent *he;
13709 struct hostent_data data;
13710
13711 (void) gethostbyname_r(name, he, &data);
13712
13713 ;
13714 return 0;
13715}
13716_ACEOF
13717if ac_fn_c_try_compile "$LINENO"; then :
13718
13719 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13720
13721
13722$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13723
13724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13725$as_echo "yes" >&6; }
13726
13727else
13728
13729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13730$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013731
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013732fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013734
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013737
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013738fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013740 CFLAGS=$OLD_CFLAGS
13741
13742else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013743
Matthias Kloseb9621712010-04-24 17:59:49 +000013744 for ac_func in gethostbyname
13745do :
13746 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013747if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013748 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013749#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013750_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013751
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013752fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013753done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013754
Michael W. Hudson54241132001-12-07 15:38:26 +000013755
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013756fi
13757
Michael W. Hudson54241132001-12-07 15:38:26 +000013758
13759
13760
13761
13762
13763
Guido van Rossum627b2d71993-12-24 10:39:16 +000013764# checks for system services
13765# (none yet)
13766
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013767# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013768ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013769if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013770
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013771else
Matthias Kloseb9621712010-04-24 17:59:49 +000013772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13773$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013774if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013775 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013776else
Martin v. Löwis11437992002-04-12 09:54:03 +000013777 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013778LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013782/* Override any GCC internal prototype to avoid an error.
13783 Use char because int might match the return type of a GCC
13784 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013785#ifdef __cplusplus
13786extern "C"
13787#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013788char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013789int
13790main ()
13791{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013792return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013793 ;
13794 return 0;
13795}
13796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013797if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013798 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013799else
Matthias Kloseb9621712010-04-24 17:59:49 +000013800 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013802rm -f core conftest.err conftest.$ac_objext \
13803 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013804LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013805fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13807$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013808if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013809 cat >>confdefs.h <<_ACEOF
13810#define HAVE_LIBIEEE 1
13811_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013812
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013813 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013814
Guido van Rossum627b2d71993-12-24 10:39:16 +000013815fi
13816
Michael W. Hudson54241132001-12-07 15:38:26 +000013817
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013818fi
13819
Michael W. Hudson54241132001-12-07 15:38:26 +000013820
Guido van Rossum7f253911997-05-09 02:42:48 +000013821# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13823$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013825# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013826if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013827 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013828if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013829then
13830
Matthias Kloseb9621712010-04-24 17:59:49 +000013831$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013832
Matthias Kloseb9621712010-04-24 17:59:49 +000013833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13834$as_echo "yes" >&6; }
13835else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13836$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013837fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013838else
Matthias Kloseb9621712010-04-24 17:59:49 +000013839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13840$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013841fi
13842
Guido van Rossum7f253911997-05-09 02:42:48 +000013843
Guido van Rossum7f43da71994-08-01 12:15:30 +000013844# check for --with-libm=...
13845
Guido van Rossum563e7081996-09-10 18:20:48 +000013846case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013847Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013848*) LIBM=-lm
13849esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13851$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013853# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013854if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013855 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013856if test "$withval" = no
13857then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13859$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013860elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013861then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13863$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013864else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013865fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013866else
Matthias Kloseb9621712010-04-24 17:59:49 +000013867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13868$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013869fi
13870
Guido van Rossum7f43da71994-08-01 12:15:30 +000013871
13872# check for --with-libc=...
13873
Matthias Kloseb9621712010-04-24 17:59:49 +000013874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13875$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013876
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013877# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013878if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013879 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013880if test "$withval" = no
13881then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13883$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013884elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013885then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13887$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013888else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013889fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013890else
Matthias Kloseb9621712010-04-24 17:59:49 +000013891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13892$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013893fi
13894
Guido van Rossum7f43da71994-08-01 12:15:30 +000013895
Stefan Krah1919b7e2012-03-21 18:25:23 +010013896# **************************************
13897# * Check for gcc x64 inline assembler *
13898# **************************************
13899
13900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13901$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13903/* end confdefs.h. */
13904
13905int
13906main ()
13907{
13908
13909 __asm__ __volatile__ ("movq %rcx, %rax");
13910
13911 ;
13912 return 0;
13913}
13914_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013915if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013916 have_gcc_asm_for_x64=yes
13917else
13918 have_gcc_asm_for_x64=no
13919fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013920rm -f core conftest.err conftest.$ac_objext \
13921 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13923$as_echo "$have_gcc_asm_for_x64" >&6; }
13924if test "$have_gcc_asm_for_x64" = yes
13925then
13926
13927$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13928
13929fi
13930
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013931# **************************************************
13932# * Check for various properties of floating point *
13933# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013934
Matthias Kloseb9621712010-04-24 17:59:49 +000013935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13936$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013937if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013938 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013939else
13940
Matthias Kloseb9621712010-04-24 17:59:49 +000013941if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013942 ac_cv_little_endian_double=no
13943else
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013945/* end confdefs.h. */
13946
13947#include <string.h>
13948int main() {
13949 double x = 9006104071832581.0;
13950 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13951 return 0;
13952 else
13953 return 1;
13954}
13955
13956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013957if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013958 ac_cv_little_endian_double=yes
13959else
Matthias Kloseb9621712010-04-24 17:59:49 +000013960 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013961fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13963 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013964fi
13965
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013966fi
13967
Matthias Kloseb9621712010-04-24 17:59:49 +000013968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13969$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013970if test "$ac_cv_little_endian_double" = yes
13971then
13972
Matthias Kloseb9621712010-04-24 17:59:49 +000013973$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013974
13975fi
13976
Matthias Kloseb9621712010-04-24 17:59:49 +000013977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13978$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013979if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013980 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013981else
13982
Matthias Kloseb9621712010-04-24 17:59:49 +000013983if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013984 ac_cv_big_endian_double=no
13985else
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013987/* end confdefs.h. */
13988
13989#include <string.h>
13990int main() {
13991 double x = 9006104071832581.0;
13992 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13993 return 0;
13994 else
13995 return 1;
13996}
13997
13998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013999if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014000 ac_cv_big_endian_double=yes
14001else
Matthias Kloseb9621712010-04-24 17:59:49 +000014002 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014003fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014004rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14005 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014006fi
14007
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014008fi
14009
Matthias Kloseb9621712010-04-24 17:59:49 +000014010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
14011$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014012if test "$ac_cv_big_endian_double" = yes
14013then
14014
Matthias Kloseb9621712010-04-24 17:59:49 +000014015$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014016
14017fi
14018
14019# Some ARM platforms use a mixed-endian representation for doubles.
14020# While Python doesn't currently have full support for these platforms
14021# (see e.g., issue 1762561), we can at least make sure that float <-> string
14022# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14024$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014025if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014026 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014027else
14028
Matthias Kloseb9621712010-04-24 17:59:49 +000014029if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014030 ac_cv_mixed_endian_double=no
14031else
Matthias Kloseb9621712010-04-24 17:59:49 +000014032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014033/* end confdefs.h. */
14034
14035#include <string.h>
14036int main() {
14037 double x = 9006104071832581.0;
14038 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14039 return 0;
14040 else
14041 return 1;
14042}
14043
14044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014045if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014046 ac_cv_mixed_endian_double=yes
14047else
Matthias Kloseb9621712010-04-24 17:59:49 +000014048 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014049fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014050rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14051 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014052fi
14053
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014054fi
14055
Matthias Kloseb9621712010-04-24 17:59:49 +000014056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14057$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014058if test "$ac_cv_mixed_endian_double" = yes
14059then
14060
Matthias Kloseb9621712010-04-24 17:59:49 +000014061$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014062
14063fi
14064
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014065# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014066# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014067# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014068# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014069# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014070# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014071
14072# This inline assembler syntax may also work for suncc and icc,
14073# so we try it on all platforms.
14074
Matthias Kloseb9621712010-04-24 17:59:49 +000014075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14076$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014078/* end confdefs.h. */
14079
14080int
14081main ()
14082{
14083
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014084 unsigned short cw;
14085 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14086 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014087
14088 ;
14089 return 0;
14090}
14091_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014092if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014093 have_gcc_asm_for_x87=yes
14094else
Matthias Kloseb9621712010-04-24 17:59:49 +000014095 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014096fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014097rm -f core conftest.err conftest.$ac_objext \
14098 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14100$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014101if test "$have_gcc_asm_for_x87" = yes
14102then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014103
Matthias Kloseb9621712010-04-24 17:59:49 +000014104$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014105
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014106fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014107
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14109$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14111/* end confdefs.h. */
14112
14113int
14114main ()
14115{
14116
14117 unsigned int fpcr;
14118 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14119 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14120
14121 ;
14122 return 0;
14123}
14124_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014125if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014126 have_gcc_asm_for_mc68881=yes
14127else
14128 have_gcc_asm_for_mc68881=no
14129fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014130rm -f core conftest.err conftest.$ac_objext \
14131 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14133$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14134if test "$have_gcc_asm_for_mc68881" = yes
14135then
14136
14137$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14138
14139fi
14140
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014141# Detect whether system arithmetic is subject to x87-style double
14142# rounding issues. The result of this test has little meaning on non
14143# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14144# mode is round-to-nearest and double rounding issues are present, and
14145# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14147$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014148# $BASECFLAGS may affect the result
14149ac_save_cc="$CC"
14150CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014151if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014152 ac_cv_x87_double_rounding=no
14153else
Matthias Kloseb9621712010-04-24 17:59:49 +000014154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014155/* end confdefs.h. */
14156
14157#include <stdlib.h>
14158#include <math.h>
14159int main() {
14160 volatile double x, y, z;
14161 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14162 x = 0.99999999999999989; /* 1-2**-53 */
14163 y = 1./x;
14164 if (y != 1.)
14165 exit(0);
14166 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14167 x = 1e16;
14168 y = 2.99999;
14169 z = x + y;
14170 if (z != 1e16+4.)
14171 exit(0);
14172 /* both tests show evidence of double rounding */
14173 exit(1);
14174}
14175
14176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014177if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014178 ac_cv_x87_double_rounding=no
14179else
Matthias Kloseb9621712010-04-24 17:59:49 +000014180 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014182rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14183 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014184fi
14185
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014186CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14188$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014189if test "$ac_cv_x87_double_rounding" = yes
14190then
14191
Matthias Kloseb9621712010-04-24 17:59:49 +000014192$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014193
14194fi
14195
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014196# ************************************
14197# * Check for mathematical functions *
14198# ************************************
14199
14200LIBS_SAVE=$LIBS
14201LIBS="$LIBS $LIBM"
14202
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014203for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14204do :
14205 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14206ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014207if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014208 cat >>confdefs.h <<_ACEOF
14209#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14210_ACEOF
14211
14212fi
14213done
14214
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014215for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014216do :
14217 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14218ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014219if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014220 cat >>confdefs.h <<_ACEOF
14221#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14222_ACEOF
14223
14224fi
14225done
14226
14227ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14228"
Victor Stinnere0be4232011-10-25 13:06:09 +020014229if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014230 ac_have_decl=1
14231else
14232 ac_have_decl=0
14233fi
14234
14235cat >>confdefs.h <<_ACEOF
14236#define HAVE_DECL_ISINF $ac_have_decl
14237_ACEOF
14238ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14239"
Victor Stinnere0be4232011-10-25 13:06:09 +020014240if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014241 ac_have_decl=1
14242else
14243 ac_have_decl=0
14244fi
14245
14246cat >>confdefs.h <<_ACEOF
14247#define HAVE_DECL_ISNAN $ac_have_decl
14248_ACEOF
14249ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14250"
Victor Stinnere0be4232011-10-25 13:06:09 +020014251if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014252 ac_have_decl=1
14253else
14254 ac_have_decl=0
14255fi
14256
14257cat >>confdefs.h <<_ACEOF
14258#define HAVE_DECL_ISFINITE $ac_have_decl
14259_ACEOF
14260
14261
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014262# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14263# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14265$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014266if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014267 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014268else
14269
Matthias Kloseb9621712010-04-24 17:59:49 +000014270if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014271 ac_cv_tanh_preserves_zero_sign=no
14272else
Matthias Kloseb9621712010-04-24 17:59:49 +000014273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014274/* end confdefs.h. */
14275
14276#include <math.h>
14277#include <stdlib.h>
14278int main() {
14279 /* return 0 if either negative zeros don't exist
14280 on this platform or if negative zeros exist
14281 and tanh(-0.) == -0. */
14282 if (atan2(0., -1.) == atan2(-0., -1.) ||
14283 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14284 else exit(1);
14285}
14286
14287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014288if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014289 ac_cv_tanh_preserves_zero_sign=yes
14290else
Matthias Kloseb9621712010-04-24 17:59:49 +000014291 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14294 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014295fi
14296
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014297fi
14298
Matthias Kloseb9621712010-04-24 17:59:49 +000014299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14300$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014301if test "$ac_cv_tanh_preserves_zero_sign" = yes
14302then
14303
Matthias Kloseb9621712010-04-24 17:59:49 +000014304$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014305
14306fi
14307
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014308if test "$ac_cv_func_log1p" = yes
14309then
14310 # On some versions of AIX, log1p(-0.) returns 0. instead of
14311 # -0. See issue #9920.
14312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14313$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014314 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014315 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014316else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014317
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014318 if test "$cross_compiling" = yes; then :
14319 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014320else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14322/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014323
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014324 #include <math.h>
14325 #include <stdlib.h>
14326 int main() {
14327 /* Fail if the signs of log1p(-0.) and -0. can be
14328 distinguished. */
14329 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14330 return 0;
14331 else
14332 return 1;
14333 }
14334
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014335_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014336if ac_fn_c_try_run "$LINENO"; then :
14337 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014338else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014339 ac_cv_log1p_drops_zero_sign=yes
14340fi
14341rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14342 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014343fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014344
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014345fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014346
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14348$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14349fi
14350if test "$ac_cv_log1p_drops_zero_sign" = yes
14351then
14352
14353$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14354
14355fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014356
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014357LIBS=$LIBS_SAVE
14358
Mark Dickinsona614f042009-11-28 12:48:43 +000014359# For multiprocessing module, check that sem_open
14360# actually works. For FreeBSD versions <= 7.2,
14361# the kernel module that provides POSIX semaphores
14362# isn't loaded by default, so an attempt to call
14363# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14365$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014366if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014367 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014368else
Matthias Kloseb9621712010-04-24 17:59:49 +000014369 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014370 ac_cv_posix_semaphores_enabled=yes
14371else
Matthias Kloseb9621712010-04-24 17:59:49 +000014372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014373/* end confdefs.h. */
14374
14375#include <unistd.h>
14376#include <fcntl.h>
14377#include <stdio.h>
14378#include <semaphore.h>
14379#include <sys/stat.h>
14380
14381int main(void) {
14382 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14383 if (a == SEM_FAILED) {
14384 perror("sem_open");
14385 return 1;
14386 }
14387 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014388 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014389 return 0;
14390}
14391
14392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014393if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014394 ac_cv_posix_semaphores_enabled=yes
14395else
Matthias Kloseb9621712010-04-24 17:59:49 +000014396 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014398rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14399 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014400fi
14401
14402
Mark Dickinsona614f042009-11-28 12:48:43 +000014403fi
14404
Matthias Kloseb9621712010-04-24 17:59:49 +000014405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14406$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014407if test $ac_cv_posix_semaphores_enabled = no
14408then
14409
Matthias Kloseb9621712010-04-24 17:59:49 +000014410$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014411
14412fi
14413
Mark Dickinson10683072009-04-18 21:18:19 +000014414# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14416$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014417if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014418 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014419else
Matthias Kloseb9621712010-04-24 17:59:49 +000014420 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014421 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014422else
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014424/* end confdefs.h. */
14425
14426#include <unistd.h>
14427#include <fcntl.h>
14428#include <stdio.h>
14429#include <semaphore.h>
14430#include <sys/stat.h>
14431
14432int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014433 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014434 int count;
14435 int res;
14436 if(a==SEM_FAILED){
14437 perror("sem_open");
14438 return 1;
14439
14440 }
14441 res = sem_getvalue(a, &count);
14442 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014443 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014444 return res==-1 ? 1 : 0;
14445}
14446
Mark Dickinson10683072009-04-18 21:18:19 +000014447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014448if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014449 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014450else
Matthias Kloseb9621712010-04-24 17:59:49 +000014451 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014452fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014453rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14454 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014455fi
14456
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014457
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014458fi
14459
Matthias Kloseb9621712010-04-24 17:59:49 +000014460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14461$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014462if test $ac_cv_broken_sem_getvalue = yes
14463then
14464
Matthias Kloseb9621712010-04-24 17:59:49 +000014465$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014466
14467fi
14468
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014469ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14470"
14471if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14472 ac_have_decl=1
14473else
14474 ac_have_decl=0
14475fi
14476
14477cat >>confdefs.h <<_ACEOF
14478#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14479_ACEOF
14480ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14481"
14482if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14483 ac_have_decl=1
14484else
14485 ac_have_decl=0
14486fi
14487
14488cat >>confdefs.h <<_ACEOF
14489#define HAVE_DECL_RTLD_NOW $ac_have_decl
14490_ACEOF
14491ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14492"
14493if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14494 ac_have_decl=1
14495else
14496 ac_have_decl=0
14497fi
14498
14499cat >>confdefs.h <<_ACEOF
14500#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14501_ACEOF
14502ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14503"
14504if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14505 ac_have_decl=1
14506else
14507 ac_have_decl=0
14508fi
14509
14510cat >>confdefs.h <<_ACEOF
14511#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14512_ACEOF
14513ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14514"
14515if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14516 ac_have_decl=1
14517else
14518 ac_have_decl=0
14519fi
14520
14521cat >>confdefs.h <<_ACEOF
14522#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14523_ACEOF
14524ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14525"
14526if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14527 ac_have_decl=1
14528else
14529 ac_have_decl=0
14530fi
14531
14532cat >>confdefs.h <<_ACEOF
14533#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14534_ACEOF
14535ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14536"
14537if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14538 ac_have_decl=1
14539else
14540 ac_have_decl=0
14541fi
14542
14543cat >>confdefs.h <<_ACEOF
14544#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14545_ACEOF
14546
14547
Mark Dickinsonbd792642009-03-18 20:06:12 +000014548# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14550$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014551# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014552if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014553 enableval=$enable_big_digits; case $enable_big_digits in
14554yes)
14555 enable_big_digits=30 ;;
14556no)
14557 enable_big_digits=15 ;;
1455815|30)
14559 ;;
14560*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014561 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 +000014562esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14564$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014565
14566cat >>confdefs.h <<_ACEOF
14567#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14568_ACEOF
14569
14570
14571else
Matthias Kloseb9621712010-04-24 17:59:49 +000014572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14573$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014574fi
14575
14576
Guido van Rossumef2255b2000-03-10 22:30:29 +000014577# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014578ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014579if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014580
14581
Matthias Kloseb9621712010-04-24 17:59:49 +000014582$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014583
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014584 wchar_h="yes"
14585
Guido van Rossumef2255b2000-03-10 22:30:29 +000014586else
Martin v. Löwis11437992002-04-12 09:54:03 +000014587 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014588
14589fi
14590
Michael W. Hudson54241132001-12-07 15:38:26 +000014591
Martin v. Löwis11437992002-04-12 09:54:03 +000014592
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014593# determine wchar_t size
14594if test "$wchar_h" = yes
14595then
Matthias Kloseb9621712010-04-24 17:59:49 +000014596 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014597# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14598# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14599# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14601$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014602if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014603 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014604else
Matthias Kloseb9621712010-04-24 17:59:49 +000014605 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14606"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014607
Martin v. Löwis11437992002-04-12 09:54:03 +000014608else
Matthias Kloseb9621712010-04-24 17:59:49 +000014609 if test "$ac_cv_type_wchar_t" = yes; then
14610 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14611$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014612as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014613See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014614 else
14615 ac_cv_sizeof_wchar_t=0
14616 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014618
Martin v. Löwis11437992002-04-12 09:54:03 +000014619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14621$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014622
14623
14624
Martin v. Löwis11437992002-04-12 09:54:03 +000014625cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014626#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014627_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014628
Michael W. Hudson54241132001-12-07 15:38:26 +000014629
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014630fi
14631
Matthias Kloseb9621712010-04-24 17:59:49 +000014632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14633$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014634have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014636/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014637
14638#include <tcl.h>
14639#if TCL_UTF_MAX != 6
14640# error "NOT UCS4_TCL"
14641#endif
14642int
14643main ()
14644{
14645
14646 ;
14647 return 0;
14648}
14649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014650if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014651
14652
Matthias Kloseb9621712010-04-24 17:59:49 +000014653$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014654
14655 have_ucs4_tcl=yes
14656
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14660$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014661
Skip Montanaro6dead952003-09-25 14:50:04 +000014662# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014663if test "$wchar_h" = yes
14664then
14665 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14667$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014668 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014669 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014670else
14671
Matthias Kloseb9621712010-04-24 17:59:49 +000014672 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014673 ac_cv_wchar_t_signed=yes
14674else
Matthias Kloseb9621712010-04-24 17:59:49 +000014675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014676/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014677
14678 #include <wchar.h>
14679 int main()
14680 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014681 /* Success: exit code 0 */
14682 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014683 }
14684
14685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014686if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014687 ac_cv_wchar_t_signed=yes
14688else
Matthias Kloseb9621712010-04-24 17:59:49 +000014689 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014690fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14692 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014693fi
14694
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014695fi
14696
Matthias Kloseb9621712010-04-24 17:59:49 +000014697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14698$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014699fi
14700
Georg Brandl52d168a2008-01-07 18:10:24 +000014701# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014702if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014703 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014704then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014705 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014706
Matthias Kloseb9621712010-04-24 17:59:49 +000014707$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014708
Georg Brandl52d168a2008-01-07 18:10:24 +000014709else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014710 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014711fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14713$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014714
14715# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14717$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014718if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014719 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014720else
Matthias Kloseb9621712010-04-24 17:59:49 +000014721 ac_cv_c_bigendian=unknown
14722 # See if we're dealing with a universal compiler.
14723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14724/* end confdefs.h. */
14725#ifndef __APPLE_CC__
14726 not a universal capable compiler
14727 #endif
14728 typedef int dummy;
14729
Skip Montanaro6dead952003-09-25 14:50:04 +000014730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014731if ac_fn_c_try_compile "$LINENO"; then :
14732
14733 # Check for potential -arch flags. It is not universal unless
14734 # there are at least two -arch flags with different values.
14735 ac_arch=
14736 ac_prev=
14737 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14738 if test -n "$ac_prev"; then
14739 case $ac_word in
14740 i?86 | x86_64 | ppc | ppc64)
14741 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14742 ac_arch=$ac_word
14743 else
14744 ac_cv_c_bigendian=universal
14745 break
14746 fi
14747 ;;
14748 esac
14749 ac_prev=
14750 elif test "x$ac_word" = "x-arch"; then
14751 ac_prev=arch
14752 fi
14753 done
14754fi
14755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14756 if test $ac_cv_c_bigendian = unknown; then
14757 # See if sys/param.h defines the BYTE_ORDER macro.
14758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014759/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014760#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014761 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014762
Martin v. Löwis11437992002-04-12 09:54:03 +000014763int
14764main ()
14765{
Matthias Kloseb9621712010-04-24 17:59:49 +000014766#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14767 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14768 && LITTLE_ENDIAN)
14769 bogus endian macros
14770 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014771
14772 ;
14773 return 0;
14774}
14775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014776if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014777 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014779/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014780#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014781 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014782
Martin v. Löwis11437992002-04-12 09:54:03 +000014783int
14784main ()
14785{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014786#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014787 not big endian
14788 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014789
14790 ;
14791 return 0;
14792}
14793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014794if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014795 ac_cv_c_bigendian=yes
14796else
Matthias Kloseb9621712010-04-24 17:59:49 +000014797 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014800fi
14801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14802 fi
14803 if test $ac_cv_c_bigendian = unknown; then
14804 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014806/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014807#include <limits.h>
14808
Martin v. Löwis11437992002-04-12 09:54:03 +000014809int
14810main ()
14811{
Matthias Kloseb9621712010-04-24 17:59:49 +000014812#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14813 bogus endian macros
14814 #endif
14815
Martin v. Löwis11437992002-04-12 09:54:03 +000014816 ;
14817 return 0;
14818}
14819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014820if ac_fn_c_try_compile "$LINENO"; then :
14821 # It does; now see whether it defined to _BIG_ENDIAN or not.
14822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14823/* end confdefs.h. */
14824#include <limits.h>
14825
14826int
14827main ()
14828{
14829#ifndef _BIG_ENDIAN
14830 not big endian
14831 #endif
14832
14833 ;
14834 return 0;
14835}
14836_ACEOF
14837if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014838 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014839else
Matthias Kloseb9621712010-04-24 17:59:49 +000014840 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14843fi
14844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14845 fi
14846 if test $ac_cv_c_bigendian = unknown; then
14847 # Compile a test program.
14848 if test "$cross_compiling" = yes; then :
14849 # Try to guess by grepping values from an object file.
14850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14851/* end confdefs.h. */
14852short int ascii_mm[] =
14853 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14854 short int ascii_ii[] =
14855 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14856 int use_ascii (int i) {
14857 return ascii_mm[i] + ascii_ii[i];
14858 }
14859 short int ebcdic_ii[] =
14860 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14861 short int ebcdic_mm[] =
14862 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14863 int use_ebcdic (int i) {
14864 return ebcdic_mm[i] + ebcdic_ii[i];
14865 }
14866 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014867
Matthias Kloseb9621712010-04-24 17:59:49 +000014868int
14869main ()
14870{
14871return use_ascii (foo) == use_ebcdic (foo);
14872 ;
14873 return 0;
14874}
14875_ACEOF
14876if ac_fn_c_try_compile "$LINENO"; then :
14877 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14878 ac_cv_c_bigendian=yes
14879 fi
14880 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14881 if test "$ac_cv_c_bigendian" = unknown; then
14882 ac_cv_c_bigendian=no
14883 else
14884 # finding both strings is unlikely to happen, but who knows?
14885 ac_cv_c_bigendian=unknown
14886 fi
14887 fi
14888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014890else
Matthias Kloseb9621712010-04-24 17:59:49 +000014891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014892/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014893$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014894int
14895main ()
14896{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014897
Matthias Kloseb9621712010-04-24 17:59:49 +000014898 /* Are we little or big endian? From Harbison&Steele. */
14899 union
14900 {
14901 long int l;
14902 char c[sizeof (long int)];
14903 } u;
14904 u.l = 1;
14905 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014906
14907 ;
14908 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014909}
Martin v. Löwis11437992002-04-12 09:54:03 +000014910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014911if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014912 ac_cv_c_bigendian=no
14913else
Matthias Kloseb9621712010-04-24 17:59:49 +000014914 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014915fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014916rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14917 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014919
Matthias Kloseb9621712010-04-24 17:59:49 +000014920 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14923$as_echo "$ac_cv_c_bigendian" >&6; }
14924 case $ac_cv_c_bigendian in #(
14925 yes)
14926 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14927;; #(
14928 no)
14929 ;; #(
14930 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014931
Matthias Kloseb9621712010-04-24 17:59:49 +000014932$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014933
Matthias Kloseb9621712010-04-24 17:59:49 +000014934 ;; #(
14935 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014936 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014937 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014938 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014939
Michael W. Hudson54241132001-12-07 15:38:26 +000014940
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014941# ABI version string for Python extension modules. This appears between the
14942# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14943# from the following attributes which affect the ABI of this Python build (in
14944# this order):
14945#
14946# * The Python implementation (always 'cpython-' for us)
14947# * The major and minor version numbers
14948# * --with-pydebug (adds a 'd')
14949# * --with-pymalloc (adds a 'm')
14950# * --with-wide-unicode (adds a 'u')
14951#
14952# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014953# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14954# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014955
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14957$as_echo_n "checking ABIFLAGS... " >&6; }
14958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14959$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14961$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014962SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14964$as_echo "$SOABI" >&6; }
14965
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014966
14967case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014968 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014969 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14970 *)
14971 EXT_SUFFIX=${SHLIB_SUFFIX};;
14972esac
14973
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14975$as_echo_n "checking LDVERSION... " >&6; }
14976LDVERSION='$(VERSION)$(ABIFLAGS)'
14977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14978$as_echo "$LDVERSION" >&6; }
14979
doko@python.org87421192013-01-26 11:39:31 +010014980
doko@ubuntu.com55532312016-06-14 08:55:19 +020014981if test x$PLATFORM_TRIPLET = x; then
14982 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14983else
14984 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14985fi
doko@python.org87421192013-01-26 11:39:31 +010014986
14987
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014988# Check whether right shifting a negative integer extends the sign bit
14989# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14991$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014992if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014993 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014994else
Martin v. Löwis11437992002-04-12 09:54:03 +000014995
Matthias Kloseb9621712010-04-24 17:59:49 +000014996if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014997 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014998else
Matthias Kloseb9621712010-04-24 17:59:49 +000014999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015000/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015001
15002int main()
15003{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015004 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015005}
15006
Martin v. Löwis11437992002-04-12 09:54:03 +000015007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015008if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015009 ac_cv_rshift_extends_sign=yes
15010else
Matthias Kloseb9621712010-04-24 17:59:49 +000015011 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015012fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015013rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15014 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015015fi
15016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015017fi
15018
Matthias Kloseb9621712010-04-24 17:59:49 +000015019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15020$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015021if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015022then
Martin v. Löwis11437992002-04-12 09:54:03 +000015023
Matthias Kloseb9621712010-04-24 17:59:49 +000015024$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015025
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015026fi
15027
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015028# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15030$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015031if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015032 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015033else
Martin v. Löwis11437992002-04-12 09:54:03 +000015034
Matthias Kloseb9621712010-04-24 17:59:49 +000015035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015036/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015037#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015038int
15039main ()
15040{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015041
15042 FILE *f = fopen("/dev/null", "r");
15043 flockfile(f);
15044 getc_unlocked(f);
15045 funlockfile(f);
15046
Martin v. Löwis11437992002-04-12 09:54:03 +000015047 ;
15048 return 0;
15049}
15050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015051if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015052 ac_cv_have_getc_unlocked=yes
15053else
Matthias Kloseb9621712010-04-24 17:59:49 +000015054 ac_cv_have_getc_unlocked=no
15055fi
15056rm -f core conftest.err conftest.$ac_objext \
15057 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015059
Matthias Kloseb9621712010-04-24 17:59:49 +000015060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15061$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015062if test "$ac_cv_have_getc_unlocked" = yes
15063then
Martin v. Löwis11437992002-04-12 09:54:03 +000015064
Matthias Kloseb9621712010-04-24 17:59:49 +000015065$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015066
15067fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015068
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015069# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015070# save the value of LIBS so we don't actually link Python with readline
15071LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015072
Gregory P. Smith18820942008-09-07 06:24:49 +000015073# On some systems we need to link readline to a termcap compatible
15074# library. NOTE: Keep the precedence of listed libraries synchronised
15075# with setup.py.
15076py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15078$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015079for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015080 if test -z "$py_libtermcap"; then
15081 READLINE_LIBS="-lreadline"
15082 else
15083 READLINE_LIBS="-lreadline -l$py_libtermcap"
15084 fi
15085 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015087/* end confdefs.h. */
15088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015089/* Override any GCC internal prototype to avoid an error.
15090 Use char because int might match the return type of a GCC
15091 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015092#ifdef __cplusplus
15093extern "C"
15094#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015095char readline ();
15096int
15097main ()
15098{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015099return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015100 ;
15101 return 0;
15102}
15103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015104if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015105 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015107rm -f core conftest.err conftest.$ac_objext \
15108 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015109 if test $py_cv_lib_readline = yes; then
15110 break
15111 fi
15112done
15113# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15114#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015115if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15117$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015118else
Matthias Kloseb9621712010-04-24 17:59:49 +000015119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15120$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015121
Matthias Kloseb9621712010-04-24 17:59:49 +000015122$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015123
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015124fi
15125
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015126# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000015127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
15128$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015129if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015130 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015131else
15132 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015133LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015135/* end confdefs.h. */
15136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015137/* Override any GCC internal prototype to avoid an error.
15138 Use char because int might match the return type of a GCC
15139 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015140#ifdef __cplusplus
15141extern "C"
15142#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015143char rl_callback_handler_install ();
15144int
15145main ()
15146{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015147return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015148 ;
15149 return 0;
15150}
15151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015152if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015153 ac_cv_lib_readline_rl_callback_handler_install=yes
15154else
Matthias Kloseb9621712010-04-24 17:59:49 +000015155 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015156fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015157rm -f core conftest.err conftest.$ac_objext \
15158 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015159LIBS=$ac_check_lib_save_LIBS
15160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
15162$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015163if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015164
Matthias Kloseb9621712010-04-24 17:59:49 +000015165$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015166
15167fi
15168
15169
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015170# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015172/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015173#include <readline/readline.h>
15174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015175if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015176 have_readline=yes
15177else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015178 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015179
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015180fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015181rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015182if test $have_readline = yes
15183then
Matthias Kloseb9621712010-04-24 17:59:49 +000015184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015185/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015186#include <readline/readline.h>
15187
15188_ACEOF
15189if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015190 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015191
Matthias Kloseb9621712010-04-24 17:59:49 +000015192$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015193
15194fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015195rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015196
Matthias Kloseb9621712010-04-24 17:59:49 +000015197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015198/* end confdefs.h. */
15199#include <readline/readline.h>
15200
15201_ACEOF
15202if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015203 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015204
Matthias Kloseb9621712010-04-24 17:59:49 +000015205$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015206
15207fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015208rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015209
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015210fi
15211
Martin v. Löwis0daad592001-09-30 21:09:59 +000015212# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15214$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015215if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015216 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015217else
Martin v. Löwis11437992002-04-12 09:54:03 +000015218 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015219LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015221/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015223/* Override any GCC internal prototype to avoid an error.
15224 Use char because int might match the return type of a GCC
15225 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015226#ifdef __cplusplus
15227extern "C"
15228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015229char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015230int
15231main ()
15232{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015234 ;
15235 return 0;
15236}
15237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015238if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015239 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015240else
Matthias Kloseb9621712010-04-24 17:59:49 +000015241 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015243rm -f core conftest.err conftest.$ac_objext \
15244 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015245LIBS=$ac_check_lib_save_LIBS
15246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15248$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015249if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015250
Matthias Kloseb9621712010-04-24 17:59:49 +000015251$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015252
Martin v. Löwis0daad592001-09-30 21:09:59 +000015253fi
15254
Michael W. Hudson54241132001-12-07 15:38:26 +000015255
Thomas Wouters89d996e2007-09-08 17:39:28 +000015256# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15258$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015259if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015260 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015261else
15262 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015263LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015265/* end confdefs.h. */
15266
15267/* Override any GCC internal prototype to avoid an error.
15268 Use char because int might match the return type of a GCC
15269 builtin and then its argument prototype would still apply. */
15270#ifdef __cplusplus
15271extern "C"
15272#endif
15273char rl_completion_display_matches_hook ();
15274int
15275main ()
15276{
15277return rl_completion_display_matches_hook ();
15278 ;
15279 return 0;
15280}
15281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015282if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015283 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15284else
Matthias Kloseb9621712010-04-24 17:59:49 +000015285 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015287rm -f core conftest.err conftest.$ac_objext \
15288 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015289LIBS=$ac_check_lib_save_LIBS
15290fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15292$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015293if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015294
Matthias Kloseb9621712010-04-24 17:59:49 +000015295$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015296
15297fi
15298
15299
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015300# also in 4.0, but not in editline
15301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15302$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15303if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15304 $as_echo_n "(cached) " >&6
15305else
15306 ac_check_lib_save_LIBS=$LIBS
15307LIBS="-lreadline $READLINE_LIBS $LIBS"
15308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15309/* end confdefs.h. */
15310
15311/* Override any GCC internal prototype to avoid an error.
15312 Use char because int might match the return type of a GCC
15313 builtin and then its argument prototype would still apply. */
15314#ifdef __cplusplus
15315extern "C"
15316#endif
15317char rl_resize_terminal ();
15318int
15319main ()
15320{
15321return rl_resize_terminal ();
15322 ;
15323 return 0;
15324}
15325_ACEOF
15326if ac_fn_c_try_link "$LINENO"; then :
15327 ac_cv_lib_readline_rl_resize_terminal=yes
15328else
15329 ac_cv_lib_readline_rl_resize_terminal=no
15330fi
15331rm -f core conftest.err conftest.$ac_objext \
15332 conftest$ac_exeext conftest.$ac_ext
15333LIBS=$ac_check_lib_save_LIBS
15334fi
15335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15336$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15337if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15338
15339$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15340
15341fi
15342
15343
Martin v. Löwis0daad592001-09-30 21:09:59 +000015344# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15346$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015347if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015348 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015349else
Martin v. Löwis11437992002-04-12 09:54:03 +000015350 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015351LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015353/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015355/* Override any GCC internal prototype to avoid an error.
15356 Use char because int might match the return type of a GCC
15357 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015358#ifdef __cplusplus
15359extern "C"
15360#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015361char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015362int
15363main ()
15364{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015365return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015366 ;
15367 return 0;
15368}
15369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015370if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015371 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015372else
Matthias Kloseb9621712010-04-24 17:59:49 +000015373 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015375rm -f core conftest.err conftest.$ac_objext \
15376 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015377LIBS=$ac_check_lib_save_LIBS
15378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15380$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015381if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015382
Matthias Kloseb9621712010-04-24 17:59:49 +000015383$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015384
Guido van Rossum353ae582001-07-10 16:45:32 +000015385fi
15386
Jack Jansendd19cf82001-12-06 22:36:17 +000015387
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015388# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015390/* end confdefs.h. */
15391#include <readline/readline.h>
15392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015393if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015394 have_readline=yes
15395else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015396 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015397
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015398fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015399rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015400if test $have_readline = yes
15401then
Matthias Kloseb9621712010-04-24 17:59:49 +000015402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015403/* end confdefs.h. */
15404#include <readline/readline.h>
15405
15406_ACEOF
15407if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015408 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015409
Matthias Kloseb9621712010-04-24 17:59:49 +000015410$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015411
15412fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015413rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015414
15415fi
15416
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15418$as_echo_n "checking for append_history in -lreadline... " >&6; }
15419if ${ac_cv_lib_readline_append_history+:} false; then :
15420 $as_echo_n "(cached) " >&6
15421else
15422 ac_check_lib_save_LIBS=$LIBS
15423LIBS="-lreadline $READLINE_LIBS $LIBS"
15424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15425/* end confdefs.h. */
15426
15427/* Override any GCC internal prototype to avoid an error.
15428 Use char because int might match the return type of a GCC
15429 builtin and then its argument prototype would still apply. */
15430#ifdef __cplusplus
15431extern "C"
15432#endif
15433char append_history ();
15434int
15435main ()
15436{
15437return append_history ();
15438 ;
15439 return 0;
15440}
15441_ACEOF
15442if ac_fn_c_try_link "$LINENO"; then :
15443 ac_cv_lib_readline_append_history=yes
15444else
15445 ac_cv_lib_readline_append_history=no
15446fi
15447rm -f core conftest.err conftest.$ac_objext \
15448 conftest$ac_exeext conftest.$ac_ext
15449LIBS=$ac_check_lib_save_LIBS
15450fi
15451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15452$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15453if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15454
15455$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15456
15457fi
15458
15459
Martin v. Löwis82bca632006-02-10 20:49:30 +000015460# End of readline checks: restore LIBS
15461LIBS=$LIBS_no_readline
15462
Matthias Kloseb9621712010-04-24 17:59:49 +000015463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15464$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015465if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015466 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015467else
Martin v. Löwis11437992002-04-12 09:54:03 +000015468
Matthias Kloseb9621712010-04-24 17:59:49 +000015469if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015470 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015471else
Matthias Kloseb9621712010-04-24 17:59:49 +000015472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015473/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015474
15475int main()
15476{
15477 int val1 = nice(1);
15478 if (val1 != -1 && val1 == nice(2))
15479 exit(0);
15480 exit(1);
15481}
15482
Martin v. Löwis11437992002-04-12 09:54:03 +000015483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015484if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015485 ac_cv_broken_nice=yes
15486else
Matthias Kloseb9621712010-04-24 17:59:49 +000015487 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015489rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15490 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015491fi
15492
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015493fi
15494
Matthias Kloseb9621712010-04-24 17:59:49 +000015495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15496$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015497if test "$ac_cv_broken_nice" = yes
15498then
Martin v. Löwis11437992002-04-12 09:54:03 +000015499
Matthias Kloseb9621712010-04-24 17:59:49 +000015500$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015501
15502fi
15503
Matthias Kloseb9621712010-04-24 17:59:49 +000015504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15505$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015506if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015507 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015508else
Matthias Kloseb9621712010-04-24 17:59:49 +000015509 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015510 ac_cv_broken_poll=no
15511else
Matthias Kloseb9621712010-04-24 17:59:49 +000015512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015513/* end confdefs.h. */
15514
15515#include <poll.h>
15516
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015517int main()
15518{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015519 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015520 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015521
15522 close (42);
15523
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015524 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015525 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015526 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015527 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015528 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015529 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015530 return 1;
15531}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015532
15533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015534if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015535 ac_cv_broken_poll=yes
15536else
Matthias Kloseb9621712010-04-24 17:59:49 +000015537 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015538fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15540 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015542
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015543fi
15544
Matthias Kloseb9621712010-04-24 17:59:49 +000015545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15546$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015547if test "$ac_cv_broken_poll" = yes
15548then
15549
Matthias Kloseb9621712010-04-24 17:59:49 +000015550$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015551
15552fi
15553
Brett Cannon43802422005-02-10 20:48:03 +000015554# 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 +000015555# (which is not required by ISO C or UNIX spec) and/or if we support
15556# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015557ac_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 +000015558#include <$ac_cv_struct_tm>
15559
Matthias Kloseb9621712010-04-24 17:59:49 +000015560"
Victor Stinnere0be4232011-10-25 13:06:09 +020015561if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015562
15563cat >>confdefs.h <<_ACEOF
15564#define HAVE_STRUCT_TM_TM_ZONE 1
15565_ACEOF
15566
15567
15568fi
15569
15570if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15571
Matthias Kloseb9621712010-04-24 17:59:49 +000015572$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015573
15574else
Matthias Kloseb9621712010-04-24 17:59:49 +000015575 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15576"
Victor Stinnere0be4232011-10-25 13:06:09 +020015577if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015578 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015579else
Matthias Kloseb9621712010-04-24 17:59:49 +000015580 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015581fi
15582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015583cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015584#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015585_ACEOF
15586
Matthias Kloseb9621712010-04-24 17:59:49 +000015587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15588$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015589if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015590 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015591else
Matthias Kloseb9621712010-04-24 17:59:49 +000015592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015593/* end confdefs.h. */
15594#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015595#if !HAVE_DECL_TZNAME
15596extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015597#endif
15598
15599int
15600main ()
15601{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015602return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015603 ;
15604 return 0;
15605}
15606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015607if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015608 ac_cv_var_tzname=yes
15609else
Matthias Kloseb9621712010-04-24 17:59:49 +000015610 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015611fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015612rm -f core conftest.err conftest.$ac_objext \
15613 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015614fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15616$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015617 if test $ac_cv_var_tzname = yes; then
15618
Matthias Kloseb9621712010-04-24 17:59:49 +000015619$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015620
15621 fi
15622fi
15623
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015624
Martin v. Löwis1d459062005-03-14 21:23:33 +000015625# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15627$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015628if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015629 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015630else
15631
Matthias Kloseb9621712010-04-24 17:59:49 +000015632if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015633 ac_cv_working_tzset=no
15634else
Matthias Kloseb9621712010-04-24 17:59:49 +000015635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015636/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015637
15638#include <stdlib.h>
15639#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015640#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015641
15642#if HAVE_TZNAME
15643extern char *tzname[];
15644#endif
15645
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015646int main()
15647{
Brett Cannon18367812003-09-19 00:59:16 +000015648 /* Note that we need to ensure that not only does tzset(3)
15649 do 'something' with localtime, but it works as documented
15650 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015651 This includes making sure that tzname is set properly if
15652 tm->tm_zone does not exist since it is the alternative way
15653 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015654
15655 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015656 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015657 */
15658
Martin v. Löwis1d459062005-03-14 21:23:33 +000015659 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015660 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15661
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015662 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015663 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015664 if (localtime(&groundhogday)->tm_hour != 0)
15665 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015666#if HAVE_TZNAME
15667 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15668 if (strcmp(tzname[0], "UTC") ||
15669 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15670 exit(1);
15671#endif
Brett Cannon18367812003-09-19 00:59:16 +000015672
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015673 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015674 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015675 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015676 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015677#if HAVE_TZNAME
15678 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15679 exit(1);
15680#endif
Brett Cannon18367812003-09-19 00:59:16 +000015681
15682 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15683 tzset();
15684 if (localtime(&groundhogday)->tm_hour != 11)
15685 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015686#if HAVE_TZNAME
15687 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15688 exit(1);
15689#endif
15690
15691#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015692 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15693 exit(1);
15694 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15695 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015696#endif
Brett Cannon18367812003-09-19 00:59:16 +000015697
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015698 exit(0);
15699}
15700
15701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015702if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015703 ac_cv_working_tzset=yes
15704else
Matthias Kloseb9621712010-04-24 17:59:49 +000015705 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015707rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15708 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015709fi
15710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015711fi
15712
Matthias Kloseb9621712010-04-24 17:59:49 +000015713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15714$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015715if test "$ac_cv_working_tzset" = yes
15716then
15717
Matthias Kloseb9621712010-04-24 17:59:49 +000015718$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015719
15720fi
15721
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015722# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15724$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015725if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015726 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015727else
Matthias Kloseb9621712010-04-24 17:59:49 +000015728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015729/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015730#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015731int
15732main ()
15733{
15734
15735struct stat st;
15736st.st_mtim.tv_nsec = 1;
15737
15738 ;
15739 return 0;
15740}
15741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015742if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015743 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015744else
Matthias Kloseb9621712010-04-24 17:59:49 +000015745 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15748fi
15749
Matthias Kloseb9621712010-04-24 17:59:49 +000015750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15751$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015752if test "$ac_cv_stat_tv_nsec" = yes
15753then
15754
Matthias Kloseb9621712010-04-24 17:59:49 +000015755$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015756
15757fi
15758
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015759# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15761$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015762if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015763 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015764else
Matthias Kloseb9621712010-04-24 17:59:49 +000015765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015766/* end confdefs.h. */
15767#include <sys/stat.h>
15768int
15769main ()
15770{
15771
15772struct stat st;
15773st.st_mtimespec.tv_nsec = 1;
15774
15775 ;
15776 return 0;
15777}
15778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015779if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015780 ac_cv_stat_tv_nsec2=yes
15781else
Matthias Kloseb9621712010-04-24 17:59:49 +000015782 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15785fi
15786
Matthias Kloseb9621712010-04-24 17:59:49 +000015787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15788$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015789if test "$ac_cv_stat_tv_nsec2" = yes
15790then
15791
Matthias Kloseb9621712010-04-24 17:59:49 +000015792$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015793
15794fi
15795
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015796# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015797ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015798if test "$cross_compiling" = no; then
15799 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15800fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015801
15802for ac_header in curses.h ncurses.h
15803do :
15804 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15805ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15806if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15807 cat >>confdefs.h <<_ACEOF
15808#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15809_ACEOF
15810
15811fi
15812
15813done
15814
15815
15816# On Solaris, term.h requires curses.h
15817for ac_header in term.h
15818do :
15819 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15820#ifdef HAVE_CURSES_H
15821#include <curses.h>
15822#endif
15823
15824"
15825if test "x$ac_cv_header_term_h" = xyes; then :
15826 cat >>confdefs.h <<_ACEOF
15827#define HAVE_TERM_H 1
15828_ACEOF
15829
15830fi
15831
15832done
15833
15834
Jack Jansen666b1e72001-10-31 12:11:48 +000015835# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15837$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015838if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015839 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015840else
Matthias Kloseb9621712010-04-24 17:59:49 +000015841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015842/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015843#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015844int
15845main ()
15846{
Jack Jansen666b1e72001-10-31 12:11:48 +000015847
15848 int rtn;
15849 rtn = mvwdelch(0,0,0);
15850
Martin v. Löwis11437992002-04-12 09:54:03 +000015851 ;
15852 return 0;
15853}
15854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015855if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015856 ac_cv_mvwdelch_is_expression=yes
15857else
Matthias Kloseb9621712010-04-24 17:59:49 +000015858 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15861fi
15862
Matthias Kloseb9621712010-04-24 17:59:49 +000015863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15864$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015865
15866if test "$ac_cv_mvwdelch_is_expression" = yes
15867then
Martin v. Löwis11437992002-04-12 09:54:03 +000015868
Matthias Kloseb9621712010-04-24 17:59:49 +000015869$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015870
15871fi
15872
Matthias Kloseb9621712010-04-24 17:59:49 +000015873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15874$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015875if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015876 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015877else
Matthias Kloseb9621712010-04-24 17:59:49 +000015878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015879/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015880#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015881int
15882main ()
15883{
Jack Jansen666b1e72001-10-31 12:11:48 +000015884
15885 WINDOW *w;
15886 w->_flags = 0;
15887
Martin v. Löwis11437992002-04-12 09:54:03 +000015888 ;
15889 return 0;
15890}
15891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015892if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015893 ac_cv_window_has_flags=yes
15894else
Matthias Kloseb9621712010-04-24 17:59:49 +000015895 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15898fi
15899
Matthias Kloseb9621712010-04-24 17:59:49 +000015900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15901$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015902
Jack Jansen666b1e72001-10-31 12:11:48 +000015903
15904if test "$ac_cv_window_has_flags" = yes
15905then
Martin v. Löwis11437992002-04-12 09:54:03 +000015906
Matthias Kloseb9621712010-04-24 17:59:49 +000015907$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015908
15909fi
15910
Matthias Kloseb9621712010-04-24 17:59:49 +000015911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15912$as_echo_n "checking for is_term_resized... " >&6; }
15913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015914/* end confdefs.h. */
15915#include <curses.h>
15916int
15917main ()
15918{
15919void *x=is_term_resized
15920 ;
15921 return 0;
15922}
15923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015924if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015925
Matthias Kloseb9621712010-04-24 17:59:49 +000015926$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015927
Matthias Kloseb159a552010-04-25 21:00:44 +000015928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015929$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015930else
Matthias Kloseb9621712010-04-24 17:59:49 +000015931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15932$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015933
15934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15936
Matthias Kloseb9621712010-04-24 17:59:49 +000015937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15938$as_echo_n "checking for resize_term... " >&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=resize_term
15946 ;
15947 return 0;
15948}
15949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015950if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015951
Matthias Kloseb9621712010-04-24 17:59:49 +000015952$as_echo "#define HAVE_CURSES_RESIZE_TERM 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 resizeterm" >&5
15964$as_echo_n "checking for resizeterm... " >&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=resizeterm
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_RESIZETERM 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
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015988# last curses configure check
15989CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015990
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15992$as_echo "$as_me: checking for device files" >&6;}
15993
15994if test "x$cross_compiling" = xyes; then
15995 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15997$as_echo_n "checking for /dev/ptmx... " >&6; }
15998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15999$as_echo "not set" >&6; }
16000 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16001 fi
16002 if test "${ac_cv_file__dev_ptc+set}" != set; then
16003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16004$as_echo_n "checking for /dev/ptc... " >&6; }
16005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16006$as_echo "not set" >&6; }
16007 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16008 fi
16009fi
16010
Matthias Kloseb9621712010-04-24 17:59:49 +000016011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16012$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016013if ${ac_cv_file__dev_ptmx+:} false; then :
16014 $as_echo_n "(cached) " >&6
16015else
16016 test "$cross_compiling" = yes &&
16017 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16018if test -r "/dev/ptmx"; then
16019 ac_cv_file__dev_ptmx=yes
16020else
16021 ac_cv_file__dev_ptmx=no
16022fi
16023fi
16024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16025$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16026if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016027
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016028fi
16029
16030if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016031
Matthias Kloseb9621712010-04-24 17:59:49 +000016032$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016033
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016034fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16036$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016037if ${ac_cv_file__dev_ptc+:} false; then :
16038 $as_echo_n "(cached) " >&6
16039else
16040 test "$cross_compiling" = yes &&
16041 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16042if test -r "/dev/ptc"; then
16043 ac_cv_file__dev_ptc=yes
16044else
16045 ac_cv_file__dev_ptc=no
16046fi
16047fi
16048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16049$as_echo "$ac_cv_file__dev_ptc" >&6; }
16050if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016051
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016052fi
16053
16054if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016055
Matthias Kloseb9621712010-04-24 17:59:49 +000016056$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016057
Neal Norwitz865400f2003-03-21 01:42:58 +000016058fi
16059
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016060if test $ac_sys_system = Darwin
16061then
16062 LIBS="$LIBS -framework CoreFoundation"
16063fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016064
Matthias Kloseb9621712010-04-24 17:59:49 +000016065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16066$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016067if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016068 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016069else
Matthias Kloseb9621712010-04-24 17:59:49 +000016070 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016071 ac_cv_have_size_t_format="cross -- assuming yes"
16072
Thomas Wouters477c8d52006-05-27 19:21:47 +000016073else
Matthias Kloseb9621712010-04-24 17:59:49 +000016074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016075/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016076
Thomas Wouters477c8d52006-05-27 19:21:47 +000016077#include <stdio.h>
16078#include <stddef.h>
16079#include <string.h>
16080
Christian Heimes2c181612007-12-17 20:04:13 +000016081#ifdef HAVE_SYS_TYPES_H
16082#include <sys/types.h>
16083#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016084
16085#ifdef HAVE_SSIZE_T
16086typedef ssize_t Py_ssize_t;
16087#elif SIZEOF_VOID_P == SIZEOF_LONG
16088typedef long Py_ssize_t;
16089#else
16090typedef int Py_ssize_t;
16091#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016092
Christian Heimes2c181612007-12-17 20:04:13 +000016093int main()
16094{
16095 char buffer[256];
16096
Thomas Wouters477c8d52006-05-27 19:21:47 +000016097 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16098 return 1;
16099
Thomas Wouters89f507f2006-12-13 04:49:30 +000016100 if (strcmp(buffer, "123"))
16101 return 1;
16102
16103 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16104 return 1;
16105
16106 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016107 return 1;
16108
16109 return 0;
16110}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016111
Thomas Wouters477c8d52006-05-27 19:21:47 +000016112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016113if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016114 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016115else
Matthias Kloseb9621712010-04-24 17:59:49 +000016116 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016117fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016118rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16119 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016120fi
16121
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016122fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16124$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016125if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016126
Matthias Kloseb9621712010-04-24 17:59:49 +000016127$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016128
16129fi
16130
Matthias Kloseb9621712010-04-24 17:59:49 +000016131ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016132#ifdef HAVE_SYS_TYPES_H
16133#include <sys/types.h>
16134#endif
16135#ifdef HAVE_SYS_SOCKET_H
16136#include <sys/socket.h>
16137#endif
16138
Matthias Kloseb9621712010-04-24 17:59:49 +000016139"
Victor Stinnere0be4232011-10-25 13:06:09 +020016140if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016141
Martin v. Löwis11437992002-04-12 09:54:03 +000016142else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016143
Matthias Kloseb9621712010-04-24 17:59:49 +000016144$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016145
16146fi
16147
Michael W. Hudson54241132001-12-07 15:38:26 +000016148
Matthias Kloseb9621712010-04-24 17:59:49 +000016149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16150$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016151if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016152 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016153else
Matthias Kloseb9621712010-04-24 17:59:49 +000016154 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016155 ac_cv_broken_mbstowcs=no
16156else
Matthias Kloseb9621712010-04-24 17:59:49 +000016157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016158/* end confdefs.h. */
16159
Stefan Krah19c21392012-11-22 23:47:32 +010016160#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016161#include<stdlib.h>
16162int main() {
16163 size_t len = -1;
16164 const char *str = "text";
16165 len = mbstowcs(NULL, str, 0);
16166 return (len != 4);
16167}
16168
16169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016170if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016171 ac_cv_broken_mbstowcs=no
16172else
Matthias Kloseb9621712010-04-24 17:59:49 +000016173 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016174fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16176 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016177fi
16178
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016179fi
16180
Matthias Kloseb9621712010-04-24 17:59:49 +000016181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16182$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016183if test "$ac_cv_broken_mbstowcs" = yes
16184then
16185
Matthias Kloseb9621712010-04-24 17:59:49 +000016186$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016187
16188fi
16189
Antoine Pitroub52ec782009-01-25 16:34:23 +000016190# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16192$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016193
16194# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016195if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016196 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016197if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016198then
16199
Matthias Kloseb9621712010-04-24 17:59:49 +000016200$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016201
Matthias Kloseb9621712010-04-24 17:59:49 +000016202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16203$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016204fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016205if test "$withval" = no
16206then
16207
16208$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16209
Matthias Kloseb9621712010-04-24 17:59:49 +000016210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16211$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016212fi
16213
Antoine Pitrou042b1282010-08-13 21:15:58 +000016214else
16215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16216$as_echo "no value specified" >&6; }
16217fi
16218
Antoine Pitroub52ec782009-01-25 16:34:23 +000016219
Matthias Kloseb17289e2012-03-15 19:51:34 +010016220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16221$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16222if ${ac_cv_computed_gotos+:} false; then :
16223 $as_echo_n "(cached) " >&6
16224else
16225 if test "$cross_compiling" = yes; then :
16226 if test "${with_computed_gotos+set}" = set; then
16227 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16228 else
16229 ac_cv_computed_gotos=no
16230 fi
16231else
16232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16233/* end confdefs.h. */
16234
16235int main(int argc, char **argv)
16236{
16237 static void *targets[1] = { &&LABEL1 };
16238 goto LABEL2;
16239LABEL1:
16240 return 0;
16241LABEL2:
16242 goto *targets[0];
16243 return 1;
16244}
16245
16246_ACEOF
16247if ac_fn_c_try_run "$LINENO"; then :
16248 ac_cv_computed_gotos=yes
16249else
16250 ac_cv_computed_gotos=no
16251fi
16252rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16253 conftest.$ac_objext conftest.beam conftest.$ac_ext
16254fi
16255
16256fi
16257
16258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16259$as_echo "$ac_cv_computed_gotos" >&6; }
16260case "$ac_cv_computed_gotos" in yes*)
16261
16262$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16263
16264esac
16265
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016266case $ac_sys_system in
16267AIX*)
16268
16269$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16270 ;;
16271esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016272
Michael W. Hudson54241132001-12-07 15:38:26 +000016273
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016274
16275
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016276for h in `(cd $srcdir;echo Python/thread_*.h)`
16277do
16278 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16279done
16280
Michael W. Hudson54241132001-12-07 15:38:26 +000016281
Ned Deily0db50cf2014-07-25 12:41:31 -070016282SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16284$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016285for dir in $SRCDIRS; do
16286 if test ! -d $dir; then
16287 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016288 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016289done
Matthias Kloseb9621712010-04-24 17:59:49 +000016290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16291$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016292
Stefan Krah1919b7e2012-03-21 18:25:23 +010016293# Availability of -O2:
16294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16295$as_echo_n "checking for -O2... " >&6; }
16296saved_cflags="$CFLAGS"
16297CFLAGS="-O2"
16298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16299/* end confdefs.h. */
16300
16301int
16302main ()
16303{
16304
16305
16306 ;
16307 return 0;
16308}
16309_ACEOF
16310if ac_fn_c_try_compile "$LINENO"; then :
16311 have_O2=yes
16312else
16313 have_O2=no
16314fi
16315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16317$as_echo "$have_O2" >&6; }
16318CFLAGS="$saved_cflags"
16319
16320# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16321# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16323$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16324saved_cflags="$CFLAGS"
16325CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16326if test "$have_O2" = no; then
16327 CFLAGS=""
16328fi
16329if test "$cross_compiling" = yes; then :
16330 have_glibc_memmove_bug=undefined
16331else
16332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16333/* end confdefs.h. */
16334
16335#include <stdio.h>
16336#include <stdlib.h>
16337#include <string.h>
16338void foo(void *p, void *q) { memmove(p, q, 19); }
16339int main() {
16340 char a[32] = "123456789000000000";
16341 foo(&a[9], a);
16342 if (strcmp(a, "123456789123456789000000000") != 0)
16343 return 1;
16344 foo(a, &a[9]);
16345 if (strcmp(a, "123456789000000000") != 0)
16346 return 1;
16347 return 0;
16348}
16349
16350_ACEOF
16351if ac_fn_c_try_run "$LINENO"; then :
16352 have_glibc_memmove_bug=no
16353else
16354 have_glibc_memmove_bug=yes
16355fi
16356rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16357 conftest.$ac_objext conftest.beam conftest.$ac_ext
16358fi
16359
16360CFLAGS="$saved_cflags"
16361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16362$as_echo "$have_glibc_memmove_bug" >&6; }
16363if test "$have_glibc_memmove_bug" = yes; then
16364
16365$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16366
16367fi
16368
16369if test "$have_gcc_asm_for_x87" = yes; then
16370 # Some versions of gcc miscompile inline asm:
16371 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16372 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16373 case $CC in
16374 *gcc*)
16375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16376$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16377 saved_cflags="$CFLAGS"
16378 CFLAGS="-O2"
16379 if test "$cross_compiling" = yes; then :
16380 have_ipa_pure_const_bug=undefined
16381else
16382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16383/* end confdefs.h. */
16384
16385 __attribute__((noinline)) int
16386 foo(int *p) {
16387 int r;
16388 asm ( "movl \$6, (%1)\n\t"
16389 "xorl %0, %0\n\t"
16390 : "=r" (r) : "r" (p) : "memory"
16391 );
16392 return r;
16393 }
16394 int main() {
16395 int p = 8;
16396 if ((foo(&p) ? : p) != 6)
16397 return 1;
16398 return 0;
16399 }
16400
16401_ACEOF
16402if ac_fn_c_try_run "$LINENO"; then :
16403 have_ipa_pure_const_bug=no
16404else
16405 have_ipa_pure_const_bug=yes
16406fi
16407rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16408 conftest.$ac_objext conftest.beam conftest.$ac_ext
16409fi
16410
16411 CFLAGS="$saved_cflags"
16412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16413$as_echo "$have_ipa_pure_const_bug" >&6; }
16414 if test "$have_ipa_pure_const_bug" = yes; then
16415
16416$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16417
16418 fi
16419 ;;
16420 esac
16421fi
16422
Victor Stinner4f5366e2015-01-09 02:13:19 +010016423# Check for stdatomic.h
16424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16425$as_echo_n "checking for stdatomic.h... " >&6; }
16426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16427/* end confdefs.h. */
16428
16429
16430 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016431 atomic_int value = ATOMIC_VAR_INIT(1);
16432 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016433 int main() {
16434 int loaded_value = atomic_load(&value);
16435 return 0;
16436 }
16437
16438
16439_ACEOF
16440if ac_fn_c_try_link "$LINENO"; then :
16441 have_stdatomic_h=yes
16442else
16443 have_stdatomic_h=no
16444fi
16445rm -f core conftest.err conftest.$ac_objext \
16446 conftest$ac_exeext conftest.$ac_ext
16447
16448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16449$as_echo "$have_stdatomic_h" >&6; }
16450
16451if test "$have_stdatomic_h" = yes; then
16452
16453$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16454
16455fi
16456
16457# Check for GCC >= 4.7 __atomic builtins
16458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16459$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16461/* end confdefs.h. */
16462
16463
16464 volatile int val = 1;
16465 int main() {
16466 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16467 return 0;
16468 }
16469
16470
16471_ACEOF
16472if ac_fn_c_try_link "$LINENO"; then :
16473 have_builtin_atomic=yes
16474else
16475 have_builtin_atomic=no
16476fi
16477rm -f core conftest.err conftest.$ac_objext \
16478 conftest$ac_exeext conftest.$ac_ext
16479
16480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16481$as_echo "$have_builtin_atomic" >&6; }
16482
16483if test "$have_builtin_atomic" = yes; then
16484
16485$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16486
16487fi
16488
Ned Deily322f5ba2013-11-21 23:01:59 -080016489# ensurepip option
16490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16491$as_echo_n "checking for ensurepip... " >&6; }
16492
16493# Check whether --with-ensurepip was given.
16494if test "${with_ensurepip+set}" = set; then :
16495 withval=$with_ensurepip;
16496else
16497 with_ensurepip=upgrade
16498fi
16499
16500case $with_ensurepip in #(
16501 yes|upgrade) :
16502 ENSUREPIP=upgrade ;; #(
16503 install) :
16504 ENSUREPIP=install ;; #(
16505 no) :
16506 ENSUREPIP=no ;; #(
16507 *) :
16508 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16509esac
16510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16511$as_echo "$ENSUREPIP" >&6; }
16512
16513
Victor Stinner35a97c02015-03-08 02:59:09 +010016514# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16516$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16518/* end confdefs.h. */
16519
16520
16521 #include <dirent.h>
16522
16523 int main() {
16524 struct dirent entry;
16525 return entry.d_type == DT_UNKNOWN;
16526 }
16527
16528
16529_ACEOF
16530if ac_fn_c_try_link "$LINENO"; then :
16531 have_dirent_d_type=yes
16532else
16533 have_dirent_d_type=no
16534fi
16535rm -f core conftest.err conftest.$ac_objext \
16536 conftest$ac_exeext conftest.$ac_ext
16537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16538$as_echo "$have_dirent_d_type" >&6; }
16539
16540if test "$have_dirent_d_type" = yes; then
16541
16542$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16543
16544fi
16545
Victor Stinner9eb57c52015-03-19 22:21:49 +010016546# check if the Linux getrandom() syscall is available
16547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16548$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16550/* end confdefs.h. */
16551
16552
Victor Stinner1b80b242016-04-12 22:34:58 +020016553 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016554 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016555 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016556
16557 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016558 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016559 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016560 const int flags = GRND_NONBLOCK;
16561 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016562 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016563 return 0;
16564 }
16565
16566
16567_ACEOF
16568if ac_fn_c_try_link "$LINENO"; then :
16569 have_getrandom_syscall=yes
16570else
16571 have_getrandom_syscall=no
16572fi
16573rm -f core conftest.err conftest.$ac_objext \
16574 conftest$ac_exeext conftest.$ac_ext
16575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16576$as_echo "$have_getrandom_syscall" >&6; }
16577
16578if test "$have_getrandom_syscall" = yes; then
16579
16580$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16581
16582fi
16583
Victor Stinner3abf44e2015-09-18 15:38:37 +020016584# check if the getrandom() function is available
16585# the test was written for the Solaris function of <sys/random.h>
16586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16587$as_echo_n "checking for the getrandom() function... " >&6; }
16588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16589/* end confdefs.h. */
16590
16591
16592 #include <sys/random.h>
16593
16594 int main() {
16595 char buffer[1];
16596 const size_t buflen = sizeof(buffer);
16597 const int flags = 0;
16598 /* ignore the result, Python checks for ENOSYS at runtime */
16599 (void)getrandom(buffer, buflen, flags);
16600 return 0;
16601 }
16602
16603
16604_ACEOF
16605if ac_fn_c_try_link "$LINENO"; then :
16606 have_getrandom=yes
16607else
16608 have_getrandom=no
16609fi
16610rm -f core conftest.err conftest.$ac_objext \
16611 conftest$ac_exeext conftest.$ac_ext
16612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16613$as_echo "$have_getrandom" >&6; }
16614
16615if test "$have_getrandom" = yes; then
16616
16617$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16618
16619fi
16620
Guido van Rossum627b2d71993-12-24 10:39:16 +000016621# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016622ac_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 +000016623
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016624ac_config_files="$ac_config_files Modules/ld_so_aix"
16625
Martin v. Löwis11437992002-04-12 09:54:03 +000016626cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016627# This file is a shell script that caches the results of configure
16628# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016629# scripts and configure runs, see configure's option --config-cache.
16630# It is not useful on other systems. If it contains results you don't
16631# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016632#
Martin v. Löwis11437992002-04-12 09:54:03 +000016633# config.status only pays attention to the cache file if you give it
16634# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016635#
Skip Montanaro6dead952003-09-25 14:50:04 +000016636# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016637# loading this file, other *unset* `ac_cv_foo' will be assigned the
16638# following values.
16639
16640_ACEOF
16641
Guido van Rossumf78abae1997-01-21 22:02:36 +000016642# The following way of writing the cache mishandles newlines in values,
16643# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016644# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016645# Ultrix sh set writes to stderr and can't be redirected directly,
16646# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016647(
16648 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16649 eval ac_val=\$$ac_var
16650 case $ac_val in #(
16651 *${as_nl}*)
16652 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016653 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16654$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016655 esac
16656 case $ac_var in #(
16657 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016658 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16659 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016660 esac ;;
16661 esac
16662 done
16663
Martin v. Löwis11437992002-04-12 09:54:03 +000016664 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016665 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16666 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016667 # `set' does not quote correctly, so add quotes: double-quote
16668 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016669 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016670 "s/'/'\\\\''/g;
16671 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016672 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016673 *)
16674 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016675 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016676 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016677 esac |
16678 sort
16679) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016680 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016681 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016682 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016683 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016684 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16685 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016686 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16687 :end' >>confcache
16688if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16689 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016690 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016691 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16692$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016693 if test ! -f "$cache_file" || test -h "$cache_file"; then
16694 cat confcache >"$cache_file"
16695 else
16696 case $cache_file in #(
16697 */* | ?:*)
16698 mv -f confcache "$cache_file"$$ &&
16699 mv -f "$cache_file"$$ "$cache_file" ;; #(
16700 *)
16701 mv -f confcache "$cache_file" ;;
16702 esac
16703 fi
16704 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016705 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016706 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16707$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016708 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016709fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016710rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016711
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016712test "x$prefix" = xNONE && prefix=$ac_default_prefix
16713# Let make expand exec_prefix.
16714test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016715
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016716DEFS=-DHAVE_CONFIG_H
16717
Skip Montanaro6dead952003-09-25 14:50:04 +000016718ac_libobjs=
16719ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016720U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016721for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16722 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016723 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016724 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016725 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16726 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016727 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16728 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016729done
16730LIBOBJS=$ac_libobjs
16731
16732LTLIBOBJS=$ac_ltlibobjs
16733
16734
Martin v. Löwis11437992002-04-12 09:54:03 +000016735
Matthias Kloseb9621712010-04-24 17:59:49 +000016736
Victor Stinnere0be4232011-10-25 13:06:09 +020016737: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016738ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016739ac_clean_files_save=$ac_clean_files
16740ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016741{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16742$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16743as_write_fail=0
16744cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016745#! $SHELL
16746# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016747# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016748# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016749# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016750
Martin v. Löwis11437992002-04-12 09:54:03 +000016751debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016752ac_cs_recheck=false
16753ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016754
Matthias Kloseb9621712010-04-24 17:59:49 +000016755SHELL=\${CONFIG_SHELL-$SHELL}
16756export SHELL
16757_ASEOF
16758cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16759## -------------------- ##
16760## M4sh Initialization. ##
16761## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016762
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016763# Be more Bourne compatible
16764DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016765if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016766 emulate sh
16767 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016768 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016769 # is contrary to our usage. Disable this feature.
16770 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016771 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016772else
Matthias Kloseb9621712010-04-24 17:59:49 +000016773 case `(set -o) 2>/dev/null` in #(
16774 *posix*) :
16775 set -o posix ;; #(
16776 *) :
16777 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016778esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016779fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016780
16781
Matthias Kloseb9621712010-04-24 17:59:49 +000016782as_nl='
16783'
16784export as_nl
16785# Printing a long string crashes Solaris 7 /usr/bin/printf.
16786as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16787as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16788as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16789# Prefer a ksh shell builtin over an external printf program on Solaris,
16790# but without wasting forks for bash or zsh.
16791if test -z "$BASH_VERSION$ZSH_VERSION" \
16792 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16793 as_echo='print -r --'
16794 as_echo_n='print -rn --'
16795elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16796 as_echo='printf %s\n'
16797 as_echo_n='printf %s'
16798else
16799 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16800 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16801 as_echo_n='/usr/ucb/echo -n'
16802 else
16803 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16804 as_echo_n_body='eval
16805 arg=$1;
16806 case $arg in #(
16807 *"$as_nl"*)
16808 expr "X$arg" : "X\\(.*\\)$as_nl";
16809 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16810 esac;
16811 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16812 '
16813 export as_echo_n_body
16814 as_echo_n='sh -c $as_echo_n_body as_echo'
16815 fi
16816 export as_echo_body
16817 as_echo='sh -c $as_echo_body as_echo'
16818fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016819
16820# The user is always right.
16821if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016822 PATH_SEPARATOR=:
16823 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16824 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16825 PATH_SEPARATOR=';'
16826 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016827fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016828
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016829
16830# IFS
16831# We need space, tab and new line, in precisely that order. Quoting is
16832# there to prevent editors from complaining about space-tab.
16833# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16834# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016835IFS=" "" $as_nl"
16836
16837# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016838as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016839case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016840 *[\\/]* ) as_myself=$0 ;;
16841 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016842for as_dir in $PATH
16843do
16844 IFS=$as_save_IFS
16845 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016846 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16847 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016848IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016850 ;;
16851esac
16852# We did not find ourselves, most probably we were run as `sh COMMAND'
16853# in which case we are not to be found in the path.
16854if test "x$as_myself" = x; then
16855 as_myself=$0
16856fi
16857if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016858 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16859 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016860fi
16861
Matthias Kloseb9621712010-04-24 17:59:49 +000016862# Unset variables that we do not need and which cause bugs (e.g. in
16863# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16864# suppresses any "Segmentation fault" message there. '((' could
16865# trigger a bug in pdksh 5.2.14.
16866for as_var in BASH_ENV ENV MAIL MAILPATH
16867do eval test x\${$as_var+set} = xset \
16868 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016869done
16870PS1='$ '
16871PS2='> '
16872PS4='+ '
16873
16874# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016875LC_ALL=C
16876export LC_ALL
16877LANGUAGE=C
16878export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016879
Matthias Kloseb9621712010-04-24 17:59:49 +000016880# CDPATH.
16881(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16882
16883
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016884# as_fn_error STATUS ERROR [LINENO LOG_FD]
16885# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016886# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16887# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016888# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016889as_fn_error ()
16890{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016891 as_status=$1; test $as_status -eq 0 && as_status=1
16892 if test "$4"; then
16893 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16894 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016895 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016896 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016897 as_fn_exit $as_status
16898} # as_fn_error
16899
16900
16901# as_fn_set_status STATUS
16902# -----------------------
16903# Set $? to STATUS, without forking.
16904as_fn_set_status ()
16905{
16906 return $1
16907} # as_fn_set_status
16908
16909# as_fn_exit STATUS
16910# -----------------
16911# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16912as_fn_exit ()
16913{
16914 set +e
16915 as_fn_set_status $1
16916 exit $1
16917} # as_fn_exit
16918
16919# as_fn_unset VAR
16920# ---------------
16921# Portably unset VAR.
16922as_fn_unset ()
16923{
16924 { eval $1=; unset $1;}
16925}
16926as_unset=as_fn_unset
16927# as_fn_append VAR VALUE
16928# ----------------------
16929# Append the text in VALUE to the end of the definition contained in VAR. Take
16930# advantage of any shell optimizations that allow amortized linear growth over
16931# repeated appends, instead of the typical quadratic growth present in naive
16932# implementations.
16933if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16934 eval 'as_fn_append ()
16935 {
16936 eval $1+=\$2
16937 }'
16938else
16939 as_fn_append ()
16940 {
16941 eval $1=\$$1\$2
16942 }
16943fi # as_fn_append
16944
16945# as_fn_arith ARG...
16946# ------------------
16947# Perform arithmetic evaluation on the ARGs, and store the result in the
16948# global $as_val. Take advantage of shells that can avoid forks. The arguments
16949# must be portable across $(()) and expr.
16950if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16951 eval 'as_fn_arith ()
16952 {
16953 as_val=$(( $* ))
16954 }'
16955else
16956 as_fn_arith ()
16957 {
16958 as_val=`expr "$@" || test $? -eq 1`
16959 }
16960fi # as_fn_arith
16961
16962
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016963if expr a : '\(a\)' >/dev/null 2>&1 &&
16964 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16965 as_expr=expr
16966else
16967 as_expr=false
16968fi
16969
16970if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16971 as_basename=basename
16972else
16973 as_basename=false
16974fi
16975
Matthias Kloseb9621712010-04-24 17:59:49 +000016976if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16977 as_dirname=dirname
16978else
16979 as_dirname=false
16980fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016982as_me=`$as_basename -- "$0" ||
16983$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16984 X"$0" : 'X\(//\)$' \| \
16985 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016986$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016987 sed '/^.*\/\([^/][^/]*\)\/*$/{
16988 s//\1/
16989 q
16990 }
16991 /^X\/\(\/\/\)$/{
16992 s//\1/
16993 q
16994 }
16995 /^X\/\(\/\).*/{
16996 s//\1/
16997 q
16998 }
16999 s/.*/./; q'`
17000
Matthias Kloseb9621712010-04-24 17:59:49 +000017001# Avoid depending upon Character Ranges.
17002as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17003as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17004as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17005as_cr_digits='0123456789'
17006as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017007
17008ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017009case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017010-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017011 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017012 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017013 xy) ECHO_C='\c';;
17014 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17015 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017016 esac;;
17017*)
17018 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017019esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017020
Martin v. Löwis11437992002-04-12 09:54:03 +000017021rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017022if test -d conf$$.dir; then
17023 rm -f conf$$.dir/conf$$.file
17024else
17025 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017026 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017028if (echo >conf$$.file) 2>/dev/null; then
17029 if ln -s conf$$.file conf$$ 2>/dev/null; then
17030 as_ln_s='ln -s'
17031 # ... but there are two gotchas:
17032 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17033 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017034 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017035 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017036 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017037 elif ln conf$$.file conf$$ 2>/dev/null; then
17038 as_ln_s=ln
17039 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017040 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017041 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017042else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017043 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017045rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17046rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017047
Matthias Kloseb9621712010-04-24 17:59:49 +000017048
17049# as_fn_mkdir_p
17050# -------------
17051# Create "$as_dir" as a directory, including parents if necessary.
17052as_fn_mkdir_p ()
17053{
17054
17055 case $as_dir in #(
17056 -*) as_dir=./$as_dir;;
17057 esac
17058 test -d "$as_dir" || eval $as_mkdir_p || {
17059 as_dirs=
17060 while :; do
17061 case $as_dir in #(
17062 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17063 *) as_qdir=$as_dir;;
17064 esac
17065 as_dirs="'$as_qdir' $as_dirs"
17066 as_dir=`$as_dirname -- "$as_dir" ||
17067$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17068 X"$as_dir" : 'X\(//\)[^/]' \| \
17069 X"$as_dir" : 'X\(//\)$' \| \
17070 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17071$as_echo X"$as_dir" |
17072 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17073 s//\1/
17074 q
17075 }
17076 /^X\(\/\/\)[^/].*/{
17077 s//\1/
17078 q
17079 }
17080 /^X\(\/\/\)$/{
17081 s//\1/
17082 q
17083 }
17084 /^X\(\/\).*/{
17085 s//\1/
17086 q
17087 }
17088 s/.*/./; q'`
17089 test -d "$as_dir" && break
17090 done
17091 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017092 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017093
17094
17095} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017096if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017097 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017098else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017099 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017100 as_mkdir_p=false
17101fi
17102
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017103
17104# as_fn_executable_p FILE
17105# -----------------------
17106# Test if FILE is an executable regular file.
17107as_fn_executable_p ()
17108{
17109 test -f "$1" && test -x "$1"
17110} # as_fn_executable_p
17111as_test_x='test -x'
17112as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017113
17114# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017115as_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 +000017116
17117# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017118as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017119
17120
Martin v. Löwis11437992002-04-12 09:54:03 +000017121exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017122## ----------------------------------- ##
17123## Main body of $CONFIG_STATUS script. ##
17124## ----------------------------------- ##
17125_ASEOF
17126test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017127
Matthias Kloseb9621712010-04-24 17:59:49 +000017128cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17129# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017130# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017131# values after options handling.
17132ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017133This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017134generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017135
17136 CONFIG_FILES = $CONFIG_FILES
17137 CONFIG_HEADERS = $CONFIG_HEADERS
17138 CONFIG_LINKS = $CONFIG_LINKS
17139 CONFIG_COMMANDS = $CONFIG_COMMANDS
17140 $ $0 $@
17141
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017142on `(hostname || uname -n) 2>/dev/null | sed 1q`
17143"
17144
Martin v. Löwis11437992002-04-12 09:54:03 +000017145_ACEOF
17146
Matthias Kloseb9621712010-04-24 17:59:49 +000017147case $ac_config_files in *"
17148"*) set x $ac_config_files; shift; ac_config_files=$*;;
17149esac
17150
17151case $ac_config_headers in *"
17152"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17153esac
17154
17155
17156cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017157# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017158config_files="$ac_config_files"
17159config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017161_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017162
Matthias Kloseb9621712010-04-24 17:59:49 +000017163cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017164ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017165\`$as_me' instantiates files and other configuration actions
17166from templates according to the current configuration. Unless the files
17167and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017168
Matthias Kloseb9621712010-04-24 17:59:49 +000017169Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017170
17171 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017172 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017173 --config print configuration, then exit
17174 -q, --quiet, --silent
17175 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017176 -d, --debug don't remove temporary files
17177 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017178 --file=FILE[:TEMPLATE]
17179 instantiate the configuration file FILE
17180 --header=FILE[:TEMPLATE]
17181 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017182
17183Configuration files:
17184$config_files
17185
17186Configuration headers:
17187$config_headers
17188
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017189Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017192cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17193ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017194ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017195python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017196configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017197 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017198
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017199Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017200This config.status script is free software; the Free Software Foundation
17201gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017202
17203ac_pwd='$ac_pwd'
17204srcdir='$srcdir'
17205INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017206MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017207test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017208_ACEOF
17209
Matthias Kloseb9621712010-04-24 17:59:49 +000017210cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17211# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017212ac_need_defaults=:
17213while test $# != 0
17214do
17215 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017216 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017217 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17218 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017219 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017220 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017221 --*=)
17222 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17223 ac_optarg=
17224 ac_shift=:
17225 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017226 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017227 ac_option=$1
17228 ac_optarg=$2
17229 ac_shift=shift
17230 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017231 esac
17232
Skip Montanaro6dead952003-09-25 14:50:04 +000017233 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017234 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017235 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17236 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017237 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017238 $as_echo "$ac_cs_version"; exit ;;
17239 --config | --confi | --conf | --con | --co | --c )
17240 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017241 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017242 debug=: ;;
17243 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017244 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017245 case $ac_optarg in
17246 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017247 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017248 esac
17249 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017250 ac_need_defaults=false;;
17251 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017252 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017253 case $ac_optarg in
17254 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17255 esac
17256 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017257 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017258 --he | --h)
17259 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017260 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017261Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017262 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017263 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017264 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17265 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17266 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017267
17268 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017269 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017270Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017271
Matthias Kloseb9621712010-04-24 17:59:49 +000017272 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017273 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017274
17275 esac
17276 shift
17277done
17278
Skip Montanaro6dead952003-09-25 14:50:04 +000017279ac_configure_extra_args=
17280
17281if $ac_cs_silent; then
17282 exec 6>/dev/null
17283 ac_configure_extra_args="$ac_configure_extra_args --silent"
17284fi
17285
17286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017287cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017288if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017289 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017290 shift
17291 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17292 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017293 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017294 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017295fi
17296
Martin v. Löwis11437992002-04-12 09:54:03 +000017297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017298cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017299exec 5>>config.log
17300{
17301 echo
17302 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17303## Running $as_me. ##
17304_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017305 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017306} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017309cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017310_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017311
Matthias Kloseb9621712010-04-24 17:59:49 +000017312cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017313
17314# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017315for ac_config_target in $ac_config_targets
17316do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017317 case $ac_config_target in
17318 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17319 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17320 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017321 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17322 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017323 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17324 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017325 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017326 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017327 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017328
Victor Stinnere0be4232011-10-25 13:06:09 +020017329 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017330 esac
17331done
17332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017333
Martin v. Löwis11437992002-04-12 09:54:03 +000017334# If the user did not use the arguments to specify the items to instantiate,
17335# then the envvar interface is used. Set only those that are not.
17336# We use the long form for the default assignment because of an extremely
17337# bizarre bug on SunOS 4.1.3.
17338if $ac_need_defaults; then
17339 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17340 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17341fi
17342
Skip Montanaro6dead952003-09-25 14:50:04 +000017343# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017344# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017345# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017346# Hook for its removal unless debugging.
17347# Note that there is a small window in which the directory will not be cleaned:
17348# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017349$debug ||
17350{
Victor Stinnere0be4232011-10-25 13:06:09 +020017351 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017352 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017353 : "${ac_tmp:=$tmp}"
17354 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017355' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017356 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017357}
Martin v. Löwis11437992002-04-12 09:54:03 +000017358# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017359
Martin v. Löwis11437992002-04-12 09:54:03 +000017360{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017361 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017362 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017363} ||
17364{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017365 tmp=./conf$$-$RANDOM
17366 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017367} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017368ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017369
Matthias Kloseb9621712010-04-24 17:59:49 +000017370# Set up the scripts for CONFIG_FILES section.
17371# No need to generate them if there are no CONFIG_FILES.
17372# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017373if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017374
Matthias Kloseb9621712010-04-24 17:59:49 +000017375
17376ac_cr=`echo X | tr X '\015'`
17377# On cygwin, bash can eat \r inside `` if the user requested igncr.
17378# But we know of no other shell where ac_cr would be empty at this
17379# point, so we can use a bashism as a fallback.
17380if test "x$ac_cr" = x; then
17381 eval ac_cr=\$\'\\r\'
17382fi
17383ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17384if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017385 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017386else
17387 ac_cs_awk_cr=$ac_cr
17388fi
17389
Victor Stinnere0be4232011-10-25 13:06:09 +020017390echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017391_ACEOF
17392
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017393
Matthias Kloseb9621712010-04-24 17:59:49 +000017394{
17395 echo "cat >conf$$subs.awk <<_ACEOF" &&
17396 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17397 echo "_ACEOF"
17398} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017399 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17400ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017401ac_delim='%!_!# '
17402for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017403 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017404 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017405
Matthias Kloseb9621712010-04-24 17:59:49 +000017406 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17407 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017408 break
17409 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017410 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017411 else
17412 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017413 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017414done
Matthias Kloseb9621712010-04-24 17:59:49 +000017415rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017416
Matthias Kloseb9621712010-04-24 17:59:49 +000017417cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017418cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017420sed -n '
17421h
17422s/^/S["/; s/!.*/"]=/
17423p
17424g
17425s/^[^!]*!//
17426:repl
17427t repl
17428s/'"$ac_delim"'$//
17429t delim
17430:nl
17431h
17432s/\(.\{148\}\)..*/\1/
17433t more1
17434s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17435p
17436n
17437b repl
17438:more1
17439s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17440p
17441g
17442s/.\{148\}//
17443t nl
17444:delim
17445h
17446s/\(.\{148\}\)..*/\1/
17447t more2
17448s/["\\]/\\&/g; s/^/"/; s/$/"/
17449p
17450b
17451:more2
17452s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17453p
17454g
17455s/.\{148\}//
17456t delim
17457' <conf$$subs.awk | sed '
17458/^[^""]/{
17459 N
17460 s/\n//
17461}
17462' >>$CONFIG_STATUS || ac_write_fail=1
17463rm -f conf$$subs.awk
17464cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17465_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017466cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017467 for (key in S) S_is_set[key] = 1
17468 FS = ""
17469
17470}
17471{
17472 line = $ 0
17473 nfields = split(line, field, "@")
17474 substed = 0
17475 len = length(field[1])
17476 for (i = 2; i < nfields; i++) {
17477 key = field[i]
17478 keylen = length(key)
17479 if (S_is_set[key]) {
17480 value = S[key]
17481 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17482 len += length(value) + length(field[++i])
17483 substed = 1
17484 } else
17485 len += 1 + keylen
17486 }
17487
17488 print line
17489}
17490
17491_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017493cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17494if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17495 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17496else
17497 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017498fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017499 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017500_ACEOF
17501
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017502# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17503# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017504# trailing colons and then remove the whole line if VPATH becomes empty
17505# (actually we leave an empty line to preserve line numbers).
17506if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017507 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17508h
17509s///
17510s/^/:/
17511s/[ ]*$/:/
17512s/:\$(srcdir):/:/g
17513s/:\${srcdir}:/:/g
17514s/:@srcdir@:/:/g
17515s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017516s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017517x
17518s/\(=[ ]*\).*/\1/
17519G
17520s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017521s/^[^=]*=[ ]*$//
17522}'
17523fi
17524
Matthias Kloseb9621712010-04-24 17:59:49 +000017525cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017526fi # test -n "$CONFIG_FILES"
17527
Matthias Kloseb9621712010-04-24 17:59:49 +000017528# Set up the scripts for CONFIG_HEADERS section.
17529# No need to generate them if there are no CONFIG_HEADERS.
17530# This happens for instance with `./config.status Makefile'.
17531if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017532cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017533BEGIN {
17534_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017535
Matthias Kloseb9621712010-04-24 17:59:49 +000017536# Transform confdefs.h into an awk script `defines.awk', embedded as
17537# here-document in config.status, that substitutes the proper values into
17538# config.h.in to produce config.h.
17539
17540# Create a delimiter string that does not exist in confdefs.h, to ease
17541# handling of long lines.
17542ac_delim='%!_!# '
17543for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017544 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17545 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017546 break
17547 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017548 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017549 else
17550 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17551 fi
17552done
17553
17554# For the awk script, D is an array of macro values keyed by name,
17555# likewise P contains macro parameters if any. Preserve backslash
17556# newline sequences.
17557
17558ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17559sed -n '
17560s/.\{148\}/&'"$ac_delim"'/g
17561t rset
17562:rset
17563s/^[ ]*#[ ]*define[ ][ ]*/ /
17564t def
17565d
17566:def
17567s/\\$//
17568t bsnl
17569s/["\\]/\\&/g
17570s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17571D["\1"]=" \3"/p
17572s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17573d
17574:bsnl
17575s/["\\]/\\&/g
17576s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17577D["\1"]=" \3\\\\\\n"\\/p
17578t cont
17579s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17580t cont
17581d
17582:cont
17583n
17584s/.\{148\}/&'"$ac_delim"'/g
17585t clear
17586:clear
17587s/\\$//
17588t bsnlc
17589s/["\\]/\\&/g; s/^/"/; s/$/"/p
17590d
17591:bsnlc
17592s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17593b cont
17594' <confdefs.h | sed '
17595s/'"$ac_delim"'/"\\\
17596"/g' >>$CONFIG_STATUS || ac_write_fail=1
17597
17598cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17599 for (key in D) D_is_set[key] = 1
17600 FS = ""
17601}
17602/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17603 line = \$ 0
17604 split(line, arg, " ")
17605 if (arg[1] == "#") {
17606 defundef = arg[2]
17607 mac1 = arg[3]
17608 } else {
17609 defundef = substr(arg[1], 2)
17610 mac1 = arg[2]
17611 }
17612 split(mac1, mac2, "(") #)
17613 macro = mac2[1]
17614 prefix = substr(line, 1, index(line, defundef) - 1)
17615 if (D_is_set[macro]) {
17616 # Preserve the white space surrounding the "#".
17617 print prefix "define", macro P[macro] D[macro]
17618 next
17619 } else {
17620 # Replace #undef with comments. This is necessary, for example,
17621 # in the case of _POSIX_SOURCE, which is predefined and required
17622 # on some systems where configure will not decide to define it.
17623 if (defundef == "undef") {
17624 print "/*", prefix defundef, macro, "*/"
17625 next
17626 }
17627 }
17628}
17629{ print }
17630_ACAWK
17631_ACEOF
17632cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017633 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017634fi # test -n "$CONFIG_HEADERS"
17635
17636
17637eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17638shift
17639for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017640do
17641 case $ac_tag in
17642 :[FHLC]) ac_mode=$ac_tag; continue;;
17643 esac
17644 case $ac_mode$ac_tag in
17645 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017646 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017647 :[FH]-) ac_tag=-:-;;
17648 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17649 esac
17650 ac_save_IFS=$IFS
17651 IFS=:
17652 set x $ac_tag
17653 IFS=$ac_save_IFS
17654 shift
17655 ac_file=$1
17656 shift
17657
17658 case $ac_mode in
17659 :L) ac_source=$1;;
17660 :[FH])
17661 ac_file_inputs=
17662 for ac_f
17663 do
17664 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017665 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017666 *) # Look for the file first in the build tree, then in the source tree
17667 # (if the path is not absolute). The absolute path cannot be DOS-style,
17668 # because $ac_f cannot contain `:'.
17669 test -f "$ac_f" ||
17670 case $ac_f in
17671 [\\/$]*) false;;
17672 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17673 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017674 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017675 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017676 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17677 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017678 done
17679
17680 # Let's still pretend it is `configure' which instantiates (i.e., don't
17681 # use $as_me), people would be surprised to read:
17682 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017683 configure_input='Generated from '`
17684 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17685 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017686 if test x"$ac_file" != x-; then
17687 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017688 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17689$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017690 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017691 # Neutralize special characters interpreted by sed in replacement strings.
17692 case $configure_input in #(
17693 *\&* | *\|* | *\\* )
17694 ac_sed_conf_input=`$as_echo "$configure_input" |
17695 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17696 *) ac_sed_conf_input=$configure_input;;
17697 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017698
17699 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017700 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17701 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017702 esac
17703 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017704 esac
17705
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017706 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017707$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017708 X"$ac_file" : 'X\(//\)[^/]' \| \
17709 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017710 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017711$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017712 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17713 s//\1/
17714 q
17715 }
17716 /^X\(\/\/\)[^/].*/{
17717 s//\1/
17718 q
17719 }
17720 /^X\(\/\/\)$/{
17721 s//\1/
17722 q
17723 }
17724 /^X\(\/\).*/{
17725 s//\1/
17726 q
17727 }
17728 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017729 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017730 ac_builddir=.
17731
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017732case "$ac_dir" in
17733.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17734*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017735 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017736 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017737 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017738 case $ac_top_builddir_sub in
17739 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17740 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17741 esac ;;
17742esac
17743ac_abs_top_builddir=$ac_pwd
17744ac_abs_builddir=$ac_pwd$ac_dir_suffix
17745# for backward compatibility:
17746ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017747
17748case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017749 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017750 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017751 ac_top_srcdir=$ac_top_builddir_sub
17752 ac_abs_top_srcdir=$ac_pwd ;;
17753 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017754 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017755 ac_top_srcdir=$srcdir
17756 ac_abs_top_srcdir=$srcdir ;;
17757 *) # Relative name.
17758 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17759 ac_top_srcdir=$ac_top_build_prefix$srcdir
17760 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017761esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017762ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017763
Martin v. Löwis11437992002-04-12 09:54:03 +000017764
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017765 case $ac_mode in
17766 :F)
17767 #
17768 # CONFIG_FILE
17769 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017770
17771 case $INSTALL in
17772 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017773 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017774 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017775 ac_MKDIR_P=$MKDIR_P
17776 case $MKDIR_P in
17777 [\\/$]* | ?:[\\/]* ) ;;
17778 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17779 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017780_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017781
Matthias Kloseb9621712010-04-24 17:59:49 +000017782cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017783# If the template does not know about datarootdir, expand it.
17784# FIXME: This hack should be removed a few years after 2.60.
17785ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017786ac_sed_dataroot='
17787/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017788 p
17789 q
17790}
17791/@datadir@/p
17792/@docdir@/p
17793/@infodir@/p
17794/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017795/@mandir@/p'
17796case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017797*datarootdir*) ac_datarootdir_seen=yes;;
17798*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017799 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17800$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017802cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017803 ac_datarootdir_hack='
17804 s&@datadir@&$datadir&g
17805 s&@docdir@&$docdir&g
17806 s&@infodir@&$infodir&g
17807 s&@localedir@&$localedir&g
17808 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017809 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017810esac
17811_ACEOF
17812
17813# Neutralize VPATH when `$srcdir' = `.'.
17814# Shell code in configure.ac might set extrasub.
17815# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017816cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17817ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017818$extrasub
17819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017820cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017821:t
17822/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017823s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017824s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017825s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017826s&@srcdir@&$ac_srcdir&;t t
17827s&@abs_srcdir@&$ac_abs_srcdir&;t t
17828s&@top_srcdir@&$ac_top_srcdir&;t t
17829s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17830s&@builddir@&$ac_builddir&;t t
17831s&@abs_builddir@&$ac_abs_builddir&;t t
17832s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17833s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017834s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017835$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017836"
Victor Stinnere0be4232011-10-25 13:06:09 +020017837eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17838 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017840test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017841 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17842 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17843 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017844 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017845which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017846$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017847which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017848
Victor Stinnere0be4232011-10-25 13:06:09 +020017849 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017850 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017851 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17852 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017853 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017854 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017855 ;;
17856 :H)
17857 #
17858 # CONFIG_HEADER
17859 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017860 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017861 {
17862 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017863 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17864 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017865 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017866 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017867 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17868$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017869 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017870 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017871 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017872 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017873 fi
17874 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017875 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017876 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017877 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017878 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017879 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017881
17882 esac
17883
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017884
17885 case $ac_file$ac_mode in
17886 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17887
17888 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017889done # for ac_tag
17890
Guido van Rossum627b2d71993-12-24 10:39:16 +000017891
Matthias Kloseb9621712010-04-24 17:59:49 +000017892as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017893_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017894ac_clean_files=$ac_clean_files_save
17895
Matthias Kloseb9621712010-04-24 17:59:49 +000017896test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017897 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017898
Martin v. Löwis11437992002-04-12 09:54:03 +000017899
17900# configure is writing to config.log, and then calls config.status.
17901# config.status does its own redirection, appending to config.log.
17902# Unfortunately, on DOS this fails, as config.log is still kept open
17903# by configure, so config.status won't be able to write to it; its
17904# output is simply discarded. So we exec the FD to /dev/null,
17905# effectively closing config.log, so it can be properly (re)opened and
17906# appended to by config.status. When coming back to configure, we
17907# need to make the FD available again.
17908if test "$no_create" != yes; then
17909 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017910 ac_config_status_args=
17911 test "$silent" = yes &&
17912 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017913 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017914 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017915 exec 5>>config.log
17916 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17917 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017918 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017919fi
17920if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17922$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017923fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017924
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017925
Christian Heimes75ed8902013-11-20 01:11:18 +010017926echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017927if test ! -f Modules/Setup
17928then
17929 cp $srcdir/Modules/Setup.dist Modules/Setup
17930fi
17931
Christian Heimes75ed8902013-11-20 01:11:18 +010017932echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017933if test ! -f Modules/Setup.local
17934then
17935 echo "# Edit this file for local setup changes" >Modules/Setup.local
17936fi
17937
Christian Heimes75ed8902013-11-20 01:11:18 +010017938echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017939$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17940 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017941 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017942mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017943
17944if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17945 echo "" >&6
17946 echo "" >&6
Christian Heimes938da642016-09-24 12:34:25 +020017947 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 +000017948 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017949 echo "" >&6
17950 echo "" >&6
17951fi
17952