blob: 3853716227809ed734e4ba1aa795689093d48c3d [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.
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003# Generated by GNU Autoconf 2.69 for python 3.6.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://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
270$0: http://bugs.python.org/ about your system, including
271$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'
Benjamin Petersona8c22a02015-05-27 23:29:00 -0500583PACKAGE_VERSION='3.6'
584PACKAGE_STRING='python 3.6'
Georg Brandle2e15612009-05-20 18:25:10 +0000585PACKAGE_BUGREPORT='http://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
645THREADOBJ
646LDLAST
647USE_THREAD_MODULE
648SIGNAL_OBJS
649USE_SIGNAL_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700650TCLTK_LIBS
651TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
655PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000656SHLIBS
657CFLAGSFORSHARED
658LINKFORSHARED
659CCSHARED
660BLDSHARED
661LDCXXSHARED
662LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700663SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBTOOL_CRUFT
665OTHER_LIBTOOL_OPT
666UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700667CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BASECFLAGS
669OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700670LLVM_PROF_FOUND
671LLVM_PROF_ERR
672LLVM_PROF_FILE
673LLVM_PROF_MERGER
674PGO_PROF_USE_FLAG
675PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700676LTOFLAGS
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000677ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000678LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100679MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000680INSTALL_DATA
681INSTALL_SCRIPT
682INSTALL_PROGRAM
Kushal Das02d23a22014-04-15 23:50:06 +0530683OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200684PYTHON
685ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200686ac_ct_READELF
687READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000688ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200689ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000690AR
691RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000692USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000693GNULD
694LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000695LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000696RUNSHARED
697INSTSONAME
698LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000699PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000700BLDLIBRARY
701DLLLIBRARY
702LDLIBRARY
703LIBRARY
704BUILDEXEEXT
705EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200706NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200707MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200708PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200709PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200710MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200711ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000712MAINCC
713CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714GREP
715CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000716OBJEXT
717EXEEXT
718ac_ct_CC
719CPPFLAGS
720LDFLAGS
721CFLAGS
722CC
723EXPORT_MACOSX_DEPLOYMENT_TARGET
724CONFIGURE_MACOSX_DEPLOYMENT_TARGET
725SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200726_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000727MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000728FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000729FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800730FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000731FRAMEWORKALTINSTALLLAST
732FRAMEWORKALTINSTALLFIRST
733FRAMEWORKINSTALLLAST
734FRAMEWORKINSTALLFIRST
735PYTHONFRAMEWORKINSTALLDIR
736PYTHONFRAMEWORKPREFIX
737PYTHONFRAMEWORKDIR
738PYTHONFRAMEWORKIDENTIFIER
739PYTHONFRAMEWORK
740LIPO_32BIT_FLAGS
741ARCH_RUN_32BIT
742UNIVERSALSDK
743CONFIG_ARGS
744SOVERSION
745VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200746PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100747host_os
748host_vendor
749host_cpu
750host
751build_os
752build_vendor
753build_cpu
754build
Martin Panter1046d5c2016-04-23 00:58:44 +0000755cross_compiling
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500756HAS_HG
757HGBRANCH
758HGTAG
759HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400760BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000761target_alias
762host_alias
763build_alias
764LIBS
765ECHO_T
766ECHO_N
767ECHO_C
768DEFS
769mandir
770localedir
771libdir
772psdir
773pdfdir
774dvidir
775htmldir
776infodir
777docdir
778oldincludedir
779includedir
doko@ubuntu.com55532312016-06-14 08:55:19 +0200780runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000781localstatedir
782sharedstatedir
783sysconfdir
784datadir
785datarootdir
786libexecdir
787sbindir
788bindir
789program_transform_name
790prefix
791exec_prefix
792PACKAGE_URL
793PACKAGE_BUGREPORT
794PACKAGE_STRING
795PACKAGE_VERSION
796PACKAGE_TARNAME
797PACKAGE_NAME
798PATH_SEPARATOR
799SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000800ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000801ac_user_opts='
802enable_option_checking
803enable_universalsdk
804with_universal_archs
805with_framework_name
806enable_framework
807with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600808with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000809with_cxx_main
810with_suffix
811enable_shared
812enable_profiling
813with_pydebug
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700814with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100815with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100816with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000817with_libs
818with_system_expat
819with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100820with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000821enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700822with_tcltk_includes
823with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_dbmliborder
825with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000826with_threads
827with_thread
828enable_ipv6
829with_doc_strings
830with_tsc
831with_pymalloc
832with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_fpectl
834with_libm
835with_libc
836enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800838with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000839'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840 ac_precious_vars='build_alias
841host_alias
842target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100843MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000844CC
845CFLAGS
846LDFLAGS
847LIBS
848CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100849CPP
850PKG_CONFIG
851PKG_CONFIG_PATH
852PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000853
Guido van Rossum627b2d71993-12-24 10:39:16 +0000854
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000856ac_init_help=
857ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000858ac_unrecognized_opts=
859ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860# The variables have the same names as the options, with
861# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000862cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000863exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865no_recursion=
866prefix=NONE
867program_prefix=NONE
868program_suffix=NONE
869program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874x_includes=NONE
875x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000876
877# Installation directory options.
878# These are left unexpanded so users can "make install exec_prefix=/foo"
879# and all the variables that are supposed to be based on exec_prefix
880# by default will actually change.
881# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000882# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000883bindir='${exec_prefix}/bin'
884sbindir='${exec_prefix}/sbin'
885libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000886datarootdir='${prefix}/share'
887datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000888sysconfdir='${prefix}/etc'
889sharedstatedir='${prefix}/com'
890localstatedir='${prefix}/var'
doko@ubuntu.com55532312016-06-14 08:55:19 +0200891runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000892includedir='${prefix}/include'
893oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
895infodir='${datarootdir}/info'
896htmldir='${docdir}'
897dvidir='${docdir}'
898pdfdir='${docdir}'
899psdir='${docdir}'
900libdir='${exec_prefix}/lib'
901localedir='${datarootdir}/locale'
902mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000903
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000905ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000907do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908 # If the previous option needs an argument, assign it.
909 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911 ac_prev=
912 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000913 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200916 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
917 *=) ac_optarg= ;;
918 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000921 # Accept the important Cygnus configure options, so we can diagnose typos.
922
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923 case $ac_dashdash$ac_option in
924 --)
925 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927 -bindir | --bindir | --bindi | --bind | --bin | --bi)
928 ac_prev=bindir ;;
929 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
932 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000937 -cache-file | --cache-file | --cache-fil | --cache-fi \
938 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
939 ac_prev=cache_file ;;
940 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
941 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 cache_file=$ac_optarg ;;
943
944 --config-cache | -C)
945 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000946
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000947 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000949 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
953 | --dataroo | --dataro | --datar)
954 ac_prev=datarootdir ;;
955 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
956 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
957 datarootdir=$ac_optarg ;;
958
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000960 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000961 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000962 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200963 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000964 ac_useropt_orig=$ac_useropt
965 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
966 case $ac_user_opts in
967 *"
968"enable_$ac_useropt"
969"*) ;;
970 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
971 ac_unrecognized_sep=', ';;
972 esac
973 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000974
975 -docdir | --docdir | --docdi | --doc | --do)
976 ac_prev=docdir ;;
977 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
978 docdir=$ac_optarg ;;
979
980 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
981 ac_prev=dvidir ;;
982 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
983 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000986 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000987 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200989 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000990 ac_useropt_orig=$ac_useropt
991 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
992 case $ac_user_opts in
993 *"
994"enable_$ac_useropt"
995"*) ;;
996 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
997 ac_unrecognized_sep=', ';;
998 esac
999 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1002 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1003 | --exec | --exe | --ex)
1004 ac_prev=exec_prefix ;;
1005 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1006 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1007 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
1010 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001011 # Obsolete; use --with-gas.
1012 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 -help | --help | --hel | --he | -h)
1015 ac_init_help=long ;;
1016 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1017 ac_init_help=recursive ;;
1018 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1019 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
1021 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001026 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1027 ac_prev=htmldir ;;
1028 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1029 | --ht=*)
1030 htmldir=$ac_optarg ;;
1031
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001032 -includedir | --includedir | --includedi | --included | --include \
1033 | --includ | --inclu | --incl | --inc)
1034 ac_prev=includedir ;;
1035 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1036 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
1039 -infodir | --infodir | --infodi | --infod | --info | --inf)
1040 ac_prev=infodir ;;
1041 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
1044 -libdir | --libdir | --libdi | --libd)
1045 ac_prev=libdir ;;
1046 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
1049 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1050 | --libexe | --libex | --libe)
1051 ac_prev=libexecdir ;;
1052 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1053 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001056 -localedir | --localedir | --localedi | --localed | --locale)
1057 ac_prev=localedir ;;
1058 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1059 localedir=$ac_optarg ;;
1060
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001062 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063 ac_prev=localstatedir ;;
1064 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001065 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067
1068 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1069 ac_prev=mandir ;;
1070 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074 # Obsolete; use --without-fp.
1075 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 no_create=yes ;;
1080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1082 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1083 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001085 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1086 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1087 | --oldin | --oldi | --old | --ol | --o)
1088 ac_prev=oldincludedir ;;
1089 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1090 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1091 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1095 ac_prev=prefix ;;
1096 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
1099 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1100 | --program-pre | --program-pr | --program-p)
1101 ac_prev=program_prefix ;;
1102 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1103 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105
1106 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1107 | --program-suf | --program-su | --program-s)
1108 ac_prev=program_suffix ;;
1109 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1110 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112
1113 -program-transform-name | --program-transform-name \
1114 | --program-transform-nam | --program-transform-na \
1115 | --program-transform-n | --program-transform- \
1116 | --program-transform | --program-transfor \
1117 | --program-transfo | --program-transf \
1118 | --program-trans | --program-tran \
1119 | --progr-tra | --program-tr | --program-t)
1120 ac_prev=program_transform_name ;;
1121 -program-transform-name=* | --program-transform-name=* \
1122 | --program-transform-nam=* | --program-transform-na=* \
1123 | --program-transform-n=* | --program-transform-=* \
1124 | --program-transform=* | --program-transfor=* \
1125 | --program-transfo=* | --program-transf=* \
1126 | --program-trans=* | --program-tran=* \
1127 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001130 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1131 ac_prev=pdfdir ;;
1132 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1133 pdfdir=$ac_optarg ;;
1134
1135 -psdir | --psdir | --psdi | --psd | --ps)
1136 ac_prev=psdir ;;
1137 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1138 psdir=$ac_optarg ;;
1139
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1141 | -silent | --silent | --silen | --sile | --sil)
1142 silent=yes ;;
1143
doko@ubuntu.com55532312016-06-14 08:55:19 +02001144 -runstatedir | --runstatedir | --runstatedi | --runstated \
1145 | --runstate | --runstat | --runsta | --runst | --runs \
1146 | --run | --ru | --r)
1147 ac_prev=runstatedir ;;
1148 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1149 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1150 | --run=* | --ru=* | --r=*)
1151 runstatedir=$ac_optarg ;;
1152
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001153 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1154 ac_prev=sbindir ;;
1155 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1156 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001158
1159 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1160 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1161 | --sharedst | --shareds | --shared | --share | --shar \
1162 | --sha | --sh)
1163 ac_prev=sharedstatedir ;;
1164 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1165 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1166 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1167 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001169
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001170 -site | --site | --sit)
1171 ac_prev=site ;;
1172 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001174
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1176 ac_prev=srcdir ;;
1177 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001180 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1181 | --syscon | --sysco | --sysc | --sys | --sy)
1182 ac_prev=sysconfdir ;;
1183 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1184 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001186
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191
1192 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1193 verbose=yes ;;
1194
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 -version | --version | --versio | --versi | --vers | -V)
1196 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001202 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 ac_useropt_orig=$ac_useropt
1204 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1205 case $ac_user_opts in
1206 *"
1207"with_$ac_useropt"
1208"*) ;;
1209 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1210 ac_unrecognized_sep=', ';;
1211 esac
1212 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001213
1214 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001216 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001218 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 ac_useropt_orig=$ac_useropt
1220 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1221 case $ac_user_opts in
1222 *"
1223"with_$ac_useropt"
1224"*) ;;
1225 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1226 ac_unrecognized_sep=', ';;
1227 esac
1228 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001230 --x)
1231 # Obsolete; use --with-x.
1232 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233
1234 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1235 | --x-incl | --x-inc | --x-in | --x-i)
1236 ac_prev=x_includes ;;
1237 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1238 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240
1241 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1242 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1243 ac_prev=x_libraries ;;
1244 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1245 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001248 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1249Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250 ;;
1251
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 *=*)
1253 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1254 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001255 case $ac_envvar in #(
1256 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001257 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001258 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001259 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 export $ac_envvar ;;
1261
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001262 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001265 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001267 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001268 ;;
1269
1270 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001271done
1272
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001274 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001275 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276fi
1277
Matthias Kloseb9621712010-04-24 17:59:49 +00001278if test -n "$ac_unrecognized_opts"; then
1279 case $enable_option_checking in
1280 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001281 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001282 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1283 esac
1284fi
1285
1286# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001287for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1288 datadir sysconfdir sharedstatedir localstatedir includedir \
1289 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
doko@ubuntu.com55532312016-06-14 08:55:19 +02001290 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001291do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001293 # Remove trailing slashes.
1294 case $ac_val in
1295 */ )
1296 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1297 eval $ac_var=\$ac_val;;
1298 esac
1299 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001300 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001301 [\\/$]* | ?:[\\/]* ) continue;;
1302 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001303 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001304 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001305done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001306
Martin v. Löwis11437992002-04-12 09:54:03 +00001307# There might be people who depend on the old broken behavior: `$host'
1308# used to hold the argument of --host etc.
1309# FIXME: To remove some day.
1310build=$build_alias
1311host=$host_alias
1312target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Martin v. Löwis11437992002-04-12 09:54:03 +00001314# FIXME: To remove some day.
1315if test "x$host_alias" != x; then
1316 if test "x$build_alias" = x; then
1317 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001318 elif test "x$build_alias" != "x$host_alias"; then
1319 cross_compiling=yes
1320 fi
1321fi
1322
1323ac_tool_prefix=
1324test -n "$host_alias" && ac_tool_prefix=$host_alias-
1325
1326test "$silent" = yes && exec 6>/dev/null
1327
Guido van Rossum627b2d71993-12-24 10:39:16 +00001328
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329ac_pwd=`pwd` && test -n "$ac_pwd" &&
1330ac_ls_di=`ls -di .` &&
1331ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001332 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001334 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335
1336
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337# Find the source files, if location was not specified.
1338if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001339 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001341 ac_confdir=`$as_dirname -- "$as_myself" ||
1342$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1343 X"$as_myself" : 'X\(//\)[^/]' \| \
1344 X"$as_myself" : 'X\(//\)$' \| \
1345 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1346$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1348 s//\1/
1349 q
1350 }
1351 /^X\(\/\/\)[^/].*/{
1352 s//\1/
1353 q
1354 }
1355 /^X\(\/\/\)$/{
1356 s//\1/
1357 q
1358 }
1359 /^X\(\/\).*/{
1360 s//\1/
1361 q
1362 }
1363 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001364 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001365 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001366 srcdir=..
1367 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001368else
1369 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371if test ! -r "$srcdir/$ac_unique_file"; then
1372 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001373 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001375ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1376ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001377 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001378 pwd)`
1379# When building in place, set srcdir=.
1380if test "$ac_abs_confdir" = "$ac_pwd"; then
1381 srcdir=.
1382fi
1383# Remove unnecessary trailing slashes from srcdir.
1384# Double slashes in file names in object file debugging info
1385# mess up M-x gdb in Emacs.
1386case $srcdir in
1387*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1388esac
1389for ac_var in $ac_precious_vars; do
1390 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1391 eval ac_env_${ac_var}_value=\$${ac_var}
1392 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1393 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1394done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001395
Martin v. Löwis11437992002-04-12 09:54:03 +00001396#
1397# Report the --help message.
1398#
1399if test "$ac_init_help" = "long"; then
1400 # Omit some internal or obsolete options to make the list less imposing.
1401 # This message is too long to be a string in the A/UX 3.1 sh.
1402 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001403\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001404
1405Usage: $0 [OPTION]... [VAR=VALUE]...
1406
1407To assign environment variables (e.g., CC, CFLAGS...), specify them as
1408VAR=VALUE. See below for descriptions of some of the useful variables.
1409
1410Defaults for the options are specified in brackets.
1411
1412Configuration:
1413 -h, --help display this help and exit
1414 --help=short display options specific to this package
1415 --help=recursive display the short help of all the included packages
1416 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001417 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 --cache-file=FILE cache test results in FILE [disabled]
1419 -C, --config-cache alias for \`--cache-file=config.cache'
1420 -n, --no-create do not create output files
1421 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1422
Martin v. Löwis11437992002-04-12 09:54:03 +00001423Installation directories:
1424 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001425 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001427 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001428
1429By default, \`make install' will install all the files in
1430\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1431an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1432for instance \`--prefix=\$HOME'.
1433
1434For better control, use the options below.
1435
1436Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001437 --bindir=DIR user executables [EPREFIX/bin]
1438 --sbindir=DIR system admin executables [EPREFIX/sbin]
1439 --libexecdir=DIR program executables [EPREFIX/libexec]
1440 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1441 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1442 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
doko@ubuntu.com55532312016-06-14 08:55:19 +02001443 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 --libdir=DIR object code libraries [EPREFIX/lib]
1445 --includedir=DIR C header files [PREFIX/include]
1446 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1447 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1448 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1449 --infodir=DIR info documentation [DATAROOTDIR/info]
1450 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1451 --mandir=DIR man documentation [DATAROOTDIR/man]
1452 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1453 --htmldir=DIR html documentation [DOCDIR]
1454 --dvidir=DIR dvi documentation [DOCDIR]
1455 --pdfdir=DIR pdf documentation [DOCDIR]
1456 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001457_ACEOF
1458
1459 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001460
1461System types:
1462 --build=BUILD configure for building on BUILD [guessed]
1463 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001464_ACEOF
1465fi
1466
1467if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001468 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001469 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001470 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 cat <<\_ACEOF
1472
1473Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001474 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1476 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001477 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001478 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001479 --enable-framework[=INSTALLDIR]
1480 Build (MacOSX|Darwin) framework
1481 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001482 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001483 --enable-loadable-sqlite-extensions
1484 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --enable-ipv6 Enable ipv6 (with ipv4) support
1486 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001487 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001488 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001489
1490Optional Packages:
1491 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1492 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001493 --with-universal-archs=ARCH
1494 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001495 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001496 --with-framework-name=FRAMEWORK
1497 specify an alternate name of the framework built
1498 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001499 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001500 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001501 --with-cxx-main=<compiler>
1502 compile main() and link python executable with C++
1503 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001504 --with-suffix=.exe set executable suffix
1505 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001506 --with-lto Enable Link Time Optimization in PGO builds.
1507 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001508 --with-hash-algorithm=[fnv|siphash24]
1509 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001510 --with-address-sanitizer
1511 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001512 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001513 --with-system-expat build pyexpat module using an installed expat
1514 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001515 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001516 --with-system-libmpdec build _decimal module using an installed libmpdec
1517 library
Ned Deilyd819b932013-09-06 01:07:05 -07001518 --with-tcltk-includes='-I...'
1519 override search for Tcl and Tk include files
1520 --with-tcltk-libs='-L...'
1521 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001522 --with-dbmliborder=db1:db2:...
1523 order to check db backends for dbm. Valid value is a
1524 colon separated string with the backend names
1525 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001526 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001527 --with(out)-threads[=DIRECTORY]
1528 disable/enable thread support
1529 --with(out)-thread[=DIRECTORY]
1530 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001532 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001533 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001534 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001535 --with-fpectl enable SIGFPE catching
1536 --with-libm=STRING math library
1537 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001538 --with(out)-computed-gotos
1539 Use computed gotos in evaluation loop (enabled by
1540 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001541 --with(out)-ensurepip=[=upgrade]
1542 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001543
1544Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001545 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001546 CC C compiler command
1547 CFLAGS C compiler flags
1548 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1549 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001551 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001552 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001553 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001554 PKG_CONFIG path to pkg-config utility
1555 PKG_CONFIG_PATH
1556 directories to add to pkg-config's search path
1557 PKG_CONFIG_LIBDIR
1558 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001559
1560Use these variables to override the choices made by `configure' or to help
1561it to find libraries and programs with nonstandard names/locations.
1562
Georg Brandle2e15612009-05-20 18:25:10 +00001563Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001564_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001565ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001566fi
1567
1568if test "$ac_init_help" = "recursive"; then
1569 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001570 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001571 test -d "$ac_dir" ||
1572 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1573 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 ac_builddir=.
1575
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001576case "$ac_dir" in
1577.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1578*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001581 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001582 case $ac_top_builddir_sub in
1583 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1584 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1585 esac ;;
1586esac
1587ac_abs_top_builddir=$ac_pwd
1588ac_abs_builddir=$ac_pwd$ac_dir_suffix
1589# for backward compatibility:
1590ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001591
1592case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 ac_top_srcdir=$ac_top_builddir_sub
1596 ac_abs_top_srcdir=$ac_pwd ;;
1597 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 ac_top_srcdir=$srcdir
1600 ac_abs_top_srcdir=$srcdir ;;
1601 *) # Relative name.
1602 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1603 ac_top_srcdir=$ac_top_build_prefix$srcdir
1604 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001605esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001607
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001608 cd "$ac_dir" || { ac_status=$?; continue; }
1609 # Check for guested configure.
1610 if test -f "$ac_srcdir/configure.gnu"; then
1611 echo &&
1612 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1613 elif test -f "$ac_srcdir/configure"; then
1614 echo &&
1615 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001616 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001617 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001618 fi || ac_status=$?
1619 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001620 done
1621fi
1622
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001623test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001624if $ac_init_version; then
1625 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001626python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001627generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001628
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001629Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001630This configure script is free software; the Free Software Foundation
1631gives unlimited permission to copy, distribute and modify it.
1632_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001635
1636## ------------------------ ##
1637## Autoconf initialization. ##
1638## ------------------------ ##
1639
1640# ac_fn_c_try_compile LINENO
1641# --------------------------
1642# Try to compile conftest.$ac_ext, and return whether this succeeded.
1643ac_fn_c_try_compile ()
1644{
1645 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1646 rm -f conftest.$ac_objext
1647 if { { ac_try="$ac_compile"
1648case "(($ac_try" in
1649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1650 *) ac_try_echo=$ac_try;;
1651esac
1652eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1653$as_echo "$ac_try_echo"; } >&5
1654 (eval "$ac_compile") 2>conftest.err
1655 ac_status=$?
1656 if test -s conftest.err; then
1657 grep -v '^ *+' conftest.err >conftest.er1
1658 cat conftest.er1 >&5
1659 mv -f conftest.er1 conftest.err
1660 fi
1661 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1662 test $ac_status = 0; } && {
1663 test -z "$ac_c_werror_flag" ||
1664 test ! -s conftest.err
1665 } && test -s conftest.$ac_objext; then :
1666 ac_retval=0
1667else
1668 $as_echo "$as_me: failed program was:" >&5
1669sed 's/^/| /' conftest.$ac_ext >&5
1670
1671 ac_retval=1
1672fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001673 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001674 as_fn_set_status $ac_retval
1675
1676} # ac_fn_c_try_compile
1677
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001678# ac_fn_c_try_cpp LINENO
1679# ----------------------
1680# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1681ac_fn_c_try_cpp ()
1682{
1683 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1684 if { { ac_try="$ac_cpp conftest.$ac_ext"
1685case "(($ac_try" in
1686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1687 *) ac_try_echo=$ac_try;;
1688esac
1689eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1690$as_echo "$ac_try_echo"; } >&5
1691 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1692 ac_status=$?
1693 if test -s conftest.err; then
1694 grep -v '^ *+' conftest.err >conftest.er1
1695 cat conftest.er1 >&5
1696 mv -f conftest.er1 conftest.err
1697 fi
1698 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1699 test $ac_status = 0; } > conftest.i && {
1700 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1701 test ! -s conftest.err
1702 }; then :
1703 ac_retval=0
1704else
1705 $as_echo "$as_me: failed program was:" >&5
1706sed 's/^/| /' conftest.$ac_ext >&5
1707
1708 ac_retval=1
1709fi
1710 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1711 as_fn_set_status $ac_retval
1712
1713} # ac_fn_c_try_cpp
1714
Matthias Kloseb9621712010-04-24 17:59:49 +00001715# ac_fn_c_try_link LINENO
1716# -----------------------
1717# Try to link conftest.$ac_ext, and return whether this succeeded.
1718ac_fn_c_try_link ()
1719{
1720 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1721 rm -f conftest.$ac_objext conftest$ac_exeext
1722 if { { ac_try="$ac_link"
1723case "(($ac_try" in
1724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1725 *) ac_try_echo=$ac_try;;
1726esac
1727eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1728$as_echo "$ac_try_echo"; } >&5
1729 (eval "$ac_link") 2>conftest.err
1730 ac_status=$?
1731 if test -s conftest.err; then
1732 grep -v '^ *+' conftest.err >conftest.er1
1733 cat conftest.er1 >&5
1734 mv -f conftest.er1 conftest.err
1735 fi
1736 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1737 test $ac_status = 0; } && {
1738 test -z "$ac_c_werror_flag" ||
1739 test ! -s conftest.err
1740 } && test -s conftest$ac_exeext && {
1741 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001742 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001743 }; then :
1744 ac_retval=0
1745else
1746 $as_echo "$as_me: failed program was:" >&5
1747sed 's/^/| /' conftest.$ac_ext >&5
1748
1749 ac_retval=1
1750fi
1751 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1752 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1753 # interfere with the next link command; also delete a directory that is
1754 # left behind by Apple's compiler. We do this before executing the actions.
1755 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001756 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001757 as_fn_set_status $ac_retval
1758
1759} # ac_fn_c_try_link
1760
Matthias Kloseb9621712010-04-24 17:59:49 +00001761# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1762# -------------------------------------------------------
1763# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1764# the include files in INCLUDES and setting the cache variable VAR
1765# accordingly.
1766ac_fn_c_check_header_mongrel ()
1767{
1768 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001769 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1771$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001772if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001773 $as_echo_n "(cached) " >&6
1774fi
1775eval ac_res=\$$3
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1777$as_echo "$ac_res" >&6; }
1778else
1779 # Is the header compilable?
1780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1781$as_echo_n "checking $2 usability... " >&6; }
1782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1783/* end confdefs.h. */
1784$4
1785#include <$2>
1786_ACEOF
1787if ac_fn_c_try_compile "$LINENO"; then :
1788 ac_header_compiler=yes
1789else
1790 ac_header_compiler=no
1791fi
1792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1794$as_echo "$ac_header_compiler" >&6; }
1795
1796# Is the header present?
1797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1798$as_echo_n "checking $2 presence... " >&6; }
1799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1800/* end confdefs.h. */
1801#include <$2>
1802_ACEOF
1803if ac_fn_c_try_cpp "$LINENO"; then :
1804 ac_header_preproc=yes
1805else
1806 ac_header_preproc=no
1807fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001808rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1810$as_echo "$ac_header_preproc" >&6; }
1811
1812# So? What about this header?
1813case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1814 yes:no: )
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1816$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1818$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1819 ;;
1820 no:yes:* )
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1822$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1824$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1826$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1828$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1830$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001831( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001832## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001833## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001834 ) | sed "s/^/$as_me: WARNING: /" >&2
1835 ;;
1836esac
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1838$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001839if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001840 $as_echo_n "(cached) " >&6
1841else
1842 eval "$3=\$ac_header_compiler"
1843fi
1844eval ac_res=\$$3
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1846$as_echo "$ac_res" >&6; }
1847fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001848 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001849
1850} # ac_fn_c_check_header_mongrel
1851
1852# ac_fn_c_try_run LINENO
1853# ----------------------
1854# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1855# that executables *can* be run.
1856ac_fn_c_try_run ()
1857{
1858 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1859 if { { ac_try="$ac_link"
1860case "(($ac_try" in
1861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1862 *) ac_try_echo=$ac_try;;
1863esac
1864eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1865$as_echo "$ac_try_echo"; } >&5
1866 (eval "$ac_link") 2>&5
1867 ac_status=$?
1868 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1869 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1870 { { case "(($ac_try" in
1871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1872 *) ac_try_echo=$ac_try;;
1873esac
1874eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1875$as_echo "$ac_try_echo"; } >&5
1876 (eval "$ac_try") 2>&5
1877 ac_status=$?
1878 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1879 test $ac_status = 0; }; }; then :
1880 ac_retval=0
1881else
1882 $as_echo "$as_me: program exited with status $ac_status" >&5
1883 $as_echo "$as_me: failed program was:" >&5
1884sed 's/^/| /' conftest.$ac_ext >&5
1885
1886 ac_retval=$ac_status
1887fi
1888 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001889 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001890 as_fn_set_status $ac_retval
1891
1892} # ac_fn_c_try_run
1893
1894# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1895# -------------------------------------------------------
1896# Tests whether HEADER exists and can be compiled using the include files in
1897# INCLUDES, setting the cache variable VAR accordingly.
1898ac_fn_c_check_header_compile ()
1899{
1900 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1902$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001903if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001904 $as_echo_n "(cached) " >&6
1905else
1906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1907/* end confdefs.h. */
1908$4
1909#include <$2>
1910_ACEOF
1911if ac_fn_c_try_compile "$LINENO"; then :
1912 eval "$3=yes"
1913else
1914 eval "$3=no"
1915fi
1916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1917fi
1918eval ac_res=\$$3
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1920$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001921 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001922
1923} # ac_fn_c_check_header_compile
1924
Matthias Kloseb9621712010-04-24 17:59:49 +00001925# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1926# -------------------------------------------
1927# Tests whether TYPE exists after having included INCLUDES, setting cache
1928# variable VAR accordingly.
1929ac_fn_c_check_type ()
1930{
1931 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1933$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001934if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001935 $as_echo_n "(cached) " >&6
1936else
1937 eval "$3=no"
1938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1939/* end confdefs.h. */
1940$4
1941int
1942main ()
1943{
1944if (sizeof ($2))
1945 return 0;
1946 ;
1947 return 0;
1948}
1949_ACEOF
1950if ac_fn_c_try_compile "$LINENO"; then :
1951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1952/* end confdefs.h. */
1953$4
1954int
1955main ()
1956{
1957if (sizeof (($2)))
1958 return 0;
1959 ;
1960 return 0;
1961}
1962_ACEOF
1963if ac_fn_c_try_compile "$LINENO"; then :
1964
1965else
1966 eval "$3=yes"
1967fi
1968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1969fi
1970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1971fi
1972eval ac_res=\$$3
1973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1974$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001975 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001976
1977} # ac_fn_c_check_type
1978
1979# ac_fn_c_find_uintX_t LINENO BITS VAR
1980# ------------------------------------
1981# Finds an unsigned integer type with width BITS, setting cache variable VAR
1982# accordingly.
1983ac_fn_c_find_uintX_t ()
1984{
1985 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1987$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001988if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001989 $as_echo_n "(cached) " >&6
1990else
1991 eval "$3=no"
1992 # Order is important - never check a type that is potentially smaller
1993 # than half of the expected target width.
1994 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1995 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1997/* end confdefs.h. */
1998$ac_includes_default
1999int
2000main ()
2001{
2002static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002003test_array [0] = 0;
2004return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002005
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011 case $ac_type in #(
2012 uint$2_t) :
2013 eval "$3=yes" ;; #(
2014 *) :
2015 eval "$3=\$ac_type" ;;
2016esac
2017fi
2018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002019 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002020
2021else
2022 break
2023fi
2024 done
2025fi
2026eval ac_res=\$$3
2027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2028$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002029 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002030
2031} # ac_fn_c_find_uintX_t
2032
2033# ac_fn_c_find_intX_t LINENO BITS VAR
2034# -----------------------------------
2035# Finds a signed integer type with width BITS, setting cache variable VAR
2036# accordingly.
2037ac_fn_c_find_intX_t ()
2038{
2039 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2041$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002042if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002043 $as_echo_n "(cached) " >&6
2044else
2045 eval "$3=no"
2046 # Order is important - never check a type that is potentially smaller
2047 # than half of the expected target width.
2048 for ac_type in int$2_t 'int' 'long int' \
2049 'long long int' 'short int' 'signed char'; do
2050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051/* end confdefs.h. */
2052$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002053 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002054int
2055main ()
2056{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002057static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002058test_array [0] = 0;
2059return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002060
2061 ;
2062 return 0;
2063}
2064_ACEOF
2065if ac_fn_c_try_compile "$LINENO"; then :
2066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067/* end confdefs.h. */
2068$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002069 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002070int
2071main ()
2072{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002073static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002074 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002075test_array [0] = 0;
2076return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002077
2078 ;
2079 return 0;
2080}
2081_ACEOF
2082if ac_fn_c_try_compile "$LINENO"; then :
2083
2084else
2085 case $ac_type in #(
2086 int$2_t) :
2087 eval "$3=yes" ;; #(
2088 *) :
2089 eval "$3=\$ac_type" ;;
2090esac
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002095 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002096
2097else
2098 break
2099fi
2100 done
2101fi
2102eval ac_res=\$$3
2103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2104$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002105 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002106
2107} # ac_fn_c_find_intX_t
2108
2109# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2110# --------------------------------------------
2111# Tries to find the compile-time value of EXPR in a program that includes
2112# INCLUDES, setting VAR accordingly. Returns whether the value could be
2113# computed
2114ac_fn_c_compute_int ()
2115{
2116 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2117 if test "$cross_compiling" = yes; then
2118 # Depending upon the size, compute the lo and hi bounds.
2119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
2121$4
2122int
2123main ()
2124{
2125static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002126test_array [0] = 0;
2127return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002128
2129 ;
2130 return 0;
2131}
2132_ACEOF
2133if ac_fn_c_try_compile "$LINENO"; then :
2134 ac_lo=0 ac_mid=0
2135 while :; do
2136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2137/* end confdefs.h. */
2138$4
2139int
2140main ()
2141{
2142static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002143test_array [0] = 0;
2144return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_compile "$LINENO"; then :
2151 ac_hi=$ac_mid; break
2152else
2153 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2154 if test $ac_lo -le $ac_mid; then
2155 ac_lo= ac_hi=
2156 break
2157 fi
2158 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2159fi
2160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2161 done
2162else
2163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2164/* end confdefs.h. */
2165$4
2166int
2167main ()
2168{
2169static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002170test_array [0] = 0;
2171return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002172
2173 ;
2174 return 0;
2175}
2176_ACEOF
2177if ac_fn_c_try_compile "$LINENO"; then :
2178 ac_hi=-1 ac_mid=-1
2179 while :; do
2180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181/* end confdefs.h. */
2182$4
2183int
2184main ()
2185{
2186static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002187test_array [0] = 0;
2188return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002189
2190 ;
2191 return 0;
2192}
2193_ACEOF
2194if ac_fn_c_try_compile "$LINENO"; then :
2195 ac_lo=$ac_mid; break
2196else
2197 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2198 if test $ac_mid -le $ac_hi; then
2199 ac_lo= ac_hi=
2200 break
2201 fi
2202 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2203fi
2204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2205 done
2206else
2207 ac_lo= ac_hi=
2208fi
2209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2210fi
2211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2212# Binary search between lo and hi bounds.
2213while test "x$ac_lo" != "x$ac_hi"; do
2214 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2216/* end confdefs.h. */
2217$4
2218int
2219main ()
2220{
2221static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002222test_array [0] = 0;
2223return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002224
2225 ;
2226 return 0;
2227}
2228_ACEOF
2229if ac_fn_c_try_compile "$LINENO"; then :
2230 ac_hi=$ac_mid
2231else
2232 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2233fi
2234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2235done
2236case $ac_lo in #((
2237?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2238'') ac_retval=1 ;;
2239esac
2240 else
2241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2242/* end confdefs.h. */
2243$4
2244static long int longval () { return $2; }
2245static unsigned long int ulongval () { return $2; }
2246#include <stdio.h>
2247#include <stdlib.h>
2248int
2249main ()
2250{
2251
2252 FILE *f = fopen ("conftest.val", "w");
2253 if (! f)
2254 return 1;
2255 if (($2) < 0)
2256 {
2257 long int i = longval ();
2258 if (i != ($2))
2259 return 1;
2260 fprintf (f, "%ld", i);
2261 }
2262 else
2263 {
2264 unsigned long int i = ulongval ();
2265 if (i != ($2))
2266 return 1;
2267 fprintf (f, "%lu", i);
2268 }
2269 /* Do not output a trailing newline, as this causes \r\n confusion
2270 on some platforms. */
2271 return ferror (f) || fclose (f) != 0;
2272
2273 ;
2274 return 0;
2275}
2276_ACEOF
2277if ac_fn_c_try_run "$LINENO"; then :
2278 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2279else
2280 ac_retval=1
2281fi
2282rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2283 conftest.$ac_objext conftest.beam conftest.$ac_ext
2284rm -f conftest.val
2285
2286 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002287 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002288 as_fn_set_status $ac_retval
2289
2290} # ac_fn_c_compute_int
2291
2292# ac_fn_c_check_func LINENO FUNC VAR
2293# ----------------------------------
2294# Tests whether FUNC exists, setting the cache variable VAR accordingly
2295ac_fn_c_check_func ()
2296{
2297 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2299$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002300if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002301 $as_echo_n "(cached) " >&6
2302else
2303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304/* end confdefs.h. */
2305/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2306 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2307#define $2 innocuous_$2
2308
2309/* System header to define __stub macros and hopefully few prototypes,
2310 which can conflict with char $2 (); below.
2311 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2312 <limits.h> exists even on freestanding compilers. */
2313
2314#ifdef __STDC__
2315# include <limits.h>
2316#else
2317# include <assert.h>
2318#endif
2319
2320#undef $2
2321
2322/* Override any GCC internal prototype to avoid an error.
2323 Use char because int might match the return type of a GCC
2324 builtin and then its argument prototype would still apply. */
2325#ifdef __cplusplus
2326extern "C"
2327#endif
2328char $2 ();
2329/* The GNU C library defines this for functions which it implements
2330 to always fail with ENOSYS. Some functions are actually named
2331 something starting with __ and the normal name is an alias. */
2332#if defined __stub_$2 || defined __stub___$2
2333choke me
2334#endif
2335
2336int
2337main ()
2338{
2339return $2 ();
2340 ;
2341 return 0;
2342}
2343_ACEOF
2344if ac_fn_c_try_link "$LINENO"; then :
2345 eval "$3=yes"
2346else
2347 eval "$3=no"
2348fi
2349rm -f core conftest.err conftest.$ac_objext \
2350 conftest$ac_exeext conftest.$ac_ext
2351fi
2352eval ac_res=\$$3
2353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2354$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002355 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002356
2357} # ac_fn_c_check_func
2358
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002359# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2360# ---------------------------------------------
2361# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2362# accordingly.
2363ac_fn_c_check_decl ()
2364{
2365 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2366 as_decl_name=`echo $2|sed 's/ *(.*//'`
2367 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2369$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2370if eval \${$3+:} false; then :
2371 $as_echo_n "(cached) " >&6
2372else
2373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2374/* end confdefs.h. */
2375$4
2376int
2377main ()
2378{
2379#ifndef $as_decl_name
2380#ifdef __cplusplus
2381 (void) $as_decl_use;
2382#else
2383 (void) $as_decl_name;
2384#endif
2385#endif
2386
2387 ;
2388 return 0;
2389}
2390_ACEOF
2391if ac_fn_c_try_compile "$LINENO"; then :
2392 eval "$3=yes"
2393else
2394 eval "$3=no"
2395fi
2396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2397fi
2398eval ac_res=\$$3
2399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2400$as_echo "$ac_res" >&6; }
2401 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2402
2403} # ac_fn_c_check_decl
2404
Matthias Kloseb9621712010-04-24 17:59:49 +00002405# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2406# ----------------------------------------------------
2407# Tries to find if the field MEMBER exists in type AGGR, after including
2408# INCLUDES, setting cache variable VAR accordingly.
2409ac_fn_c_check_member ()
2410{
2411 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2413$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002414if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 $as_echo_n "(cached) " >&6
2416else
2417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2418/* end confdefs.h. */
2419$5
2420int
2421main ()
2422{
2423static $2 ac_aggr;
2424if (ac_aggr.$3)
2425return 0;
2426 ;
2427 return 0;
2428}
2429_ACEOF
2430if ac_fn_c_try_compile "$LINENO"; then :
2431 eval "$4=yes"
2432else
2433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2434/* end confdefs.h. */
2435$5
2436int
2437main ()
2438{
2439static $2 ac_aggr;
2440if (sizeof ac_aggr.$3)
2441return 0;
2442 ;
2443 return 0;
2444}
2445_ACEOF
2446if ac_fn_c_try_compile "$LINENO"; then :
2447 eval "$4=yes"
2448else
2449 eval "$4=no"
2450fi
2451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2452fi
2453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2454fi
2455eval ac_res=\$$4
2456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2457$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002458 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002459
2460} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002462This file contains any messages produced by compilers while
2463running configure, to aid debugging if configure makes a mistake.
2464
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002465It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002466generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002467
2468 $ $0 $@
2469
2470_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002472{
2473cat <<_ASUNAME
2474## --------- ##
2475## Platform. ##
2476## --------- ##
2477
2478hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2479uname -m = `(uname -m) 2>/dev/null || echo unknown`
2480uname -r = `(uname -r) 2>/dev/null || echo unknown`
2481uname -s = `(uname -s) 2>/dev/null || echo unknown`
2482uname -v = `(uname -v) 2>/dev/null || echo unknown`
2483
2484/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2485/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2486
2487/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2488/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2489/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002491/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2492/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2493/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2494
2495_ASUNAME
2496
2497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2498for as_dir in $PATH
2499do
2500 IFS=$as_save_IFS
2501 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 $as_echo "PATH: $as_dir"
2503 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002505
2506} >&5
2507
2508cat >&5 <<_ACEOF
2509
2510
2511## ----------- ##
2512## Core tests. ##
2513## ----------- ##
2514
2515_ACEOF
2516
2517
2518# Keep a trace of the command line.
2519# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002520# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002521# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002522# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002523ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002524ac_configure_args0=
2525ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002526ac_must_keep_next=false
2527for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002528do
Skip Montanaro6dead952003-09-25 14:50:04 +00002529 for ac_arg
2530 do
2531 case $ac_arg in
2532 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2533 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2534 | -silent | --silent | --silen | --sile | --sil)
2535 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002538 esac
2539 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002540 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002541 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002542 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002543 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002544 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002545 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002546 case $ac_arg in
2547 *=* | --config-cache | -C | -disable-* | --disable-* \
2548 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2549 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2550 | -with-* | --with-* | -without-* | --without-* | --x)
2551 case "$ac_configure_args0 " in
2552 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2553 esac
2554 ;;
2555 -* ) ac_must_keep_next=true ;;
2556 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002557 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002558 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002559 ;;
2560 esac
2561 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002562done
Matthias Kloseb9621712010-04-24 17:59:49 +00002563{ ac_configure_args0=; unset ac_configure_args0;}
2564{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002565
2566# When interrupted or exit'd, cleanup temporary files, and complete
2567# config.log. We remove comments because anyway the quotes in there
2568# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569# WARNING: Use '\'' to represent an apostrophe within the trap.
2570# 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 +00002571trap 'exit_status=$?
2572 # Save into config.log some information that might help in debugging.
2573 {
2574 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002575
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002576 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002577## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002579 echo
2580 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581(
2582 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2583 eval ac_val=\$$ac_var
2584 case $ac_val in #(
2585 *${as_nl}*)
2586 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2588$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589 esac
2590 case $ac_var in #(
2591 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002592 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2593 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594 esac ;;
2595 esac
2596 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2599 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601 "s/'\''/'\''\\\\'\'''\''/g;
2602 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2603 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002604 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002606 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607 esac |
2608 sort
2609)
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002611
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002612 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002613## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002614## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002615 echo
2616 for ac_var in $ac_subst_vars
2617 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618 eval ac_val=\$$ac_var
2619 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002622 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002623 done | sort
2624 echo
2625
2626 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002627 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002629## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002630 echo
2631 for ac_var in $ac_subst_files
2632 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002633 eval ac_val=\$$ac_var
2634 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002638 done | sort
2639 echo
2640 fi
2641
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002643 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002644## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002645## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002647 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 echo
2649 fi
2650 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002651 $as_echo "$as_me: caught signal $ac_signal"
2652 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002654 rm -f core *.core core.conftest.* &&
2655 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002657' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002658for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002660done
2661ac_signal=0
2662
2663# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002664rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002665
Matthias Kloseb9621712010-04-24 17:59:49 +00002666$as_echo "/* confdefs.h */" > confdefs.h
2667
Martin v. Löwis11437992002-04-12 09:54:03 +00002668# Predefined preprocessor variables.
2669
2670cat >>confdefs.h <<_ACEOF
2671#define PACKAGE_NAME "$PACKAGE_NAME"
2672_ACEOF
2673
Martin v. Löwis11437992002-04-12 09:54:03 +00002674cat >>confdefs.h <<_ACEOF
2675#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2676_ACEOF
2677
Martin v. Löwis11437992002-04-12 09:54:03 +00002678cat >>confdefs.h <<_ACEOF
2679#define PACKAGE_VERSION "$PACKAGE_VERSION"
2680_ACEOF
2681
Martin v. Löwis11437992002-04-12 09:54:03 +00002682cat >>confdefs.h <<_ACEOF
2683#define PACKAGE_STRING "$PACKAGE_STRING"
2684_ACEOF
2685
Martin v. Löwis11437992002-04-12 09:54:03 +00002686cat >>confdefs.h <<_ACEOF
2687#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2688_ACEOF
2689
Matthias Kloseb9621712010-04-24 17:59:49 +00002690cat >>confdefs.h <<_ACEOF
2691#define PACKAGE_URL "$PACKAGE_URL"
2692_ACEOF
2693
Martin v. Löwis11437992002-04-12 09:54:03 +00002694
2695# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002696# Prefer an explicitly selected file to automatically selected ones.
2697ac_site_file1=NONE
2698ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002699if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002700 # We do not want a PATH search for config.site.
2701 case $CONFIG_SITE in #((
2702 -*) ac_site_file1=./$CONFIG_SITE;;
2703 */*) ac_site_file1=$CONFIG_SITE;;
2704 *) ac_site_file1=./$CONFIG_SITE;;
2705 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002706elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002707 ac_site_file1=$prefix/share/config.site
2708 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002709else
Matthias Kloseb9621712010-04-24 17:59:49 +00002710 ac_site_file1=$ac_default_prefix/share/config.site
2711 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002713for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002714do
Matthias Kloseb9621712010-04-24 17:59:49 +00002715 test "x$ac_site_file" = xNONE && continue
2716 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2718$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002719 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002720 . "$ac_site_file" \
2721 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2722$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2723as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002724See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002725 fi
2726done
2727
2728if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002729 # Some versions of bash will fail to source /dev/null (special files
2730 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2731 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2732 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2733$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002735 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2736 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002737 esac
2738 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002739else
Matthias Kloseb9621712010-04-24 17:59:49 +00002740 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2741$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002742 >$cache_file
2743fi
2744
2745# Check that the precious variables saved in the cache have kept the same
2746# value.
2747ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002748for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002749 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2750 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002751 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2752 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 case $ac_old_set,$ac_new_set in
2754 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002755 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2756$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 +00002757 ac_cache_corrupted=: ;;
2758 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002759 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2760$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002761 ac_cache_corrupted=: ;;
2762 ,);;
2763 *)
2764 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002765 # differences in whitespace do not lead to failure.
2766 ac_old_val_w=`echo x $ac_old_val`
2767 ac_new_val_w=`echo x $ac_new_val`
2768 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2769 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2770$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2771 ac_cache_corrupted=:
2772 else
2773 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2774$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2775 eval $ac_var=\$ac_old_val
2776 fi
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2778$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2779 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2780$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002781 fi;;
2782 esac
2783 # Pass precious variables to config.status.
2784 if test "$ac_new_set" = set; then
2785 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002786 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002787 *) ac_arg=$ac_var=$ac_new_val ;;
2788 esac
2789 case " $ac_configure_args " in
2790 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002791 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002792 esac
2793 fi
2794done
2795if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002796 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2797$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2798 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2799$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002800 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002802## -------------------- ##
2803## Main body of script. ##
2804## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002805
Guido van Rossum7f43da71994-08-01 12:15:30 +00002806ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002807ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002808ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2809ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2810ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002811
Guido van Rossum627b2d71993-12-24 10:39:16 +00002812
Michael W. Hudson54241132001-12-07 15:38:26 +00002813
Trent Nelson4d4ec652012-10-16 08:51:24 -04002814
Trent Nelson5595ab52012-10-17 04:47:31 -04002815if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002816 # If we're building out-of-tree, we need to make sure the following
2817 # resources get picked up before their $srcdir counterparts.
2818 # Objects/ -> typeslots.inc
2819 # Include/ -> Python-ast.h, graminit.h
2820 # Python/ -> importlib.h
2821 # (A side effect of this is that these resources will automatically be
2822 # regenerated when building out-of-tree, regardless of whether or not
2823 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2824 # off.)
2825 BASECPPFLAGS="-IObjects -IInclude -IPython"
2826else
2827 BASECPPFLAGS=""
2828fi
2829
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002830
2831
2832
2833
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002834if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002835then
2836# Extract the first word of "hg", so it can be a program name with args.
2837set dummy hg; ac_word=$2
2838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2839$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002840if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002841 $as_echo_n "(cached) " >&6
2842else
2843 if test -n "$HAS_HG"; then
2844 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2845else
2846as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2847for as_dir in $PATH
2848do
2849 IFS=$as_save_IFS
2850 test -z "$as_dir" && as_dir=.
2851 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002852 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002853 ac_cv_prog_HAS_HG="found"
2854 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2855 break 2
2856 fi
2857done
2858 done
2859IFS=$as_save_IFS
2860
2861 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2862fi
2863fi
2864HAS_HG=$ac_cv_prog_HAS_HG
2865if test -n "$HAS_HG"; then
2866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2867$as_echo "$HAS_HG" >&6; }
2868else
2869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2870$as_echo "no" >&6; }
2871fi
2872
2873
2874else
2875HAS_HG=no-repository
2876fi
2877if test $HAS_HG = found
2878then
2879 HGVERSION="hg id -i \$(srcdir)"
2880 HGTAG="hg id -t \$(srcdir)"
2881 HGBRANCH="hg id -b \$(srcdir)"
2882else
2883 HGVERSION=""
2884 HGTAG=""
2885 HGBRANCH=""
2886fi
2887
2888
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002889ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002890
2891
Victor Stinnerdddf4842016-06-07 11:21:42 +02002892
doko@ubuntu.com55532312016-06-14 08:55:19 +02002893
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002894ac_aux_dir=
2895for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2896 if test -f "$ac_dir/install-sh"; then
2897 ac_aux_dir=$ac_dir
2898 ac_install_sh="$ac_aux_dir/install-sh -c"
2899 break
2900 elif test -f "$ac_dir/install.sh"; then
2901 ac_aux_dir=$ac_dir
2902 ac_install_sh="$ac_aux_dir/install.sh -c"
2903 break
2904 elif test -f "$ac_dir/shtool"; then
2905 ac_aux_dir=$ac_dir
2906 ac_install_sh="$ac_aux_dir/shtool install -c"
2907 break
2908 fi
2909done
2910if test -z "$ac_aux_dir"; then
2911 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2912fi
2913
2914# These three variables are undocumented and unsupported,
2915# and are intended to be withdrawn in a future Autoconf release.
2916# They can cause serious problems if a builder's source tree is in a directory
2917# whose full name contains unusual characters.
2918ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2919ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2920ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2921
2922
2923# Make sure we can run config.sub.
2924$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2925 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2926
2927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2928$as_echo_n "checking build system type... " >&6; }
2929if ${ac_cv_build+:} false; then :
2930 $as_echo_n "(cached) " >&6
2931else
2932 ac_build_alias=$build_alias
2933test "x$ac_build_alias" = x &&
2934 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2935test "x$ac_build_alias" = x &&
2936 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2937ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2938 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2939
2940fi
2941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2942$as_echo "$ac_cv_build" >&6; }
2943case $ac_cv_build in
2944*-*-*) ;;
2945*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2946esac
2947build=$ac_cv_build
2948ac_save_IFS=$IFS; IFS='-'
2949set x $ac_cv_build
2950shift
2951build_cpu=$1
2952build_vendor=$2
2953shift; shift
2954# Remember, the first character of IFS is used to create $*,
2955# except with old shells:
2956build_os=$*
2957IFS=$ac_save_IFS
2958case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2959
2960
2961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2962$as_echo_n "checking host system type... " >&6; }
2963if ${ac_cv_host+:} false; then :
2964 $as_echo_n "(cached) " >&6
2965else
2966 if test "x$host_alias" = x; then
2967 ac_cv_host=$ac_cv_build
2968else
2969 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2970 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2971fi
2972
2973fi
2974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2975$as_echo "$ac_cv_host" >&6; }
2976case $ac_cv_host in
2977*-*-*) ;;
2978*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2979esac
2980host=$ac_cv_host
2981ac_save_IFS=$IFS; IFS='-'
2982set x $ac_cv_host
2983shift
2984host_cpu=$1
2985host_vendor=$2
2986shift; shift
2987# Remember, the first character of IFS is used to create $*,
2988# except with old shells:
2989host_os=$*
2990IFS=$ac_save_IFS
2991case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2992
2993
2994
doko@python.orga10e4a92013-01-25 18:45:12 +01002995
2996
Ned Deilyfcbc2462014-08-22 13:32:49 -07002997# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2998rm -f pybuilddir.txt
2999
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003000if test "$cross_compiling" = yes; then
3001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
3002$as_echo_n "checking for python interpreter for cross build... " >&6; }
3003 if test -z "$PYTHON_FOR_BUILD"; then
3004 for interp in python$PACKAGE_VERSION python3 python; do
3005 which $interp >/dev/null 2>&1 || continue
3006 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
3007 break
3008 fi
3009 interp=
3010 done
3011 if test x$interp = x; then
3012 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3013 fi
3014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3015$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01003016 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:$(srcdir)/Lib/$(PLATDIR) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003017 fi
Christian Heimes954ac032012-12-12 13:10:21 +01003018elif test "$cross_compiling" = maybe; then
3019 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003020else
3021 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3022fi
3023
3024
Martin v. Löwis11437992002-04-12 09:54:03 +00003025
Benjamin Petersond23f8222009-04-05 19:13:16 +00003026if test "$prefix" != "/"; then
3027 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3028fi
3029
3030
Martin v. Löwis11437992002-04-12 09:54:03 +00003031
3032
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003033# We don't use PACKAGE_ variables, and they cause conflicts
3034# with other autoconf-based packages that include Python.h
3035grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3036rm confdefs.h
3037mv confdefs.h.new confdefs.h
3038
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003039
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003040VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003041
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003042# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003043
3044SOVERSION=1.0
3045
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003046# The later defininition of _XOPEN_SOURCE disables certain features
3047# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3048
Matthias Kloseb9621712010-04-24 17:59:49 +00003049$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003050
3051
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003052# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3053# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3054# them.
3055
Matthias Kloseb9621712010-04-24 17:59:49 +00003056$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003057
3058
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003059# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3060# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3061# them.
3062
Matthias Kloseb9621712010-04-24 17:59:49 +00003063$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003064
3065
Martin v. Löwisd6320502004-08-12 13:45:08 +00003066# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3067# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3068
Matthias Kloseb9621712010-04-24 17:59:49 +00003069$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003070
3071
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003072# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3073# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3074# them.
3075
Matthias Kloseb9621712010-04-24 17:59:49 +00003076$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003077
3078
3079
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003080define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003081
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003082# Arguments passed to configure.
3083
3084CONFIG_ARGS="$ac_configure_args"
3085
Matthias Kloseb9621712010-04-24 17:59:49 +00003086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3087$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003088# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003089if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003090 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003091 case $enableval in
3092 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003093 # Locate the best usable SDK, see Mac/README.txt for more
3094 # information
3095 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003096 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003097 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003098 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3099 if test ! -d "${enableval}"
3100 then
3101 enableval=/
3102 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003103 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003104 ;;
3105 esac
3106 case $enableval in
3107 no)
3108 UNIVERSALSDK=
3109 enable_universalsdk=
3110 ;;
3111 *)
3112 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003113 if test ! -d "${UNIVERSALSDK}"
3114 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003115 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003116 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003117 ;;
3118 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003119
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003120
Thomas Wouters477c8d52006-05-27 19:21:47 +00003121else
3122
3123 UNIVERSALSDK=
3124 enable_universalsdk=
3125
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003126fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003127
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003128if test -n "${UNIVERSALSDK}"
3129then
Matthias Kloseb9621712010-04-24 17:59:49 +00003130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3131$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003132else
Matthias Kloseb9621712010-04-24 17:59:49 +00003133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3134$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003135fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003137
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003138
Ned Deily87adb6e2013-10-18 21:09:56 -07003139ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003140
Ned Deilycbfb9a52012-06-23 16:02:19 -07003141# For backward compatibility reasons we prefer to select '32-bit' if available,
3142# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003143UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003144if test "`uname -s`" = "Darwin"
3145then
3146 if test -n "${UNIVERSALSDK}"
3147 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003148 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003149 then
3150 UNIVERSAL_ARCHS="intel"
3151 fi
3152 fi
3153fi
3154
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003155
Matthias Kloseb9621712010-04-24 17:59:49 +00003156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3157$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003158
3159# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003160if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003161 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003162 UNIVERSAL_ARCHS="$withval"
3163
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003164fi
3165
Ned Deily87adb6e2013-10-18 21:09:56 -07003166if test -n "${UNIVERSALSDK}"
3167then
3168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3169$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3170else
3171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3172$as_echo "no" >&6; }
3173fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003174
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003175
3176# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003177if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003178 withval=$with_framework_name;
3179 PYTHONFRAMEWORK=${withval}
3180 PYTHONFRAMEWORKDIR=${withval}.framework
3181 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3182
3183else
3184
3185 PYTHONFRAMEWORK=Python
3186 PYTHONFRAMEWORKDIR=Python.framework
3187 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3188
3189fi
3190
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003191# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003192if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003193 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003194 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003195 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003196 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003197 esac
3198 case $enableval in
3199 no)
3200 PYTHONFRAMEWORK=
3201 PYTHONFRAMEWORKDIR=no-framework
3202 PYTHONFRAMEWORKPREFIX=
3203 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003204 FRAMEWORKINSTALLFIRST=
3205 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003206 FRAMEWORKALTINSTALLFIRST=
3207 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003208 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003209 if test "x${prefix}" = "xNONE"; then
3210 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3211 else
3212 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3213 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003214 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003215 ;;
3216 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003217 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003218 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003219 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003220 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003221 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3222 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003223 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003224 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003225
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003226 if test "x${prefix}" = "xNONE" ; then
3227 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003228
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003229 else
3230 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3231 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003232
3233 case "${enableval}" in
3234 /System*)
3235 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3236 if test "${prefix}" = "NONE" ; then
3237 # See below
3238 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3239 fi
3240 ;;
3241
3242 /Library*)
3243 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3244 ;;
3245
3246 */Library/Frameworks)
3247 MDIR="`dirname "${enableval}"`"
3248 MDIR="`dirname "${MDIR}"`"
3249 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3250
3251 if test "${prefix}" = "NONE"; then
3252 # User hasn't specified the
3253 # --prefix option, but wants to install
3254 # the framework in a non-default location,
3255 # ensure that the compatibility links get
3256 # installed relative to that prefix as well
3257 # instead of in /usr/local.
3258 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3259 fi
3260 ;;
3261
3262 *)
3263 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3264 ;;
3265 esac
3266
Jack Jansen127e56e2001-09-11 14:41:54 +00003267 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003268
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003269 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003270 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003271 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003272
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003273 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003274
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003275 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3276
3277 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3278
Jack Jansene578a632001-08-15 01:27:14 +00003279 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003280
Guido van Rossum563e7081996-09-10 18:20:48 +00003281else
Martin v. Löwis11437992002-04-12 09:54:03 +00003282
Jack Jansene578a632001-08-15 01:27:14 +00003283 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003284 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003285 PYTHONFRAMEWORKPREFIX=
3286 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003287 FRAMEWORKINSTALLFIRST=
3288 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003289 FRAMEWORKALTINSTALLFIRST=
3290 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003291 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003292 if test "x${prefix}" = "xNONE" ; then
3293 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3294 else
3295 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3296 fi
Jack Jansene578a632001-08-15 01:27:14 +00003297 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003298
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003299
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003300fi
3301
Thomas Wouters477c8d52006-05-27 19:21:47 +00003302
3303
Michael W. Hudson54241132001-12-07 15:38:26 +00003304
3305
3306
3307
Jack Jansene578a632001-08-15 01:27:14 +00003308
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003309
3310
3311
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003312
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003313
Ned Deilyb8f944f2013-11-21 22:42:25 -08003314
Jack Jansene578a632001-08-15 01:27:14 +00003315##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003316## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003317## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003318##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003319# Set name for machine-dependent library files
3320
Matthias Kloseb9621712010-04-24 17:59:49 +00003321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3322$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003323if test -z "$MACHDEP"
3324then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003325 # avoid using uname for cross builds
3326 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003327 # ac_sys_system and ac_sys_release are used for setting
3328 # a lot of different things including 'define_xopen_source'
3329 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003330 case "$host" in
3331 *-*-linux*)
3332 ac_sys_system=Linux
3333 ;;
3334 *-*-cygwin*)
3335 ac_sys_system=Cygwin
3336 ;;
3337 *)
3338 # for now, limit cross builds to known configurations
3339 MACHDEP="unknown"
3340 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3341 esac
3342 ac_sys_release=
3343 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003344 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003345 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003346 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003347 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003348 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003349 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003350 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003351 fi
3352 ac_md_system=`echo $ac_sys_system |
3353 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3354 ac_md_release=`echo $ac_sys_release |
3355 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3356 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003357
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003358 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003359 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003360 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003361 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003362 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003363 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003364 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003365fi
Guido van Rossum91922671997-10-09 20:24:13 +00003366
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003367
3368if test "$cross_compiling" = yes; then
3369 case "$host" in
3370 *-*-linux*)
3371 case "$host_cpu" in
3372 arm*)
3373 _host_cpu=arm
3374 ;;
3375 *)
3376 _host_cpu=$host_cpu
3377 esac
3378 ;;
3379 *-*-cygwin*)
3380 _host_cpu=
3381 ;;
3382 *)
3383 # for now, limit cross builds to known configurations
3384 MACHDEP="unknown"
3385 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3386 esac
3387 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3388fi
3389
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003390# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3391# disable features if it is defined, without any means to access these
3392# features as extensions. For these systems, we skip the definition of
3393# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3394# some feature, make sure there is no alternative way to access this
3395# feature. Also, when using wildcards, make sure you have verified the
3396# need for not defining _XOPEN_SOURCE on all systems matching the
3397# wildcard, and that the wildcard does not include future systems
3398# (which may remove their limitations).
3399case $ac_sys_system/$ac_sys_release in
3400 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3401 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003402 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003403 # In addition, Stefan Krah confirms that issue #1244610 exists through
3404 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003405 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003406 define_xopen_source=no
3407 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3408 # also defined. This can be overridden by defining _BSD_SOURCE
3409 # As this has a different meaning on Linux, only define it on OpenBSD
3410
Matthias Kloseb9621712010-04-24 17:59:49 +00003411$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003412
3413 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003414 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003415 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3416 # also defined. This can be overridden by defining _BSD_SOURCE
3417 # As this has a different meaning on Linux, only define it on OpenBSD
3418
Matthias Kloseb9621712010-04-24 17:59:49 +00003419$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003420
3421 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003422 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3423 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3424 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003425 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 +00003426 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003427 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3428 # request to enable features supported by the standard as a request
3429 # to disable features not supported by the standard. The best way
3430 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3431 # entirely and define __EXTENSIONS__ instead.
3432 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003433 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003434 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3435 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003436 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003437 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003438 define_xopen_source=no;;
3439 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003440 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003441 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003442 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003443 # On FreeBSD 4, the math functions C89 does not cover are never defined
3444 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3445 FreeBSD/4.*)
3446 define_xopen_source=no;;
3447 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3448 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3449 # identifies itself as Darwin/7.*
3450 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3451 # disables platform specific features beyond repair.
3452 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3453 # has no effect, don't bother defining them
3454 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003455 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003456 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003457 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003458 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3459 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3460 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003461 AIX/4)
3462 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003463 AIX/5)
3464 if test `uname -r` -eq 1; then
3465 define_xopen_source=no
3466 fi
3467 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003468 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3469 # defining NI_NUMERICHOST.
3470 QNX/6.3.2)
3471 define_xopen_source=no
3472 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003473
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003474esac
3475
3476if test $define_xopen_source = yes
3477then
Victor Stinner14d098d2011-09-07 22:29:43 +02003478 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003479
Victor Stinner14d098d2011-09-07 22:29:43 +02003480$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003481
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003482
3483 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3484 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3485 # several APIs are not declared. Since this is also needed in some
3486 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003487
Matthias Kloseb9621712010-04-24 17:59:49 +00003488$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003489
3490
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003491
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003492$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003493
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003494fi
3495
Christian Heimes647cd872013-12-07 23:39:33 +01003496# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3497case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003498 hp*|HP*)
3499 define_stdc_a1=yes;;
3500 *)
3501 define_stdc_a1=no;;
3502esac
3503
3504if test $define_stdc_a1 = yes
3505then
Christian Heimes647cd872013-12-07 23:39:33 +01003506
3507$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3508
Christian Heimesb02bcae2013-12-08 15:21:08 +01003509fi
Christian Heimes647cd872013-12-07 23:39:33 +01003510
Guido van Rossum91922671997-10-09 20:24:13 +00003511#
3512# SGI compilers allow the specification of the both the ABI and the
3513# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003514# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003515#
3516# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3517# thus supply support for various ABI/ISA combinations. The MACHDEP
3518# variable is also adjusted.
3519#
3520
3521if test ! -z "$SGI_ABI"
3522then
3523 CC="cc $SGI_ABI"
3524 LDFLAGS="$SGI_ABI $LDFLAGS"
3525 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3528$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003529
Jack Jansen6b08a402004-06-03 12:41:45 +00003530# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3531# it may influence the way we can build extensions, so distutils
3532# needs to check it
3533
Thomas Wouters477c8d52006-05-27 19:21:47 +00003534
Jack Jansen6b08a402004-06-03 12:41:45 +00003535CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003536EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003537
Guido van Rossum627b2d71993-12-24 10:39:16 +00003538# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003539
3540# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3541# for debug/optimization stuff. BASECFLAGS is for flags that are required
3542# just to get things to compile and link. Users are free to override OPT
3543# when running configure or make. The build should not break if they do.
3544# BASECFLAGS should generally not be messed with, however.
3545
3546# XXX shouldn't some/most/all of this code be merged with the stuff later
3547# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3549$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003550
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003551# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003552if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003553 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003554 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003555 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003556 without_gcc=yes;;
3557 yes) CC=gcc
3558 without_gcc=no;;
3559 *) CC=$withval
3560 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003561 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003562else
Martin v. Löwis11437992002-04-12 09:54:03 +00003563
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003564 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003565 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003566 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003567 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003568 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003569fi
3570
Matthias Kloseb9621712010-04-24 17:59:49 +00003571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3572$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003573
Zachary Ware5af85642015-12-21 12:09:17 -06003574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3575$as_echo_n "checking for --with-icc... " >&6; }
3576
3577# Check whether --with-icc was given.
3578if test "${with_icc+set}" = set; then :
3579 withval=$with_icc;
3580 case $withval in
3581 no) CC=${CC:-cc}
3582 with_icc=no;;
3583 yes) CC=icc
3584 CXX=icpc
3585 with_icc=yes;;
3586 *) CC=$withval
3587 with_icc=$withval;;
3588 esac
3589else
3590
3591 with_icc=no
3592fi
3593
3594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3595$as_echo "$with_icc" >&6; }
3596
Guido van Rossum8b131c51995-03-09 14:10:13 +00003597# If the user switches compilers, we can't believe the cache
3598if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3599then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003600 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003601(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003602fi
3603
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003604# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3605# when the compiler supports them, but we don't always want -O2, and
3606# we set -g later.
3607if test -z "$CFLAGS"; then
3608 CFLAGS=
3609fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003610
3611if test "$ac_sys_system" = "Darwin"
3612then
3613 # Compiler selection on MacOSX is more complicated than
3614 # AC_PROG_CC can handle, see Mac/README.txt for more
3615 # information
3616 if test -z "${CC}"
3617 then
3618 found_gcc=
3619 found_clang=
3620 as_save_IFS=$IFS; IFS=:
3621 for as_dir in $PATH
3622 do
3623 IFS=$as_save_IFS
3624 if test -x $as_dir/gcc; then
3625 if test -z "${found_gcc}"; then
3626 found_gcc=$as_dir/gcc
3627 fi
3628 fi
3629 if test -x $as_dir/clang; then
3630 if test -z "${found_clang}"; then
3631 found_clang=$as_dir/clang
3632 fi
3633 fi
3634 done
3635 IFS=$as_save_IFS
3636
3637 if test -n "$found_gcc" -a -n "$found_clang"
3638 then
3639 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3640 then
3641 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3642$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3643 CC="$found_clang"
3644 CXX="$found_clang++"
3645 fi
3646
3647
3648 elif test -z "$found_gcc" -a -n "$found_clang"
3649 then
3650 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3651$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3652 CC="$found_clang"
3653 CXX="$found_clang++"
3654
3655 elif test -z "$found_gcc" -a -z "$found_clang"
3656 then
3657 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3658 if test -n "${found_clang}"
3659 then
3660 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3661$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3662 CC="${found_clang}"
3663 CXX="`/usr/bin/xcrun -find clang++`"
3664
3665 # else: use default behaviour
3666 fi
3667 fi
3668 fi
3669fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003670ac_ext=c
3671ac_cpp='$CPP $CPPFLAGS'
3672ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3673ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3674ac_compiler_gnu=$ac_cv_c_compiler_gnu
3675if test -n "$ac_tool_prefix"; then
3676 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3677set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3679$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003680if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003681 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003682else
3683 if test -n "$CC"; then
3684 ac_cv_prog_CC="$CC" # Let the user override the test.
3685else
Martin v. Löwis11437992002-04-12 09:54:03 +00003686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3687for as_dir in $PATH
3688do
3689 IFS=$as_save_IFS
3690 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003692 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003693 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 $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 +00003695 break 2
3696 fi
3697done
Matthias Kloseb9621712010-04-24 17:59:49 +00003698 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003699IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003700
Jack Jansendd19cf82001-12-06 22:36:17 +00003701fi
3702fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003703CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003704if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3706$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003707else
Matthias Kloseb9621712010-04-24 17:59:49 +00003708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3709$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003710fi
3711
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003712
Martin v. Löwis11437992002-04-12 09:54:03 +00003713fi
3714if test -z "$ac_cv_prog_CC"; then
3715 ac_ct_CC=$CC
3716 # Extract the first word of "gcc", so it can be a program name with args.
3717set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3719$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003720if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003722else
3723 if test -n "$ac_ct_CC"; then
3724 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3725else
3726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3727for as_dir in $PATH
3728do
3729 IFS=$as_save_IFS
3730 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003733 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 $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 +00003735 break 2
3736 fi
3737done
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003740
3741fi
3742fi
3743ac_ct_CC=$ac_cv_prog_ac_ct_CC
3744if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3746$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003747else
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3749$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003750fi
3751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003752 if test "x$ac_ct_CC" = x; then
3753 CC=""
3754 else
3755 case $cross_compiling:$ac_tool_warned in
3756yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003757{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3758$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003759ac_tool_warned=yes ;;
3760esac
3761 CC=$ac_ct_CC
3762 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003763else
3764 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003765fi
3766
Jack Jansendd19cf82001-12-06 22:36:17 +00003767if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003768 if test -n "$ac_tool_prefix"; then
3769 # 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 +00003770set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3772$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003773if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003775else
3776 if test -n "$CC"; then
3777 ac_cv_prog_CC="$CC" # Let the user override the test.
3778else
Martin v. Löwis11437992002-04-12 09:54:03 +00003779as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3780for as_dir in $PATH
3781do
3782 IFS=$as_save_IFS
3783 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003785 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003786 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003788 break 2
3789 fi
3790done
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003792IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003793
3794fi
3795fi
3796CC=$ac_cv_prog_CC
3797if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3799$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003800else
Matthias Kloseb9621712010-04-24 17:59:49 +00003801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3802$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003803fi
3804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805
Martin v. Löwis11437992002-04-12 09:54:03 +00003806 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003807fi
3808if test -z "$CC"; then
3809 # Extract the first word of "cc", so it can be a program name with args.
3810set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3812$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003813if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003815else
3816 if test -n "$CC"; then
3817 ac_cv_prog_CC="$CC" # Let the user override the test.
3818else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003819 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003820as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3821for as_dir in $PATH
3822do
3823 IFS=$as_save_IFS
3824 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003826 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003827 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3828 ac_prog_rejected=yes
3829 continue
3830 fi
3831 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003832 $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 +00003833 break 2
3834 fi
3835done
Matthias Kloseb9621712010-04-24 17:59:49 +00003836 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003838
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003839if test $ac_prog_rejected = yes; then
3840 # We found a bogon in the path, so make sure we never use it.
3841 set dummy $ac_cv_prog_CC
3842 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003843 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003844 # We chose a different compiler from the bogus one.
3845 # However, it has the same basename, so the bogon will be chosen
3846 # first if we set CC to just the basename; use the full file name.
3847 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003848 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003849 fi
3850fi
3851fi
3852fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003853CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003854if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3856$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003857else
Matthias Kloseb9621712010-04-24 17:59:49 +00003858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3859$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003860fi
3861
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003862
Martin v. Löwis11437992002-04-12 09:54:03 +00003863fi
3864if test -z "$CC"; then
3865 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003866 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003867 do
3868 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3869set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3871$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003872if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003873 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003874else
3875 if test -n "$CC"; then
3876 ac_cv_prog_CC="$CC" # Let the user override the test.
3877else
Martin v. Löwis11437992002-04-12 09:54:03 +00003878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3879for as_dir in $PATH
3880do
3881 IFS=$as_save_IFS
3882 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003883 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003884 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003885 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003886 $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 +00003887 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003888 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003889done
Matthias Kloseb9621712010-04-24 17:59:49 +00003890 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003891IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003892
3893fi
3894fi
3895CC=$ac_cv_prog_CC
3896if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3898$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003899else
Matthias Kloseb9621712010-04-24 17:59:49 +00003900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3901$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003902fi
3903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904
Martin v. Löwis11437992002-04-12 09:54:03 +00003905 test -n "$CC" && break
3906 done
3907fi
3908if test -z "$CC"; then
3909 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003910 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003911do
3912 # Extract the first word of "$ac_prog", so it can be a program name with args.
3913set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3915$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003916if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003917 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003918else
3919 if test -n "$ac_ct_CC"; then
3920 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3921else
3922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3923for as_dir in $PATH
3924do
3925 IFS=$as_save_IFS
3926 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003927 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003928 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003929 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003930 $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 +00003931 break 2
3932 fi
3933done
Matthias Kloseb9621712010-04-24 17:59:49 +00003934 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003936
Martin v. Löwis11437992002-04-12 09:54:03 +00003937fi
3938fi
3939ac_ct_CC=$ac_cv_prog_ac_ct_CC
3940if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3942$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003943else
Matthias Kloseb9621712010-04-24 17:59:49 +00003944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3945$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003946fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003947
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948
Martin v. Löwis11437992002-04-12 09:54:03 +00003949 test -n "$ac_ct_CC" && break
3950done
Michael W. Hudson54241132001-12-07 15:38:26 +00003951
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952 if test "x$ac_ct_CC" = x; then
3953 CC=""
3954 else
3955 case $cross_compiling:$ac_tool_warned in
3956yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003957{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3958$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959ac_tool_warned=yes ;;
3960esac
3961 CC=$ac_ct_CC
3962 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003963fi
3964
3965fi
3966
3967
Matthias Kloseb9621712010-04-24 17:59:49 +00003968test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3969$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003970as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003971See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003972
3973# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003974$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3975set X $ac_compile
3976ac_compiler=$2
3977for ac_option in --version -v -V -qversion; do
3978 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979case "(($ac_try" in
3980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3981 *) ac_try_echo=$ac_try;;
3982esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003983eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3984$as_echo "$ac_try_echo"; } >&5
3985 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003986 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003987 if test -s conftest.err; then
3988 sed '10a\
3989... rest of stderr output deleted ...
3990 10q' conftest.err >conftest.er1
3991 cat conftest.er1 >&5
3992 fi
3993 rm -f conftest.er1 conftest.err
3994 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3995 test $ac_status = 0; }
3996done
Martin v. Löwis11437992002-04-12 09:54:03 +00003997
Matthias Kloseb9621712010-04-24 17:59:49 +00003998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003999/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00004000
Martin v. Löwis11437992002-04-12 09:54:03 +00004001int
4002main ()
4003{
4004
4005 ;
4006 return 0;
4007}
4008_ACEOF
4009ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00004010ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00004011# Try to create an executable without -o first, disregard a.out.
4012# It will help us diagnose broken compilers, and finding out an intuition
4013# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00004014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4015$as_echo_n "checking whether the C compiler works... " >&6; }
4016ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4017
4018# The possible output files:
4019ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4020
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004021ac_rmfiles=
4022for ac_file in $ac_files
4023do
4024 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004025 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004026 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4027 esac
4028done
4029rm -f $ac_rmfiles
4030
Matthias Kloseb9621712010-04-24 17:59:49 +00004031if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004032case "(($ac_try" in
4033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4034 *) ac_try_echo=$ac_try;;
4035esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004036eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4037$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004038 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004039 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004040 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4041 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004042 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4043# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4044# in a Makefile. We should not override ac_cv_exeext if it was cached,
4045# so that the user can short-circuit this test for compilers unknown to
4046# Autoconf.
4047for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004048do
4049 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004050 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004051 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004052 ;;
4053 [ab].out )
4054 # We found the default executable, but exeext='' is most
4055 # certainly right.
4056 break;;
4057 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004058 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004059 then :; else
4060 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4061 fi
4062 # We set ac_cv_exeext here because the later test for it is not
4063 # safe: cross compilers may not add the suffix if given an `-o'
4064 # argument, so we may need to know it at that point already.
4065 # Even if this section looks crufty: it has the advantage of
4066 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004067 break;;
4068 * )
4069 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004070 esac
4071done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004072test "$ac_cv_exeext" = no && ac_cv_exeext=
4073
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004074else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004075 ac_file=''
4076fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004077if test -z "$ac_file"; then :
4078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4079$as_echo "no" >&6; }
4080$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004081sed 's/^/| /' conftest.$ac_ext >&5
4082
Matthias Kloseb9621712010-04-24 17:59:49 +00004083{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004085as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004086See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004087else
4088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4089$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4092$as_echo_n "checking for C compiler default output file name... " >&6; }
4093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4094$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004095ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004096
Matthias Kloseb9621712010-04-24 17:59:49 +00004097rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004098ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4100$as_echo_n "checking for suffix of executables... " >&6; }
4101if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004102case "(($ac_try" in
4103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4104 *) ac_try_echo=$ac_try;;
4105esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004106eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4107$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004108 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004109 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4111 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004112 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4113# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4114# work properly (i.e., refer to `conftest.exe'), while it won't with
4115# `rm'.
4116for ac_file in conftest.exe conftest conftest.*; do
4117 test -f "$ac_file" || continue
4118 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004119 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004120 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4121 break;;
4122 * ) break;;
4123 esac
4124done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004125else
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4127$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004128as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004129See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004130fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004131rm -f conftest conftest$ac_cv_exeext
4132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4133$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004134
4135rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004136EXEEXT=$ac_cv_exeext
4137ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4139/* end confdefs.h. */
4140#include <stdio.h>
4141int
4142main ()
4143{
4144FILE *f = fopen ("conftest.out", "w");
4145 return ferror (f) || fclose (f) != 0;
4146
4147 ;
4148 return 0;
4149}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004151ac_clean_files="$ac_clean_files conftest.out"
4152# Check that the compiler produces executables we can run. If not, either
4153# the compiler is broken, or we cross compile.
4154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4155$as_echo_n "checking whether we are cross compiling... " >&6; }
4156if test "$cross_compiling" != yes; then
4157 { { ac_try="$ac_link"
4158case "(($ac_try" in
4159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4160 *) ac_try_echo=$ac_try;;
4161esac
4162eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4163$as_echo "$ac_try_echo"; } >&5
4164 (eval "$ac_link") 2>&5
4165 ac_status=$?
4166 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4167 test $ac_status = 0; }
4168 if { ac_try='./conftest$ac_cv_exeext'
4169 { { case "(($ac_try" in
4170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4171 *) ac_try_echo=$ac_try;;
4172esac
4173eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4174$as_echo "$ac_try_echo"; } >&5
4175 (eval "$ac_try") 2>&5
4176 ac_status=$?
4177 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4178 test $ac_status = 0; }; }; then
4179 cross_compiling=no
4180 else
4181 if test "$cross_compiling" = maybe; then
4182 cross_compiling=yes
4183 else
4184 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4185$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004186as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004187If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004188See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004189 fi
4190 fi
4191fi
4192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4193$as_echo "$cross_compiling" >&6; }
4194
4195rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4196ac_clean_files=$ac_clean_files_save
4197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4198$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004199if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 $as_echo_n "(cached) " >&6
4201else
4202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004203/* end confdefs.h. */
4204
4205int
4206main ()
4207{
4208
4209 ;
4210 return 0;
4211}
4212_ACEOF
4213rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004214if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004215case "(($ac_try" in
4216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4217 *) ac_try_echo=$ac_try;;
4218esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004219eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4220$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004221 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004222 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004223 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4224 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004225 for ac_file in conftest.o conftest.obj conftest.*; do
4226 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004227 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004228 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004229 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4230 break;;
4231 esac
4232done
4233else
Matthias Kloseb9621712010-04-24 17:59:49 +00004234 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004235sed 's/^/| /' conftest.$ac_ext >&5
4236
Matthias Kloseb9621712010-04-24 17:59:49 +00004237{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4238$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004239as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004240See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004241fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004242rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4245$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004246OBJEXT=$ac_cv_objext
4247ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4249$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004250if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004251 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004252else
Matthias Kloseb9621712010-04-24 17:59:49 +00004253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004255
Martin v. Löwis11437992002-04-12 09:54:03 +00004256int
4257main ()
4258{
4259#ifndef __GNUC__
4260 choke me
4261#endif
4262
4263 ;
4264 return 0;
4265}
4266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004267if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004268 ac_compiler_gnu=yes
4269else
Matthias Kloseb9621712010-04-24 17:59:49 +00004270 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004273ac_cv_c_compiler_gnu=$ac_compiler_gnu
4274
4275fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4277$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4278if test $ac_compiler_gnu = yes; then
4279 GCC=yes
4280else
4281 GCC=
4282fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004283ac_test_CFLAGS=${CFLAGS+set}
4284ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4286$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004287if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004288 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004289else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290 ac_save_c_werror_flag=$ac_c_werror_flag
4291 ac_c_werror_flag=yes
4292 ac_cv_prog_cc_g=no
4293 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004295/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004296
Martin v. Löwis11437992002-04-12 09:54:03 +00004297int
4298main ()
4299{
4300
4301 ;
4302 return 0;
4303}
4304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004305if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004306 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004307else
Matthias Kloseb9621712010-04-24 17:59:49 +00004308 CFLAGS=""
4309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004310/* end confdefs.h. */
4311
4312int
4313main ()
4314{
4315
4316 ;
4317 return 0;
4318}
4319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004320if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004321
Matthias Kloseb9621712010-04-24 17:59:49 +00004322else
4323 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004324 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326/* end confdefs.h. */
4327
4328int
4329main ()
4330{
4331
4332 ;
4333 return 0;
4334}
4335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004336if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4344 ac_c_werror_flag=$ac_save_c_werror_flag
4345fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4347$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004348if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004349 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004350elif test $ac_cv_prog_cc_g = yes; then
4351 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004352 CFLAGS="-g -O2"
4353 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004354 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004355 fi
4356else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004357 if test "$GCC" = yes; then
4358 CFLAGS="-O2"
4359 else
4360 CFLAGS=
4361 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004362fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4364$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004365if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004366 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004367else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004368 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004369ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004371/* end confdefs.h. */
4372#include <stdarg.h>
4373#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004374struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004375/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4376struct buf { int x; };
4377FILE * (*rcsopen) (struct buf *, struct stat *, int);
4378static char *e (p, i)
4379 char **p;
4380 int i;
4381{
4382 return p[i];
4383}
4384static char *f (char * (*g) (char **, int), char **p, ...)
4385{
4386 char *s;
4387 va_list v;
4388 va_start (v,p);
4389 s = g (p, va_arg (v,int));
4390 va_end (v);
4391 return s;
4392}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004393
4394/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4395 function prototypes and stuff, but not '\xHH' hex character constants.
4396 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004397 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004398 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4399 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004400 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004401int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4402
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004403/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4404 inside strings and character constants. */
4405#define FOO(x) 'x'
4406int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4407
Skip Montanaro6dead952003-09-25 14:50:04 +00004408int test (int i, double x);
4409struct s1 {int (*f) (int a);};
4410struct s2 {int (*f) (double a);};
4411int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4412int argc;
4413char **argv;
4414int
4415main ()
4416{
4417return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4418 ;
4419 return 0;
4420}
4421_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004422for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4423 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004424do
4425 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004426 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004427 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004429rm -f core conftest.err conftest.$ac_objext
4430 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004431done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004432rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004433CC=$ac_save_CC
4434
4435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004436# AC_CACHE_VAL
4437case "x$ac_cv_prog_cc_c89" in
4438 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4440$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004441 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4443$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004444 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004445 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4447$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004448esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004449if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004450
Matthias Kloseb9621712010-04-24 17:59:49 +00004451fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004452
Martin v. Löwis11437992002-04-12 09:54:03 +00004453ac_ext=c
4454ac_cpp='$CPP $CPPFLAGS'
4455ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4456ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4457ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004458
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004459ac_ext=c
4460ac_cpp='$CPP $CPPFLAGS'
4461ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4462ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4463ac_compiler_gnu=$ac_cv_c_compiler_gnu
4464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4465$as_echo_n "checking how to run the C preprocessor... " >&6; }
4466# On Suns, sometimes $CPP names a directory.
4467if test -n "$CPP" && test -d "$CPP"; then
4468 CPP=
4469fi
4470if test -z "$CPP"; then
4471 if ${ac_cv_prog_CPP+:} false; then :
4472 $as_echo_n "(cached) " >&6
4473else
4474 # Double quotes because CPP needs to be expanded
4475 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4476 do
4477 ac_preproc_ok=false
4478for ac_c_preproc_warn_flag in '' yes
4479do
4480 # Use a header file that comes with gcc, so configuring glibc
4481 # with a fresh cross-compiler works.
4482 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4483 # <limits.h> exists even on freestanding compilers.
4484 # On the NeXT, cc -E runs the code through the compiler's parser,
4485 # not just through cpp. "Syntax error" is here to catch this case.
4486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4487/* end confdefs.h. */
4488#ifdef __STDC__
4489# include <limits.h>
4490#else
4491# include <assert.h>
4492#endif
4493 Syntax error
4494_ACEOF
4495if ac_fn_c_try_cpp "$LINENO"; then :
4496
4497else
4498 # Broken: fails on valid input.
4499continue
4500fi
4501rm -f conftest.err conftest.i conftest.$ac_ext
4502
4503 # OK, works on sane cases. Now check whether nonexistent headers
4504 # can be detected and how.
4505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4506/* end confdefs.h. */
4507#include <ac_nonexistent.h>
4508_ACEOF
4509if ac_fn_c_try_cpp "$LINENO"; then :
4510 # Broken: success on invalid input.
4511continue
4512else
4513 # Passes both tests.
4514ac_preproc_ok=:
4515break
4516fi
4517rm -f conftest.err conftest.i conftest.$ac_ext
4518
4519done
4520# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4521rm -f conftest.i conftest.err conftest.$ac_ext
4522if $ac_preproc_ok; then :
4523 break
4524fi
4525
4526 done
4527 ac_cv_prog_CPP=$CPP
4528
4529fi
4530 CPP=$ac_cv_prog_CPP
4531else
4532 ac_cv_prog_CPP=$CPP
4533fi
4534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4535$as_echo "$CPP" >&6; }
4536ac_preproc_ok=false
4537for ac_c_preproc_warn_flag in '' yes
4538do
4539 # Use a header file that comes with gcc, so configuring glibc
4540 # with a fresh cross-compiler works.
4541 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4542 # <limits.h> exists even on freestanding compilers.
4543 # On the NeXT, cc -E runs the code through the compiler's parser,
4544 # not just through cpp. "Syntax error" is here to catch this case.
4545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4546/* end confdefs.h. */
4547#ifdef __STDC__
4548# include <limits.h>
4549#else
4550# include <assert.h>
4551#endif
4552 Syntax error
4553_ACEOF
4554if ac_fn_c_try_cpp "$LINENO"; then :
4555
4556else
4557 # Broken: fails on valid input.
4558continue
4559fi
4560rm -f conftest.err conftest.i conftest.$ac_ext
4561
4562 # OK, works on sane cases. Now check whether nonexistent headers
4563 # can be detected and how.
4564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4565/* end confdefs.h. */
4566#include <ac_nonexistent.h>
4567_ACEOF
4568if ac_fn_c_try_cpp "$LINENO"; then :
4569 # Broken: success on invalid input.
4570continue
4571else
4572 # Passes both tests.
4573ac_preproc_ok=:
4574break
4575fi
4576rm -f conftest.err conftest.i conftest.$ac_ext
4577
4578done
4579# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4580rm -f conftest.i conftest.err conftest.$ac_ext
4581if $ac_preproc_ok; then :
4582
4583else
4584 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4585$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4586as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4587See \`config.log' for more details" "$LINENO" 5; }
4588fi
4589
4590ac_ext=c
4591ac_cpp='$CPP $CPPFLAGS'
4592ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4593ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4594ac_compiler_gnu=$ac_cv_c_compiler_gnu
4595
4596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4597$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4598if ${ac_cv_path_GREP+:} false; then :
4599 $as_echo_n "(cached) " >&6
4600else
4601 if test -z "$GREP"; then
4602 ac_path_GREP_found=false
4603 # Loop through the user's path and test for each of PROGNAME-LIST
4604 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4605for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4606do
4607 IFS=$as_save_IFS
4608 test -z "$as_dir" && as_dir=.
4609 for ac_prog in grep ggrep; do
4610 for ac_exec_ext in '' $ac_executable_extensions; do
4611 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4612 as_fn_executable_p "$ac_path_GREP" || continue
4613# Check for GNU ac_path_GREP and select it if it is found.
4614 # Check for GNU $ac_path_GREP
4615case `"$ac_path_GREP" --version 2>&1` in
4616*GNU*)
4617 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4618*)
4619 ac_count=0
4620 $as_echo_n 0123456789 >"conftest.in"
4621 while :
4622 do
4623 cat "conftest.in" "conftest.in" >"conftest.tmp"
4624 mv "conftest.tmp" "conftest.in"
4625 cp "conftest.in" "conftest.nl"
4626 $as_echo 'GREP' >> "conftest.nl"
4627 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4628 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4629 as_fn_arith $ac_count + 1 && ac_count=$as_val
4630 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4631 # Best one so far, save it but keep looking for a better one
4632 ac_cv_path_GREP="$ac_path_GREP"
4633 ac_path_GREP_max=$ac_count
4634 fi
4635 # 10*(2^10) chars as input seems more than enough
4636 test $ac_count -gt 10 && break
4637 done
4638 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4639esac
4640
4641 $ac_path_GREP_found && break 3
4642 done
4643 done
4644 done
4645IFS=$as_save_IFS
4646 if test -z "$ac_cv_path_GREP"; then
4647 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4648 fi
4649else
4650 ac_cv_path_GREP=$GREP
4651fi
4652
4653fi
4654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4655$as_echo "$ac_cv_path_GREP" >&6; }
4656 GREP="$ac_cv_path_GREP"
4657
4658
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004659
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004660
4661
Matthias Kloseb9621712010-04-24 17:59:49 +00004662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4663$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004664
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004665# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004666if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004667 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004668
4669 case $withval in
4670 no) with_cxx_main=no
4671 MAINCC='$(CC)';;
4672 yes) with_cxx_main=yes
4673 MAINCC='$(CXX)';;
4674 *) with_cxx_main=yes
4675 MAINCC=$withval
4676 if test -z "$CXX"
4677 then
4678 CXX=$withval
4679 fi;;
4680 esac
4681else
4682
4683 with_cxx_main=no
4684 MAINCC='$(CC)'
4685
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004686fi
4687
Matthias Kloseb9621712010-04-24 17:59:49 +00004688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4689$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004690
4691preset_cxx="$CXX"
4692if test -z "$CXX"
4693then
4694 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004695 gcc) if test -n "$ac_tool_prefix"; then
4696 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4697set dummy ${ac_tool_prefix}g++; ac_word=$2
4698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4699$as_echo_n "checking for $ac_word... " >&6; }
4700if ${ac_cv_path_CXX+:} false; then :
4701 $as_echo_n "(cached) " >&6
4702else
4703 case $CXX in
4704 [\\/]* | ?:[\\/]*)
4705 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4706 ;;
4707 *)
4708 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4709for as_dir in notfound
4710do
4711 IFS=$as_save_IFS
4712 test -z "$as_dir" && as_dir=.
4713 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004714 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004715 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4716 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4717 break 2
4718 fi
4719done
4720 done
4721IFS=$as_save_IFS
4722
4723 ;;
4724esac
4725fi
4726CXX=$ac_cv_path_CXX
4727if test -n "$CXX"; then
4728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4729$as_echo "$CXX" >&6; }
4730else
4731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4732$as_echo "no" >&6; }
4733fi
4734
4735
4736fi
4737if test -z "$ac_cv_path_CXX"; then
4738 ac_pt_CXX=$CXX
4739 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004740set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4742$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004743if ${ac_cv_path_ac_pt_CXX+:} false; then :
4744 $as_echo_n "(cached) " >&6
4745else
4746 case $ac_pt_CXX in
4747 [\\/]* | ?:[\\/]*)
4748 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4749 ;;
4750 *)
4751 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4752for as_dir in notfound
4753do
4754 IFS=$as_save_IFS
4755 test -z "$as_dir" && as_dir=.
4756 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004757 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004758 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4759 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4760 break 2
4761 fi
4762done
4763 done
4764IFS=$as_save_IFS
4765
4766 ;;
4767esac
4768fi
4769ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4770if test -n "$ac_pt_CXX"; then
4771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4772$as_echo "$ac_pt_CXX" >&6; }
4773else
4774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4775$as_echo "no" >&6; }
4776fi
4777
4778 if test "x$ac_pt_CXX" = x; then
4779 CXX="g++"
4780 else
4781 case $cross_compiling:$ac_tool_warned in
4782yes:)
4783{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4784$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4785ac_tool_warned=yes ;;
4786esac
4787 CXX=$ac_pt_CXX
4788 fi
4789else
4790 CXX="$ac_cv_path_CXX"
4791fi
4792 ;;
4793 cc) if test -n "$ac_tool_prefix"; then
4794 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4795set dummy ${ac_tool_prefix}c++; ac_word=$2
4796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4797$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004798if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004800else
4801 case $CXX in
4802 [\\/]* | ?:[\\/]*)
4803 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4804 ;;
4805 *)
4806 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4807for as_dir in notfound
4808do
4809 IFS=$as_save_IFS
4810 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004811 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004812 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004813 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004814 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004815 break 2
4816 fi
4817done
Matthias Kloseb9621712010-04-24 17:59:49 +00004818 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004819IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004820
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004821 ;;
4822esac
4823fi
4824CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004825if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4827$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004828else
Matthias Kloseb9621712010-04-24 17:59:49 +00004829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4830$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004832
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004833
4834fi
4835if test -z "$ac_cv_path_CXX"; then
4836 ac_pt_CXX=$CXX
4837 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004838set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4840$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004841if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004842 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004843else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004844 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004845 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004846 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 +00004847 ;;
4848 *)
4849 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4850for as_dir in notfound
4851do
4852 IFS=$as_save_IFS
4853 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004854 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004855 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004856 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004857 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004858 break 2
4859 fi
4860done
Matthias Kloseb9621712010-04-24 17:59:49 +00004861 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004862IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004863
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004864 ;;
4865esac
4866fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004867ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4868if test -n "$ac_pt_CXX"; then
4869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4870$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004871else
Matthias Kloseb9621712010-04-24 17:59:49 +00004872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4873$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004875
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004876 if test "x$ac_pt_CXX" = x; then
4877 CXX="c++"
4878 else
4879 case $cross_compiling:$ac_tool_warned in
4880yes:)
4881{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4882$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4883ac_tool_warned=yes ;;
4884esac
4885 CXX=$ac_pt_CXX
4886 fi
4887else
4888 CXX="$ac_cv_path_CXX"
4889fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004890 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004891 clang|*/clang) if test -n "$ac_tool_prefix"; then
4892 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4893set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4895$as_echo_n "checking for $ac_word... " >&6; }
4896if ${ac_cv_path_CXX+:} false; then :
4897 $as_echo_n "(cached) " >&6
4898else
4899 case $CXX in
4900 [\\/]* | ?:[\\/]*)
4901 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4902 ;;
4903 *)
4904 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4905for as_dir in notfound
4906do
4907 IFS=$as_save_IFS
4908 test -z "$as_dir" && as_dir=.
4909 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004910 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004911 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4912 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4913 break 2
4914 fi
4915done
4916 done
4917IFS=$as_save_IFS
4918
Ned Deilycbfb9a52012-06-23 16:02:19 -07004919 ;;
4920esac
4921fi
4922CXX=$ac_cv_path_CXX
4923if test -n "$CXX"; then
4924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4925$as_echo "$CXX" >&6; }
4926else
4927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4928$as_echo "no" >&6; }
4929fi
4930
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004931
4932fi
4933if test -z "$ac_cv_path_CXX"; then
4934 ac_pt_CXX=$CXX
4935 # Extract the first word of "clang++", so it can be a program name with args.
4936set dummy clang++; ac_word=$2
4937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4938$as_echo_n "checking for $ac_word... " >&6; }
4939if ${ac_cv_path_ac_pt_CXX+:} false; then :
4940 $as_echo_n "(cached) " >&6
4941else
4942 case $ac_pt_CXX in
4943 [\\/]* | ?:[\\/]*)
4944 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4945 ;;
4946 *)
4947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4948for as_dir in notfound
4949do
4950 IFS=$as_save_IFS
4951 test -z "$as_dir" && as_dir=.
4952 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004954 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4956 break 2
4957 fi
4958done
4959 done
4960IFS=$as_save_IFS
4961
4962 ;;
4963esac
4964fi
4965ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4966if test -n "$ac_pt_CXX"; then
4967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4968$as_echo "$ac_pt_CXX" >&6; }
4969else
4970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4971$as_echo "no" >&6; }
4972fi
4973
4974 if test "x$ac_pt_CXX" = x; then
4975 CXX="clang++"
4976 else
4977 case $cross_compiling:$ac_tool_warned in
4978yes:)
4979{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4980$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4981ac_tool_warned=yes ;;
4982esac
4983 CXX=$ac_pt_CXX
4984 fi
4985else
4986 CXX="$ac_cv_path_CXX"
4987fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004988 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004989 icc|*/icc) if test -n "$ac_tool_prefix"; then
4990 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4991set dummy ${ac_tool_prefix}icpc; ac_word=$2
4992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4993$as_echo_n "checking for $ac_word... " >&6; }
4994if ${ac_cv_path_CXX+:} false; then :
4995 $as_echo_n "(cached) " >&6
4996else
4997 case $CXX in
4998 [\\/]* | ?:[\\/]*)
4999 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5000 ;;
5001 *)
5002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5003for as_dir in notfound
5004do
5005 IFS=$as_save_IFS
5006 test -z "$as_dir" && as_dir=.
5007 for ac_exec_ext in '' $ac_executable_extensions; do
5008 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5009 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5010 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5011 break 2
5012 fi
5013done
5014 done
5015IFS=$as_save_IFS
5016
5017 ;;
5018esac
5019fi
5020CXX=$ac_cv_path_CXX
5021if test -n "$CXX"; then
5022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5023$as_echo "$CXX" >&6; }
5024else
5025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5026$as_echo "no" >&6; }
5027fi
5028
5029
5030fi
5031if test -z "$ac_cv_path_CXX"; then
5032 ac_pt_CXX=$CXX
5033 # Extract the first word of "icpc", so it can be a program name with args.
5034set dummy icpc; ac_word=$2
5035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5036$as_echo_n "checking for $ac_word... " >&6; }
5037if ${ac_cv_path_ac_pt_CXX+:} false; then :
5038 $as_echo_n "(cached) " >&6
5039else
5040 case $ac_pt_CXX in
5041 [\\/]* | ?:[\\/]*)
5042 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5043 ;;
5044 *)
5045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5046for as_dir in notfound
5047do
5048 IFS=$as_save_IFS
5049 test -z "$as_dir" && as_dir=.
5050 for ac_exec_ext in '' $ac_executable_extensions; do
5051 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5052 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5053 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5054 break 2
5055 fi
5056done
5057 done
5058IFS=$as_save_IFS
5059
5060 ;;
5061esac
5062fi
5063ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5064if test -n "$ac_pt_CXX"; then
5065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5066$as_echo "$ac_pt_CXX" >&6; }
5067else
5068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5069$as_echo "no" >&6; }
5070fi
5071
5072 if test "x$ac_pt_CXX" = x; then
5073 CXX="icpc"
5074 else
5075 case $cross_compiling:$ac_tool_warned in
5076yes:)
5077{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5078$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5079ac_tool_warned=yes ;;
5080esac
5081 CXX=$ac_pt_CXX
5082 fi
5083else
5084 CXX="$ac_cv_path_CXX"
5085fi
5086 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005087 esac
5088 if test "$CXX" = "notfound"
5089 then
5090 CXX=""
5091 fi
5092fi
5093if test -z "$CXX"
5094then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005095 if test -n "$ac_tool_prefix"; then
5096 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5097 do
5098 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5099set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5101$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005102if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005104else
5105 if test -n "$CXX"; then
5106 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5107else
5108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5109for as_dir in $PATH
5110do
5111 IFS=$as_save_IFS
5112 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005114 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005115 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005116 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005117 break 2
5118 fi
5119done
Matthias Kloseb9621712010-04-24 17:59:49 +00005120 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005121IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005122
5123fi
5124fi
5125CXX=$ac_cv_prog_CXX
5126if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5128$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005129else
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5131$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005132fi
5133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005134
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005135 test -n "$CXX" && break
5136 done
5137fi
5138if test -z "$CXX"; then
5139 ac_ct_CXX=$CXX
5140 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5141do
5142 # Extract the first word of "$ac_prog", so it can be a program name with args.
5143set dummy $ac_prog; ac_word=$2
5144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5145$as_echo_n "checking for $ac_word... " >&6; }
5146if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5147 $as_echo_n "(cached) " >&6
5148else
5149 if test -n "$ac_ct_CXX"; then
5150 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5151else
5152as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5153for as_dir in $PATH
5154do
5155 IFS=$as_save_IFS
5156 test -z "$as_dir" && as_dir=.
5157 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005158 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005159 ac_cv_prog_ac_ct_CXX="$ac_prog"
5160 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5161 break 2
5162 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005163done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005164 done
5165IFS=$as_save_IFS
5166
5167fi
5168fi
5169ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5170if test -n "$ac_ct_CXX"; then
5171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5172$as_echo "$ac_ct_CXX" >&6; }
5173else
5174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5175$as_echo "no" >&6; }
5176fi
5177
5178
5179 test -n "$ac_ct_CXX" && break
5180done
5181
5182 if test "x$ac_ct_CXX" = x; then
5183 CXX="notfound"
5184 else
5185 case $cross_compiling:$ac_tool_warned in
5186yes:)
5187{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5188$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5189ac_tool_warned=yes ;;
5190esac
5191 CXX=$ac_ct_CXX
5192 fi
5193fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005194
5195 if test "$CXX" = "notfound"
5196 then
5197 CXX=""
5198 fi
5199fi
5200if test "$preset_cxx" != "$CXX"
5201then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005202 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005203
5204 By default, distutils will build C++ extension modules with \"$CXX\".
5205 If this is not intended, then set CXX on the configure command line.
5206 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005207$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005208
5209 By default, distutils will build C++ extension modules with \"$CXX\".
5210 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005211 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005212fi
5213
5214
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005215MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5216
5217
5218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5219$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5220cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005221#undef bfin
5222#undef cris
5223#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005224#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005225#undef hppa
5226#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005227#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005228#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005229#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005230#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005231#undef unix
5232#if defined(__linux__)
5233# if defined(__x86_64__) && defined(__LP64__)
5234 x86_64-linux-gnu
5235# elif defined(__x86_64__) && defined(__ILP32__)
5236 x86_64-linux-gnux32
5237# elif defined(__i386__)
5238 i386-linux-gnu
5239# elif defined(__aarch64__) && defined(__AARCH64EL__)
5240# if defined(__ILP32__)
5241 aarch64_ilp32-linux-gnu
5242# else
5243 aarch64-linux-gnu
5244# endif
5245# elif defined(__aarch64__) && defined(__AARCH64EB__)
5246# if defined(__ILP32__)
5247 aarch64_be_ilp32-linux-gnu
5248# else
5249 aarch64_be-linux-gnu
5250# endif
5251# elif defined(__alpha__)
5252 alpha-linux-gnu
5253# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5254# if defined(__ARMEL__)
5255 arm-linux-gnueabihf
5256# else
5257 armeb-linux-gnueabihf
5258# endif
5259# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5260# if defined(__ARMEL__)
5261 arm-linux-gnueabi
5262# else
5263 armeb-linux-gnueabi
5264# endif
5265# elif defined(__hppa__)
5266 hppa-linux-gnu
5267# elif defined(__ia64__)
5268 ia64-linux-gnu
5269# elif defined(__m68k__) && !defined(__mcoldfire__)
5270 m68k-linux-gnu
5271# elif defined(__mips_hard_float) && defined(_MIPSEL)
5272# if _MIPS_SIM == _ABIO32
5273 mipsel-linux-gnu
5274# elif _MIPS_SIM == _ABIN32
5275 mips64el-linux-gnuabin32
5276# elif _MIPS_SIM == _ABI64
5277 mips64el-linux-gnuabi64
5278# else
5279# error unknown platform triplet
5280# endif
5281# elif defined(__mips_hard_float)
5282# if _MIPS_SIM == _ABIO32
5283 mips-linux-gnu
5284# elif _MIPS_SIM == _ABIN32
5285 mips64-linux-gnuabin32
5286# elif _MIPS_SIM == _ABI64
5287 mips64-linux-gnuabi64
5288# else
5289# error unknown platform triplet
5290# endif
5291# elif defined(__or1k__)
5292 or1k-linux-gnu
5293# elif defined(__powerpc__) && defined(__SPE__)
5294 powerpc-linux-gnuspe
5295# elif defined(__powerpc64__)
5296# if defined(__LITTLE_ENDIAN__)
5297 powerpc64le-linux-gnu
5298# else
5299 powerpc64-linux-gnu
5300# endif
5301# elif defined(__powerpc__)
5302 powerpc-linux-gnu
5303# elif defined(__s390x__)
5304 s390x-linux-gnu
5305# elif defined(__s390__)
5306 s390-linux-gnu
5307# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5308 sh4-linux-gnu
5309# elif defined(__sparc__) && defined(__arch64__)
5310 sparc64-linux-gnu
5311# elif defined(__sparc__)
5312 sparc-linux-gnu
5313# else
5314# error unknown platform triplet
5315# endif
5316#elif defined(__FreeBSD_kernel__)
5317# if defined(__LP64__)
5318 x86_64-kfreebsd-gnu
5319# elif defined(__i386__)
5320 i386-kfreebsd-gnu
5321# else
5322# error unknown platform triplet
5323# endif
5324#elif defined(__gnu_hurd__)
5325 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005326#elif defined(__APPLE__)
5327 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005328#else
5329# error unknown platform triplet
5330#endif
5331
5332EOF
5333
5334if $CPP conftest.c >conftest.out 2>/dev/null; then
5335 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5337$as_echo "$PLATFORM_TRIPLET" >&6; }
5338else
5339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5340$as_echo "none" >&6; }
5341fi
5342rm -f conftest.c conftest.out
5343
5344if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5345 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5346 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5347 fi
5348fi
doko@ubuntu.com55532312016-06-14 08:55:19 +02005349if test x$PLATFORM_TRIPLET = x; then
5350 PLATDIR=plat-$MACHDEP
5351else
5352 PLATDIR=plat-$PLATFORM_TRIPLET
5353fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005354
5355
doko@ubuntu.com55532312016-06-14 08:55:19 +02005356if test x$MULTIARCH != x; then
5357 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5358fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005359
5360
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5362$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5363save_LDFLAGS="$LDFLAGS"
5364LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005365
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5367/* end confdefs.h. */
5368
5369int
5370main ()
5371{
5372
5373 ;
5374 return 0;
5375}
5376_ACEOF
5377if ac_fn_c_try_link "$LINENO"; then :
5378 NO_AS_NEEDED="-Wl,--no-as-needed"
5379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5380$as_echo "yes" >&6; }
5381else
5382 NO_AS_NEEDED=""
5383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5384$as_echo "no" >&6; }
5385fi
5386rm -f core conftest.err conftest.$ac_objext \
5387 conftest$ac_exeext conftest.$ac_ext
5388LDFLAGS="$save_LDFLAGS"
5389
5390
5391
5392# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005393
Matthias Kloseb9621712010-04-24 17:59:49 +00005394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5395$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005396if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005397 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005398else
5399 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5400 then ac_cv_path_EGREP="$GREP -E"
5401 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005402 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005403 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 # Loop through the user's path and test for each of PROGNAME-LIST
5405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005406for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5407do
5408 IFS=$as_save_IFS
5409 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 for ac_prog in egrep; do
5411 for ac_exec_ext in '' $ac_executable_extensions; do
5412 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005413 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005414# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005415 # Check for GNU $ac_path_EGREP
5416case `"$ac_path_EGREP" --version 2>&1` in
5417*GNU*)
5418 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5419*)
5420 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005421 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005422 while :
5423 do
5424 cat "conftest.in" "conftest.in" >"conftest.tmp"
5425 mv "conftest.tmp" "conftest.in"
5426 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005427 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005428 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5429 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005430 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005431 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5432 # Best one so far, save it but keep looking for a better one
5433 ac_cv_path_EGREP="$ac_path_EGREP"
5434 ac_path_EGREP_max=$ac_count
5435 fi
5436 # 10*(2^10) chars as input seems more than enough
5437 test $ac_count -gt 10 && break
5438 done
5439 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5440esac
5441
Matthias Kloseb9621712010-04-24 17:59:49 +00005442 $ac_path_EGREP_found && break 3
5443 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005444 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005445 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005446IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005447 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005448 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005449 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005450else
5451 ac_cv_path_EGREP=$EGREP
5452fi
5453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005454 fi
5455fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5457$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005458 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005459
5460
Matthias Kloseb9621712010-04-24 17:59:49 +00005461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5462$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005463if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005464 $as_echo_n "(cached) " >&6
5465else
5466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005467/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005468#include <stdlib.h>
5469#include <stdarg.h>
5470#include <string.h>
5471#include <float.h>
5472
5473int
5474main ()
5475{
5476
5477 ;
5478 return 0;
5479}
5480_ACEOF
5481if ac_fn_c_try_compile "$LINENO"; then :
5482 ac_cv_header_stdc=yes
5483else
5484 ac_cv_header_stdc=no
5485fi
5486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5487
5488if test $ac_cv_header_stdc = yes; then
5489 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5491/* end confdefs.h. */
5492#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005493
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005494_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005496 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005497
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005498else
Matthias Kloseb9621712010-04-24 17:59:49 +00005499 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005500fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005501rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005502
Matthias Kloseb9621712010-04-24 17:59:49 +00005503fi
5504
5505if test $ac_cv_header_stdc = yes; then
5506 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5508/* end confdefs.h. */
5509#include <stdlib.h>
5510
5511_ACEOF
5512if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5513 $EGREP "free" >/dev/null 2>&1; then :
5514
5515else
5516 ac_cv_header_stdc=no
5517fi
5518rm -f conftest*
5519
5520fi
5521
5522if test $ac_cv_header_stdc = yes; then
5523 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5524 if test "$cross_compiling" = yes; then :
5525 :
5526else
5527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5528/* end confdefs.h. */
5529#include <ctype.h>
5530#include <stdlib.h>
5531#if ((' ' & 0x0FF) == 0x020)
5532# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5533# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5534#else
5535# define ISLOWER(c) \
5536 (('a' <= (c) && (c) <= 'i') \
5537 || ('j' <= (c) && (c) <= 'r') \
5538 || ('s' <= (c) && (c) <= 'z'))
5539# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5540#endif
5541
5542#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5543int
5544main ()
5545{
5546 int i;
5547 for (i = 0; i < 256; i++)
5548 if (XOR (islower (i), ISLOWER (i))
5549 || toupper (i) != TOUPPER (i))
5550 return 2;
5551 return 0;
5552}
5553_ACEOF
5554if ac_fn_c_try_run "$LINENO"; then :
5555
5556else
5557 ac_cv_header_stdc=no
5558fi
5559rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5560 conftest.$ac_objext conftest.beam conftest.$ac_ext
5561fi
5562
5563fi
5564fi
5565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5566$as_echo "$ac_cv_header_stdc" >&6; }
5567if test $ac_cv_header_stdc = yes; then
5568
5569$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5570
5571fi
5572
5573# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5574for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5575 inttypes.h stdint.h unistd.h
5576do :
5577 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5578ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5579"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005580if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005581 cat >>confdefs.h <<_ACEOF
5582#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5583_ACEOF
5584
5585fi
5586
5587done
5588
5589
5590
5591 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02005592if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005593 MINIX=yes
5594else
5595 MINIX=
5596fi
5597
5598
5599 if test "$MINIX" = yes; then
5600
5601$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5602
5603
5604$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5605
5606
5607$as_echo "#define _MINIX 1" >>confdefs.h
5608
5609 fi
5610
5611
5612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5613$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005614if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005615 $as_echo_n "(cached) " >&6
5616else
5617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5618/* end confdefs.h. */
5619
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005620# define __EXTENSIONS__ 1
5621 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005622int
5623main ()
5624{
5625
5626 ;
5627 return 0;
5628}
5629_ACEOF
5630if ac_fn_c_try_compile "$LINENO"; then :
5631 ac_cv_safe_to_define___extensions__=yes
5632else
5633 ac_cv_safe_to_define___extensions__=no
5634fi
5635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5636fi
5637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5638$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5639 test $ac_cv_safe_to_define___extensions__ = yes &&
5640 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5641
5642 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5643
5644 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5645
5646 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5647
5648 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5649
5650
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652# Check for unsupported systems
5653case $ac_sys_system/$ac_sys_release in
5654atheos*|Linux*/1*)
5655 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5656 echo See README for details.
5657 exit 1;;
5658esac
5659
5660
Matthias Kloseb9621712010-04-24 17:59:49 +00005661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5662$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663
5664# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005665if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 withval=$with_suffix;
5667 case $withval in
5668 no) EXEEXT=;;
5669 yes) EXEEXT=.exe;;
5670 *) EXEEXT=$withval;;
5671 esac
5672fi
5673
Matthias Kloseb9621712010-04-24 17:59:49 +00005674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5675$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676
5677# Test whether we're running on a non-case-sensitive system, in which
5678# case we give a warning if no ext is given
5679
Matthias Kloseb9621712010-04-24 17:59:49 +00005680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5681$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682if test ! -d CaseSensitiveTestDir; then
5683mkdir CaseSensitiveTestDir
5684fi
5685
5686if test -d casesensitivetestdir
5687then
Matthias Kloseb9621712010-04-24 17:59:49 +00005688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5689$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690 BUILDEXEEXT=.exe
5691else
Matthias Kloseb9621712010-04-24 17:59:49 +00005692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5693$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694 BUILDEXEEXT=$EXEEXT
5695fi
5696rmdir CaseSensitiveTestDir
5697
5698case $MACHDEP in
5699bsdos*)
5700 case $CC in
5701 gcc) CC="$CC -D_HAVE_BSDI";;
5702 esac;;
5703esac
5704
5705case $ac_sys_system in
5706hp*|HP*)
5707 case $CC in
5708 cc|*/cc) CC="$CC -Ae";;
5709 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710esac
5711
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712
Matthias Kloseb9621712010-04-24 17:59:49 +00005713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5714$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715if test -z "$LIBRARY"
5716then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005717 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5720$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721
5722# LDLIBRARY is the name of the library to link against (as opposed to the
5723# name of the library into which to insert object files). BLDLIBRARY is also
5724# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5725# is blank as the main program is not linked directly against LDLIBRARY.
5726# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5727# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5728# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5729# DLLLIBRARY is the shared (i.e., DLL) library.
5730#
5731# RUNSHARED is used to run shared python without installed libraries
5732#
5733# INSTSONAME is the name of the shared library that will be use to install
5734# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005735#
5736# LDVERSION is the shared library version number, normally the Python version
5737# with the ABI build flags appended.
5738
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739
5740
5741
5742
5743
5744
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005745
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746LDLIBRARY="$LIBRARY"
5747BLDLIBRARY='$(LDLIBRARY)'
5748INSTSONAME='$(LDLIBRARY)'
5749DLLLIBRARY=''
5750LDLIBRARYDIR=''
5751RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005752LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753
5754# LINKCC is the command that links the python executable -- default is $(CC).
5755# If CXX is set, and if it is needed to link a main function that was
5756# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5757# python might then depend on the C++ runtime
5758# This is altered for AIX in order to build the export list before
5759# linking.
5760
Matthias Kloseb9621712010-04-24 17:59:49 +00005761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5762$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763if test -z "$LINKCC"
5764then
5765 LINKCC='$(PURIFY) $(MAINCC)'
5766 case $ac_sys_system in
5767 AIX*)
5768 exp_extra="\"\""
5769 if test $ac_sys_release -ge 5 -o \
5770 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5771 exp_extra="."
5772 fi
5773 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774 QNX*)
5775 # qcc must be used because the other compilers do not
5776 # support -N.
5777 LINKCC=qcc;;
5778 esac
5779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5781$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782
5783# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5784# make sure we default having it set to "no": this is used by
5785# distutils.unixccompiler to know if it should add --enable-new-dtags
5786# to linker command lines, and failing to detect GNU ld simply results
5787# in the same bahaviour as before.
5788
Matthias Kloseb9621712010-04-24 17:59:49 +00005789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5790$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791ac_prog=ld
5792if test "$GCC" = yes; then
5793 ac_prog=`$CC -print-prog-name=ld`
5794fi
5795case `"$ac_prog" -V 2>&1 < /dev/null` in
5796 *GNU*)
5797 GNULD=yes;;
5798 *)
5799 GNULD=no;;
5800esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5802$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5805$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005806if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005807 $as_echo_n "(cached) " >&6
5808else
5809 ac_cv_c_inline=no
5810for ac_kw in inline __inline__ __inline; do
5811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5812/* end confdefs.h. */
5813#ifndef __cplusplus
5814typedef int foo_t;
5815static $ac_kw foo_t static_foo () {return 0; }
5816$ac_kw foo_t foo () {return 0; }
5817#endif
5818
5819_ACEOF
5820if ac_fn_c_try_compile "$LINENO"; then :
5821 ac_cv_c_inline=$ac_kw
5822fi
5823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5824 test "$ac_cv_c_inline" != no && break
5825done
5826
5827fi
5828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5829$as_echo "$ac_cv_c_inline" >&6; }
5830
5831case $ac_cv_c_inline in
5832 inline | yes) ;;
5833 *)
5834 case $ac_cv_c_inline in
5835 no) ac_val=;;
5836 *) ac_val=$ac_cv_c_inline;;
5837 esac
5838 cat >>confdefs.h <<_ACEOF
5839#ifndef __cplusplus
5840#define inline $ac_val
5841#endif
5842_ACEOF
5843 ;;
5844esac
5845
5846if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005847
5848$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005849
5850
5851fi
5852
5853
Matthias Kloseb9621712010-04-24 17:59:49 +00005854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5855$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005857if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858 enableval=$enable_shared;
5859fi
5860
5861
5862if test -z "$enable_shared"
5863then
5864 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005865 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866 enable_shared="yes";;
5867 *)
5868 enable_shared="no";;
5869 esac
5870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5872$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873
Matthias Kloseb9621712010-04-24 17:59:49 +00005874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5875$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005877if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005878 enableval=$enable_profiling;
5879fi
5880
5881if test "x$enable_profiling" = xyes; then
5882 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005883 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885/* end confdefs.h. */
5886int main() { return 0; }
5887_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005888if ac_fn_c_try_link "$LINENO"; then :
5889
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005891 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005893rm -f core conftest.err conftest.$ac_objext \
5894 conftest$ac_exeext conftest.$ac_ext
5895 CC="$ac_save_cc"
5896else
5897 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5900$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901
doko@ubuntu.comba015832012-06-30 16:52:05 +02005902if test "x$enable_profiling" = xyes; then
5903 BASECFLAGS="-pg $BASECFLAGS"
5904 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905fi
5906
Matthias Kloseb9621712010-04-24 17:59:49 +00005907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5908$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909
5910# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5911# library that we build, but we do not want to link against it (we
5912# will find it with a -framework option). For this reason there is an
5913# extra variable BLDLIBRARY against which Python and the extension
5914# modules are linked, BLDLIBRARY. This is normally the same as
5915# LDLIBRARY, but empty for MacOSX framework builds.
5916if test "$enable_framework"
5917then
5918 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005919 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920 BLDLIBRARY=''
5921else
5922 BLDLIBRARY='$(LDLIBRARY)'
5923fi
5924
5925# Other platforms follow
5926if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005927 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928
Matthias Kloseb9621712010-04-24 17:59:49 +00005929$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930
5931 case $ac_sys_system in
5932 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005933 LDLIBRARY='libpython$(LDVERSION).dll.a'
5934 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935 ;;
5936 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005937 LDLIBRARY='libpython$(LDVERSION).so'
5938 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005939 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005941 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005942 then
5943 PY3LIBRARY=libpython3.so
5944 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005946 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005947 LDLIBRARY='libpython$(LDVERSION).so'
5948 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005949 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005951 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005952 then
5953 PY3LIBRARY=libpython3.so
5954 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955 ;;
5956 hp*|HP*)
5957 case `uname -m` in
5958 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005959 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960 ;;
5961 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005962 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963 ;;
5964 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005965 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005966 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005969 LDLIBRARY='libpython$(LDVERSION).dylib'
5970 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005971 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005973 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005974 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005975 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005976 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977
5978 esac
5979else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005980 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981 case $ac_sys_system in
5982 CYGWIN*)
5983 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005984 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985 ;;
5986 esac
5987fi
5988
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005989if test "$cross_compiling" = yes; then
5990 RUNSHARED=
5991fi
5992
Matthias Kloseb9621712010-04-24 17:59:49 +00005993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5994$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995
5996if test -n "$ac_tool_prefix"; then
5997 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5998set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6000$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006001if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006002 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003else
6004 if test -n "$RANLIB"; then
6005 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6006else
6007as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6008for as_dir in $PATH
6009do
6010 IFS=$as_save_IFS
6011 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006012 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006013 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006015 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006016 break 2
6017 fi
6018done
Matthias Kloseb9621712010-04-24 17:59:49 +00006019 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020IFS=$as_save_IFS
6021
6022fi
6023fi
6024RANLIB=$ac_cv_prog_RANLIB
6025if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6027$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028else
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6030$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031fi
6032
6033
6034fi
6035if test -z "$ac_cv_prog_RANLIB"; then
6036 ac_ct_RANLIB=$RANLIB
6037 # Extract the first word of "ranlib", so it can be a program name with args.
6038set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6040$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006041if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006042 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006043else
6044 if test -n "$ac_ct_RANLIB"; then
6045 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6046else
6047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6048for as_dir in $PATH
6049do
6050 IFS=$as_save_IFS
6051 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006052 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006053 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006054 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006055 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006056 break 2
6057 fi
6058done
Matthias Kloseb9621712010-04-24 17:59:49 +00006059 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006060IFS=$as_save_IFS
6061
6062fi
6063fi
6064ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6065if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6067$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006068else
Matthias Kloseb9621712010-04-24 17:59:49 +00006069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6070$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006071fi
6072
6073 if test "x$ac_ct_RANLIB" = x; then
6074 RANLIB=":"
6075 else
6076 case $cross_compiling:$ac_tool_warned in
6077yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006078{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6079$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006080ac_tool_warned=yes ;;
6081esac
6082 RANLIB=$ac_ct_RANLIB
6083 fi
6084else
6085 RANLIB="$ac_cv_prog_RANLIB"
6086fi
6087
6088
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006089if test -n "$ac_tool_prefix"; then
6090 for ac_prog in ar aal
6091 do
6092 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6093set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6095$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006096if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006097 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006098else
6099 if test -n "$AR"; then
6100 ac_cv_prog_AR="$AR" # Let the user override the test.
6101else
6102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6103for as_dir in $PATH
6104do
6105 IFS=$as_save_IFS
6106 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006107 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006108 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006109 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006110 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006111 break 2
6112 fi
6113done
Matthias Kloseb9621712010-04-24 17:59:49 +00006114 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006115IFS=$as_save_IFS
6116
6117fi
6118fi
6119AR=$ac_cv_prog_AR
6120if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6122$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006123else
Matthias Kloseb9621712010-04-24 17:59:49 +00006124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6125$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006126fi
6127
6128
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006129 test -n "$AR" && break
6130 done
6131fi
6132if test -z "$AR"; then
6133 ac_ct_AR=$AR
6134 for ac_prog in ar aal
6135do
6136 # Extract the first word of "$ac_prog", so it can be a program name with args.
6137set dummy $ac_prog; ac_word=$2
6138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6139$as_echo_n "checking for $ac_word... " >&6; }
6140if ${ac_cv_prog_ac_ct_AR+:} false; then :
6141 $as_echo_n "(cached) " >&6
6142else
6143 if test -n "$ac_ct_AR"; then
6144 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6145else
6146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6147for as_dir in $PATH
6148do
6149 IFS=$as_save_IFS
6150 test -z "$as_dir" && as_dir=.
6151 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006152 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006153 ac_cv_prog_ac_ct_AR="$ac_prog"
6154 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6155 break 2
6156 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006157done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006158 done
6159IFS=$as_save_IFS
6160
6161fi
6162fi
6163ac_ct_AR=$ac_cv_prog_ac_ct_AR
6164if test -n "$ac_ct_AR"; then
6165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6166$as_echo "$ac_ct_AR" >&6; }
6167else
6168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6169$as_echo "no" >&6; }
6170fi
6171
6172
6173 test -n "$ac_ct_AR" && break
6174done
6175
6176 if test "x$ac_ct_AR" = x; then
6177 AR="ar"
6178 else
6179 case $cross_compiling:$ac_tool_warned in
6180yes:)
6181{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6182$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6183ac_tool_warned=yes ;;
6184esac
6185 AR=$ac_ct_AR
6186 fi
6187fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188
6189
6190# tweak ARFLAGS only if the user didn't set it on the command line
6191
6192if test -z "$ARFLAGS"
6193then
6194 ARFLAGS="rc"
6195fi
6196
doko@ubuntu.com58844492012-06-30 18:25:32 +02006197if test -n "$ac_tool_prefix"; then
6198 for ac_prog in readelf
6199 do
6200 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6201set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6203$as_echo_n "checking for $ac_word... " >&6; }
6204if ${ac_cv_prog_READELF+:} false; then :
6205 $as_echo_n "(cached) " >&6
6206else
6207 if test -n "$READELF"; then
6208 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6209else
6210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6211for as_dir in $PATH
6212do
6213 IFS=$as_save_IFS
6214 test -z "$as_dir" && as_dir=.
6215 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006216 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006217 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6218 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6219 break 2
6220 fi
6221done
6222 done
6223IFS=$as_save_IFS
6224
6225fi
6226fi
6227READELF=$ac_cv_prog_READELF
6228if test -n "$READELF"; then
6229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6230$as_echo "$READELF" >&6; }
6231else
6232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6233$as_echo "no" >&6; }
6234fi
6235
6236
6237 test -n "$READELF" && break
6238 done
6239fi
6240if test -z "$READELF"; then
6241 ac_ct_READELF=$READELF
6242 for ac_prog in readelf
6243do
6244 # Extract the first word of "$ac_prog", so it can be a program name with args.
6245set dummy $ac_prog; ac_word=$2
6246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6247$as_echo_n "checking for $ac_word... " >&6; }
6248if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6249 $as_echo_n "(cached) " >&6
6250else
6251 if test -n "$ac_ct_READELF"; then
6252 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6253else
6254as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6255for as_dir in $PATH
6256do
6257 IFS=$as_save_IFS
6258 test -z "$as_dir" && as_dir=.
6259 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006260 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006261 ac_cv_prog_ac_ct_READELF="$ac_prog"
6262 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6263 break 2
6264 fi
6265done
6266 done
6267IFS=$as_save_IFS
6268
6269fi
6270fi
6271ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6272if test -n "$ac_ct_READELF"; then
6273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6274$as_echo "$ac_ct_READELF" >&6; }
6275else
6276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6277$as_echo "no" >&6; }
6278fi
6279
6280
6281 test -n "$ac_ct_READELF" && break
6282done
6283
6284 if test "x$ac_ct_READELF" = x; then
6285 READELF=":"
6286 else
6287 case $cross_compiling:$ac_tool_warned in
6288yes:)
6289{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6290$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6291ac_tool_warned=yes ;;
6292esac
6293 READELF=$ac_ct_READELF
6294 fi
6295fi
6296
6297if test "$cross_compiling" = yes; then
6298 case "$READELF" in
6299 readelf|:)
6300 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6301 ;;
6302 esac
6303fi
6304
6305
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006306
Matthias Klosec4c48422012-10-21 23:05:35 +02006307for ac_prog in python$PACKAGE_VERSION python3 python
6308do
6309 # Extract the first word of "$ac_prog", so it can be a program name with args.
6310set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6312$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006313if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006314 $as_echo_n "(cached) " >&6
6315else
Matthias Klosec4c48422012-10-21 23:05:35 +02006316 if test -n "$PYTHON"; then
6317 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006318else
6319as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6320for as_dir in $PATH
6321do
6322 IFS=$as_save_IFS
6323 test -z "$as_dir" && as_dir=.
6324 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006325 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006326 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006327 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6328 break 2
6329 fi
6330done
6331 done
6332IFS=$as_save_IFS
6333
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006334fi
6335fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006336PYTHON=$ac_cv_prog_PYTHON
6337if test -n "$PYTHON"; then
6338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6339$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006340else
6341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6342$as_echo "no" >&6; }
6343fi
6344
6345
Matthias Klosec4c48422012-10-21 23:05:35 +02006346 test -n "$PYTHON" && break
6347done
6348test -n "$PYTHON" || PYTHON="not-found"
6349
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006350if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006351 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6352else
6353 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006354fi
6355
6356
Kushal Das02d23a22014-04-15 23:50:06 +05306357for ac_prog in python$PACKAGE_VERSION python3 python
6358do
6359 # Extract the first word of "$ac_prog", so it can be a program name with args.
6360set dummy $ac_prog; ac_word=$2
6361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6362$as_echo_n "checking for $ac_word... " >&6; }
6363if ${ac_cv_prog_PYTHON+:} false; then :
6364 $as_echo_n "(cached) " >&6
6365else
6366 if test -n "$PYTHON"; then
6367 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6368else
6369as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6370for as_dir in $PATH
6371do
6372 IFS=$as_save_IFS
6373 test -z "$as_dir" && as_dir=.
6374 for ac_exec_ext in '' $ac_executable_extensions; do
6375 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6376 ac_cv_prog_PYTHON="$ac_prog"
6377 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6378 break 2
6379 fi
6380done
6381 done
6382IFS=$as_save_IFS
6383
6384fi
6385fi
6386PYTHON=$ac_cv_prog_PYTHON
6387if test -n "$PYTHON"; then
6388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6389$as_echo "$PYTHON" >&6; }
6390else
6391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6392$as_echo "no" >&6; }
6393fi
6394
6395
6396 test -n "$PYTHON" && break
6397done
6398test -n "$PYTHON" || PYTHON="not-found"
6399
6400if test "$PYTHON" = not-found; then
6401 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6402else
6403 OPCODEHGEN="$PYTHON"
6404fi
6405
6406
6407
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408case $MACHDEP in
6409bsdos*|hp*|HP*)
6410 # install -d does not work on BSDI or HP-UX
6411 if test -z "$INSTALL"
6412 then
6413 INSTALL="${srcdir}/install-sh -c"
6414 fi
6415esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006416# Find a good install program. We prefer a C program (faster),
6417# so one script is as good as another. But avoid the broken or
6418# incompatible versions:
6419# SysV /etc/install, /usr/sbin/install
6420# SunOS /usr/etc/install
6421# IRIX /sbin/install
6422# AIX /bin/install
6423# AmigaOS /C/install, which installs bootblocks on floppy discs
6424# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6425# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6426# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6427# OS/2's system install, which has a completely different semantic
6428# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006429# Reject install programs that cannot install multiple files.
6430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6431$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006432if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006433if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006434 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006435else
6436 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6437for as_dir in $PATH
6438do
6439 IFS=$as_save_IFS
6440 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006441 # Account for people who put trailing slashes in PATH elements.
6442case $as_dir/ in #((
6443 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006444 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006445 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006446 /usr/ucb/* ) ;;
6447 *)
6448 # OSF1 and SCO ODT 3.0 have their own names for install.
6449 # Don't use installbsd from OSF since it installs stuff as root
6450 # by default.
6451 for ac_prog in ginstall scoinst install; do
6452 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006453 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006454 if test $ac_prog = install &&
6455 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6456 # AIX install. It has an incompatible calling convention.
6457 :
6458 elif test $ac_prog = install &&
6459 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6460 # program-specific install script used by HP pwplus--don't use.
6461 :
6462 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006463 rm -rf conftest.one conftest.two conftest.dir
6464 echo one > conftest.one
6465 echo two > conftest.two
6466 mkdir conftest.dir
6467 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6468 test -s conftest.one && test -s conftest.two &&
6469 test -s conftest.dir/conftest.one &&
6470 test -s conftest.dir/conftest.two
6471 then
6472 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6473 break 3
6474 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006475 fi
6476 fi
6477 done
6478 done
6479 ;;
6480esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006481
6482 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006483IFS=$as_save_IFS
6484
Matthias Kloseb9621712010-04-24 17:59:49 +00006485rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006486
6487fi
6488 if test "${ac_cv_path_install+set}" = set; then
6489 INSTALL=$ac_cv_path_install
6490 else
6491 # As a last resort, use the slow shell script. Don't cache a
6492 # value for INSTALL within a source directory, because that will
6493 # break other packages using the cache if that directory is
6494 # removed, or if the value is a relative name.
6495 INSTALL=$ac_install_sh
6496 fi
6497fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6499$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006500
6501# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6502# It thinks the first close brace ends the variable substitution.
6503test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6504
6505test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6506
6507test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6508
Matthias Klose93a0ef12012-03-15 18:08:34 +01006509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6510$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6511if test -z "$MKDIR_P"; then
6512 if ${ac_cv_path_mkdir+:} false; then :
6513 $as_echo_n "(cached) " >&6
6514else
6515 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6516for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6517do
6518 IFS=$as_save_IFS
6519 test -z "$as_dir" && as_dir=.
6520 for ac_prog in mkdir gmkdir; do
6521 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006522 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006523 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6524 'mkdir (GNU coreutils) '* | \
6525 'mkdir (coreutils) '* | \
6526 'mkdir (fileutils) '4.1*)
6527 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6528 break 3;;
6529 esac
6530 done
6531 done
6532 done
6533IFS=$as_save_IFS
6534
6535fi
6536
6537 test -d ./--version && rmdir ./--version
6538 if test "${ac_cv_path_mkdir+set}" = set; then
6539 MKDIR_P="$ac_cv_path_mkdir -p"
6540 else
6541 # As a last resort, use the slow shell script. Don't cache a
6542 # value for MKDIR_P within a source directory, because that will
6543 # break other packages using the cache if that directory is
6544 # removed, or if the value is a relative name.
6545 MKDIR_P="$ac_install_sh -d"
6546 fi
6547fi
6548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6549$as_echo "$MKDIR_P" >&6; }
6550
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006551
6552# Not every filesystem supports hard links
6553
6554if test -z "$LN" ; then
6555 case $ac_sys_system in
6556 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006557 *) LN=ln;;
6558 esac
6559fi
6560
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006561# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006562
6563ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006564
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006565# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6567$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006568
6569# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006570if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006571 withval=$with_pydebug;
6572if test "$withval" != no
6573then
6574
Matthias Kloseb9621712010-04-24 17:59:49 +00006575$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006576
Matthias Kloseb9621712010-04-24 17:59:49 +00006577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6578$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006579 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006580 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006581else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6582$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006583fi
6584else
Matthias Kloseb9621712010-04-24 17:59:49 +00006585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6586$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006587fi
6588
6589
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006590# Enable LTO flags
6591
6592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6593$as_echo_n "checking for --with-lto... " >&6; }
6594
6595# Check whether --with-lto was given.
6596if test "${with_lto+set}" = set; then :
6597 withval=$with_lto;
6598if test "$withval" != no
6599then
6600 Py_LTO='true'
6601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6602$as_echo "yes" >&6; };
6603else
6604 Py_LTO='false'
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6606$as_echo "no" >&6; };
6607fi
6608else
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6610$as_echo "no" >&6; }
6611fi
6612
6613if test "$Py_LTO" = 'true' ; then
6614 case $CC in
6615 *clang*)
6616 # Any changes made here should be reflected in the GCC+Darwin case below
6617 LTOFLAGS="-flto"
6618 ;;
6619 *gcc*)
6620 case $ac_sys_system in
6621 Darwin*)
6622 LTOFLAGS="-flto"
6623 ;;
6624 *)
6625 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6626 ;;
6627 esac
6628 ;;
6629 esac
6630fi
6631
Brett Cannon7188a3e2015-09-18 15:13:44 -07006632# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006633
6634
6635
6636
6637
6638
Brett Cannon7188a3e2015-09-18 15:13:44 -07006639# Extract the first word of "llvm-profdata", so it can be a program name with args.
6640set dummy llvm-profdata; ac_word=$2
6641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6642$as_echo_n "checking for $ac_word... " >&6; }
6643if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6644 $as_echo_n "(cached) " >&6
6645else
6646 if test -n "$LLVM_PROF_FOUND"; then
6647 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6648else
6649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6650for as_dir in $PATH
6651do
6652 IFS=$as_save_IFS
6653 test -z "$as_dir" && as_dir=.
6654 for ac_exec_ext in '' $ac_executable_extensions; do
6655 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6656 ac_cv_prog_LLVM_PROF_FOUND="found"
6657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6658 break 2
6659 fi
6660done
6661 done
6662IFS=$as_save_IFS
6663
6664 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6665fi
6666fi
6667LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6668if test -n "$LLVM_PROF_FOUND"; then
6669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6670$as_echo "$LLVM_PROF_FOUND" >&6; }
6671else
6672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6673$as_echo "no" >&6; }
6674fi
6675
6676
6677LLVM_PROF_ERR=no
6678case $CC in
6679 *clang*)
6680 # Any changes made here should be reflected in the GCC+Darwin case below
6681 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6682 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6683 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6684 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6685 if test $LLVM_PROF_FOUND = not-found
6686 then
6687 LLVM_PROF_ERR=yes
6688 fi
6689 ;;
6690 *gcc*)
6691 case $ac_sys_system in
6692 Darwin*)
6693 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6694 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6695 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6696 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6697 if test $LLVM_PROF_FOUND = not-found
6698 then
6699 LLVM_PROF_ERR=yes
6700 fi
6701 ;;
6702 *)
6703 PGO_PROF_GEN_FLAG="-fprofile-generate"
6704 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6705 LLVM_PROF_MERGER="true"
6706 LLVM_PROF_FILE=""
6707 ;;
6708 esac
6709 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006710 *icc*)
6711 PGO_PROF_GEN_FLAG="-prof-gen"
6712 PGO_PROF_USE_FLAG="-prof-use"
6713 LLVM_PROF_MERGER="true"
6714 LLVM_PROF_FILE=""
6715 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006716esac
6717
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006718# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6719# merged with this chunk of code?
6720
6721# Optimizer/debugger flags
6722# ------------------------
6723# (The following bit of code is complicated enough - please keep things
6724# indented properly. Just pretend you're editing Python code. ;-)
6725
6726# There are two parallel sets of case statements below, one that checks to
6727# see if OPT was set and one that does BASECFLAGS setting based upon
6728# compiler and platform. BASECFLAGS tweaks need to be made even if the
6729# user set OPT.
6730
6731# tweak OPT based on compiler and platform, only if the user didn't set
6732# it on the command line
6733
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006734if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006735then
6736 case $GCC in
6737 yes)
6738 if test "$CC" != 'g++' ; then
6739 STRICT_PROTO="-Wstrict-prototypes"
6740 fi
6741 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6742 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6743 WRAP="-fwrapv"
6744 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006745
6746 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006747 case $CC in
6748 *clang*) WRAP="-fwrapv"
6749 ;;
6750 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006751
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006752 case $ac_cv_prog_cc_g in
6753 yes)
6754 if test "$Py_DEBUG" = 'true' ; then
6755 # Optimization messes up debuggers, so turn it off for
6756 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006757 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6758 OPT="-g -Og -Wall $STRICT_PROTO"
6759 else
6760 OPT="-g -O0 -Wall $STRICT_PROTO"
6761 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006762 else
6763 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6764 fi
6765 ;;
6766 *)
6767 OPT="-O3 -Wall $STRICT_PROTO"
6768 ;;
6769 esac
6770 case $ac_sys_system in
6771 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6772 ;;
6773 esac
6774 ;;
6775
6776 *)
6777 OPT="-O"
6778 ;;
6779 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006780fi
6781
6782
6783
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006784
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006785# The -arch flags for universal builds on OSX
6786UNIVERSAL_ARCH_FLAGS=
6787
6788
6789# tweak BASECFLAGS based on compiler and platform
6790case $GCC in
6791yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006792 # Python doesn't violate C99 aliasing rules, but older versions of
6793 # GCC produce warnings for legal Python code. Enable
6794 # -fno-strict-aliasing on versions of GCC that support but produce
6795 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6797$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006798 ac_save_cc="$CC"
6799 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006800 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006801 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006802 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006803else
Matthias Kloseb9621712010-04-24 17:59:49 +00006804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006805/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006806
Matthias Kloseb159a552010-04-25 21:00:44 +00006807
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006808int
6809main ()
6810{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006811
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006812 ;
6813 return 0;
6814}
Matthias Kloseb159a552010-04-25 21:00:44 +00006815
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006817if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006818
6819 CC="$ac_save_cc -fstrict-aliasing"
6820 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006822/* end confdefs.h. */
6823
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006824 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006825int
6826main ()
6827{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006828double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006829 ;
6830 return 0;
6831}
Matthias Kloseb159a552010-04-25 21:00:44 +00006832
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006834if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006835
6836 ac_cv_no_strict_aliasing=no
6837
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006838else
Matthias Kloseb159a552010-04-25 21:00:44 +00006839
6840 ac_cv_no_strict_aliasing=yes
6841
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006842fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006844
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006845else
Matthias Kloseb159a552010-04-25 21:00:44 +00006846
6847 ac_cv_no_strict_aliasing=no
6848
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006851fi
6852
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006853 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006854 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6856$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006857 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006858 then
6859 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6860 fi
6861
Zachary Ware5af85642015-12-21 12:09:17 -06006862 # ICC doesn't recognize the option, but only emits a warning
6863 ## XXX does it emit an unused result warning and can it be disabled?
6864 case "$CC" in
6865 *icc*)
6866 ac_cv_disable_unused_result_warning=no
6867 ;;
6868 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6870$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6871 ac_save_cc="$CC"
6872 CC="$CC -Wunused-result -Werror"
6873 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006874 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006875 $as_echo_n "(cached) " >&6
6876else
6877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6878/* end confdefs.h. */
6879
6880
6881int
6882main ()
6883{
6884
6885 ;
6886 return 0;
6887}
6888
6889_ACEOF
6890if ac_fn_c_try_compile "$LINENO"; then :
6891
6892 ac_cv_disable_unused_result_warning=yes
6893
6894else
6895
6896 ac_cv_disable_unused_result_warning=no
6897
6898fi
6899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6900fi
6901
6902 CFLAGS="$save_CFLAGS"
6903 CC="$ac_save_cc"
6904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6905$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006906 ;;
6907 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006908
6909 if test $ac_cv_disable_unused_result_warning = yes
6910 then
6911 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6912 fi
6913
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6915$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6916 ac_save_cc="$CC"
6917 CC="$CC -Werror=declaration-after-statement"
6918 save_CFLAGS="$CFLAGS"
6919 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6920 $as_echo_n "(cached) " >&6
6921else
6922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6923/* end confdefs.h. */
6924
6925
6926int
6927main ()
6928{
6929
6930 ;
6931 return 0;
6932}
6933
6934_ACEOF
6935if ac_fn_c_try_compile "$LINENO"; then :
6936
6937 ac_cv_declaration_after_statement_warning=yes
6938
6939else
6940
6941 ac_cv_declaration_after_statement_warning=no
6942
6943fi
6944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6945fi
6946
6947 CFLAGS="$save_CFLAGS"
6948 CC="$ac_save_cc"
6949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6950$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6951
6952 if test $ac_cv_declaration_after_statement_warning = yes
6953 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006954 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006955 fi
6956
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6958$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6959 ac_save_cc="$CC"
6960 CC="$CC -Wsign-compare"
6961 save_CFLAGS="$CFLAGS"
6962 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6963 $as_echo_n "(cached) " >&6
6964else
6965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6966/* end confdefs.h. */
6967
6968
6969int
6970main ()
6971{
6972
6973 ;
6974 return 0;
6975}
6976
6977_ACEOF
6978if ac_fn_c_try_compile "$LINENO"; then :
6979
6980 ac_cv_enable_sign_compare_warning=yes
6981
6982else
6983
6984 ac_cv_enable_sign_compare_warning=no
6985
6986fi
6987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6988fi
6989
6990 CFLAGS="$save_CFLAGS"
6991 CC="$ac_save_cc"
6992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6993$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6994
6995 if test $ac_cv_enable_sign_compare_warning = yes
6996 then
6997 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6998 fi
6999
7000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7001$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7002 ac_save_cc="$CC"
7003 CC="$CC -Wunreachable-code"
7004 save_CFLAGS="$CFLAGS"
7005 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7006 $as_echo_n "(cached) " >&6
7007else
7008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7009/* end confdefs.h. */
7010
7011
7012int
7013main ()
7014{
7015
7016 ;
7017 return 0;
7018}
7019
7020_ACEOF
7021if ac_fn_c_try_compile "$LINENO"; then :
7022
7023 ac_cv_enable_unreachable_code_warning=yes
7024
7025else
7026
7027 ac_cv_enable_unreachable_code_warning=no
7028
7029fi
7030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7031fi
7032
7033 CFLAGS="$save_CFLAGS"
7034 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007035
7036 # Don't enable unreachable code warning in debug mode, since it usually
7037 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007038 # Issue #24324: Unfortunately, the unreachable code warning does not work
7039 # correctly on gcc and has been silently removed from the compiler.
7040 # It is supported on clang but on OS X systems gcc may be an alias
7041 # for clang. Try to determine if the compiler is not really gcc and,
7042 # if so, only then enable the warning.
7043 if test $ac_cv_enable_unreachable_code_warning = yes && \
7044 test "$Py_DEBUG" != "true" && \
7045 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007046 then
7047 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007048 else
7049 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007050 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7052$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007053
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007054 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7055 # support. Without this, treatment of subnormals doesn't follow
7056 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007057 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007058 alpha*)
7059 BASECFLAGS="$BASECFLAGS -mieee"
7060 ;;
7061 esac
7062
7063 case $ac_sys_system in
7064 SCO_SV*)
7065 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7066 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007067
7068 # is there any other compiler on Darwin besides gcc?
7069 Darwin*)
7070 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7071 # used to be here, but non-Apple gcc doesn't accept them.
7072 if test "${CC}" = gcc
7073 then
7074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007075$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007076 case "${UNIVERSALSDK}" in
7077 */MacOSX10.4u.sdk)
7078 # Build using 10.4 SDK, force usage of gcc when the
7079 # compiler is gcc, otherwise the user will get very
7080 # confusing error messages when building on OSX 10.6
7081 CC=gcc-4.0
7082 CPP=cpp-4.0
7083 ;;
7084 esac
7085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007086$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007087 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007088
Ned Deily87adb6e2013-10-18 21:09:56 -07007089 if test "${enable_universalsdk}"
7090 then
7091 case "$UNIVERSAL_ARCHS" in
7092 32-bit)
7093 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7094 LIPO_32BIT_FLAGS=""
7095 ARCH_RUN_32BIT=""
7096 ;;
7097 64-bit)
7098 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7099 LIPO_32BIT_FLAGS=""
7100 ARCH_RUN_32BIT="true"
7101 ;;
7102 all)
7103 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7104 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7105 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7106 ;;
7107 intel)
7108 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7109 LIPO_32BIT_FLAGS="-extract i386"
7110 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7111 ;;
7112 intel-32)
7113 UNIVERSAL_ARCH_FLAGS="-arch i386"
7114 LIPO_32BIT_FLAGS=""
7115 ARCH_RUN_32BIT=""
7116 ;;
7117 3-way)
7118 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7119 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7120 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7121 ;;
7122 *)
7123 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7124 ;;
7125 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007126
Ned Deily87adb6e2013-10-18 21:09:56 -07007127 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7128 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7129 if test "${UNIVERSALSDK}" != "/"
7130 then
7131 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7132 fi
7133 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007134
Ned Deily87adb6e2013-10-18 21:09:56 -07007135 # Calculate an appropriate deployment target for this build:
7136 # The deployment target value is used explicitly to enable certain
7137 # features are enabled (such as builtin libedit support for readline)
7138 # through the use of Apple's Availabiliy Macros and is used as a
7139 # component of the string returned by distutils.get_platform().
7140 #
7141 # Use the value from:
7142 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7143 # 2. the operating system version of the build machine if >= 10.6
7144 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7145 # below to pick either 10.3, 10.4, or 10.5 as the target.
7146 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007147
Ned Deily87adb6e2013-10-18 21:09:56 -07007148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7149$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007150 cur_target_major=`sw_vers -productVersion | \
7151 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7152 cur_target_minor=`sw_vers -productVersion | \
7153 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7154 cur_target="${cur_target_major}.${cur_target_minor}"
7155 if test ${cur_target_major} -eq 10 && \
7156 test ${cur_target_minor} -ge 3 && \
7157 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007158 then
Ned Deily36820b62014-06-25 13:44:22 -07007159 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007160 cur_target=10.3
7161 if test ${enable_universalsdk}
7162 then
7163 case "$UNIVERSAL_ARCHS" in
7164 all|3-way|intel|64-bit)
7165 # These configurations were first supported in 10.5
7166 cur_target='10.5'
7167 ;;
7168 esac
7169 else
7170 if test `/usr/bin/arch` = "i386"
7171 then
7172 # 10.4 was the first release to support Intel archs
7173 cur_target="10.4"
7174 fi
7175 fi
7176 fi
7177 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007178
Ned Deily87adb6e2013-10-18 21:09:56 -07007179 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7180 # environment with a value that is the same as what we'll use
7181 # in the Makefile to ensure that we'll get the same compiler
7182 # environment during configure and build time.
7183 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7184 export MACOSX_DEPLOYMENT_TARGET
7185 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7187$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007188
Ned Deily87adb6e2013-10-18 21:09:56 -07007189 # end of Darwin* tests
7190 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007191 esac
7192 ;;
7193
7194*)
7195 case $ac_sys_system in
7196 OpenUNIX*|UnixWare*)
7197 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7198 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007199 SCO_SV*)
7200 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7201 ;;
7202 esac
7203 ;;
7204esac
7205
Zachary Ware5af85642015-12-21 12:09:17 -06007206# ICC needs -fp-model strict or floats behave badly
7207case "$CC" in
7208*icc*)
7209 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7210 ;;
7211esac
7212
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007213if test "$Py_DEBUG" = 'true'; then
7214 :
7215else
7216 OPT="-DNDEBUG $OPT"
7217fi
7218
7219if test "$ac_arch_flags"
7220then
7221 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7222fi
7223
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007224# On some compilers, pthreads are available without further options
7225# (e.g. MacOS X). On some of these systems, the compiler will not
7226# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7227# So we have to see first whether pthreads are available without
7228# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7230$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007231if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007232 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007233else
Matthias Kloseb9621712010-04-24 17:59:49 +00007234 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007235 ac_cv_pthread_is_default=no
7236else
Matthias Kloseb9621712010-04-24 17:59:49 +00007237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007238/* end confdefs.h. */
7239
Stefan Krah7dba5942012-11-22 22:49:11 +01007240#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007241#include <pthread.h>
7242
7243void* routine(void* p){return NULL;}
7244
7245int main(){
7246 pthread_t p;
7247 if(pthread_create(&p,NULL,routine,NULL)!=0)
7248 return 1;
7249 (void)pthread_detach(p);
7250 return 0;
7251}
7252
7253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007254if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007255
7256 ac_cv_pthread_is_default=yes
7257 ac_cv_kthread=no
7258 ac_cv_pthread=no
7259
7260else
Matthias Kloseb9621712010-04-24 17:59:49 +00007261 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007262fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007263rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7264 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007265fi
7266
7267
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007268fi
7269
Matthias Kloseb9621712010-04-24 17:59:49 +00007270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7271$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007272
7273
7274if test $ac_cv_pthread_is_default = yes
7275then
7276 ac_cv_kpthread=no
7277else
7278# -Kpthread, if available, provides the right #defines
7279# and linker options to make pthread_create available
7280# Some compilers won't report that they do not support -Kpthread,
7281# so we need to run a program to see whether it really made the
7282# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7284$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007285if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007286 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007287else
7288 ac_save_cc="$CC"
7289CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007290if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007291 ac_cv_kpthread=no
7292else
Matthias Kloseb9621712010-04-24 17:59:49 +00007293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007294/* end confdefs.h. */
7295
Stefan Krah7dba5942012-11-22 22:49:11 +01007296#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007297#include <pthread.h>
7298
7299void* routine(void* p){return NULL;}
7300
7301int main(){
7302 pthread_t p;
7303 if(pthread_create(&p,NULL,routine,NULL)!=0)
7304 return 1;
7305 (void)pthread_detach(p);
7306 return 0;
7307}
7308
7309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007310if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007311 ac_cv_kpthread=yes
7312else
Matthias Kloseb9621712010-04-24 17:59:49 +00007313 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007314fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007315rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7316 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007317fi
7318
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007319CC="$ac_save_cc"
7320fi
7321
Matthias Kloseb9621712010-04-24 17:59:49 +00007322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7323$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007324fi
7325
7326if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7327then
7328# -Kthread, if available, provides the right #defines
7329# and linker options to make pthread_create available
7330# Some compilers won't report that they do not support -Kthread,
7331# so we need to run a program to see whether it really made the
7332# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7334$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007335if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007336 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007337else
7338 ac_save_cc="$CC"
7339CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007340if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007341 ac_cv_kthread=no
7342else
Matthias Kloseb9621712010-04-24 17:59:49 +00007343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007344/* end confdefs.h. */
7345
Stefan Krah7dba5942012-11-22 22:49:11 +01007346#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007347#include <pthread.h>
7348
7349void* routine(void* p){return NULL;}
7350
7351int main(){
7352 pthread_t p;
7353 if(pthread_create(&p,NULL,routine,NULL)!=0)
7354 return 1;
7355 (void)pthread_detach(p);
7356 return 0;
7357}
7358
7359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007360if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007361 ac_cv_kthread=yes
7362else
Matthias Kloseb9621712010-04-24 17:59:49 +00007363 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007364fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007365rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7366 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007367fi
7368
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007369CC="$ac_save_cc"
7370fi
7371
Matthias Kloseb9621712010-04-24 17:59:49 +00007372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7373$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007374fi
7375
7376if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7377then
7378# -pthread, if available, provides the right #defines
7379# and linker options to make pthread_create available
7380# Some compilers won't report that they do not support -pthread,
7381# so we need to run a program to see whether it really made the
7382# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7384$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007385if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007386 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007387else
7388 ac_save_cc="$CC"
7389CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007390if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007391 ac_cv_pthread=no
7392else
Matthias Kloseb9621712010-04-24 17:59:49 +00007393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394/* end confdefs.h. */
7395
Stefan Krah7dba5942012-11-22 22:49:11 +01007396#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007397#include <pthread.h>
7398
7399void* routine(void* p){return NULL;}
7400
7401int main(){
7402 pthread_t p;
7403 if(pthread_create(&p,NULL,routine,NULL)!=0)
7404 return 1;
7405 (void)pthread_detach(p);
7406 return 0;
7407}
7408
7409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007410if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007411 ac_cv_pthread=yes
7412else
Matthias Kloseb9621712010-04-24 17:59:49 +00007413 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007414fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7416 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007417fi
7418
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007419CC="$ac_save_cc"
7420fi
7421
Matthias Kloseb9621712010-04-24 17:59:49 +00007422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7423$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007424fi
7425
7426# If we have set a CC compiler flag for thread support then
7427# check if it works for CXX, too.
7428ac_cv_cxx_thread=no
7429if test ! -z "$CXX"
7430then
Matthias Kloseb9621712010-04-24 17:59:49 +00007431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7432$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007433ac_save_cxx="$CXX"
7434
7435if test "$ac_cv_kpthread" = "yes"
7436then
7437 CXX="$CXX -Kpthread"
7438 ac_cv_cxx_thread=yes
7439elif test "$ac_cv_kthread" = "yes"
7440then
7441 CXX="$CXX -Kthread"
7442 ac_cv_cxx_thread=yes
7443elif test "$ac_cv_pthread" = "yes"
7444then
7445 CXX="$CXX -pthread"
7446 ac_cv_cxx_thread=yes
7447fi
7448
7449if test $ac_cv_cxx_thread = yes
7450then
7451 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7452 $CXX -c conftest.$ac_ext 2>&5
7453 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7454 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7455 then
7456 ac_cv_cxx_thread=yes
7457 else
7458 ac_cv_cxx_thread=no
7459 fi
7460 rm -fr conftest*
7461fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7463$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007464fi
7465CXX="$ac_save_cxx"
7466
7467
7468# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7470$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007471if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007472 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007473else
Matthias Kloseb9621712010-04-24 17:59:49 +00007474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007475/* end confdefs.h. */
7476#include <stdlib.h>
7477#include <stdarg.h>
7478#include <string.h>
7479#include <float.h>
7480
7481int
7482main ()
7483{
7484
7485 ;
7486 return 0;
7487}
7488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007489if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007490 ac_cv_header_stdc=yes
7491else
Matthias Kloseb9621712010-04-24 17:59:49 +00007492 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007493fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7495
7496if test $ac_cv_header_stdc = yes; then
7497 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007499/* end confdefs.h. */
7500#include <string.h>
7501
7502_ACEOF
7503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007504 $EGREP "memchr" >/dev/null 2>&1; then :
7505
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007506else
7507 ac_cv_header_stdc=no
7508fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007509rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007510
7511fi
7512
7513if test $ac_cv_header_stdc = yes; then
7514 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007516/* end confdefs.h. */
7517#include <stdlib.h>
7518
7519_ACEOF
7520if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007521 $EGREP "free" >/dev/null 2>&1; then :
7522
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007523else
7524 ac_cv_header_stdc=no
7525fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007526rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007527
7528fi
7529
7530if test $ac_cv_header_stdc = yes; then
7531 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007532 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007533 :
7534else
Matthias Kloseb9621712010-04-24 17:59:49 +00007535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007536/* end confdefs.h. */
7537#include <ctype.h>
7538#include <stdlib.h>
7539#if ((' ' & 0x0FF) == 0x020)
7540# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7541# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7542#else
7543# define ISLOWER(c) \
7544 (('a' <= (c) && (c) <= 'i') \
7545 || ('j' <= (c) && (c) <= 'r') \
7546 || ('s' <= (c) && (c) <= 'z'))
7547# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7548#endif
7549
7550#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7551int
7552main ()
7553{
7554 int i;
7555 for (i = 0; i < 256; i++)
7556 if (XOR (islower (i), ISLOWER (i))
7557 || toupper (i) != TOUPPER (i))
7558 return 2;
7559 return 0;
7560}
7561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007562if ac_fn_c_try_run "$LINENO"; then :
7563
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007564else
Matthias Kloseb9621712010-04-24 17:59:49 +00007565 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007567rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7568 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007569fi
7570
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007571fi
7572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7574$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007575if test $ac_cv_header_stdc = yes; then
7576
Matthias Kloseb9621712010-04-24 17:59:49 +00007577$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007578
7579fi
7580
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007581for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007582fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007583ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007584sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007585unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007586poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007587sys/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 +01007588sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007589sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007590sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007591sys/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 -07007592libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007593bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007594sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007595do :
7596 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7597ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007598if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007599 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007600#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007601_ACEOF
7602
7603fi
7604
Guido van Rossum627b2d71993-12-24 10:39:16 +00007605done
7606
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007607ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007608for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007609 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7611$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007612if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007613 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007614else
Matthias Kloseb9621712010-04-24 17:59:49 +00007615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007616/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007617#include <sys/types.h>
7618#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007619
Martin v. Löwis11437992002-04-12 09:54:03 +00007620int
7621main ()
7622{
7623if ((DIR *) 0)
7624return 0;
7625 ;
7626 return 0;
7627}
7628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007629if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007630 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007631else
Matthias Kloseb9621712010-04-24 17:59:49 +00007632 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007636eval ac_res=\$$as_ac_Header
7637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7638$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007639if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007640 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007641#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007642_ACEOF
7643
7644ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007645fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007646
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007647done
7648# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7649if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7651$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007652if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007653 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007654else
Martin v. Löwis11437992002-04-12 09:54:03 +00007655 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007659/* Override any GCC internal prototype to avoid an error.
7660 Use char because int might match the return type of a GCC
7661 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007662#ifdef __cplusplus
7663extern "C"
7664#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007665char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007666int
7667main ()
7668{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007669return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007670 ;
7671 return 0;
7672}
7673_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007674for ac_lib in '' dir; do
7675 if test -z "$ac_lib"; then
7676 ac_res="none required"
7677 else
7678 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007679 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007680 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007681 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007682 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007684rm -f core conftest.err conftest.$ac_objext \
7685 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007686 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007687 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007689done
Victor Stinnere0be4232011-10-25 13:06:09 +02007690if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007691
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007692else
7693 ac_cv_search_opendir=no
7694fi
7695rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007696LIBS=$ac_func_search_save_LIBS
7697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7699$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007700ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007701if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007702 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007703
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007704fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007705
Michael W. Hudson54241132001-12-07 15:38:26 +00007706else
Matthias Kloseb9621712010-04-24 17:59:49 +00007707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7708$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007709if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007710 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007711else
7712 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007716/* Override any GCC internal prototype to avoid an error.
7717 Use char because int might match the return type of a GCC
7718 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007719#ifdef __cplusplus
7720extern "C"
7721#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007722char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007723int
7724main ()
7725{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007726return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007727 ;
7728 return 0;
7729}
7730_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007731for ac_lib in '' x; do
7732 if test -z "$ac_lib"; then
7733 ac_res="none required"
7734 else
7735 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007736 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007737 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007738 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007739 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007741rm -f core conftest.err conftest.$ac_objext \
7742 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007743 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007744 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007746done
Victor Stinnere0be4232011-10-25 13:06:09 +02007747if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007748
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007749else
7750 ac_cv_search_opendir=no
7751fi
7752rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007753LIBS=$ac_func_search_save_LIBS
7754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7756$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007757ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007758if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007759 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007760
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007761fi
7762
7763fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007764
Matthias Kloseb9621712010-04-24 17:59:49 +00007765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7766$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007767if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007768 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007769else
Matthias Kloseb9621712010-04-24 17:59:49 +00007770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007771/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007772#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007773int
7774main ()
7775{
7776return makedev(0, 0);
7777 ;
7778 return 0;
7779}
7780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007781if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007782 ac_cv_header_sys_types_h_makedev=yes
7783else
Matthias Kloseb9621712010-04-24 17:59:49 +00007784 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007786rm -f core conftest.err conftest.$ac_objext \
7787 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007788
7789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7791$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007792
7793if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007794ac_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 +02007795if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007796
Matthias Kloseb9621712010-04-24 17:59:49 +00007797$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007798
7799fi
7800
7801
7802
7803 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007804 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 +02007805if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007806
Matthias Kloseb9621712010-04-24 17:59:49 +00007807$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007808
7809fi
7810
7811
7812 fi
7813fi
7814
Michael W. Hudson54241132001-12-07 15:38:26 +00007815
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007816# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7817for ac_header in net/if.h
7818do :
7819 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7820#ifdef STDC_HEADERS
7821# include <stdlib.h>
7822# include <stddef.h>
7823#else
7824# ifdef HAVE_STDLIB_H
7825# include <stdlib.h>
7826# endif
7827#endif
7828#ifdef HAVE_SYS_SOCKET_H
7829# include <sys/socket.h>
7830#endif
7831
7832"
Victor Stinnere0be4232011-10-25 13:06:09 +02007833if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007834 cat >>confdefs.h <<_ACEOF
7835#define HAVE_NET_IF_H 1
7836_ACEOF
7837
7838fi
7839
7840done
7841
7842
Martin v. Löwis11017b12006-01-14 18:12:57 +00007843# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007844for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007845do :
7846 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 +00007847#ifdef HAVE_ASM_TYPES_H
7848#include <asm/types.h>
7849#endif
7850#ifdef HAVE_SYS_SOCKET_H
7851#include <sys/socket.h>
7852#endif
7853
Matthias Kloseb9621712010-04-24 17:59:49 +00007854"
Victor Stinnere0be4232011-10-25 13:06:09 +02007855if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007856 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007857#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007858_ACEOF
7859
7860fi
7861
7862done
7863
7864
Charles-François Natali47413c12011-10-06 19:47:44 +02007865# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007866for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007867do :
7868 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7869ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7870#ifdef HAVE_SYS_SOCKET_H
7871#include <sys/socket.h>
7872#endif
7873
7874"
7875if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7876 cat >>confdefs.h <<_ACEOF
7877#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7878_ACEOF
7879
7880fi
7881
7882done
7883
7884
Guido van Rossum627b2d71993-12-24 10:39:16 +00007885# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007886was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7888$as_echo_n "checking for clock_t in time.h... " >&6; }
7889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007890/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007891#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007892
7893_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007894if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007895 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007896 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007897else
Martin v. Löwis11437992002-04-12 09:54:03 +00007898
7899
Matthias Kloseb9621712010-04-24 17:59:49 +00007900$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007901
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007902
Guido van Rossum627b2d71993-12-24 10:39:16 +00007903fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007904rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007905
Matthias Kloseb9621712010-04-24 17:59:49 +00007906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7907$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007908
Matthias Kloseb9621712010-04-24 17:59:49 +00007909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7910$as_echo_n "checking for makedev... " >&6; }
7911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007912/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007913
Jesus Cea740f53a2010-04-28 11:35:30 +00007914#if defined(MAJOR_IN_MKDEV)
7915#include <sys/mkdev.h>
7916#elif defined(MAJOR_IN_SYSMACROS)
7917#include <sys/sysmacros.h>
7918#else
7919#include <sys/types.h>
7920#endif
7921
Neal Norwitz11690112002-07-30 01:08:28 +00007922int
7923main ()
7924{
Jesus Cea740f53a2010-04-28 11:35:30 +00007925
7926 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007927 ;
7928 return 0;
7929}
Matthias Kloseb159a552010-04-25 21:00:44 +00007930
Neal Norwitz11690112002-07-30 01:08:28 +00007931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007932if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007933 ac_cv_has_makedev=yes
7934else
Matthias Kloseb9621712010-04-24 17:59:49 +00007935 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007937rm -f core conftest.err conftest.$ac_objext \
7938 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7940$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007941if test "$ac_cv_has_makedev" = "yes"; then
7942
Matthias Kloseb9621712010-04-24 17:59:49 +00007943$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007944
7945fi
7946
Christian Heimes985ecdc2013-11-20 11:46:18 +01007947# byte swapping
7948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7949$as_echo_n "checking for le64toh... " >&6; }
7950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7951/* end confdefs.h. */
7952
7953#ifdef HAVE_ENDIAN_H
7954#include <endian.h>
7955#elif defined(HAVE_SYS_ENDIAN_H)
7956#include <sys/endian.h>
7957#endif
7958
7959int
7960main ()
7961{
7962
7963 le64toh(1)
7964 ;
7965 return 0;
7966}
7967
7968_ACEOF
7969if ac_fn_c_try_link "$LINENO"; then :
7970 ac_cv_has_le64toh=yes
7971else
7972 ac_cv_has_le64toh=no
7973fi
7974rm -f core conftest.err conftest.$ac_objext \
7975 conftest$ac_exeext conftest.$ac_ext
7976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7977$as_echo "$ac_cv_has_le64toh" >&6; }
7978if test "$ac_cv_has_le64toh" = "yes"; then
7979
7980$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7981
7982fi
7983
Martin v. Löwis399a6892002-10-04 10:22:02 +00007984# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7985# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7986# defined, but the compiler does not support pragma redefine_extname,
7987# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7988# structures (such as rlimit64) without declaring them. As a
7989# work-around, disable LFS on such configurations
7990
7991use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7993$as_echo_n "checking Solaris LFS bug... " >&6; }
7994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007995/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007996
7997#define _LARGEFILE_SOURCE 1
7998#define _FILE_OFFSET_BITS 64
7999#include <sys/resource.h>
8000
Martin v. Löwis399a6892002-10-04 10:22:02 +00008001int
8002main ()
8003{
8004struct rlimit foo;
8005 ;
8006 return 0;
8007}
8008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008009if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008010 sol_lfs_bug=no
8011else
Matthias Kloseb9621712010-04-24 17:59:49 +00008012 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008013fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8016$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008017if test "$sol_lfs_bug" = "yes"; then
8018 use_lfs=no
8019fi
8020
8021if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008022# Two defines needed to enable largefile support on various platforms
8023# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008024case $ac_sys_system/$ac_sys_release in
8025AIX*)
8026
8027$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8028
8029 ;;
8030esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008031
Matthias Kloseb9621712010-04-24 17:59:49 +00008032$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008033
8034
Matthias Kloseb9621712010-04-24 17:59:49 +00008035$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008036
Martin v. Löwis399a6892002-10-04 10:22:02 +00008037fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008038
Guido van Rossum84e7b241996-08-19 21:59:00 +00008039# Add some code to confdefs.h so that the test for off_t works on SCO
8040cat >> confdefs.h <<\EOF
8041#if defined(SCO_DS)
8042#undef _OFF_T
8043#endif
8044EOF
8045
Guido van Rossumef2255b2000-03-10 22:30:29 +00008046# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008047ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008048if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008049
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008050else
Martin v. Löwis11437992002-04-12 09:54:03 +00008051
8052cat >>confdefs.h <<_ACEOF
8053#define mode_t int
8054_ACEOF
8055
8056fi
8057
Matthias Kloseb9621712010-04-24 17:59:49 +00008058ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008059if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008060
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008061else
Martin v. Löwis11437992002-04-12 09:54:03 +00008062
8063cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008065_ACEOF
8066
8067fi
8068
Matthias Kloseb9621712010-04-24 17:59:49 +00008069ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008070if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008071
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008072else
Martin v. Löwis11437992002-04-12 09:54:03 +00008073
8074cat >>confdefs.h <<_ACEOF
8075#define pid_t int
8076_ACEOF
8077
8078fi
8079
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008080
Martin v. Löwis11437992002-04-12 09:54:03 +00008081cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008082#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008083_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008084
Matthias Kloseb9621712010-04-24 17:59:49 +00008085ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008086if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008087
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008088else
Martin v. Löwis11437992002-04-12 09:54:03 +00008089
8090cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008091#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008092_ACEOF
8093
8094fi
8095
Matthias Kloseb9621712010-04-24 17:59:49 +00008096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8097$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008098if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008099 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008100else
Matthias Kloseb9621712010-04-24 17:59:49 +00008101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008102/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008103#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008104
8105_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008106if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008107 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008108 ac_cv_type_uid_t=yes
8109else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008110 ac_cv_type_uid_t=no
8111fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008112rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008113
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8116$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008117if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008118
Matthias Kloseb9621712010-04-24 17:59:49 +00008119$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008120
8121
Matthias Kloseb9621712010-04-24 17:59:49 +00008122$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008123
8124fi
8125
Mark Dickinson983bc162012-12-02 12:11:38 +00008126
8127# There are two separate checks for each of the exact-width integer types we
8128# need. First we check whether the type is available using the usual
8129# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8130# and <stdint.h> where available). We then also use the special type checks of
8131# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8132# directly, #define's uint32_t to be a suitable type.
8133
8134ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8135if test "x$ac_cv_type_uint32_t" = xyes; then :
8136
8137$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8138
8139fi
8140
Matthias Kloseb9621712010-04-24 17:59:49 +00008141ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8142case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008143 no|yes) ;; #(
8144 *)
8145
Matthias Kloseb9621712010-04-24 17:59:49 +00008146$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008147
8148
8149cat >>confdefs.h <<_ACEOF
8150#define uint32_t $ac_cv_c_uint32_t
8151_ACEOF
8152;;
8153 esac
8154
Mark Dickinson983bc162012-12-02 12:11:38 +00008155
8156ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8157if test "x$ac_cv_type_uint64_t" = xyes; then :
8158
8159$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8160
8161fi
8162
Matthias Kloseb9621712010-04-24 17:59:49 +00008163ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8164case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008165 no|yes) ;; #(
8166 *)
8167
Matthias Kloseb9621712010-04-24 17:59:49 +00008168$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008169
8170
8171cat >>confdefs.h <<_ACEOF
8172#define uint64_t $ac_cv_c_uint64_t
8173_ACEOF
8174;;
8175 esac
8176
Mark Dickinson983bc162012-12-02 12:11:38 +00008177
8178ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8179if test "x$ac_cv_type_int32_t" = xyes; then :
8180
8181$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8182
8183fi
8184
Matthias Kloseb9621712010-04-24 17:59:49 +00008185ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8186case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008187 no|yes) ;; #(
8188 *)
8189
8190cat >>confdefs.h <<_ACEOF
8191#define int32_t $ac_cv_c_int32_t
8192_ACEOF
8193;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008194esac
8195
Mark Dickinson983bc162012-12-02 12:11:38 +00008196
8197ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8198if test "x$ac_cv_type_int64_t" = xyes; then :
8199
8200$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8201
8202fi
8203
Matthias Kloseb9621712010-04-24 17:59:49 +00008204ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8205case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008206 no|yes) ;; #(
8207 *)
8208
8209cat >>confdefs.h <<_ACEOF
8210#define int64_t $ac_cv_c_int64_t
8211_ACEOF
8212;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008213esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008214
Mark Dickinson983bc162012-12-02 12:11:38 +00008215
Matthias Kloseb9621712010-04-24 17:59:49 +00008216ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008217if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008218
Matthias Kloseb9621712010-04-24 17:59:49 +00008219$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008220
8221fi
8222
Stefan Krah1919b7e2012-03-21 18:25:23 +01008223ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8224if test "x$ac_cv_type___uint128_t" = xyes; then :
8225
8226$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8227
8228fi
8229
Jack Jansendd19cf82001-12-06 22:36:17 +00008230
Michael W. Hudson54241132001-12-07 15:38:26 +00008231# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008232# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008233# The cast to long int works around a bug in the HP C Compiler
8234# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8235# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8236# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8238$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008239if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008240 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008241else
Matthias Kloseb9621712010-04-24 17:59:49 +00008242 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 +00008243
Martin v. Löwis11437992002-04-12 09:54:03 +00008244else
Matthias Kloseb9621712010-04-24 17:59:49 +00008245 if test "$ac_cv_type_int" = yes; then
8246 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8247$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008248as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008249See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008250 else
8251 ac_cv_sizeof_int=0
8252 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008254
Martin v. Löwis11437992002-04-12 09:54:03 +00008255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8257$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008258
8259
8260
Martin v. Löwis11437992002-04-12 09:54:03 +00008261cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008262#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008263_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008264
8265
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008266# The cast to long int works around a bug in the HP C Compiler
8267# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8268# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8269# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8271$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008272if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008273 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008274else
Matthias Kloseb9621712010-04-24 17:59:49 +00008275 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 +00008276
Martin v. Löwis11437992002-04-12 09:54:03 +00008277else
Matthias Kloseb9621712010-04-24 17:59:49 +00008278 if test "$ac_cv_type_long" = yes; then
8279 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8280$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008281as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008282See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008283 else
8284 ac_cv_sizeof_long=0
8285 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008286fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008287
Martin v. Löwis11437992002-04-12 09:54:03 +00008288fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8290$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008291
8292
8293
Martin v. Löwis11437992002-04-12 09:54:03 +00008294cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008295#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008296_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008297
8298
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008299# The cast to long int works around a bug in the HP C Compiler
8300# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8301# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8302# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8304$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008305if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008306 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008307else
Matthias Kloseb9621712010-04-24 17:59:49 +00008308 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 +00008309
Martin v. Löwis11437992002-04-12 09:54:03 +00008310else
Matthias Kloseb9621712010-04-24 17:59:49 +00008311 if test "$ac_cv_type_void_p" = yes; then
8312 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8313$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008314as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008315See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008316 else
8317 ac_cv_sizeof_void_p=0
8318 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008319fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008320
Martin v. Löwis11437992002-04-12 09:54:03 +00008321fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8323$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008324
8325
8326
Martin v. Löwis11437992002-04-12 09:54:03 +00008327cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008328#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008329_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008330
8331
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008332# The cast to long int works around a bug in the HP C Compiler
8333# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8334# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8335# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8337$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008338if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008339 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008340else
Matthias Kloseb9621712010-04-24 17:59:49 +00008341 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 +00008342
Martin v. Löwis11437992002-04-12 09:54:03 +00008343else
Matthias Kloseb9621712010-04-24 17:59:49 +00008344 if test "$ac_cv_type_short" = yes; then
8345 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8346$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008347as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008348See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008349 else
8350 ac_cv_sizeof_short=0
8351 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008352fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008353
Martin v. Löwis11437992002-04-12 09:54:03 +00008354fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8356$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008357
8358
8359
Martin v. Löwis11437992002-04-12 09:54:03 +00008360cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008361#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008362_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008363
8364
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008365# The cast to long int works around a bug in the HP C Compiler
8366# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8367# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8368# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8370$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008371if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008372 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008373else
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 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 +00008375
Martin v. Löwis11437992002-04-12 09:54:03 +00008376else
Matthias Kloseb9621712010-04-24 17:59:49 +00008377 if test "$ac_cv_type_float" = yes; then
8378 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8379$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008380as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008381See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008382 else
8383 ac_cv_sizeof_float=0
8384 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008385fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008386
Martin v. Löwis11437992002-04-12 09:54:03 +00008387fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8389$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008390
8391
8392
Martin v. Löwis11437992002-04-12 09:54:03 +00008393cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008394#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008395_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008396
8397
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008398# The cast to long int works around a bug in the HP C Compiler
8399# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8400# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8401# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8403$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008404if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008405 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008406else
Matthias Kloseb9621712010-04-24 17:59:49 +00008407 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 +00008408
Martin v. Löwis11437992002-04-12 09:54:03 +00008409else
Matthias Kloseb9621712010-04-24 17:59:49 +00008410 if test "$ac_cv_type_double" = yes; then
8411 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8412$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008413as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008414See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008415 else
8416 ac_cv_sizeof_double=0
8417 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008418fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008419
Martin v. Löwis11437992002-04-12 09:54:03 +00008420fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8422$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008423
8424
8425
Martin v. Löwis11437992002-04-12 09:54:03 +00008426cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008427#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008428_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008429
8430
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008431# The cast to long int works around a bug in the HP C Compiler
8432# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8433# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8434# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8436$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008437if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008438 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008439else
Matthias Kloseb9621712010-04-24 17:59:49 +00008440 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 +00008441
Martin v. Löwis11437992002-04-12 09:54:03 +00008442else
Matthias Kloseb9621712010-04-24 17:59:49 +00008443 if test "$ac_cv_type_fpos_t" = yes; then
8444 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8445$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008446as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008447See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008448 else
8449 ac_cv_sizeof_fpos_t=0
8450 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008451fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008452
Martin v. Löwis11437992002-04-12 09:54:03 +00008453fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8455$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008456
8457
8458
Martin v. Löwis11437992002-04-12 09:54:03 +00008459cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008460#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008461_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008462
Michael W. Hudson54241132001-12-07 15:38:26 +00008463
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008464# The cast to long int works around a bug in the HP C Compiler
8465# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8466# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8467# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8469$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008470if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008471 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008472else
Matthias Kloseb9621712010-04-24 17:59:49 +00008473 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 +00008474
Martin v. Löwis18e16552006-02-15 17:27:45 +00008475else
Matthias Kloseb9621712010-04-24 17:59:49 +00008476 if test "$ac_cv_type_size_t" = yes; then
8477 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8478$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008479as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008480See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008481 else
8482 ac_cv_sizeof_size_t=0
8483 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008484fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008485
Martin v. Löwis18e16552006-02-15 17:27:45 +00008486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8488$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008489
8490
8491
Martin v. Löwis18e16552006-02-15 17:27:45 +00008492cat >>confdefs.h <<_ACEOF
8493#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8494_ACEOF
8495
8496
Christian Heimes400adb02008-02-01 08:12:03 +00008497# The cast to long int works around a bug in the HP C Compiler
8498# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8499# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8500# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8502$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008503if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008504 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008505else
Matthias Kloseb9621712010-04-24 17:59:49 +00008506 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 +00008507
Christian Heimes400adb02008-02-01 08:12:03 +00008508else
Matthias Kloseb9621712010-04-24 17:59:49 +00008509 if test "$ac_cv_type_pid_t" = yes; then
8510 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8511$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008512as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008513See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008514 else
8515 ac_cv_sizeof_pid_t=0
8516 fi
8517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008518
Christian Heimes400adb02008-02-01 08:12:03 +00008519fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8521$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008522
8523
8524
8525cat >>confdefs.h <<_ACEOF
8526#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8527_ACEOF
8528
8529
Michael W. Hudson54241132001-12-07 15:38:26 +00008530
Matthias Kloseb9621712010-04-24 17:59:49 +00008531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8532$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008533have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008535/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008536
Martin v. Löwis11437992002-04-12 09:54:03 +00008537int
8538main ()
8539{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008540long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008541 ;
8542 return 0;
8543}
8544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008545if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008546
8547
Matthias Kloseb9621712010-04-24 17:59:49 +00008548$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008549
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008550 have_long_long=yes
8551
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8555$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008556if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008557# The cast to long int works around a bug in the HP C Compiler
8558# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8559# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8560# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8562$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008563if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008564 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008565else
Matthias Kloseb9621712010-04-24 17:59:49 +00008566 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008567
Martin v. Löwis11437992002-04-12 09:54:03 +00008568else
Matthias Kloseb9621712010-04-24 17:59:49 +00008569 if test "$ac_cv_type_long_long" = yes; then
8570 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8571$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008572as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008573See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008574 else
8575 ac_cv_sizeof_long_long=0
8576 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008578
Martin v. Löwis11437992002-04-12 09:54:03 +00008579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8581$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008582
8583
8584
Martin v. Löwis11437992002-04-12 09:54:03 +00008585cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008586#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008587_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008588
Michael W. Hudson54241132001-12-07 15:38:26 +00008589
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008590fi
8591
Matthias Kloseb9621712010-04-24 17:59:49 +00008592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8593$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008594have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008596/* end confdefs.h. */
8597
8598int
8599main ()
8600{
8601long double x; x = (long double)0;
8602 ;
8603 return 0;
8604}
8605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008606if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008607
8608
Matthias Kloseb9621712010-04-24 17:59:49 +00008609$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008610
8611 have_long_double=yes
8612
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008613fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8616$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008617if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008618# The cast to long int works around a bug in the HP C Compiler
8619# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8620# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8621# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8623$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008624if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008625 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008626else
Matthias Kloseb9621712010-04-24 17:59:49 +00008627 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 +00008628
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008629else
Matthias Kloseb9621712010-04-24 17:59:49 +00008630 if test "$ac_cv_type_long_double" = yes; then
8631 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8632$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008633as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008634See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008635 else
8636 ac_cv_sizeof_long_double=0
8637 fi
8638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008639
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8642$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008643
8644
8645
8646cat >>confdefs.h <<_ACEOF
8647#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8648_ACEOF
8649
8650
8651fi
8652
8653
Matthias Kloseb9621712010-04-24 17:59:49 +00008654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8655$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008656have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008658/* end confdefs.h. */
8659
8660int
8661main ()
8662{
8663_Bool x; x = (_Bool)0;
8664 ;
8665 return 0;
8666}
8667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008668if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008669
8670
Matthias Kloseb9621712010-04-24 17:59:49 +00008671$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008672
8673 have_c99_bool=yes
8674
Thomas Woutersb2137042007-02-01 18:02:27 +00008675fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8678$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008679if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008680# The cast to long int works around a bug in the HP C Compiler
8681# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8682# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8683# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8685$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008686if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008688else
Matthias Kloseb9621712010-04-24 17:59:49 +00008689 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 +00008690
Thomas Woutersb2137042007-02-01 18:02:27 +00008691else
Matthias Kloseb9621712010-04-24 17:59:49 +00008692 if test "$ac_cv_type__Bool" = yes; then
8693 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8694$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008695as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008696See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008697 else
8698 ac_cv_sizeof__Bool=0
8699 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008701
Thomas Woutersb2137042007-02-01 18:02:27 +00008702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8704$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008705
8706
8707
Thomas Woutersb2137042007-02-01 18:02:27 +00008708cat >>confdefs.h <<_ACEOF
8709#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8710_ACEOF
8711
8712
8713fi
8714
Matthias Kloseb9621712010-04-24 17:59:49 +00008715ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008716 #include <stdint.h>
8717 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008718 #ifdef HAVE_INTTYPES_H
8719 #include <inttypes.h>
8720 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008721"
Victor Stinnere0be4232011-10-25 13:06:09 +02008722if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008723
8724cat >>confdefs.h <<_ACEOF
8725#define HAVE_UINTPTR_T 1
8726_ACEOF
8727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008728# The cast to long int works around a bug in the HP C Compiler
8729# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8730# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8731# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8733$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008734if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008735 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008736else
Matthias Kloseb9621712010-04-24 17:59:49 +00008737 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008738
Martin v. Löwis11437992002-04-12 09:54:03 +00008739else
Matthias Kloseb9621712010-04-24 17:59:49 +00008740 if test "$ac_cv_type_uintptr_t" = yes; then
8741 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8742$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008743as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008744See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008745 else
8746 ac_cv_sizeof_uintptr_t=0
8747 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008749
Martin v. Löwis11437992002-04-12 09:54:03 +00008750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8752$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008753
8754
8755
Martin v. Löwis11437992002-04-12 09:54:03 +00008756cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008757#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008758_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008759
Michael W. Hudson54241132001-12-07 15:38:26 +00008760
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008761fi
8762
Thomas Wouters89f507f2006-12-13 04:49:30 +00008763
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008764# The cast to long int works around a bug in the HP C Compiler
8765# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8766# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8767# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8769$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008770if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008771 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008772else
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008774#ifdef HAVE_SYS_TYPES_H
8775#include <sys/types.h>
8776#endif
8777
Matthias Kloseb9621712010-04-24 17:59:49 +00008778"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008779
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008780else
Matthias Kloseb9621712010-04-24 17:59:49 +00008781 if test "$ac_cv_type_off_t" = yes; then
8782 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8783$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008784as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008785See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008786 else
8787 ac_cv_sizeof_off_t=0
8788 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008790
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8793$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008794
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008795
8796
Martin v. Löwis11437992002-04-12 09:54:03 +00008797cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008798#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008799_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008800
Michael W. Hudson54241132001-12-07 15:38:26 +00008801
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008802
Matthias Kloseb9621712010-04-24 17:59:49 +00008803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8804$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008805if test "$have_long_long" = yes
8806then
8807if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008808 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008809
Matthias Kloseb9621712010-04-24 17:59:49 +00008810$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008811
Matthias Kloseb9621712010-04-24 17:59:49 +00008812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8813$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008814else
Matthias Kloseb9621712010-04-24 17:59:49 +00008815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8816$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008817fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008818else
Matthias Kloseb9621712010-04-24 17:59:49 +00008819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8820$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008821fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008822
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008823# The cast to long int works around a bug in the HP C Compiler
8824# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8825# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8826# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8828$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008829if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008830 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008831else
Matthias Kloseb9621712010-04-24 17:59:49 +00008832 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008833#ifdef HAVE_SYS_TYPES_H
8834#include <sys/types.h>
8835#endif
8836#ifdef HAVE_TIME_H
8837#include <time.h>
8838#endif
8839
Matthias Kloseb9621712010-04-24 17:59:49 +00008840"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008841
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008842else
Matthias Kloseb9621712010-04-24 17:59:49 +00008843 if test "$ac_cv_type_time_t" = yes; then
8844 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8845$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008846as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008847See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008848 else
8849 ac_cv_sizeof_time_t=0
8850 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008852
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8855$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008856
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008857
8858
Martin v. Löwis11437992002-04-12 09:54:03 +00008859cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008860#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008861_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008862
Michael W. Hudson54241132001-12-07 15:38:26 +00008863
8864
Trent Mick635f6fb2000-08-23 21:33:05 +00008865# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008866ac_save_cc="$CC"
8867if test "$ac_cv_kpthread" = "yes"
8868then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008869elif test "$ac_cv_kthread" = "yes"
8870then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008871elif test "$ac_cv_pthread" = "yes"
8872then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008873fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008874
Matthias Kloseb9621712010-04-24 17:59:49 +00008875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8876$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008877have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008879/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008880
8881 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008882int
8883main ()
8884{
Guido van Rossum12580492000-09-24 16:47:19 +00008885pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008886 ;
8887 return 0;
8888}
Matthias Kloseb159a552010-04-25 21:00:44 +00008889
Martin v. Löwis11437992002-04-12 09:54:03 +00008890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008891if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008892 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008893fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8896$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008897if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008898 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008899# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8900# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8901# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8903$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008904if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008905 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008906else
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008908#ifdef HAVE_PTHREAD_H
8909#include <pthread.h>
8910#endif
8911
Matthias Kloseb9621712010-04-24 17:59:49 +00008912"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008913
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008914else
Matthias Kloseb9621712010-04-24 17:59:49 +00008915 if test "$ac_cv_type_pthread_t" = yes; then
8916 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8917$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008918as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008919See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008920 else
8921 ac_cv_sizeof_pthread_t=0
8922 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008924
Trent Mick635f6fb2000-08-23 21:33:05 +00008925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8927$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008928
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008929
8930
Martin v. Löwis11437992002-04-12 09:54:03 +00008931cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008932#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008933_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008934
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008935
Trent Mick635f6fb2000-08-23 21:33:05 +00008936fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008937CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008938
Michael W. Hudson54241132001-12-07 15:38:26 +00008939
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008940case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008941 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008942 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8943 ;;
8944 Darwin/*)
8945 OTHER_LIBTOOL_OPT=""
8946 ;;
8947esac
8948
8949
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008950
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008951case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008952 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008953 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8954 if test "${enable_universalsdk}"; then
8955 :
8956 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008957 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008958 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008959 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008960 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008961 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008962 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008963 if test ${gcc_version} '<' 4.0
8964 then
8965 LIBTOOL_CRUFT="-lcc_dynamic"
8966 else
8967 LIBTOOL_CRUFT=""
8968 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008969 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008970 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008971else
Matthias Kloseb9621712010-04-24 17:59:49 +00008972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008973/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008974
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008975 #include <unistd.h>
8976 int main(int argc, char*argv[])
8977 {
8978 if (sizeof(long) == 4) {
8979 return 0;
8980 } else {
8981 return 1;
8982 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008983 }
8984
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008986if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008987 ac_osx_32bit=yes
8988else
Matthias Kloseb9621712010-04-24 17:59:49 +00008989 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008991rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8992 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008993fi
8994
8995
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008996 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008997 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008998 i386)
8999 MACOSX_DEFAULT_ARCH="i386"
9000 ;;
9001 ppc)
9002 MACOSX_DEFAULT_ARCH="ppc"
9003 ;;
9004 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009005 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009006 ;;
9007 esac
9008 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009009 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009010 i386)
9011 MACOSX_DEFAULT_ARCH="x86_64"
9012 ;;
9013 ppc)
9014 MACOSX_DEFAULT_ARCH="ppc64"
9015 ;;
9016 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009017 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009018 ;;
9019 esac
9020
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009021 fi
9022
9023 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009024 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009025 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009026esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9028$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009029if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009030then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009031 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009033 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009034
Matthias Kloseb9621712010-04-24 17:59:49 +00009035$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009036
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9038$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009039 if test $enable_shared = "yes"
9040 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009041 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 +00009042 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009043else
Matthias Kloseb9621712010-04-24 17:59:49 +00009044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9045$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009046fi
9047
Matthias Kloseb9621712010-04-24 17:59:49 +00009048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9049$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009050case $ac_sys_system/$ac_sys_release in
9051 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009052
Matthias Kloseb9621712010-04-24 17:59:49 +00009053$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009054
Matthias Kloseb9621712010-04-24 17:59:49 +00009055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9056$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009057 ;;
9058 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9060$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009061 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009062esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009063
Guido van Rossum0a516c91994-09-12 10:58:40 +00009064# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009065
Michael W. Hudson54241132001-12-07 15:38:26 +00009066
9067
9068
9069
Benjamin Peterson99f03762010-04-11 22:15:28 +00009070
Thomas Wouters477c8d52006-05-27 19:21:47 +00009071
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009072# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9073# -- usually .so, .sl on HP-UX, .dll on Cygwin
9074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9075$as_echo_n "checking the extension of shared libraries... " >&6; }
9076if test -z "$SHLIB_SUFFIX"; then
9077 case $ac_sys_system in
9078 hp*|HP*)
9079 case `uname -m` in
9080 ia64) SHLIB_SUFFIX=.so;;
9081 *) SHLIB_SUFFIX=.sl;;
9082 esac
9083 ;;
9084 CYGWIN*) SHLIB_SUFFIX=.dll;;
9085 *) SHLIB_SUFFIX=.so;;
9086 esac
9087fi
9088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9089$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009090
Guido van Rossum0a516c91994-09-12 10:58:40 +00009091# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009092# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009093# (Shared libraries in this instance are shared modules to be loaded into
9094# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9096$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009097if test -z "$LDSHARED"
9098then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009099 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009100 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009101 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009102 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009103 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009104 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009105 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009106 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009107 if test "$GCC" = "yes" ; then
9108 LDSHARED='$(CC) -shared'
9109 LDCXXSHARED='$(CXX) -shared'
9110 else
9111 LDSHARED='$(CC) -G'
9112 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009113 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009114 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009115 if test "$GCC" = "yes" ; then
9116 LDSHARED='$(CC) -shared'
9117 LDCXXSHARED='$(CXX) -shared'
9118 else
9119 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009120 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009121 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009122 LDSHARED='$(CC) -bundle'
9123 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009124 if test "$enable_framework" ; then
9125 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009126 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9127 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009128 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009129 else
9130 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009131 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009132 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009133 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009134 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009135 LDSHARED='$(CC) -bundle'
9136 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009137 if test "$enable_framework" ; then
9138 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009139 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9140 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009141 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009142 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009143 # No framework, use the Python app as bundle-loader
9144 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009145 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009146 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009147 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009148 Darwin/*)
9149 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9150 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009151
Ned Deily36820b62014-06-25 13:44:22 -07009152 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9153 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9154 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9155 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9156 if test ${dep_target_major} -eq 10 && \
9157 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009158 then
Ned Deily36820b62014-06-25 13:44:22 -07009159 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009160 LDSHARED='$(CC) -bundle'
9161 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009162 if test "$enable_framework" ; then
9163 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009164 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9165 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009166 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009167 else
9168 # No framework, use the Python app as bundle-loader
9169 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9170 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009171 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009172 fi
Ned Deily36820b62014-06-25 13:44:22 -07009173 else
9174 # building for OS X 10.3 and later
9175 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9176 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9177 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009178 fi
9179 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009180 Linux*|GNU*|QNX*)
9181 LDSHARED='$(CC) -shared'
9182 LDCXXSHARED='$(CXX) -shared';;
9183 BSD/OS*/4*)
9184 LDSHARED="gcc -shared"
9185 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009186 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009187 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009188 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009189 LDSHARED='$(CC) -shared'
9190 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009191 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009192 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009193 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009194 OpenBSD*)
9195 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9196 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009197 LDSHARED='$(CC) -shared $(CCSHARED)'
9198 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009199 else
9200 case `uname -r` in
9201 [01].* | 2.[0-7] | 2.[0-7].*)
9202 LDSHARED="ld -Bshareable ${LDFLAGS}"
9203 ;;
9204 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009205 LDSHARED='$(CC) -shared $(CCSHARED)'
9206 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009207 ;;
9208 esac
9209 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009210 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009211 LDSHARED='$(CC) -shared'
9212 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009213 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009214 if test "$GCC" = "yes" ; then
9215 LDSHARED='$(CC) -shared'
9216 LDCXXSHARED='$(CXX) -shared'
9217 else
9218 LDSHARED='$(CC) -G'
9219 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009220 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009221 SCO_SV*)
9222 LDSHARED='$(CC) -Wl,-G,-Bexport'
9223 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9224 CYGWIN*)
9225 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9226 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009227 *) LDSHARED="ld";;
9228 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009229fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9231$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009232LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009233BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009234# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009235# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9237$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009238if test -z "$CCSHARED"
9239then
Guido van Rossum07397971997-04-29 21:49:50 +00009240 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009241 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009242 then CCSHARED="-fPIC";
9243 elif test `uname -p` = sparc;
9244 then CCSHARED="-xcode=pic32";
9245 else CCSHARED="-Kpic";
9246 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009247 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009248 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009249 else CCSHARED="+z";
9250 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009251 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009252 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009253 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009254 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009255 if test "$GCC" = "yes"
9256 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009257 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009258 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009259 SCO_SV*)
9260 if test "$GCC" = "yes"
9261 then CCSHARED="-fPIC"
9262 else CCSHARED="-Kpic -belf"
9263 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009264 IRIX*/6*) case $CC in
9265 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009266 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009267 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009268 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009269fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9271$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009272# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009273# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9275$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009276if test -z "$LINKFORSHARED"
9277then
Guido van Rossum07397971997-04-29 21:49:50 +00009278 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009279 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009280 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009281 LINKFORSHARED="-Wl,-E -Wl,+s";;
9282# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009283 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009284 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009285 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009286 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009287 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009288
9289 # Issue #18075: the default maximum stack size (8MBytes) is too
9290 # small for the default recursion limit. Increase the stack size
9291 # to ensure that tests don't crash
9292 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9293
Jack Jansene578a632001-08-15 01:27:14 +00009294 if test "$enable_framework"
9295 then
Jack Jansenda49e192005-01-07 13:08:22 +00009296 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009297 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009298 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009299 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009300 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009301 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009302 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009303 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9304 then
9305 LINKFORSHARED="-Wl,--export-dynamic"
9306 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009307 SunOS/5*) case $CC in
9308 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009309 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009310 then
9311 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009312 fi;;
9313 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009314 CYGWIN*)
9315 if test $enable_shared = "no"
9316 then
9317 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9318 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009319 QNX*)
9320 # -Wl,-E causes the symbols to be added to the dynamic
9321 # symbol table so that they can be found when a module
9322 # is loaded. -N 2048K causes the stack size to be set
9323 # to 2048 kilobytes so that the stack doesn't overflow
9324 # when running test_compile.py.
9325 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009326 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009327fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9329$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009330
Michael W. Hudson54241132001-12-07 15:38:26 +00009331
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009332
Matthias Kloseb9621712010-04-24 17:59:49 +00009333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9334$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009335if test ! "$LIBRARY" = "$LDLIBRARY"
9336then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009337 case $ac_sys_system in
9338 CYGWIN*)
9339 # Cygwin needs CCSHARED when building extension DLLs
9340 # but not when building the interpreter DLL.
9341 CFLAGSFORSHARED='';;
9342 *)
9343 CFLAGSFORSHARED='$(CCSHARED)'
9344 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009345fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9347$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009348
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009349# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9350# library (with --enable-shared).
9351# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009352# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9353# if it is not required, since it creates a dependency of the shared library
9354# to LIBS. This, in turn, means that applications linking the shared libpython
9355# don't need to link LIBS explicitly. The default should be only changed
9356# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009357
Matthias Kloseb9621712010-04-24 17:59:49 +00009358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9359$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009360case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009361 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009362 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009363esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9365$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009366
9367
Guido van Rossum627b2d71993-12-24 10:39:16 +00009368# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9370$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009371if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009372 $as_echo_n "(cached) " >&6
9373else
9374 ac_check_lib_save_LIBS=$LIBS
9375LIBS="-lsendfile $LIBS"
9376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9377/* end confdefs.h. */
9378
9379/* Override any GCC internal prototype to avoid an error.
9380 Use char because int might match the return type of a GCC
9381 builtin and then its argument prototype would still apply. */
9382#ifdef __cplusplus
9383extern "C"
9384#endif
9385char sendfile ();
9386int
9387main ()
9388{
9389return sendfile ();
9390 ;
9391 return 0;
9392}
9393_ACEOF
9394if ac_fn_c_try_link "$LINENO"; then :
9395 ac_cv_lib_sendfile_sendfile=yes
9396else
9397 ac_cv_lib_sendfile_sendfile=no
9398fi
9399rm -f core conftest.err conftest.$ac_objext \
9400 conftest$ac_exeext conftest.$ac_ext
9401LIBS=$ac_check_lib_save_LIBS
9402fi
9403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9404$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009405if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009406 cat >>confdefs.h <<_ACEOF
9407#define HAVE_LIBSENDFILE 1
9408_ACEOF
9409
9410 LIBS="-lsendfile $LIBS"
9411
9412fi
9413
Matthias Kloseb9621712010-04-24 17:59:49 +00009414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9415$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009416if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009417 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009418else
Martin v. Löwis11437992002-04-12 09:54:03 +00009419 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009420LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009422/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009423
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009424/* Override any GCC internal prototype to avoid an error.
9425 Use char because int might match the return type of a GCC
9426 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009427#ifdef __cplusplus
9428extern "C"
9429#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009430char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009431int
9432main ()
9433{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009434return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009435 ;
9436 return 0;
9437}
9438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009439if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009440 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009441else
Matthias Kloseb9621712010-04-24 17:59:49 +00009442 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009443fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009444rm -f core conftest.err conftest.$ac_objext \
9445 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009446LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009447fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9449$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009450if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009451 cat >>confdefs.h <<_ACEOF
9452#define HAVE_LIBDL 1
9453_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009454
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009455 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009456
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009457fi
9458 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9460$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009461if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009462 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009463else
Martin v. Löwis11437992002-04-12 09:54:03 +00009464 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009465LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009468
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009469/* Override any GCC internal prototype to avoid an error.
9470 Use char because int might match the return type of a GCC
9471 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009472#ifdef __cplusplus
9473extern "C"
9474#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009475char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009476int
9477main ()
9478{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009479return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009480 ;
9481 return 0;
9482}
9483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009484if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009485 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009486else
Matthias Kloseb9621712010-04-24 17:59:49 +00009487 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009489rm -f core conftest.err conftest.$ac_objext \
9490 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009491LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9494$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009495if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009496 cat >>confdefs.h <<_ACEOF
9497#define HAVE_LIBDLD 1
9498_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009499
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009500 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009501
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009502fi
9503 # Dynamic linking for HP-UX
Victor Stinnerbeeb5122014-11-28 13:28:25 +01009504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
9505$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
9506if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
9507 $as_echo_n "(cached) " >&6
9508else
9509 ac_check_lib_save_LIBS=$LIBS
9510LIBS="-lcrypto $LIBS"
9511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9512/* end confdefs.h. */
9513
9514/* Override any GCC internal prototype to avoid an error.
9515 Use char because int might match the return type of a GCC
9516 builtin and then its argument prototype would still apply. */
9517#ifdef __cplusplus
9518extern "C"
9519#endif
9520char RAND_egd ();
9521int
9522main ()
9523{
9524return RAND_egd ();
9525 ;
9526 return 0;
9527}
9528_ACEOF
9529if ac_fn_c_try_link "$LINENO"; then :
9530 ac_cv_lib_crypto_RAND_egd=yes
9531else
9532 ac_cv_lib_crypto_RAND_egd=no
9533fi
9534rm -f core conftest.err conftest.$ac_objext \
9535 conftest$ac_exeext conftest.$ac_ext
9536LIBS=$ac_check_lib_save_LIBS
9537fi
9538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
9539$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
9540if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
9541
9542$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
9543
9544fi
9545
Martin v. Löwis519adae2003-09-20 10:47:47 +00009546
Georg Brandlb1441c72009-01-03 22:33:39 +00009547# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009548if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9550$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009551if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009552 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009553else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009554 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009558/* Override any GCC internal prototype to avoid an error.
9559 Use char because int might match the return type of a GCC
9560 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009561#ifdef __cplusplus
9562extern "C"
9563#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009564char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009565int
9566main ()
9567{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009568return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009569 ;
9570 return 0;
9571}
9572_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009573for ac_lib in '' pthread rt posix4; do
9574 if test -z "$ac_lib"; then
9575 ac_res="none required"
9576 else
9577 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009578 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009579 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009580 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009581 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009583rm -f core conftest.err conftest.$ac_objext \
9584 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009585 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009586 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009588done
Victor Stinnere0be4232011-10-25 13:06:09 +02009589if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009590
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009591else
9592 ac_cv_search_sem_init=no
9593fi
9594rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009595LIBS=$ac_func_search_save_LIBS
9596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9598$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009599ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009600if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009601 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009602
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009603fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009604 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009605 # posix4 on Solaris 2.6
9606 # pthread (first!) on Linux
9607fi
9608
Martin v. Löwis19d17342003-06-14 21:03:05 +00009609# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9611$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009612if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009613 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009614else
9615 ac_check_lib_save_LIBS=$LIBS
9616LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009618/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009620/* Override any GCC internal prototype to avoid an error.
9621 Use char because int might match the return type of a GCC
9622 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009623#ifdef __cplusplus
9624extern "C"
9625#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009626char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009627int
9628main ()
9629{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009630return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009631 ;
9632 return 0;
9633}
9634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009635if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009636 ac_cv_lib_intl_textdomain=yes
9637else
Matthias Kloseb9621712010-04-24 17:59:49 +00009638 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009640rm -f core conftest.err conftest.$ac_objext \
9641 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009642LIBS=$ac_check_lib_save_LIBS
9643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9645$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009646if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009647
Matthias Kloseb9621712010-04-24 17:59:49 +00009648$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009649
Brett Cannonc6d936e2009-06-07 20:09:53 +00009650 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009651fi
9652
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009653
9654# checks for system dependent C++ extensions support
9655case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009656 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9657$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009659/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009660
Georg Brandl59e87bd2011-02-15 19:48:59 +00009661 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009662int
9663main ()
9664{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009665loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009666 ;
9667 return 0;
9668}
Matthias Kloseb159a552010-04-25 21:00:44 +00009669
Martin v. Löwis11437992002-04-12 09:54:03 +00009670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009671if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009672
Matthias Kloseb159a552010-04-25 21:00:44 +00009673
Matthias Kloseb9621712010-04-24 17:59:49 +00009674$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009675
Matthias Kloseb159a552010-04-25 21:00:44 +00009676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009677$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009678
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009679else
Matthias Kloseb159a552010-04-25 21:00:44 +00009680
9681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009682$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009683
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009685rm -f core conftest.err conftest.$ac_objext \
9686 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009687 *) ;;
9688esac
9689
Christian Heimes985ecdc2013-11-20 11:46:18 +01009690# check for systems that require aligned memory access
9691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9692$as_echo_n "checking aligned memory access is required... " >&6; }
9693if test "$cross_compiling" = yes; then :
9694 aligned_required=yes
9695else
9696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9697/* end confdefs.h. */
9698
9699int main()
9700{
9701 char s[16];
9702 int i, *p1, *p2;
9703 for (i=0; i < 16; i++)
9704 s[i] = i;
9705 p1 = (int*)(s+1);
9706 p2 = (int*)(s+2);
9707 if (*p1 == *p2)
9708 return 1;
9709 return 0;
9710}
9711
9712_ACEOF
9713if ac_fn_c_try_run "$LINENO"; then :
9714 aligned_required=no
9715else
9716 aligned_required=yes
9717fi
9718rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9719 conftest.$ac_objext conftest.beam conftest.$ac_ext
9720fi
9721
9722
9723if test "$aligned_required" = yes ; then
9724
9725$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9726
9727fi
9728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9729$as_echo "$aligned_required" >&6; }
9730
9731
9732# str, bytes and memoryview hash algorithm
9733
9734
9735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9736$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9737
9738# Check whether --with-hash_algorithm was given.
9739if test "${with_hash_algorithm+set}" = set; then :
9740 withval=$with_hash_algorithm;
9741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9742$as_echo "$withval" >&6; }
9743case "$withval" in
9744 siphash24)
9745 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9746
9747 ;;
9748 fnv)
9749 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9750
9751 ;;
9752 *)
9753 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9754 ;;
9755esac
9756
9757else
9758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9759$as_echo "default" >&6; }
9760fi
9761
9762
Charles-François Natalid30b0222014-05-08 23:08:51 +01009763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9764$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9765
9766# Check whether --with-address_sanitizer was given.
9767if test "${with_address_sanitizer+set}" = set; then :
9768 withval=$with_address_sanitizer;
9769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9770$as_echo "$withval" >&6; }
9771BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9772LDFLAGS="-fsanitize=address $LDFLAGS"
9773
9774else
9775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9776$as_echo "no" >&6; }
9777fi
9778
9779
Guido van Rossum70c7f481998-03-26 18:44:10 +00009780# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9782$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009783if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009784 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009785else
Martin v. Löwis11437992002-04-12 09:54:03 +00009786 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009787LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009791/* Override any GCC internal prototype to avoid an error.
9792 Use char because int might match the return type of a GCC
9793 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009794#ifdef __cplusplus
9795extern "C"
9796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009797char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009798int
9799main ()
9800{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009801return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009802 ;
9803 return 0;
9804}
9805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009806if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009807 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009808else
Matthias Kloseb9621712010-04-24 17:59:49 +00009809 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009811rm -f core conftest.err conftest.$ac_objext \
9812 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009813LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9816$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009817if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009818 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009819fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009820 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9822$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009823if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009824 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009825else
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009827LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009830
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831/* Override any GCC internal prototype to avoid an error.
9832 Use char because int might match the return type of a GCC
9833 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009834#ifdef __cplusplus
9835extern "C"
9836#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009837char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009838int
9839main ()
9840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009841return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009842 ;
9843 return 0;
9844}
9845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009846if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009847 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009848else
Matthias Kloseb9621712010-04-24 17:59:49 +00009849 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009851rm -f core conftest.err conftest.$ac_objext \
9852 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009853LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9856$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009857if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009858 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009859fi
9860 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009861
Matthias Kloseb9621712010-04-24 17:59:49 +00009862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9863$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009864
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009865# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009866if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009867 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9869$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009870LIBS="$withval $LIBS"
9871
9872else
Matthias Kloseb9621712010-04-24 17:59:49 +00009873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9874$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009875fi
9876
Guido van Rossum7f43da71994-08-01 12:15:30 +00009877
Victor Stinner8291b5e2015-03-20 16:03:14 +01009878
9879
9880
9881
9882
9883
9884
9885if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9886 if test -n "$ac_tool_prefix"; then
9887 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9888set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9890$as_echo_n "checking for $ac_word... " >&6; }
9891if ${ac_cv_path_PKG_CONFIG+:} false; then :
9892 $as_echo_n "(cached) " >&6
9893else
9894 case $PKG_CONFIG in
9895 [\\/]* | ?:[\\/]*)
9896 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9897 ;;
9898 *)
9899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9900for as_dir in $PATH
9901do
9902 IFS=$as_save_IFS
9903 test -z "$as_dir" && as_dir=.
9904 for ac_exec_ext in '' $ac_executable_extensions; do
9905 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9906 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9907 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9908 break 2
9909 fi
9910done
9911 done
9912IFS=$as_save_IFS
9913
9914 ;;
9915esac
9916fi
9917PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9918if test -n "$PKG_CONFIG"; then
9919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9920$as_echo "$PKG_CONFIG" >&6; }
9921else
9922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9923$as_echo "no" >&6; }
9924fi
9925
9926
9927fi
9928if test -z "$ac_cv_path_PKG_CONFIG"; then
9929 ac_pt_PKG_CONFIG=$PKG_CONFIG
9930 # Extract the first word of "pkg-config", so it can be a program name with args.
9931set dummy pkg-config; ac_word=$2
9932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9933$as_echo_n "checking for $ac_word... " >&6; }
9934if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9935 $as_echo_n "(cached) " >&6
9936else
9937 case $ac_pt_PKG_CONFIG in
9938 [\\/]* | ?:[\\/]*)
9939 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9940 ;;
9941 *)
9942 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9943for as_dir in $PATH
9944do
9945 IFS=$as_save_IFS
9946 test -z "$as_dir" && as_dir=.
9947 for ac_exec_ext in '' $ac_executable_extensions; do
9948 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9949 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9950 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9951 break 2
9952 fi
9953done
9954 done
9955IFS=$as_save_IFS
9956
9957 ;;
9958esac
9959fi
9960ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9961if test -n "$ac_pt_PKG_CONFIG"; then
9962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9963$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9964else
9965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9966$as_echo "no" >&6; }
9967fi
9968
9969 if test "x$ac_pt_PKG_CONFIG" = x; then
9970 PKG_CONFIG=""
9971 else
9972 case $cross_compiling:$ac_tool_warned in
9973yes:)
9974{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9975$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9976ac_tool_warned=yes ;;
9977esac
9978 PKG_CONFIG=$ac_pt_PKG_CONFIG
9979 fi
9980else
9981 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9982fi
9983
9984fi
9985if test -n "$PKG_CONFIG"; then
9986 _pkg_min_version=0.9.0
9987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9988$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9989 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9991$as_echo "yes" >&6; }
9992 else
9993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9994$as_echo "no" >&6; }
9995 PKG_CONFIG=""
9996 fi
9997fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009998
9999# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10001$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010002
10003# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010004if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010005 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010006else
10007 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010008fi
10009
10010
Matthias Kloseb9621712010-04-24 17:59:49 +000010011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10012$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010013
10014# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10016$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010017
10018# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010019if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010020 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +000010021else
10022 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010023fi
10024
10025
10026if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010027 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10028else
10029 LIBFFI_INCLUDEDIR=""
10030fi
10031
10032
Matthias Kloseb9621712010-04-24 17:59:49 +000010033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10034$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010035
Stefan Krah60187b52012-03-23 19:06:27 +010010036# Check for use of the system libmpdec library
10037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10038$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10039
10040# Check whether --with-system_libmpdec was given.
10041if test "${with_system_libmpdec+set}" = set; then :
10042 withval=$with_system_libmpdec;
10043else
10044 with_system_libmpdec="no"
10045fi
10046
10047
10048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10049$as_echo "$with_system_libmpdec" >&6; }
10050
Benjamin Peterson076ed002010-10-31 17:11:02 +000010051# Check for support for loadable sqlite extensions
10052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10053$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10054# Check whether --enable-loadable-sqlite-extensions was given.
10055if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10056 enableval=$enable_loadable_sqlite_extensions;
10057else
10058 enable_loadable_sqlite_extensions="no"
10059fi
10060
10061
10062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10063$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10064
Ned Deilyd819b932013-09-06 01:07:05 -070010065# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10066
10067
10068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10069$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10070
10071# Check whether --with-tcltk-includes was given.
10072if test "${with_tcltk_includes+set}" = set; then :
10073 withval=$with_tcltk_includes;
10074else
10075 with_tcltk_includes="default"
10076fi
10077
10078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10079$as_echo "$with_tcltk_includes" >&6; }
10080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10081$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10082
10083# Check whether --with-tcltk-libs was given.
10084if test "${with_tcltk_libs+set}" = set; then :
10085 withval=$with_tcltk_libs;
10086else
10087 with_tcltk_libs="default"
10088fi
10089
10090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10091$as_echo "$with_tcltk_libs" >&6; }
10092if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10093then
10094 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10095 then
10096 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10097 fi
10098 TCLTK_INCLUDES=""
10099 TCLTK_LIBS=""
10100else
10101 TCLTK_INCLUDES="$with_tcltk_includes"
10102 TCLTK_LIBS="$with_tcltk_libs"
10103fi
10104
Matthias Klose55708cc2009-04-30 08:06:49 +000010105# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10107$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010108
10109# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010110if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010111 withval=$with_dbmliborder;
10112if test x$with_dbmliborder = xyes
10113then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010114as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010115else
10116 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10117 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10118 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010119 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010120 fi
10121 done
10122fi
10123fi
10124
Matthias Kloseb9621712010-04-24 17:59:49 +000010125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10126$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010127
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010128# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010129
10130
Matthias Kloseb9621712010-04-24 17:59:49 +000010131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10132$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010134# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010135if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010136 withval=$with_signal_module;
10137fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010138
10139
10140if test -z "$with_signal_module"
10141then with_signal_module="yes"
10142fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10144$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010145
10146if test "${with_signal_module}" = "yes"; then
10147 USE_SIGNAL_MODULE=""
10148 SIGNAL_OBJS=""
10149else
10150 USE_SIGNAL_MODULE="#"
10151 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10152fi
10153
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010154# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010155
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010156USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010158
Martin v. Löwis11437992002-04-12 09:54:03 +000010159
10160# Templates for things AC_DEFINEd more than once.
10161# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010162
10163
Martin v. Löwis11437992002-04-12 09:54:03 +000010164
Matthias Kloseb9621712010-04-24 17:59:49 +000010165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10166$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010167
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010168# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010169if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010170 withval=$with_threads;
10171fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010172
10173
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010174# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010177if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178 withval=$with_thread; with_threads=$with_thread
10179fi
10180
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010181
10182if test -z "$with_threads"
10183then with_threads="yes"
10184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10186$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010187
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010188
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010189if test "$with_threads" = "no"
10190then
10191 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010192elif test "$ac_cv_pthread_is_default" = yes
10193then
Matthias Kloseb9621712010-04-24 17:59:49 +000010194 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010195
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010196 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010197 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010198
10199 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010201elif test "$ac_cv_kpthread" = "yes"
10202then
10203 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010204 if test "$ac_cv_cxx_thread" = "yes"; then
10205 CXX="$CXX -Kpthread"
10206 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010207 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010208
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010209 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010210 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010211elif test "$ac_cv_kthread" = "yes"
10212then
10213 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010214 if test "$ac_cv_cxx_thread" = "yes"; then
10215 CXX="$CXX -Kthread"
10216 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010217 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010218
10219 posix_threads=yes
10220 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010221elif test "$ac_cv_pthread" = "yes"
10222then
10223 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010224 if test "$ac_cv_cxx_thread" = "yes"; then
10225 CXX="$CXX -pthread"
10226 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010227 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010228
10229 posix_threads=yes
10230 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010231else
10232 if test ! -z "$with_threads" -a -d "$with_threads"
10233 then LDFLAGS="$LDFLAGS -L$with_threads"
10234 fi
10235 if test ! -z "$withval" -a -d "$withval"
10236 then LDFLAGS="$LDFLAGS -L$withval"
10237 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010238
10239 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010240 # define _POSIX_THREADS in unistd.h. Some apparently don't
10241 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10243$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010245/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010246
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010247#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010248#ifdef _POSIX_THREADS
10249yes
10250#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010251
10252_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010253if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010254 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010255 unistd_defines_pthreads=yes
10256else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010257 unistd_defines_pthreads=no
10258fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010259rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010260
Matthias Kloseb9621712010-04-24 17:59:49 +000010261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10262$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010263
Matthias Kloseb9621712010-04-24 17:59:49 +000010264 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010265
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010266 # Just looking for pthread_create in libpthread is not enough:
10267 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10268 # So we really have to include pthread.h, and then link.
10269 _libs=$LIBS
10270 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10272$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010274/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010275
10276#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010277#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010278
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010279void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010280int
10281main ()
10282{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010283
10284pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010285 ;
10286 return 0;
10287}
10288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010289if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010290
Matthias Kloseb9621712010-04-24 17:59:49 +000010291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10292$as_echo "yes" >&6; }
10293 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010294
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010295 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010296 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010297else
Martin v. Löwis11437992002-04-12 09:54:03 +000010298
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010299 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010300 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010301if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010302 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010303
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010304 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010305 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010306else
Guido van Rossumad678af1998-10-02 14:42:15 +000010307
Matthias Kloseb9621712010-04-24 17:59:49 +000010308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10309$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010310if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010311 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010312else
Martin v. Löwis11437992002-04-12 09:54:03 +000010313 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010314LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010316/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010317
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010318/* Override any GCC internal prototype to avoid an error.
10319 Use char because int might match the return type of a GCC
10320 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010321#ifdef __cplusplus
10322extern "C"
10323#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010324char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010325int
10326main ()
10327{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010328return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010329 ;
10330 return 0;
10331}
10332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010333if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010334 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010335else
Matthias Kloseb9621712010-04-24 17:59:49 +000010336 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010338rm -f core conftest.err conftest.$ac_objext \
10339 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010340LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010341fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10343$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010344if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010345 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010346
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010347 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010348 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010349 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010350else
Greg Steinadf63d62000-07-05 10:38:09 +000010351
Matthias Kloseb9621712010-04-24 17:59:49 +000010352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10353$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010354if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010356else
Martin v. Löwis11437992002-04-12 09:54:03 +000010357 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010358LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010360/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010362/* Override any GCC internal prototype to avoid an error.
10363 Use char because int might match the return type of a GCC
10364 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010365#ifdef __cplusplus
10366extern "C"
10367#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010368char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010369int
10370main ()
10371{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010372return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010373 ;
10374 return 0;
10375}
10376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010377if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010378 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010379else
Matthias Kloseb9621712010-04-24 17:59:49 +000010380 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010381fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010382rm -f core conftest.err conftest.$ac_objext \
10383 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010384LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010385fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10387$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010388if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010389 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010390
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010391 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010392 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010393 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010394else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010395
Matthias Kloseb9621712010-04-24 17:59:49 +000010396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10397$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010398if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010399 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010400else
Martin v. Löwis11437992002-04-12 09:54:03 +000010401 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010402LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010406/* Override any GCC internal prototype to avoid an error.
10407 Use char because int might match the return type of a GCC
10408 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010409#ifdef __cplusplus
10410extern "C"
10411#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010412char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010413int
10414main ()
10415{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010416return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 ;
10418 return 0;
10419}
10420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010421if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010422 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010423else
Matthias Kloseb9621712010-04-24 17:59:49 +000010424 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010425fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010426rm -f core conftest.err conftest.$ac_objext \
10427 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010428LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010429fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10431$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010432if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010433 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010434
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010435 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010436 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010437 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010438else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010439
Matthias Kloseb9621712010-04-24 17:59:49 +000010440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10441$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010442if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010443 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010444else
Martin v. Löwis11437992002-04-12 09:54:03 +000010445 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010446LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010448/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010449
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010450/* Override any GCC internal prototype to avoid an error.
10451 Use char because int might match the return type of a GCC
10452 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010453#ifdef __cplusplus
10454extern "C"
10455#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010456char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010457int
10458main ()
10459{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010460return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010461 ;
10462 return 0;
10463}
10464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010465if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010466 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010467else
Matthias Kloseb9621712010-04-24 17:59:49 +000010468 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010469fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010470rm -f core conftest.err conftest.$ac_objext \
10471 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010472LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010473fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10475$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010476if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010477 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010478
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010479 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010480 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010481 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010482else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010483
Martin v. Löwis130fb172001-07-19 11:00:41 +000010484 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010485fi
10486
Guido van Rossum627b2d71993-12-24 10:39:16 +000010487
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010488fi
10489
Guido van Rossum0be3e491997-05-22 20:33:33 +000010490fi
10491
Guido van Rossum49545951997-12-02 19:28:29 +000010492fi
10493
Guido van Rossumb93a8621998-05-07 13:27:32 +000010494fi
10495
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010497rm -f core conftest.err conftest.$ac_objext \
10498 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010499
Matthias Kloseb9621712010-04-24 17:59:49 +000010500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10501$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010502if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010503 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010504else
Martin v. Löwis11437992002-04-12 09:54:03 +000010505 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010506LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010510/* Override any GCC internal prototype to avoid an error.
10511 Use char because int might match the return type of a GCC
10512 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010513#ifdef __cplusplus
10514extern "C"
10515#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010516char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010517int
10518main ()
10519{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010520return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010521 ;
10522 return 0;
10523}
10524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010525if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010526 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010527else
Matthias Kloseb9621712010-04-24 17:59:49 +000010528 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010529fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010530rm -f core conftest.err conftest.$ac_objext \
10531 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010532LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010533fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10535$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010536if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010537 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010538
Martin v. Löwis130fb172001-07-19 11:00:41 +000010539 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010540 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010541 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010542fi
10543
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010544
Neal Norwitza978ab02002-11-02 16:58:05 +000010545 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10547$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010548if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010549 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010550else
Martin v. Löwis11437992002-04-12 09:54:03 +000010551 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010552LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010555
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010556/* Override any GCC internal prototype to avoid an error.
10557 Use char because int might match the return type of a GCC
10558 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010559#ifdef __cplusplus
10560extern "C"
10561#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010562char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010563int
10564main ()
10565{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010566return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010567 ;
10568 return 0;
10569}
10570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010571if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010572 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010573else
Matthias Kloseb9621712010-04-24 17:59:49 +000010574 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010576rm -f core conftest.err conftest.$ac_objext \
10577 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010578LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10581$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010582if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010584
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010585 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010586 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010587 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010588fi
10589
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010590 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010591fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010592
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010593if test "$posix_threads" = "yes"; then
10594 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010595
Matthias Kloseb9621712010-04-24 17:59:49 +000010596$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010597
10598 fi
10599
10600 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10601 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010602 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010603$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010604
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010605 ;;
10606 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010607$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010608
10609 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010610 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010611$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010612
10613 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010614 esac
10615
Matthias Kloseb9621712010-04-24 17:59:49 +000010616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10617$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010618 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010619 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010620else
Matthias Kloseb9621712010-04-24 17:59:49 +000010621 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010622 ac_cv_pthread_system_supported=no
10623else
Matthias Kloseb9621712010-04-24 17:59:49 +000010624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010625/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010626
10627 #include <stdio.h>
10628 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010629 void *foo(void *parm) {
10630 return NULL;
10631 }
10632 main() {
10633 pthread_attr_t attr;
10634 pthread_t id;
10635 if (pthread_attr_init(&attr)) exit(-1);
10636 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10637 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10638 exit(0);
10639 }
10640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010641if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010642 ac_cv_pthread_system_supported=yes
10643else
Matthias Kloseb9621712010-04-24 17:59:49 +000010644 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010646rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10647 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010648fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010649
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010650
Guido van Rossum627b2d71993-12-24 10:39:16 +000010651fi
10652
Matthias Kloseb9621712010-04-24 17:59:49 +000010653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10654$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010655 if test "$ac_cv_pthread_system_supported" = "yes"; then
10656
Matthias Kloseb9621712010-04-24 17:59:49 +000010657$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010658
10659 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010660 for ac_func in pthread_sigmask
10661do :
10662 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010663if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010664 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010665#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010666_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010667 case $ac_sys_system in
10668 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010669
Matthias Kloseb9621712010-04-24 17:59:49 +000010670$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010671
10672 ;;
10673 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010674fi
10675done
10676
Christian Heimesf77b4b22013-08-21 13:26:05 +020010677 for ac_func in pthread_atfork
10678do :
10679 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10680if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10681 cat >>confdefs.h <<_ACEOF
10682#define HAVE_PTHREAD_ATFORK 1
10683_ACEOF
10684
10685fi
10686done
10687
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010688fi
10689
10690
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010691# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010692
Matthias Kloseb9621712010-04-24 17:59:49 +000010693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10694$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010695# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010696if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010697 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010698 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10700$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010701 ipv6=no
10702 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10704$as_echo "yes" >&6; }
10705 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010706
10707 ipv6=yes
10708 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010709 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010710else
Martin v. Löwis11437992002-04-12 09:54:03 +000010711
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010713/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010714 /* AF_INET6 available check */
10715#include <sys/types.h>
10716#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010717int
10718main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010719{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010720int domain = AF_INET6;
10721 ;
10722 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010723}
Martin v. Löwis11437992002-04-12 09:54:03 +000010724_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010725if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010726
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10728$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010729 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010730
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010731else
Matthias Kloseb159a552010-04-25 21:00:44 +000010732
Matthias Kloseb9621712010-04-24 17:59:49 +000010733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10734$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010735 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010736
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010737fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010739
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010740if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10742$as_echo_n "checking if RFC2553 API is available... " >&6; }
10743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010744/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010745
10746 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010747#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010748int
10749main ()
10750{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010751struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010752 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010753 ;
10754 return 0;
10755}
Matthias Kloseb159a552010-04-25 21:00:44 +000010756
Martin v. Löwis11437992002-04-12 09:54:03 +000010757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010758if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010759
10760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010761$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010762 ipv6=yes
10763
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010764else
Matthias Kloseb159a552010-04-25 21:00:44 +000010765
10766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010767$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010768 ipv6=no
10769
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010772fi
10773
10774if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010775 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010776
10777fi
10778
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010779fi
10780
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010781
10782ipv6type=unknown
10783ipv6lib=none
10784ipv6trylibc=no
10785
10786if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10788$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010789 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10790 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010791 case $i in
10792 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010794/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010795
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010796#include <netinet/in.h>
10797#ifdef IPV6_INRIA_VERSION
10798yes
10799#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010800_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010801if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010802 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010803 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010804fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010805rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010806
10807 ;;
10808 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010810/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010811
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010812#include <netinet/in.h>
10813#ifdef __KAME__
10814yes
10815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010816_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010817if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010818 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010819 ipv6type=$i;
10820 ipv6lib=inet6
10821 ipv6libdir=/usr/local/v6/lib
10822 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010824rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010825
10826 ;;
10827 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010829/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010830
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010831#include <features.h>
10832#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10833yes
10834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010835_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010836if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010837 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010838 ipv6type=$i;
10839 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010840fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010841rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010842
10843 ;;
10844 linux-inet6)
10845 if test -d /usr/inet6; then
10846 ipv6type=$i
10847 ipv6lib=inet6
10848 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010849 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010850 fi
10851 ;;
10852 solaris)
10853 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010854 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010855 ipv6type=$i
10856 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010857 fi
10858 fi
10859 ;;
10860 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010862/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010863
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010864#include <sys/param.h>
10865#ifdef _TOSHIBA_INET6
10866yes
10867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010868_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010870 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010871 ipv6type=$i;
10872 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010873 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010874fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010875rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010876
10877 ;;
10878 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010880/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010881
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010882#include </usr/local/v6/include/sys/v6config.h>
10883#ifdef __V6D__
10884yes
10885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010886_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010887if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010888 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010889 ipv6type=$i;
10890 ipv6lib=v6;
10891 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010892 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010893fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010894rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010895
10896 ;;
10897 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010899/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010900
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010901#include <sys/param.h>
10902#ifdef _ZETA_MINAMI_INET6
10903yes
10904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010905_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010907 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010908 ipv6type=$i;
10909 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010910 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010911fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010912rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010913
10914 ;;
10915 esac
10916 if test "$ipv6type" != "unknown"; then
10917 break
10918 fi
10919 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10921$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010922fi
10923
10924if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10925 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10926 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10927 echo "using lib$ipv6lib"
10928 else
10929 if test $ipv6trylibc = "yes"; then
10930 echo "using libc"
10931 else
10932 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10933 echo "You need to fetch lib$ipv6lib.a from appropriate"
10934 echo 'ipv6 kit and compile beforehand.'
10935 exit 1
10936 fi
10937 fi
10938fi
10939
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10941$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10943/* end confdefs.h. */
10944 /* CAN_RAW_FD_FRAMES available check */
10945#include <linux/can/raw.h>
10946int
10947main ()
10948{
10949int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10950 ;
10951 return 0;
10952}
10953_ACEOF
10954if ac_fn_c_try_compile "$LINENO"; then :
10955
10956
10957$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10958
10959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10960$as_echo "yes" >&6; }
10961
10962else
10963
10964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10965$as_echo "no" >&6; }
10966
10967fi
10968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10969
Matthias Kloseb9621712010-04-24 17:59:49 +000010970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10971$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010973/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010974
10975 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010976int
10977main ()
10978{
10979FSIORefNum fRef = 0
10980 ;
10981 return 0;
10982}
Matthias Kloseb159a552010-04-25 21:00:44 +000010983
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010985if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010986
Matthias Kloseb159a552010-04-25 21:00:44 +000010987
Matthias Kloseb9621712010-04-24 17:59:49 +000010988$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010989
Matthias Kloseb9621712010-04-24 17:59:49 +000010990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10991$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010992
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010993else
Matthias Kloseb159a552010-04-25 21:00:44 +000010994
Matthias Kloseb9621712010-04-24 17:59:49 +000010995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10996$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010997
10998fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11000
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011001# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11003$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011005# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011006if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011007 withval=$with_doc_strings;
11008fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011009
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011010
11011if test -z "$with_doc_strings"
11012then with_doc_strings="yes"
11013fi
11014if test "$with_doc_strings" != "no"
11015then
11016
Matthias Kloseb9621712010-04-24 17:59:49 +000011017$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011018
11019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11021$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011022
Antoine Pitrou042b1282010-08-13 21:15:58 +000011023# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000011024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
11025$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011026
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011027# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011028if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011029 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011030if test "$withval" != no
11031then
11032
Matthias Kloseb9621712010-04-24 17:59:49 +000011033$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011034
Matthias Kloseb9621712010-04-24 17:59:49 +000011035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11036$as_echo "yes" >&6; }
11037else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11038$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011039fi
11040else
Matthias Kloseb9621712010-04-24 17:59:49 +000011041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11042$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011043fi
11044
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011045
11046# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11048$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011050# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011051if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011052 withval=$with_pymalloc;
11053fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011054
Neil Schemenauera35c6882001-02-27 04:45:05 +000011055
Neil Schemenauer16c22972002-03-22 15:34:49 +000011056if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011057then
11058 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011059fi
11060if test "$with_pymalloc" != "no"
11061then
Martin v. Löwis11437992002-04-12 09:54:03 +000011062
Matthias Kloseb9621712010-04-24 17:59:49 +000011063$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011064
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011065 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011066fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11068$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011069
Benjamin Peterson05159c42009-12-03 03:01:27 +000011070# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11072$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011073
11074# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011075if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011076 withval=$with_valgrind;
11077else
11078 with_valgrind=no
11079fi
11080
Matthias Kloseb9621712010-04-24 17:59:49 +000011081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11082$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011083if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011084 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 +020011085if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011086
Matthias Kloseb9621712010-04-24 17:59:49 +000011087$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011088
11089else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011090 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011091
11092fi
11093
11094
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011095 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011096fi
11097
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011098# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011099
Guido van Rossum98935bf2001-09-05 19:13:16 +000011100DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011101
Guido van Rossume97ee181999-12-20 21:27:22 +000011102# the dlopen() function means we might want to use dynload_shlib.o. some
11103# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011104for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011105do :
11106 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011107if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011108 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011109#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011110_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011111
Guido van Rossume97ee181999-12-20 21:27:22 +000011112fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011113done
Guido van Rossume97ee181999-12-20 21:27:22 +000011114
Michael W. Hudson54241132001-12-07 15:38:26 +000011115
Guido van Rossume97ee181999-12-20 21:27:22 +000011116# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11117# loading of modules.
11118
Matthias Kloseb9621712010-04-24 17:59:49 +000011119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11120$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011121if test -z "$DYNLOADFILE"
11122then
11123 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011124 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11125 if test "$ac_cv_func_dlopen" = yes
11126 then DYNLOADFILE="dynload_shlib.o"
11127 else DYNLOADFILE="dynload_aix.o"
11128 fi
11129 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011130 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011131 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11132 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011133 *)
11134 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11135 # out any dynamic loading
11136 if test "$ac_cv_func_dlopen" = yes
11137 then DYNLOADFILE="dynload_shlib.o"
11138 else DYNLOADFILE="dynload_stub.o"
11139 fi
11140 ;;
11141 esac
11142fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11144$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011145if test "$DYNLOADFILE" != "dynload_stub.o"
11146then
Martin v. Löwis11437992002-04-12 09:54:03 +000011147
Matthias Kloseb9621712010-04-24 17:59:49 +000011148$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011149
11150fi
11151
Neil Schemenauer4e425612001-06-19 15:44:15 +000011152# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11153
Michael W. Hudson54241132001-12-07 15:38:26 +000011154
Matthias Kloseb9621712010-04-24 17:59:49 +000011155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11156$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011157if test -z "$MACHDEP_OBJS"
11158then
Jack Jansene578a632001-08-15 01:27:14 +000011159 MACHDEP_OBJS=$extra_machdep_objs
11160else
11161 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011162fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011163if test -z "$MACHDEP_OBJS"; then
11164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11165$as_echo "none" >&6; }
11166else
11167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11168$as_echo "$MACHDEP_OBJS" >&6; }
11169fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011170
Guido van Rossum627b2d71993-12-24 10:39:16 +000011171# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011172for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011173 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011174 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011175 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011176 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011177 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011178 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011179 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11180 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011181 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011182 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011183 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011184 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011185 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011186 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011187 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11188 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011189 sigaction sigaltstack siginterrupt sigpending sigrelse \
11190 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011191 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011192 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011193 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011194do :
11195 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11196ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011197if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011198 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011199#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011200_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011201
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011202fi
11203done
11204
Michael W. Hudson54241132001-12-07 15:38:26 +000011205
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011206ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11207 #include <dirent.h>
11208"
11209if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11210
11211$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11212
11213fi
11214
11215
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011216# For some functions, having a definition is not sufficient, since
11217# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11219$as_echo_n "checking for chroot... " >&6; }
11220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011221/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011222#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011223int
11224main ()
11225{
11226void *x=chroot
11227 ;
11228 return 0;
11229}
11230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011231if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011232
Matthias Kloseb9621712010-04-24 17:59:49 +000011233$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011234
Matthias Kloseb159a552010-04-25 21:00:44 +000011235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011236$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011237else
Matthias Kloseb9621712010-04-24 17:59:49 +000011238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11239$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011240
11241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11244$as_echo_n "checking for link... " >&6; }
11245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011246/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011247#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011248int
11249main ()
11250{
11251void *x=link
11252 ;
11253 return 0;
11254}
11255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011256if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011257
Matthias Kloseb9621712010-04-24 17:59:49 +000011258$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011259
Matthias Kloseb159a552010-04-25 21:00:44 +000011260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011261$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011262else
Matthias Kloseb9621712010-04-24 17:59:49 +000011263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11264$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011265
11266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11269$as_echo_n "checking for symlink... " >&6; }
11270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011271/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011272#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011273int
11274main ()
11275{
11276void *x=symlink
11277 ;
11278 return 0;
11279}
11280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011281if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011282
Matthias Kloseb9621712010-04-24 17:59:49 +000011283$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011284
Matthias Kloseb159a552010-04-25 21:00:44 +000011285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011286$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011287else
Matthias Kloseb9621712010-04-24 17:59:49 +000011288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11289$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011290
11291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11294$as_echo_n "checking for fchdir... " >&6; }
11295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011296/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011297#include <unistd.h>
11298int
11299main ()
11300{
11301void *x=fchdir
11302 ;
11303 return 0;
11304}
11305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011306if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011307
Matthias Kloseb9621712010-04-24 17:59:49 +000011308$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011309
Matthias Kloseb159a552010-04-25 21:00:44 +000011310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011311$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011312else
Matthias Kloseb9621712010-04-24 17:59:49 +000011313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11314$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011315
11316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11319$as_echo_n "checking for fsync... " >&6; }
11320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011321/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011322#include <unistd.h>
11323int
11324main ()
11325{
11326void *x=fsync
11327 ;
11328 return 0;
11329}
11330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011331if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011332
Matthias Kloseb9621712010-04-24 17:59:49 +000011333$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011334
Matthias Kloseb159a552010-04-25 21:00:44 +000011335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011336$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011337else
Matthias Kloseb9621712010-04-24 17:59:49 +000011338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11339$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011340
11341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11344$as_echo_n "checking for fdatasync... " >&6; }
11345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011346/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011347#include <unistd.h>
11348int
11349main ()
11350{
11351void *x=fdatasync
11352 ;
11353 return 0;
11354}
11355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011356if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011357
Matthias Kloseb9621712010-04-24 17:59:49 +000011358$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011359
Matthias Kloseb159a552010-04-25 21:00:44 +000011360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011361$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011362else
Matthias Kloseb9621712010-04-24 17:59:49 +000011363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11364$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011365
11366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11369$as_echo_n "checking for epoll... " >&6; }
11370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011371/* end confdefs.h. */
11372#include <sys/epoll.h>
11373int
11374main ()
11375{
11376void *x=epoll_create
11377 ;
11378 return 0;
11379}
11380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011381if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011382
Matthias Kloseb9621712010-04-24 17:59:49 +000011383$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011384
Matthias Kloseb159a552010-04-25 21:00:44 +000011385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011386$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011387else
Matthias Kloseb9621712010-04-24 17:59:49 +000011388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11389$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011390
11391fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11394$as_echo_n "checking for epoll_create1... " >&6; }
11395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11396/* end confdefs.h. */
11397#include <sys/epoll.h>
11398int
11399main ()
11400{
11401void *x=epoll_create1
11402 ;
11403 return 0;
11404}
11405_ACEOF
11406if ac_fn_c_try_compile "$LINENO"; then :
11407
11408$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11409
11410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11411$as_echo "yes" >&6; }
11412else
11413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11414$as_echo "no" >&6; }
11415
11416fi
11417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11419$as_echo_n "checking for kqueue... " >&6; }
11420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011421/* end confdefs.h. */
11422
11423#include <sys/types.h>
11424#include <sys/event.h>
11425
11426int
11427main ()
11428{
11429int x=kqueue()
11430 ;
11431 return 0;
11432}
11433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011434if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011435
Matthias Kloseb9621712010-04-24 17:59:49 +000011436$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011437
Matthias Kloseb159a552010-04-25 21:00:44 +000011438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011439$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011440else
Matthias Kloseb9621712010-04-24 17:59:49 +000011441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11442$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011443
11444fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11447$as_echo_n "checking for prlimit... " >&6; }
11448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11449/* end confdefs.h. */
11450
11451#include <sys/time.h>
11452#include <sys/resource.h>
11453
11454int
11455main ()
11456{
11457void *x=prlimit
11458 ;
11459 return 0;
11460}
11461_ACEOF
11462if ac_fn_c_try_compile "$LINENO"; then :
11463
11464$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11465
11466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11467$as_echo "yes" >&6; }
11468else
11469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11470$as_echo "no" >&6; }
11471
11472fi
11473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11474
Martin v. Löwisd5843682002-11-21 20:41:28 +000011475# On some systems (eg. FreeBSD 5), we would find a definition of the
11476# functions ctermid_r, setgroups in the library, but no prototype
11477# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11478# address to avoid compiler warnings and potential miscompilations
11479# because of the missing prototypes.
11480
Matthias Kloseb9621712010-04-24 17:59:49 +000011481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11482$as_echo_n "checking for ctermid_r... " >&6; }
11483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011484/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011485
Martin v. Löwisd5843682002-11-21 20:41:28 +000011486#include <stdio.h>
11487
Martin v. Löwisd5843682002-11-21 20:41:28 +000011488int
11489main ()
11490{
11491void* p = ctermid_r
11492 ;
11493 return 0;
11494}
11495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011496if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011497
Matthias Kloseb9621712010-04-24 17:59:49 +000011498$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011499
Matthias Kloseb159a552010-04-25 21:00:44 +000011500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011501$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011502else
Matthias Kloseb9621712010-04-24 17:59:49 +000011503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11504$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011505
11506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11508
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11510$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011511if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011512 $as_echo_n "(cached) " >&6
11513else
11514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011515/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011516#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011517int
11518main ()
11519{
11520void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011521
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011522 ;
11523 return 0;
11524}
11525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011526if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011527 ac_cv_flock_decl=yes
11528else
11529 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011530
11531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011533
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011534fi
11535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11536$as_echo "$ac_cv_flock_decl" >&6; }
11537if test "x${ac_cv_flock_decl}" = xyes; then
11538 for ac_func in flock
11539do :
11540 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011541if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011542 cat >>confdefs.h <<_ACEOF
11543#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011544_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011545
Antoine Pitroua3000072010-09-07 14:52:42 +000011546else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011548$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011549if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011550 $as_echo_n "(cached) " >&6
11551else
11552 ac_check_lib_save_LIBS=$LIBS
11553LIBS="-lbsd $LIBS"
11554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11555/* end confdefs.h. */
11556
11557/* Override any GCC internal prototype to avoid an error.
11558 Use char because int might match the return type of a GCC
11559 builtin and then its argument prototype would still apply. */
11560#ifdef __cplusplus
11561extern "C"
11562#endif
11563char flock ();
11564int
11565main ()
11566{
11567return flock ();
11568 ;
11569 return 0;
11570}
11571_ACEOF
11572if ac_fn_c_try_link "$LINENO"; then :
11573 ac_cv_lib_bsd_flock=yes
11574else
11575 ac_cv_lib_bsd_flock=no
11576fi
11577rm -f core conftest.err conftest.$ac_objext \
11578 conftest$ac_exeext conftest.$ac_ext
11579LIBS=$ac_check_lib_save_LIBS
11580fi
11581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11582$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011583if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011584 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011585
11586
11587$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11588
11589
11590fi
11591
11592
11593fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011594done
11595
Antoine Pitroua3000072010-09-07 14:52:42 +000011596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011597
Matthias Kloseb9621712010-04-24 17:59:49 +000011598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11599$as_echo_n "checking for getpagesize... " >&6; }
11600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011601/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011602
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011603#include <unistd.h>
11604
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011605int
11606main ()
11607{
11608void* p = getpagesize
11609 ;
11610 return 0;
11611}
11612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011613if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011614
Matthias Kloseb9621712010-04-24 17:59:49 +000011615$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011616
Matthias Kloseb159a552010-04-25 21:00:44 +000011617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011618$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011619else
Matthias Kloseb9621712010-04-24 17:59:49 +000011620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11621$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011622
11623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011625
Victor Stinner984890f2011-11-24 13:53:38 +010011626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11627$as_echo_n "checking for broken unsetenv... " >&6; }
11628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11629/* end confdefs.h. */
11630
11631#include <stdlib.h>
11632
11633int
11634main ()
11635{
11636int res = unsetenv("DUMMY")
11637 ;
11638 return 0;
11639}
11640_ACEOF
11641if ac_fn_c_try_compile "$LINENO"; then :
11642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11643$as_echo "no" >&6; }
11644else
11645
11646$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11647
11648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11649$as_echo "yes" >&6; }
11650
11651fi
11652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11653
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011654for ac_prog in true
11655do
11656 # Extract the first word of "$ac_prog", so it can be a program name with args.
11657set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11659$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011660if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011661 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011662else
11663 if test -n "$TRUE"; then
11664 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11665else
11666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11667for as_dir in $PATH
11668do
11669 IFS=$as_save_IFS
11670 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011671 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011673 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011674 $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 +000011675 break 2
11676 fi
11677done
Matthias Kloseb9621712010-04-24 17:59:49 +000011678 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011679IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011680
11681fi
11682fi
11683TRUE=$ac_cv_prog_TRUE
11684if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11686$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011687else
Matthias Kloseb9621712010-04-24 17:59:49 +000011688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11689$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011690fi
11691
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011692
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011693 test -n "$TRUE" && break
11694done
11695test -n "$TRUE" || TRUE="/bin/true"
11696
11697
Matthias Kloseb9621712010-04-24 17:59:49 +000011698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11699$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011700if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011701 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011702else
11703 ac_check_lib_save_LIBS=$LIBS
11704LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011706/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011708/* Override any GCC internal prototype to avoid an error.
11709 Use char because int might match the return type of a GCC
11710 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011711#ifdef __cplusplus
11712extern "C"
11713#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011714char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011715int
11716main ()
11717{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011718return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011719 ;
11720 return 0;
11721}
11722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011723if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011724 ac_cv_lib_c_inet_aton=yes
11725else
Matthias Kloseb9621712010-04-24 17:59:49 +000011726 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011727fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011728rm -f core conftest.err conftest.$ac_objext \
11729 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011730LIBS=$ac_check_lib_save_LIBS
11731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11733$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011734if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011735 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011736else
Matthias Kloseb9621712010-04-24 17:59:49 +000011737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11738$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011739if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011740 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011741else
11742 ac_check_lib_save_LIBS=$LIBS
11743LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011745/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011746
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011747/* Override any GCC internal prototype to avoid an error.
11748 Use char because int might match the return type of a GCC
11749 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011750#ifdef __cplusplus
11751extern "C"
11752#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011753char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011754int
11755main ()
11756{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011757return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011758 ;
11759 return 0;
11760}
11761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011762if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011763 ac_cv_lib_resolv_inet_aton=yes
11764else
Matthias Kloseb9621712010-04-24 17:59:49 +000011765 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011766fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011767rm -f core conftest.err conftest.$ac_objext \
11768 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011769LIBS=$ac_check_lib_save_LIBS
11770fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11772$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011773if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011774 cat >>confdefs.h <<_ACEOF
11775#define HAVE_LIBRESOLV 1
11776_ACEOF
11777
11778 LIBS="-lresolv $LIBS"
11779
11780fi
11781
11782
11783fi
11784
11785
Christian Heimesd0764e22007-12-04 15:00:33 +000011786# On Tru64, chflags seems to be present, but calling it will
11787# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11789$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011790if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011791 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011792else
Matthias Kloseb9621712010-04-24 17:59:49 +000011793 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011794 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011795else
Matthias Kloseb9621712010-04-24 17:59:49 +000011796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011797/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011798
Christian Heimesd0764e22007-12-04 15:00:33 +000011799#include <sys/stat.h>
11800#include <unistd.h>
11801int main(int argc, char*argv[])
11802{
11803 if(chflags(argv[0], 0) != 0)
11804 return 1;
11805 return 0;
11806}
Ned Deily3eb67d52011-06-28 00:00:28 -070011807
Christian Heimesd0764e22007-12-04 15:00:33 +000011808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011809if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011810 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011811else
Matthias Kloseb9621712010-04-24 17:59:49 +000011812 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011813fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11815 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011816fi
11817
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011818
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11821$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011822if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011823 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011824if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011825 ac_cv_have_chflags="yes"
11826else
11827 ac_cv_have_chflags="no"
11828fi
11829
11830fi
11831if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011832
Matthias Kloseb9621712010-04-24 17:59:49 +000011833$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011834
11835fi
11836
Matthias Kloseb9621712010-04-24 17:59:49 +000011837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11838$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011839if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011840 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011841else
Matthias Kloseb9621712010-04-24 17:59:49 +000011842 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011843 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011844else
Matthias Kloseb9621712010-04-24 17:59:49 +000011845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011846/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011847
Christian Heimesd0764e22007-12-04 15:00:33 +000011848#include <sys/stat.h>
11849#include <unistd.h>
11850int main(int argc, char*argv[])
11851{
11852 if(lchflags(argv[0], 0) != 0)
11853 return 1;
11854 return 0;
11855}
Ned Deily3eb67d52011-06-28 00:00:28 -070011856
Christian Heimesd0764e22007-12-04 15:00:33 +000011857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011858if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011859 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011860else
Matthias Kloseb9621712010-04-24 17:59:49 +000011861 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011862fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011863rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11864 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011865fi
11866
11867
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011868fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11870$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011871if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011872 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011873if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011874 ac_cv_have_lchflags="yes"
11875else
11876 ac_cv_have_lchflags="no"
11877fi
11878
11879fi
11880if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011881
Matthias Kloseb9621712010-04-24 17:59:49 +000011882$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011883
11884fi
11885
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011886case $ac_sys_system/$ac_sys_release in
11887Darwin/*)
11888 _CUR_CFLAGS="${CFLAGS}"
11889 _CUR_LDFLAGS="${LDFLAGS}"
11890 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11891 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11892 ;;
11893esac
11894
Matthias Kloseb9621712010-04-24 17:59:49 +000011895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11896$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011897if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011898 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011899else
11900 ac_check_lib_save_LIBS=$LIBS
11901LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011903/* end confdefs.h. */
11904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011905/* Override any GCC internal prototype to avoid an error.
11906 Use char because int might match the return type of a GCC
11907 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011908#ifdef __cplusplus
11909extern "C"
11910#endif
11911char inflateCopy ();
11912int
11913main ()
11914{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011915return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011916 ;
11917 return 0;
11918}
11919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011920if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011921 ac_cv_lib_z_inflateCopy=yes
11922else
Matthias Kloseb9621712010-04-24 17:59:49 +000011923 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011925rm -f core conftest.err conftest.$ac_objext \
11926 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011927LIBS=$ac_check_lib_save_LIBS
11928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11930$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011931if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011932
Matthias Kloseb9621712010-04-24 17:59:49 +000011933$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011934
11935fi
11936
11937
11938case $ac_sys_system/$ac_sys_release in
11939Darwin/*)
11940 CFLAGS="${_CUR_CFLAGS}"
11941 LDFLAGS="${_CUR_LDFLAGS}"
11942 ;;
11943esac
11944
Matthias Kloseb9621712010-04-24 17:59:49 +000011945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11946$as_echo_n "checking for hstrerror... " >&6; }
11947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011948/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011949
Martin v. Löwise9416172003-05-03 10:12:45 +000011950#include <netdb.h>
11951
Martin v. Löwise9416172003-05-03 10:12:45 +000011952int
11953main ()
11954{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011955void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011956 ;
11957 return 0;
11958}
11959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011960if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011961
Matthias Kloseb9621712010-04-24 17:59:49 +000011962$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011963
Matthias Kloseb159a552010-04-25 21:00:44 +000011964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011965$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011966else
Matthias Kloseb9621712010-04-24 17:59:49 +000011967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11968$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011969
11970fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011971rm -f core conftest.err conftest.$ac_objext \
11972 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011973
Matthias Kloseb9621712010-04-24 17:59:49 +000011974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11975$as_echo_n "checking for inet_aton... " >&6; }
11976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011977/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011978
Martin v. Löwis86d66262006-02-17 08:40:11 +000011979#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011980#include <sys/socket.h>
11981#include <netinet/in.h>
11982#include <arpa/inet.h>
11983
Martin v. Löwise9416172003-05-03 10:12:45 +000011984int
11985main ()
11986{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011987void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011988 ;
11989 return 0;
11990}
11991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011992if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011993
Matthias Kloseb9621712010-04-24 17:59:49 +000011994$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011995
Matthias Kloseb159a552010-04-25 21:00:44 +000011996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011997$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011998else
Matthias Kloseb9621712010-04-24 17:59:49 +000011999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12000$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012001
12002fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012003rm -f core conftest.err conftest.$ac_objext \
12004 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012005
Matthias Kloseb9621712010-04-24 17:59:49 +000012006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12007$as_echo_n "checking for inet_pton... " >&6; }
12008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012009/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012010
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012011#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012012#include <sys/socket.h>
12013#include <netinet/in.h>
12014#include <arpa/inet.h>
12015
Martin v. Löwise9416172003-05-03 10:12:45 +000012016int
12017main ()
12018{
12019void* p = inet_pton
12020 ;
12021 return 0;
12022}
12023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012024if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012025
Matthias Kloseb9621712010-04-24 17:59:49 +000012026$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012027
Matthias Kloseb159a552010-04-25 21:00:44 +000012028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012029$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012030else
Matthias Kloseb9621712010-04-24 17:59:49 +000012031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12032$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012033
12034fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012036
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012037# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12039$as_echo_n "checking for setgroups... " >&6; }
12040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012041/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012042
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012043#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012044#ifdef HAVE_GRP_H
12045#include <grp.h>
12046#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012047
Martin v. Löwisd5843682002-11-21 20:41:28 +000012048int
12049main ()
12050{
12051void* p = setgroups
12052 ;
12053 return 0;
12054}
12055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012056if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012057
Matthias Kloseb9621712010-04-24 17:59:49 +000012058$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012059
Matthias Kloseb159a552010-04-25 21:00:44 +000012060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012061$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012062else
Matthias Kloseb9621712010-04-24 17:59:49 +000012063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12064$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012065
12066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012068
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012069# check for openpty and forkpty
12070
12071for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012072do :
12073 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012074if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012075 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012076#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012077_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012078
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012079else
Matthias Kloseb9621712010-04-24 17:59:49 +000012080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12081$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012082if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012083 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012084else
Martin v. Löwis11437992002-04-12 09:54:03 +000012085 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012086LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012089
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012090/* Override any GCC internal prototype to avoid an error.
12091 Use char because int might match the return type of a GCC
12092 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012093#ifdef __cplusplus
12094extern "C"
12095#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012096char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012097int
12098main ()
12099{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012100return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012101 ;
12102 return 0;
12103}
12104_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012105if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012106 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012107else
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012109fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012110rm -f core conftest.err conftest.$ac_objext \
12111 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012112LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012113fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12115$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012116if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012117 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012118 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012119else
Matthias Kloseb9621712010-04-24 17:59:49 +000012120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12121$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012122if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012123 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012124else
12125 ac_check_lib_save_LIBS=$LIBS
12126LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012128/* end confdefs.h. */
12129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012130/* Override any GCC internal prototype to avoid an error.
12131 Use char because int might match the return type of a GCC
12132 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012133#ifdef __cplusplus
12134extern "C"
12135#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012136char openpty ();
12137int
12138main ()
12139{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012140return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012141 ;
12142 return 0;
12143}
12144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012145if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012146 ac_cv_lib_bsd_openpty=yes
12147else
Matthias Kloseb9621712010-04-24 17:59:49 +000012148 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012150rm -f core conftest.err conftest.$ac_objext \
12151 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012152LIBS=$ac_check_lib_save_LIBS
12153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12155$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012156if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012157 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012158 LIBS="$LIBS -lbsd"
12159fi
12160
12161
12162fi
12163
Fred Drake8cef4cf2000-06-28 16:40:38 +000012164
12165fi
12166done
12167
12168for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012169do :
12170 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012171if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012172 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012173#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012174_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012175
Fred Drake8cef4cf2000-06-28 16:40:38 +000012176else
Matthias Kloseb9621712010-04-24 17:59:49 +000012177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12178$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012179if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012180 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012181else
Martin v. Löwis11437992002-04-12 09:54:03 +000012182 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012183LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012187/* Override any GCC internal prototype to avoid an error.
12188 Use char because int might match the return type of a GCC
12189 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012190#ifdef __cplusplus
12191extern "C"
12192#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012193char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012194int
12195main ()
12196{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012197return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012198 ;
12199 return 0;
12200}
12201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012202if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012203 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012204else
Matthias Kloseb9621712010-04-24 17:59:49 +000012205 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012206fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012207rm -f core conftest.err conftest.$ac_objext \
12208 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012209LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12212$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012213if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012214 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012215 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012216else
Matthias Kloseb9621712010-04-24 17:59:49 +000012217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12218$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012219if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012220 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012221else
12222 ac_check_lib_save_LIBS=$LIBS
12223LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012225/* end confdefs.h. */
12226
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012227/* Override any GCC internal prototype to avoid an error.
12228 Use char because int might match the return type of a GCC
12229 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012230#ifdef __cplusplus
12231extern "C"
12232#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012233char forkpty ();
12234int
12235main ()
12236{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012237return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012238 ;
12239 return 0;
12240}
12241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012242if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012243 ac_cv_lib_bsd_forkpty=yes
12244else
Matthias Kloseb9621712010-04-24 17:59:49 +000012245 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012247rm -f core conftest.err conftest.$ac_objext \
12248 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012249LIBS=$ac_check_lib_save_LIBS
12250fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12252$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012253if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012254 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012255 LIBS="$LIBS -lbsd"
12256fi
12257
12258
12259fi
12260
Fred Drake8cef4cf2000-06-28 16:40:38 +000012261
12262fi
12263done
12264
Jack Jansendd19cf82001-12-06 22:36:17 +000012265
Christian Heimesb186d002008-03-18 15:15:01 +000012266# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012267for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012268do :
12269 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012270if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012271 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012272#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012273_ACEOF
12274
12275fi
12276done
12277
12278
Michael W. Hudson54241132001-12-07 15:38:26 +000012279# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012280for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012281do :
12282 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12283ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012284if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012285 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012286#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012287_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012288
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012289fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012290done
12291
Michael W. Hudson54241132001-12-07 15:38:26 +000012292
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012293ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012294if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012295 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012296
Martin v. Löwis1142de32002-03-29 16:28:31 +000012297else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012298 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012299 *" dup2.$ac_objext "* ) ;;
12300 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012301 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012302esac
12303
Martin v. Löwis1142de32002-03-29 16:28:31 +000012304fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012305
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012306ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012307if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012308 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12309
12310else
12311 case " $LIBOBJS " in
12312 *" strdup.$ac_objext "* ) ;;
12313 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12314 ;;
12315esac
12316
12317fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012318
12319
12320for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012321do :
12322 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012323if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012324 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012325#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012328/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012329#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012330int
12331main ()
12332{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012333getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012334 ;
12335 return 0;
12336}
12337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012338if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012339
Matthias Kloseb9621712010-04-24 17:59:49 +000012340$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012341
Guido van Rossum627b2d71993-12-24 10:39:16 +000012342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012344
Guido van Rossum627b2d71993-12-24 10:39:16 +000012345fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012346done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012347
Jack Jansen150753c2003-03-29 22:07:47 +000012348for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012349do :
12350 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012351if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012352 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012353#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012356/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012357#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012358int
12359main ()
12360{
12361setpgrp(0,0);
12362 ;
12363 return 0;
12364}
12365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012366if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012367
Matthias Kloseb9621712010-04-24 17:59:49 +000012368$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012369
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012372
12373fi
12374done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012375
Thomas Wouters3a584202000-08-05 23:28:51 +000012376for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012377do :
12378 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012379if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012380 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012381#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012384/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012385#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012386int
12387main ()
12388{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012389gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012390 ;
12391 return 0;
12392}
12393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012394if ac_fn_c_try_compile "$LINENO"; then :
12395
Guido van Rossum627b2d71993-12-24 10:39:16 +000012396else
Skip Montanaro6dead952003-09-25 14:50:04 +000012397
Matthias Kloseb9621712010-04-24 17:59:49 +000012398$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012399
Martin v. Löwis11437992002-04-12 09:54:03 +000012400
Guido van Rossum627b2d71993-12-24 10:39:16 +000012401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012403
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012404fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012405done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012406
Michael W. Hudson54241132001-12-07 15:38:26 +000012407
Victor Stinnere0be4232011-10-25 13:06:09 +020012408for ac_func in clock_gettime
12409do :
12410 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12411if test "x$ac_cv_func_clock_gettime" = xyes; then :
12412 cat >>confdefs.h <<_ACEOF
12413#define HAVE_CLOCK_GETTIME 1
12414_ACEOF
12415
12416else
12417
12418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12419$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12420if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12421 $as_echo_n "(cached) " >&6
12422else
12423 ac_check_lib_save_LIBS=$LIBS
12424LIBS="-lrt $LIBS"
12425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12426/* end confdefs.h. */
12427
12428/* Override any GCC internal prototype to avoid an error.
12429 Use char because int might match the return type of a GCC
12430 builtin and then its argument prototype would still apply. */
12431#ifdef __cplusplus
12432extern "C"
12433#endif
12434char clock_gettime ();
12435int
12436main ()
12437{
12438return clock_gettime ();
12439 ;
12440 return 0;
12441}
12442_ACEOF
12443if ac_fn_c_try_link "$LINENO"; then :
12444 ac_cv_lib_rt_clock_gettime=yes
12445else
12446 ac_cv_lib_rt_clock_gettime=no
12447fi
12448rm -f core conftest.err conftest.$ac_objext \
12449 conftest$ac_exeext conftest.$ac_ext
12450LIBS=$ac_check_lib_save_LIBS
12451fi
12452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12453$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12454if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12455
Victor Stinner7efb8332014-08-29 15:41:08 +020012456 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012457 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12458
12459
12460$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12461
12462
12463fi
12464
12465
12466fi
12467done
12468
12469
12470for ac_func in clock_getres
12471do :
12472 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12473if test "x$ac_cv_func_clock_getres" = xyes; then :
12474 cat >>confdefs.h <<_ACEOF
12475#define HAVE_CLOCK_GETRES 1
12476_ACEOF
12477
12478else
12479
12480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12481$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12482if ${ac_cv_lib_rt_clock_getres+:} false; then :
12483 $as_echo_n "(cached) " >&6
12484else
12485 ac_check_lib_save_LIBS=$LIBS
12486LIBS="-lrt $LIBS"
12487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12488/* end confdefs.h. */
12489
12490/* Override any GCC internal prototype to avoid an error.
12491 Use char because int might match the return type of a GCC
12492 builtin and then its argument prototype would still apply. */
12493#ifdef __cplusplus
12494extern "C"
12495#endif
12496char clock_getres ();
12497int
12498main ()
12499{
12500return clock_getres ();
12501 ;
12502 return 0;
12503}
12504_ACEOF
12505if ac_fn_c_try_link "$LINENO"; then :
12506 ac_cv_lib_rt_clock_getres=yes
12507else
12508 ac_cv_lib_rt_clock_getres=no
12509fi
12510rm -f core conftest.err conftest.$ac_objext \
12511 conftest$ac_exeext conftest.$ac_ext
12512LIBS=$ac_check_lib_save_LIBS
12513fi
12514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12515$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12516if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12517
12518 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12519
12520
12521fi
12522
12523
12524fi
12525done
12526
12527
Matthias Kloseb9621712010-04-24 17:59:49 +000012528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12529$as_echo_n "checking for major... " >&6; }
12530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012531/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012532
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012533#if defined(MAJOR_IN_MKDEV)
12534#include <sys/mkdev.h>
12535#elif defined(MAJOR_IN_SYSMACROS)
12536#include <sys/sysmacros.h>
12537#else
12538#include <sys/types.h>
12539#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012540
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012541int
12542main ()
12543{
12544
12545 makedev(major(0),minor(0));
12546
12547 ;
12548 return 0;
12549}
12550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012551if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012552
12553
Matthias Kloseb9621712010-04-24 17:59:49 +000012554$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012555
Matthias Kloseb9621712010-04-24 17:59:49 +000012556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12557$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012558
12559else
Skip Montanaro6dead952003-09-25 14:50:04 +000012560
Matthias Kloseb9621712010-04-24 17:59:49 +000012561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12562$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012563
12564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012565rm -f core conftest.err conftest.$ac_objext \
12566 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012567
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012568# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012569# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12571$as_echo_n "checking for getaddrinfo... " >&6; }
12572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012573/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012574
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012575#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012576#include <sys/socket.h>
12577#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012578#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012579
Martin v. Löwis11437992002-04-12 09:54:03 +000012580int
12581main ()
12582{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012583getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012584 ;
12585 return 0;
12586}
12587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012588if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012589 have_getaddrinfo=yes
12590else
Matthias Kloseb9621712010-04-24 17:59:49 +000012591 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012593rm -f core conftest.err conftest.$ac_objext \
12594 conftest$ac_exeext conftest.$ac_ext
12595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12596$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012597if test $have_getaddrinfo = yes
12598then
Matthias Kloseb9621712010-04-24 17:59:49 +000012599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12600$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012601 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012602 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012603else
Matthias Kloseb9621712010-04-24 17:59:49 +000012604 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012605
12606if test "${enable_ipv6+set}" = set; then
12607 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12608else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012609 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012610fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012611else
Matthias Kloseb9621712010-04-24 17:59:49 +000012612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012613/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012614
Stefan Krah19c21392012-11-22 23:47:32 +010012615#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012616#include <sys/types.h>
12617#include <netdb.h>
12618#include <string.h>
12619#include <sys/socket.h>
12620#include <netinet/in.h>
12621
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012622int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012623{
12624 int passive, gaierr, inet4 = 0, inet6 = 0;
12625 struct addrinfo hints, *ai, *aitop;
12626 char straddr[INET6_ADDRSTRLEN], strport[16];
12627
12628 for (passive = 0; passive <= 1; passive++) {
12629 memset(&hints, 0, sizeof(hints));
12630 hints.ai_family = AF_UNSPEC;
12631 hints.ai_flags = passive ? AI_PASSIVE : 0;
12632 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012633 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012634 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12635 (void)gai_strerror(gaierr);
12636 goto bad;
12637 }
12638 for (ai = aitop; ai; ai = ai->ai_next) {
12639 if (ai->ai_addr == NULL ||
12640 ai->ai_addrlen == 0 ||
12641 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12642 straddr, sizeof(straddr), strport, sizeof(strport),
12643 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12644 goto bad;
12645 }
12646 switch (ai->ai_family) {
12647 case AF_INET:
12648 if (strcmp(strport, "54321") != 0) {
12649 goto bad;
12650 }
12651 if (passive) {
12652 if (strcmp(straddr, "0.0.0.0") != 0) {
12653 goto bad;
12654 }
12655 } else {
12656 if (strcmp(straddr, "127.0.0.1") != 0) {
12657 goto bad;
12658 }
12659 }
12660 inet4++;
12661 break;
12662 case AF_INET6:
12663 if (strcmp(strport, "54321") != 0) {
12664 goto bad;
12665 }
12666 if (passive) {
12667 if (strcmp(straddr, "::") != 0) {
12668 goto bad;
12669 }
12670 } else {
12671 if (strcmp(straddr, "::1") != 0) {
12672 goto bad;
12673 }
12674 }
12675 inet6++;
12676 break;
12677 case AF_UNSPEC:
12678 goto bad;
12679 break;
12680 default:
12681 /* another family support? */
12682 break;
12683 }
12684 }
12685 }
12686
12687 if (!(inet4 == 0 || inet4 == 2))
12688 goto bad;
12689 if (!(inet6 == 0 || inet6 == 2))
12690 goto bad;
12691
12692 if (aitop)
12693 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012694 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012695
12696 bad:
12697 if (aitop)
12698 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012699 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012700}
12701
Martin v. Löwis11437992002-04-12 09:54:03 +000012702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012703if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012704 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012705else
Matthias Kloseb9621712010-04-24 17:59:49 +000012706 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012707fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012708rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12709 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012711
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012712fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012713
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012715
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12717$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12718
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012719if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012720then
12721 if test $ipv6 = yes
12722 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012723 echo 'Fatal: You must get working getaddrinfo() function.'
12724 echo ' or you can specify "--disable-ipv6"'.
12725 exit 1
12726 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012727else
Martin v. Löwis11437992002-04-12 09:54:03 +000012728
Matthias Kloseb9621712010-04-24 17:59:49 +000012729$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012730
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012731fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012732
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012733for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012734do :
12735 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012736if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012737 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012738#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012739_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012740
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012741fi
12742done
12743
Michael W. Hudson54241132001-12-07 15:38:26 +000012744
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012745# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12747$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012748if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012749 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012750else
Matthias Kloseb9621712010-04-24 17:59:49 +000012751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012752/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012753#include <sys/types.h>
12754#include <sys/time.h>
12755#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012756
Martin v. Löwis11437992002-04-12 09:54:03 +000012757int
12758main ()
12759{
12760if ((struct tm *) 0)
12761return 0;
12762 ;
12763 return 0;
12764}
12765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012766if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012767 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012768else
Matthias Kloseb9621712010-04-24 17:59:49 +000012769 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012772fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12774$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012775if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012776
Matthias Kloseb9621712010-04-24 17:59:49 +000012777$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012778
12779fi
12780
Matthias Kloseb9621712010-04-24 17:59:49 +000012781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12782$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012783if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012784 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +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. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012788#include <sys/types.h>
12789#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012790
Martin v. Löwis11437992002-04-12 09:54:03 +000012791int
12792main ()
12793{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012794struct tm tm;
12795 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012796 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012797 ;
12798 return 0;
12799}
12800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012801if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012802 ac_cv_struct_tm=time.h
12803else
Matthias Kloseb9621712010-04-24 17:59:49 +000012804 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012807fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12809$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012810if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012811
Matthias Kloseb9621712010-04-24 17:59:49 +000012812$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012813
12814fi
12815
Matthias Kloseb9621712010-04-24 17:59:49 +000012816ac_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 +000012817#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012818
Matthias Kloseb9621712010-04-24 17:59:49 +000012819"
Victor Stinnere0be4232011-10-25 13:06:09 +020012820if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012821
12822cat >>confdefs.h <<_ACEOF
12823#define HAVE_STRUCT_TM_TM_ZONE 1
12824_ACEOF
12825
12826
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012827fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012828
Martin v. Löwis11437992002-04-12 09:54:03 +000012829if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12830
Matthias Kloseb9621712010-04-24 17:59:49 +000012831$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012832
12833else
Matthias Kloseb9621712010-04-24 17:59:49 +000012834 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12835"
Victor Stinnere0be4232011-10-25 13:06:09 +020012836if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012837 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012838else
Matthias Kloseb9621712010-04-24 17:59:49 +000012839 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012840fi
12841
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012842cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012843#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012844_ACEOF
12845
Matthias Kloseb9621712010-04-24 17:59:49 +000012846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12847$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012848if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012849 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012850else
Matthias Kloseb9621712010-04-24 17:59:49 +000012851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012852/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012853#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012854#if !HAVE_DECL_TZNAME
12855extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012856#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012857
Martin v. Löwis11437992002-04-12 09:54:03 +000012858int
12859main ()
12860{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012861return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012862 ;
12863 return 0;
12864}
12865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012866if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012867 ac_cv_var_tzname=yes
12868else
Matthias Kloseb9621712010-04-24 17:59:49 +000012869 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012870fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012871rm -f core conftest.err conftest.$ac_objext \
12872 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012873fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12875$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012876 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012877
Matthias Kloseb9621712010-04-24 17:59:49 +000012878$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012879
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012880 fi
12881fi
12882
Matthias Kloseb9621712010-04-24 17:59:49 +000012883ac_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 +020012884if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012885
12886cat >>confdefs.h <<_ACEOF
12887#define HAVE_STRUCT_STAT_ST_RDEV 1
12888_ACEOF
12889
12890
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012891fi
12892
Matthias Kloseb9621712010-04-24 17:59:49 +000012893ac_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 +020012894if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012895
Martin v. Löwis11437992002-04-12 09:54:03 +000012896cat >>confdefs.h <<_ACEOF
12897#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12898_ACEOF
12899
12900
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012901fi
12902
Matthias Kloseb9621712010-04-24 17:59:49 +000012903ac_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 +020012904if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012905
12906cat >>confdefs.h <<_ACEOF
12907#define HAVE_STRUCT_STAT_ST_FLAGS 1
12908_ACEOF
12909
12910
12911fi
12912
Matthias Kloseb9621712010-04-24 17:59:49 +000012913ac_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 +020012914if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012915
12916cat >>confdefs.h <<_ACEOF
12917#define HAVE_STRUCT_STAT_ST_GEN 1
12918_ACEOF
12919
12920
12921fi
12922
Matthias Kloseb9621712010-04-24 17:59:49 +000012923ac_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 +020012924if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012925
12926cat >>confdefs.h <<_ACEOF
12927#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12928_ACEOF
12929
12930
12931fi
12932
Matthias Kloseb9621712010-04-24 17:59:49 +000012933ac_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 +020012934if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012935
Martin v. Löwis11437992002-04-12 09:54:03 +000012936cat >>confdefs.h <<_ACEOF
12937#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12938_ACEOF
12939
12940
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012941fi
12942
Stefan Krah267b6392016-04-26 01:09:18 +020012943ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12944 #include <sys/types.h>
12945 #include <pwd.h>
12946
12947"
12948if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12949
12950cat >>confdefs.h <<_ACEOF
12951#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12952_ACEOF
12953
12954
12955fi
12956ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12957 #include <sys/types.h>
12958 #include <pwd.h>
12959
12960"
12961if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12962
12963cat >>confdefs.h <<_ACEOF
12964#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12965_ACEOF
12966
12967
12968fi
12969
Michael W. Hudson54241132001-12-07 15:38:26 +000012970
Matthias Kloseb9621712010-04-24 17:59:49 +000012971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12972$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012973if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012974 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012975else
Matthias Kloseb159a552010-04-25 21:00:44 +000012976
Matthias Kloseb9621712010-04-24 17:59:49 +000012977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012978/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012979#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012980int
12981main ()
12982{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012983return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012984 ;
12985 return 0;
12986}
12987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012988if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012989 ac_cv_header_time_altzone=yes
12990else
Matthias Kloseb9621712010-04-24 17:59:49 +000012991 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012992fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012995fi
12996
Matthias Kloseb9621712010-04-24 17:59:49 +000012997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12998$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012999if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013000
Matthias Kloseb9621712010-04-24 17:59:49 +000013001$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013002
13003fi
13004
Guido van Rossumda88dad1995-01-26 00:46:29 +000013005was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13007$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013009/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013010
13011#include <sys/types.h>
13012#include <sys/select.h>
13013#include <sys/time.h>
13014
Martin v. Löwis11437992002-04-12 09:54:03 +000013015int
13016main ()
13017{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013018;
Martin v. Löwis11437992002-04-12 09:54:03 +000013019 ;
13020 return 0;
13021}
13022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013023if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013024
13025
Matthias Kloseb9621712010-04-24 17:59:49 +000013026$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013027
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013028 was_it_defined=yes
13029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13033$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013034
Matthias Kloseb9621712010-04-24 17:59:49 +000013035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13036$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013037if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013038 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013039else
Matthias Kloseb9621712010-04-24 17:59:49 +000013040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013041/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013042#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013043int
13044main ()
13045{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013046struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013047 ;
13048 return 0;
13049}
13050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013051if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013052 ac_cv_struct_addrinfo=yes
13053else
Matthias Kloseb9621712010-04-24 17:59:49 +000013054 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013055fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13057fi
13058
Matthias Kloseb9621712010-04-24 17:59:49 +000013059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13060$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013061if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013062
Matthias Kloseb9621712010-04-24 17:59:49 +000013063$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013064
13065fi
13066
Matthias Kloseb9621712010-04-24 17:59:49 +000013067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13068$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013069if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013070 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013071else
Matthias Kloseb9621712010-04-24 17:59:49 +000013072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013073/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013074
13075# include <sys/types.h>
13076# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013077int
13078main ()
13079{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013080struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013081 ;
13082 return 0;
13083}
13084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013085if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013086 ac_cv_struct_sockaddr_storage=yes
13087else
Matthias Kloseb9621712010-04-24 17:59:49 +000013088 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013089fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13091fi
13092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13094$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013095if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013096
Matthias Kloseb9621712010-04-24 17:59:49 +000013097$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013098
13099fi
13100
Guido van Rossum627b2d71993-12-24 10:39:16 +000013101# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013102
Matthias Kloseb9621712010-04-24 17:59:49 +000013103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13104$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013105if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013106 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013107else
Matthias Kloseb9621712010-04-24 17:59:49 +000013108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013109/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013110$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013111int
13112main ()
13113{
13114static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013115test_array [0] = 0;
13116return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013117
13118 ;
13119 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013120}
Martin v. Löwis11437992002-04-12 09:54:03 +000013121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013122if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013123 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013124else
Matthias Kloseb9621712010-04-24 17:59:49 +000013125 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013126fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013128fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13130$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013131if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013132 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013133
13134fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013135
Matthias Kloseb9621712010-04-24 17:59:49 +000013136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13137$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013138if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013139 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013140else
Matthias Kloseb9621712010-04-24 17:59:49 +000013141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013142/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013143
Martin v. Löwis11437992002-04-12 09:54:03 +000013144int
13145main ()
13146{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013147
Martin v. Löwis11437992002-04-12 09:54:03 +000013148#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013149 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013150 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013151 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013152 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013153 char const *const *pcpcc;
13154 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013155 /* NEC SVR4.0.2 mips cc rejects this. */
13156 struct point {int x, y;};
13157 static struct point const zero = {0,0};
13158 /* AIX XL C 1.02.0.0 rejects this.
13159 It does not let you subtract one const X* pointer from another in
13160 an arm of an if-expression whose if-part is not a constant
13161 expression */
13162 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013163 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013164 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013165 ++pcpcc;
13166 ppc = (char**) pcpcc;
13167 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013168 { /* SCO 3.2v4 cc rejects this sort of thing. */
13169 char tx;
13170 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013171 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013172
Martin v. Löwis11437992002-04-12 09:54:03 +000013173 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013174 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013175 }
13176 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13177 int x[] = {25, 17};
13178 const int *foo = &x[0];
13179 ++foo;
13180 }
13181 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13182 typedef const int *iptr;
13183 iptr p = 0;
13184 ++p;
13185 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013186 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013187 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013188 struct s { int j; const int *ap[3]; } bx;
13189 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013190 }
13191 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13192 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013193 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013194 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013195 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013196#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013197
Martin v. Löwis11437992002-04-12 09:54:03 +000013198 ;
13199 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013200}
Martin v. Löwis11437992002-04-12 09:54:03 +000013201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013202if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013203 ac_cv_c_const=yes
13204else
Matthias Kloseb9621712010-04-24 17:59:49 +000013205 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13210$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013211if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013212
Matthias Kloseb9621712010-04-24 17:59:49 +000013213$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013214
13215fi
13216
Michael W. Hudson54241132001-12-07 15:38:26 +000013217
Guido van Rossumda88dad1995-01-26 00:46:29 +000013218works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13220$as_echo_n "checking for working volatile... " >&6; }
13221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013222/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013223
Martin v. Löwis11437992002-04-12 09:54:03 +000013224int
13225main ()
13226{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013227volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013228 ;
13229 return 0;
13230}
13231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013232if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013233 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013234else
Skip Montanaro6dead952003-09-25 14:50:04 +000013235
Matthias Kloseb9621712010-04-24 17:59:49 +000013236$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013237
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013238
Guido van Rossum627b2d71993-12-24 10:39:16 +000013239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13242$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013243
Guido van Rossumda88dad1995-01-26 00:46:29 +000013244works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13246$as_echo_n "checking for working signed char... " >&6; }
13247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013248/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013249
Martin v. Löwis11437992002-04-12 09:54:03 +000013250int
13251main ()
13252{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013253signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013254 ;
13255 return 0;
13256}
13257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013258if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013259 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013260else
Skip Montanaro6dead952003-09-25 14:50:04 +000013261
Matthias Kloseb9621712010-04-24 17:59:49 +000013262$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013263
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013264
Guido van Rossum7f43da71994-08-01 12:15:30 +000013265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13268$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013269
Guido van Rossumda88dad1995-01-26 00:46:29 +000013270have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13272$as_echo_n "checking for prototypes... " >&6; }
13273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013274/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013275int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013276int
13277main ()
13278{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013279return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013280 ;
13281 return 0;
13282}
13283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013284if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013285
Matthias Kloseb9621712010-04-24 17:59:49 +000013286$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013287
Matthias Kloseb159a552010-04-25 21:00:44 +000013288 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13292$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013293
Guido van Rossumda88dad1995-01-26 00:46:29 +000013294works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13296$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013298/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013299
13300#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013301int foo(int x, ...) {
13302 va_list va;
13303 va_start(va, x);
13304 va_arg(va, int);
13305 va_arg(va, char *);
13306 va_arg(va, double);
13307 return 0;
13308}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013309
Martin v. Löwis11437992002-04-12 09:54:03 +000013310int
13311main ()
13312{
Guido van Rossum90eea071996-08-30 20:58:57 +000013313return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013314 ;
13315 return 0;
13316}
13317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013318if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013319
13320
Matthias Kloseb9621712010-04-24 17:59:49 +000013321$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013322
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013323 works=yes
13324
Guido van Rossum627b2d71993-12-24 10:39:16 +000013325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13328$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013329
Martin v. Löwisd6320502004-08-12 13:45:08 +000013330# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13332$as_echo_n "checking for socketpair... " >&6; }
13333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013334/* end confdefs.h. */
13335
13336#include <sys/types.h>
13337#include <sys/socket.h>
13338
13339int
13340main ()
13341{
13342void *x=socketpair
13343 ;
13344 return 0;
13345}
13346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013347if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013348
Matthias Kloseb9621712010-04-24 17:59:49 +000013349$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013350
Matthias Kloseb159a552010-04-25 21:00:44 +000013351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013352$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013353else
Matthias Kloseb9621712010-04-24 17:59:49 +000013354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13355$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013356
13357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013359
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013360# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13362$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013364/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013365#include <sys/types.h>
13366#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013367int
13368main ()
13369{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013370struct sockaddr x;
13371x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013372 ;
13373 return 0;
13374}
13375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013376if ac_fn_c_try_compile "$LINENO"; then :
13377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13378$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013379
Matthias Kloseb9621712010-04-24 17:59:49 +000013380$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013381
13382else
Matthias Kloseb9621712010-04-24 17:59:49 +000013383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13384$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013385
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013386fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013388
Guido van Rossumda88dad1995-01-26 00:46:29 +000013389va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13391$as_echo_n "checking whether va_list is an array... " >&6; }
13392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013393/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013394
13395#ifdef HAVE_STDARG_PROTOTYPES
13396#include <stdarg.h>
13397#else
13398#include <varargs.h>
13399#endif
13400
Martin v. Löwis11437992002-04-12 09:54:03 +000013401int
13402main ()
13403{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013404va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013405 ;
13406 return 0;
13407}
13408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013409if ac_fn_c_try_compile "$LINENO"; then :
13410
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013411else
Skip Montanaro6dead952003-09-25 14:50:04 +000013412
Martin v. Löwis11437992002-04-12 09:54:03 +000013413
Matthias Kloseb9621712010-04-24 17:59:49 +000013414$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013415
Guido van Rossumda88dad1995-01-26 00:46:29 +000013416 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013417
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13421$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013422
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013423# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013424
13425
Matthias Kloseb9621712010-04-24 17:59:49 +000013426ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013427if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013428
Matthias Kloseb9621712010-04-24 17:59:49 +000013429 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013430
Matthias Kloseb9621712010-04-24 17:59:49 +000013431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13432$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013433 OLD_CFLAGS=$CFLAGS
13434 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013436/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013437
13438# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013439
Martin v. Löwis11437992002-04-12 09:54:03 +000013440int
13441main ()
13442{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013443
13444 char *name;
13445 struct hostent *he, *res;
13446 char buffer[2048];
13447 int buflen = 2048;
13448 int h_errnop;
13449
13450 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013451
13452 ;
13453 return 0;
13454}
13455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013456if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013457
Matthias Kloseb9621712010-04-24 17:59:49 +000013458 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013459
Martin v. Löwis11437992002-04-12 09:54:03 +000013460
Matthias Kloseb9621712010-04-24 17:59:49 +000013461$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013462
Matthias Kloseb9621712010-04-24 17:59:49 +000013463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13464$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013465
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013466else
Skip Montanaro6dead952003-09-25 14:50:04 +000013467
Matthias Kloseb9621712010-04-24 17:59:49 +000013468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13469$as_echo "no" >&6; }
13470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13471$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013473/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013474
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013475# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013476
Martin v. Löwis11437992002-04-12 09:54:03 +000013477int
13478main ()
13479{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013480
13481 char *name;
13482 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013483 char buffer[2048];
13484 int buflen = 2048;
13485 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013486
Matthias Kloseb159a552010-04-25 21:00:44 +000013487 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013488
13489 ;
13490 return 0;
13491}
13492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013493if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013494
Matthias Kloseb9621712010-04-24 17:59:49 +000013495 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013496
Martin v. Löwis11437992002-04-12 09:54:03 +000013497
Matthias Kloseb159a552010-04-25 21:00:44 +000013498$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013499
Matthias Kloseb9621712010-04-24 17:59:49 +000013500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13501$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013502
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013503else
Skip Montanaro6dead952003-09-25 14:50:04 +000013504
Matthias Kloseb9621712010-04-24 17:59:49 +000013505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13506$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13508$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13510/* end confdefs.h. */
13511
13512# include <netdb.h>
13513
13514int
13515main ()
13516{
13517
13518 char *name;
13519 struct hostent *he;
13520 struct hostent_data data;
13521
13522 (void) gethostbyname_r(name, he, &data);
13523
13524 ;
13525 return 0;
13526}
13527_ACEOF
13528if ac_fn_c_try_compile "$LINENO"; then :
13529
13530 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13531
13532
13533$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13534
13535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13536$as_echo "yes" >&6; }
13537
13538else
13539
13540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13541$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013542
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013545
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013548
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013549fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013551 CFLAGS=$OLD_CFLAGS
13552
13553else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013554
Matthias Kloseb9621712010-04-24 17:59:49 +000013555 for ac_func in gethostbyname
13556do :
13557 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013558if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013559 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013560#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013561_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013562
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013563fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013564done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013565
Michael W. Hudson54241132001-12-07 15:38:26 +000013566
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013567fi
13568
Michael W. Hudson54241132001-12-07 15:38:26 +000013569
13570
13571
13572
13573
13574
Guido van Rossum627b2d71993-12-24 10:39:16 +000013575# checks for system services
13576# (none yet)
13577
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013578# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013579ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013580if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013581
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013582else
Matthias Kloseb9621712010-04-24 17:59:49 +000013583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13584$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013585if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013586 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013587else
Martin v. Löwis11437992002-04-12 09:54:03 +000013588 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013589LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013591/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013593/* Override any GCC internal prototype to avoid an error.
13594 Use char because int might match the return type of a GCC
13595 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013596#ifdef __cplusplus
13597extern "C"
13598#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013599char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013600int
13601main ()
13602{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013603return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013604 ;
13605 return 0;
13606}
13607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013608if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013609 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013610else
Matthias Kloseb9621712010-04-24 17:59:49 +000013611 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013612fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013613rm -f core conftest.err conftest.$ac_objext \
13614 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013615LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013616fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13618$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013619if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013620 cat >>confdefs.h <<_ACEOF
13621#define HAVE_LIBIEEE 1
13622_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013623
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013624 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013625
Guido van Rossum627b2d71993-12-24 10:39:16 +000013626fi
13627
Michael W. Hudson54241132001-12-07 15:38:26 +000013628
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013629fi
13630
Michael W. Hudson54241132001-12-07 15:38:26 +000013631
Guido van Rossum7f253911997-05-09 02:42:48 +000013632# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13634$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013635
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013636# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013637if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013638 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013639if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013640then
13641
Matthias Kloseb9621712010-04-24 17:59:49 +000013642$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013643
Matthias Kloseb9621712010-04-24 17:59:49 +000013644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13645$as_echo "yes" >&6; }
13646else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13647$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013648fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013649else
Matthias Kloseb9621712010-04-24 17:59:49 +000013650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13651$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013652fi
13653
Guido van Rossum7f253911997-05-09 02:42:48 +000013654
Guido van Rossum7f43da71994-08-01 12:15:30 +000013655# check for --with-libm=...
13656
Guido van Rossum563e7081996-09-10 18:20:48 +000013657case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013658Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013659*) LIBM=-lm
13660esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13662$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013664# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013665if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013666 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013667if test "$withval" = no
13668then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13670$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013671elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013672then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13674$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013675else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013676fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013677else
Matthias Kloseb9621712010-04-24 17:59:49 +000013678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13679$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013680fi
13681
Guido van Rossum7f43da71994-08-01 12:15:30 +000013682
13683# check for --with-libc=...
13684
Matthias Kloseb9621712010-04-24 17:59:49 +000013685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13686$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013687
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013688# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013689if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013690 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013691if test "$withval" = no
13692then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13694$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013695elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013696then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13698$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013699else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013700fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013701else
Matthias Kloseb9621712010-04-24 17:59:49 +000013702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13703$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013704fi
13705
Guido van Rossum7f43da71994-08-01 12:15:30 +000013706
Stefan Krah1919b7e2012-03-21 18:25:23 +010013707# **************************************
13708# * Check for gcc x64 inline assembler *
13709# **************************************
13710
13711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13712$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13714/* end confdefs.h. */
13715
13716int
13717main ()
13718{
13719
13720 __asm__ __volatile__ ("movq %rcx, %rax");
13721
13722 ;
13723 return 0;
13724}
13725_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013726if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013727 have_gcc_asm_for_x64=yes
13728else
13729 have_gcc_asm_for_x64=no
13730fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013731rm -f core conftest.err conftest.$ac_objext \
13732 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13734$as_echo "$have_gcc_asm_for_x64" >&6; }
13735if test "$have_gcc_asm_for_x64" = yes
13736then
13737
13738$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13739
13740fi
13741
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013742# **************************************************
13743# * Check for various properties of floating point *
13744# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013745
Matthias Kloseb9621712010-04-24 17:59:49 +000013746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13747$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013748if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013749 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013750else
13751
Matthias Kloseb9621712010-04-24 17:59:49 +000013752if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013753 ac_cv_little_endian_double=no
13754else
Matthias Kloseb9621712010-04-24 17:59:49 +000013755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013756/* end confdefs.h. */
13757
13758#include <string.h>
13759int main() {
13760 double x = 9006104071832581.0;
13761 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13762 return 0;
13763 else
13764 return 1;
13765}
13766
13767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013768if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013769 ac_cv_little_endian_double=yes
13770else
Matthias Kloseb9621712010-04-24 17:59:49 +000013771 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013772fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013773rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13774 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013775fi
13776
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013777fi
13778
Matthias Kloseb9621712010-04-24 17:59:49 +000013779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13780$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013781if test "$ac_cv_little_endian_double" = yes
13782then
13783
Matthias Kloseb9621712010-04-24 17:59:49 +000013784$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013785
13786fi
13787
Matthias Kloseb9621712010-04-24 17:59:49 +000013788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13789$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013790if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013791 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013792else
13793
Matthias Kloseb9621712010-04-24 17:59:49 +000013794if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013795 ac_cv_big_endian_double=no
13796else
Matthias Kloseb9621712010-04-24 17:59:49 +000013797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013798/* end confdefs.h. */
13799
13800#include <string.h>
13801int main() {
13802 double x = 9006104071832581.0;
13803 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13804 return 0;
13805 else
13806 return 1;
13807}
13808
13809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013810if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013811 ac_cv_big_endian_double=yes
13812else
Matthias Kloseb9621712010-04-24 17:59:49 +000013813 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013814fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013815rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13816 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013817fi
13818
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013819fi
13820
Matthias Kloseb9621712010-04-24 17:59:49 +000013821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13822$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013823if test "$ac_cv_big_endian_double" = yes
13824then
13825
Matthias Kloseb9621712010-04-24 17:59:49 +000013826$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013827
13828fi
13829
13830# Some ARM platforms use a mixed-endian representation for doubles.
13831# While Python doesn't currently have full support for these platforms
13832# (see e.g., issue 1762561), we can at least make sure that float <-> string
13833# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13835$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013836if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013837 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013838else
13839
Matthias Kloseb9621712010-04-24 17:59:49 +000013840if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013841 ac_cv_mixed_endian_double=no
13842else
Matthias Kloseb9621712010-04-24 17:59:49 +000013843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013844/* end confdefs.h. */
13845
13846#include <string.h>
13847int main() {
13848 double x = 9006104071832581.0;
13849 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13850 return 0;
13851 else
13852 return 1;
13853}
13854
13855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013856if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013857 ac_cv_mixed_endian_double=yes
13858else
Matthias Kloseb9621712010-04-24 17:59:49 +000013859 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013860fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013861rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13862 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013863fi
13864
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013865fi
13866
Matthias Kloseb9621712010-04-24 17:59:49 +000013867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13868$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013869if test "$ac_cv_mixed_endian_double" = yes
13870then
13871
Matthias Kloseb9621712010-04-24 17:59:49 +000013872$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013873
13874fi
13875
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013876# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013877# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013878# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013879# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013880# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013881# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013882
13883# This inline assembler syntax may also work for suncc and icc,
13884# so we try it on all platforms.
13885
Matthias Kloseb9621712010-04-24 17:59:49 +000013886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13887$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013889/* end confdefs.h. */
13890
13891int
13892main ()
13893{
13894
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013895 unsigned short cw;
13896 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13897 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013898
13899 ;
13900 return 0;
13901}
13902_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013903if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013904 have_gcc_asm_for_x87=yes
13905else
Matthias Kloseb9621712010-04-24 17:59:49 +000013906 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013907fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013908rm -f core conftest.err conftest.$ac_objext \
13909 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13911$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013912if test "$have_gcc_asm_for_x87" = yes
13913then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013914
Matthias Kloseb9621712010-04-24 17:59:49 +000013915$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013916
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013917fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013918
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13920$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13922/* end confdefs.h. */
13923
13924int
13925main ()
13926{
13927
13928 unsigned int fpcr;
13929 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13930 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13931
13932 ;
13933 return 0;
13934}
13935_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013936if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013937 have_gcc_asm_for_mc68881=yes
13938else
13939 have_gcc_asm_for_mc68881=no
13940fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013941rm -f core conftest.err conftest.$ac_objext \
13942 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13944$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13945if test "$have_gcc_asm_for_mc68881" = yes
13946then
13947
13948$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13949
13950fi
13951
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013952# Detect whether system arithmetic is subject to x87-style double
13953# rounding issues. The result of this test has little meaning on non
13954# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13955# mode is round-to-nearest and double rounding issues are present, and
13956# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13958$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013959# $BASECFLAGS may affect the result
13960ac_save_cc="$CC"
13961CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013962if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013963 ac_cv_x87_double_rounding=no
13964else
Matthias Kloseb9621712010-04-24 17:59:49 +000013965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013966/* end confdefs.h. */
13967
13968#include <stdlib.h>
13969#include <math.h>
13970int main() {
13971 volatile double x, y, z;
13972 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13973 x = 0.99999999999999989; /* 1-2**-53 */
13974 y = 1./x;
13975 if (y != 1.)
13976 exit(0);
13977 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13978 x = 1e16;
13979 y = 2.99999;
13980 z = x + y;
13981 if (z != 1e16+4.)
13982 exit(0);
13983 /* both tests show evidence of double rounding */
13984 exit(1);
13985}
13986
13987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013988if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013989 ac_cv_x87_double_rounding=no
13990else
Matthias Kloseb9621712010-04-24 17:59:49 +000013991 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013993rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13994 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013995fi
13996
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013997CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13999$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014000if test "$ac_cv_x87_double_rounding" = yes
14001then
14002
Matthias Kloseb9621712010-04-24 17:59:49 +000014003$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014004
14005fi
14006
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014007# ************************************
14008# * Check for mathematical functions *
14009# ************************************
14010
14011LIBS_SAVE=$LIBS
14012LIBS="$LIBS $LIBM"
14013
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014014for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14015do :
14016 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14017ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014018if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014019 cat >>confdefs.h <<_ACEOF
14020#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14021_ACEOF
14022
14023fi
14024done
14025
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014026for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014027do :
14028 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14029ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014030if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014031 cat >>confdefs.h <<_ACEOF
14032#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14033_ACEOF
14034
14035fi
14036done
14037
14038ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14039"
Victor Stinnere0be4232011-10-25 13:06:09 +020014040if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014041 ac_have_decl=1
14042else
14043 ac_have_decl=0
14044fi
14045
14046cat >>confdefs.h <<_ACEOF
14047#define HAVE_DECL_ISINF $ac_have_decl
14048_ACEOF
14049ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14050"
Victor Stinnere0be4232011-10-25 13:06:09 +020014051if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014052 ac_have_decl=1
14053else
14054 ac_have_decl=0
14055fi
14056
14057cat >>confdefs.h <<_ACEOF
14058#define HAVE_DECL_ISNAN $ac_have_decl
14059_ACEOF
14060ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14061"
Victor Stinnere0be4232011-10-25 13:06:09 +020014062if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014063 ac_have_decl=1
14064else
14065 ac_have_decl=0
14066fi
14067
14068cat >>confdefs.h <<_ACEOF
14069#define HAVE_DECL_ISFINITE $ac_have_decl
14070_ACEOF
14071
14072
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014073# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14074# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14076$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014077if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014078 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014079else
14080
Matthias Kloseb9621712010-04-24 17:59:49 +000014081if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014082 ac_cv_tanh_preserves_zero_sign=no
14083else
Matthias Kloseb9621712010-04-24 17:59:49 +000014084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014085/* end confdefs.h. */
14086
14087#include <math.h>
14088#include <stdlib.h>
14089int main() {
14090 /* return 0 if either negative zeros don't exist
14091 on this platform or if negative zeros exist
14092 and tanh(-0.) == -0. */
14093 if (atan2(0., -1.) == atan2(-0., -1.) ||
14094 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14095 else exit(1);
14096}
14097
14098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014099if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014100 ac_cv_tanh_preserves_zero_sign=yes
14101else
Matthias Kloseb9621712010-04-24 17:59:49 +000014102 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014103fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014104rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14105 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014106fi
14107
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014108fi
14109
Matthias Kloseb9621712010-04-24 17:59:49 +000014110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14111$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014112if test "$ac_cv_tanh_preserves_zero_sign" = yes
14113then
14114
Matthias Kloseb9621712010-04-24 17:59:49 +000014115$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014116
14117fi
14118
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014119if test "$ac_cv_func_log1p" = yes
14120then
14121 # On some versions of AIX, log1p(-0.) returns 0. instead of
14122 # -0. See issue #9920.
14123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14124$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014125 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014126 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014127else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014128
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014129 if test "$cross_compiling" = yes; then :
14130 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014131else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14133/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014134
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014135 #include <math.h>
14136 #include <stdlib.h>
14137 int main() {
14138 /* Fail if the signs of log1p(-0.) and -0. can be
14139 distinguished. */
14140 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14141 return 0;
14142 else
14143 return 1;
14144 }
14145
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014146_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014147if ac_fn_c_try_run "$LINENO"; then :
14148 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014149else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014150 ac_cv_log1p_drops_zero_sign=yes
14151fi
14152rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14153 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014154fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014155
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014156fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014157
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14159$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14160fi
14161if test "$ac_cv_log1p_drops_zero_sign" = yes
14162then
14163
14164$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14165
14166fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014167
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014168LIBS=$LIBS_SAVE
14169
Mark Dickinsona614f042009-11-28 12:48:43 +000014170# For multiprocessing module, check that sem_open
14171# actually works. For FreeBSD versions <= 7.2,
14172# the kernel module that provides POSIX semaphores
14173# isn't loaded by default, so an attempt to call
14174# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14176$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014177if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014178 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014179else
Matthias Kloseb9621712010-04-24 17:59:49 +000014180 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014181 ac_cv_posix_semaphores_enabled=yes
14182else
Matthias Kloseb9621712010-04-24 17:59:49 +000014183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014184/* end confdefs.h. */
14185
14186#include <unistd.h>
14187#include <fcntl.h>
14188#include <stdio.h>
14189#include <semaphore.h>
14190#include <sys/stat.h>
14191
14192int main(void) {
14193 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14194 if (a == SEM_FAILED) {
14195 perror("sem_open");
14196 return 1;
14197 }
14198 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014199 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014200 return 0;
14201}
14202
14203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014204if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014205 ac_cv_posix_semaphores_enabled=yes
14206else
Matthias Kloseb9621712010-04-24 17:59:49 +000014207 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14210 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014211fi
14212
14213
Mark Dickinsona614f042009-11-28 12:48:43 +000014214fi
14215
Matthias Kloseb9621712010-04-24 17:59:49 +000014216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14217$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014218if test $ac_cv_posix_semaphores_enabled = no
14219then
14220
Matthias Kloseb9621712010-04-24 17:59:49 +000014221$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014222
14223fi
14224
Mark Dickinson10683072009-04-18 21:18:19 +000014225# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14227$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014228if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014229 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014230else
Matthias Kloseb9621712010-04-24 17:59:49 +000014231 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014232 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014233else
Matthias Kloseb9621712010-04-24 17:59:49 +000014234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014235/* end confdefs.h. */
14236
14237#include <unistd.h>
14238#include <fcntl.h>
14239#include <stdio.h>
14240#include <semaphore.h>
14241#include <sys/stat.h>
14242
14243int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014244 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014245 int count;
14246 int res;
14247 if(a==SEM_FAILED){
14248 perror("sem_open");
14249 return 1;
14250
14251 }
14252 res = sem_getvalue(a, &count);
14253 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014254 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014255 return res==-1 ? 1 : 0;
14256}
14257
Mark Dickinson10683072009-04-18 21:18:19 +000014258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014259if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014260 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014261else
Matthias Kloseb9621712010-04-24 17:59:49 +000014262 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014263fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14265 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014266fi
14267
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014268
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014269fi
14270
Matthias Kloseb9621712010-04-24 17:59:49 +000014271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14272$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014273if test $ac_cv_broken_sem_getvalue = yes
14274then
14275
Matthias Kloseb9621712010-04-24 17:59:49 +000014276$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014277
14278fi
14279
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014280ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14281"
14282if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14283 ac_have_decl=1
14284else
14285 ac_have_decl=0
14286fi
14287
14288cat >>confdefs.h <<_ACEOF
14289#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14290_ACEOF
14291ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14292"
14293if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14294 ac_have_decl=1
14295else
14296 ac_have_decl=0
14297fi
14298
14299cat >>confdefs.h <<_ACEOF
14300#define HAVE_DECL_RTLD_NOW $ac_have_decl
14301_ACEOF
14302ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14303"
14304if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14305 ac_have_decl=1
14306else
14307 ac_have_decl=0
14308fi
14309
14310cat >>confdefs.h <<_ACEOF
14311#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14312_ACEOF
14313ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14314"
14315if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14316 ac_have_decl=1
14317else
14318 ac_have_decl=0
14319fi
14320
14321cat >>confdefs.h <<_ACEOF
14322#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14323_ACEOF
14324ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14325"
14326if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14327 ac_have_decl=1
14328else
14329 ac_have_decl=0
14330fi
14331
14332cat >>confdefs.h <<_ACEOF
14333#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14334_ACEOF
14335ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14336"
14337if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14338 ac_have_decl=1
14339else
14340 ac_have_decl=0
14341fi
14342
14343cat >>confdefs.h <<_ACEOF
14344#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14345_ACEOF
14346ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14347"
14348if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14349 ac_have_decl=1
14350else
14351 ac_have_decl=0
14352fi
14353
14354cat >>confdefs.h <<_ACEOF
14355#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14356_ACEOF
14357
14358
Mark Dickinsonbd792642009-03-18 20:06:12 +000014359# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14361$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014362# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014363if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014364 enableval=$enable_big_digits; case $enable_big_digits in
14365yes)
14366 enable_big_digits=30 ;;
14367no)
14368 enable_big_digits=15 ;;
1436915|30)
14370 ;;
14371*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014372 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 +000014373esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14375$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014376
14377cat >>confdefs.h <<_ACEOF
14378#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14379_ACEOF
14380
14381
14382else
Matthias Kloseb9621712010-04-24 17:59:49 +000014383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14384$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014385fi
14386
14387
Guido van Rossumef2255b2000-03-10 22:30:29 +000014388# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014389ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014390if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014391
14392
Matthias Kloseb9621712010-04-24 17:59:49 +000014393$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014394
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014395 wchar_h="yes"
14396
Guido van Rossumef2255b2000-03-10 22:30:29 +000014397else
Martin v. Löwis11437992002-04-12 09:54:03 +000014398 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014399
14400fi
14401
Michael W. Hudson54241132001-12-07 15:38:26 +000014402
Martin v. Löwis11437992002-04-12 09:54:03 +000014403
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014404# determine wchar_t size
14405if test "$wchar_h" = yes
14406then
Matthias Kloseb9621712010-04-24 17:59:49 +000014407 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014408# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14409# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14410# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14412$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014413if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014414 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014415else
Matthias Kloseb9621712010-04-24 17:59:49 +000014416 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14417"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014418
Martin v. Löwis11437992002-04-12 09:54:03 +000014419else
Matthias Kloseb9621712010-04-24 17:59:49 +000014420 if test "$ac_cv_type_wchar_t" = yes; then
14421 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14422$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014423as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014424See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014425 else
14426 ac_cv_sizeof_wchar_t=0
14427 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014429
Martin v. Löwis11437992002-04-12 09:54:03 +000014430fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14432$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014433
14434
14435
Martin v. Löwis11437992002-04-12 09:54:03 +000014436cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014437#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014438_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014439
Michael W. Hudson54241132001-12-07 15:38:26 +000014440
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014441fi
14442
Matthias Kloseb9621712010-04-24 17:59:49 +000014443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14444$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014445have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014447/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014448
14449#include <tcl.h>
14450#if TCL_UTF_MAX != 6
14451# error "NOT UCS4_TCL"
14452#endif
14453int
14454main ()
14455{
14456
14457 ;
14458 return 0;
14459}
14460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014461if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014462
14463
Matthias Kloseb9621712010-04-24 17:59:49 +000014464$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014465
14466 have_ucs4_tcl=yes
14467
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14471$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014472
Skip Montanaro6dead952003-09-25 14:50:04 +000014473# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014474if test "$wchar_h" = yes
14475then
14476 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14478$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014479 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014480 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014481else
14482
Matthias Kloseb9621712010-04-24 17:59:49 +000014483 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014484 ac_cv_wchar_t_signed=yes
14485else
Matthias Kloseb9621712010-04-24 17:59:49 +000014486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014487/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014488
14489 #include <wchar.h>
14490 int main()
14491 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014492 /* Success: exit code 0 */
14493 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014494 }
14495
14496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014497if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014498 ac_cv_wchar_t_signed=yes
14499else
Matthias Kloseb9621712010-04-24 17:59:49 +000014500 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014501fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014502rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14503 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014504fi
14505
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014506fi
14507
Matthias Kloseb9621712010-04-24 17:59:49 +000014508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14509$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014510fi
14511
Georg Brandl52d168a2008-01-07 18:10:24 +000014512# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014513if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014514 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014515then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014516 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014517
Matthias Kloseb9621712010-04-24 17:59:49 +000014518$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014519
Georg Brandl52d168a2008-01-07 18:10:24 +000014520else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014521 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014522fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14524$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014525
14526# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14528$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014529if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014530 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014531else
Matthias Kloseb9621712010-04-24 17:59:49 +000014532 ac_cv_c_bigendian=unknown
14533 # See if we're dealing with a universal compiler.
14534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14535/* end confdefs.h. */
14536#ifndef __APPLE_CC__
14537 not a universal capable compiler
14538 #endif
14539 typedef int dummy;
14540
Skip Montanaro6dead952003-09-25 14:50:04 +000014541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014542if ac_fn_c_try_compile "$LINENO"; then :
14543
14544 # Check for potential -arch flags. It is not universal unless
14545 # there are at least two -arch flags with different values.
14546 ac_arch=
14547 ac_prev=
14548 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14549 if test -n "$ac_prev"; then
14550 case $ac_word in
14551 i?86 | x86_64 | ppc | ppc64)
14552 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14553 ac_arch=$ac_word
14554 else
14555 ac_cv_c_bigendian=universal
14556 break
14557 fi
14558 ;;
14559 esac
14560 ac_prev=
14561 elif test "x$ac_word" = "x-arch"; then
14562 ac_prev=arch
14563 fi
14564 done
14565fi
14566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14567 if test $ac_cv_c_bigendian = unknown; then
14568 # See if sys/param.h defines the BYTE_ORDER macro.
14569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014570/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014571#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014572 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014573
Martin v. Löwis11437992002-04-12 09:54:03 +000014574int
14575main ()
14576{
Matthias Kloseb9621712010-04-24 17:59:49 +000014577#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14578 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14579 && LITTLE_ENDIAN)
14580 bogus endian macros
14581 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014582
14583 ;
14584 return 0;
14585}
14586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014587if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014588 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014590/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014591#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014592 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014593
Martin v. Löwis11437992002-04-12 09:54:03 +000014594int
14595main ()
14596{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014597#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014598 not big endian
14599 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014600
14601 ;
14602 return 0;
14603}
14604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014605if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014606 ac_cv_c_bigendian=yes
14607else
Matthias Kloseb9621712010-04-24 17:59:49 +000014608 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014609fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014611fi
14612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14613 fi
14614 if test $ac_cv_c_bigendian = unknown; then
14615 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014617/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014618#include <limits.h>
14619
Martin v. Löwis11437992002-04-12 09:54:03 +000014620int
14621main ()
14622{
Matthias Kloseb9621712010-04-24 17:59:49 +000014623#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14624 bogus endian macros
14625 #endif
14626
Martin v. Löwis11437992002-04-12 09:54:03 +000014627 ;
14628 return 0;
14629}
14630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014631if ac_fn_c_try_compile "$LINENO"; then :
14632 # It does; now see whether it defined to _BIG_ENDIAN or not.
14633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14634/* end confdefs.h. */
14635#include <limits.h>
14636
14637int
14638main ()
14639{
14640#ifndef _BIG_ENDIAN
14641 not big endian
14642 #endif
14643
14644 ;
14645 return 0;
14646}
14647_ACEOF
14648if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014649 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014650else
Matthias Kloseb9621712010-04-24 17:59:49 +000014651 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014652fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14654fi
14655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14656 fi
14657 if test $ac_cv_c_bigendian = unknown; then
14658 # Compile a test program.
14659 if test "$cross_compiling" = yes; then :
14660 # Try to guess by grepping values from an object file.
14661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14662/* end confdefs.h. */
14663short int ascii_mm[] =
14664 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14665 short int ascii_ii[] =
14666 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14667 int use_ascii (int i) {
14668 return ascii_mm[i] + ascii_ii[i];
14669 }
14670 short int ebcdic_ii[] =
14671 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14672 short int ebcdic_mm[] =
14673 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14674 int use_ebcdic (int i) {
14675 return ebcdic_mm[i] + ebcdic_ii[i];
14676 }
14677 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014678
Matthias Kloseb9621712010-04-24 17:59:49 +000014679int
14680main ()
14681{
14682return use_ascii (foo) == use_ebcdic (foo);
14683 ;
14684 return 0;
14685}
14686_ACEOF
14687if ac_fn_c_try_compile "$LINENO"; then :
14688 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14689 ac_cv_c_bigendian=yes
14690 fi
14691 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14692 if test "$ac_cv_c_bigendian" = unknown; then
14693 ac_cv_c_bigendian=no
14694 else
14695 # finding both strings is unlikely to happen, but who knows?
14696 ac_cv_c_bigendian=unknown
14697 fi
14698 fi
14699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014701else
Matthias Kloseb9621712010-04-24 17:59:49 +000014702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014703/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014704$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014705int
14706main ()
14707{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014708
Matthias Kloseb9621712010-04-24 17:59:49 +000014709 /* Are we little or big endian? From Harbison&Steele. */
14710 union
14711 {
14712 long int l;
14713 char c[sizeof (long int)];
14714 } u;
14715 u.l = 1;
14716 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014717
14718 ;
14719 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014720}
Martin v. Löwis11437992002-04-12 09:54:03 +000014721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014722if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014723 ac_cv_c_bigendian=no
14724else
Matthias Kloseb9621712010-04-24 17:59:49 +000014725 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014726fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14728 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014730
Matthias Kloseb9621712010-04-24 17:59:49 +000014731 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14734$as_echo "$ac_cv_c_bigendian" >&6; }
14735 case $ac_cv_c_bigendian in #(
14736 yes)
14737 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14738;; #(
14739 no)
14740 ;; #(
14741 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014742
Matthias Kloseb9621712010-04-24 17:59:49 +000014743$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014744
Matthias Kloseb9621712010-04-24 17:59:49 +000014745 ;; #(
14746 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014747 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014748 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014749 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014750
Michael W. Hudson54241132001-12-07 15:38:26 +000014751
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014752# ABI version string for Python extension modules. This appears between the
14753# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14754# from the following attributes which affect the ABI of this Python build (in
14755# this order):
14756#
14757# * The Python implementation (always 'cpython-' for us)
14758# * The major and minor version numbers
14759# * --with-pydebug (adds a 'd')
14760# * --with-pymalloc (adds a 'm')
14761# * --with-wide-unicode (adds a 'u')
14762#
14763# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014764# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14765# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014766
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14768$as_echo_n "checking ABIFLAGS... " >&6; }
14769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14770$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14772$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014773SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14775$as_echo "$SOABI" >&6; }
14776
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014777
14778case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014779 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014780 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14781 *)
14782 EXT_SUFFIX=${SHLIB_SUFFIX};;
14783esac
14784
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14786$as_echo_n "checking LDVERSION... " >&6; }
14787LDVERSION='$(VERSION)$(ABIFLAGS)'
14788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14789$as_echo "$LDVERSION" >&6; }
14790
doko@python.org87421192013-01-26 11:39:31 +010014791
doko@ubuntu.com55532312016-06-14 08:55:19 +020014792if test x$PLATFORM_TRIPLET = x; then
14793 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14794else
14795 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14796fi
doko@python.org87421192013-01-26 11:39:31 +010014797
14798
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014799# Check whether right shifting a negative integer extends the sign bit
14800# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14802$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014803if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014804 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014805else
Martin v. Löwis11437992002-04-12 09:54:03 +000014806
Matthias Kloseb9621712010-04-24 17:59:49 +000014807if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014808 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014809else
Matthias Kloseb9621712010-04-24 17:59:49 +000014810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014811/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014812
14813int main()
14814{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014815 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014816}
14817
Martin v. Löwis11437992002-04-12 09:54:03 +000014818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014819if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014820 ac_cv_rshift_extends_sign=yes
14821else
Matthias Kloseb9621712010-04-24 17:59:49 +000014822 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014823fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014824rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14825 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014826fi
14827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014828fi
14829
Matthias Kloseb9621712010-04-24 17:59:49 +000014830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14831$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014832if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014833then
Martin v. Löwis11437992002-04-12 09:54:03 +000014834
Matthias Kloseb9621712010-04-24 17:59:49 +000014835$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014836
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014837fi
14838
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014839# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14841$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014842if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014843 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014844else
Martin v. Löwis11437992002-04-12 09:54:03 +000014845
Matthias Kloseb9621712010-04-24 17:59:49 +000014846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014847/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014848#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014849int
14850main ()
14851{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014852
14853 FILE *f = fopen("/dev/null", "r");
14854 flockfile(f);
14855 getc_unlocked(f);
14856 funlockfile(f);
14857
Martin v. Löwis11437992002-04-12 09:54:03 +000014858 ;
14859 return 0;
14860}
14861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014862if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014863 ac_cv_have_getc_unlocked=yes
14864else
Matthias Kloseb9621712010-04-24 17:59:49 +000014865 ac_cv_have_getc_unlocked=no
14866fi
14867rm -f core conftest.err conftest.$ac_objext \
14868 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014870
Matthias Kloseb9621712010-04-24 17:59:49 +000014871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14872$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014873if test "$ac_cv_have_getc_unlocked" = yes
14874then
Martin v. Löwis11437992002-04-12 09:54:03 +000014875
Matthias Kloseb9621712010-04-24 17:59:49 +000014876$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014877
14878fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014879
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014880# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014881# save the value of LIBS so we don't actually link Python with readline
14882LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014883
Gregory P. Smith18820942008-09-07 06:24:49 +000014884# On some systems we need to link readline to a termcap compatible
14885# library. NOTE: Keep the precedence of listed libraries synchronised
14886# with setup.py.
14887py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14889$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014890for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014891 if test -z "$py_libtermcap"; then
14892 READLINE_LIBS="-lreadline"
14893 else
14894 READLINE_LIBS="-lreadline -l$py_libtermcap"
14895 fi
14896 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014898/* end confdefs.h. */
14899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014900/* Override any GCC internal prototype to avoid an error.
14901 Use char because int might match the return type of a GCC
14902 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014903#ifdef __cplusplus
14904extern "C"
14905#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014906char readline ();
14907int
14908main ()
14909{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014910return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014911 ;
14912 return 0;
14913}
14914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014915if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014916 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014917fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014918rm -f core conftest.err conftest.$ac_objext \
14919 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014920 if test $py_cv_lib_readline = yes; then
14921 break
14922 fi
14923done
14924# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14925#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014926if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14928$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014929else
Matthias Kloseb9621712010-04-24 17:59:49 +000014930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14931$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014932
Matthias Kloseb9621712010-04-24 17:59:49 +000014933$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014934
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014935fi
14936
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014937# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14939$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014940if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014941 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014942else
14943 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014944LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014946/* end confdefs.h. */
14947
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014948/* Override any GCC internal prototype to avoid an error.
14949 Use char because int might match the return type of a GCC
14950 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014951#ifdef __cplusplus
14952extern "C"
14953#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014954char rl_callback_handler_install ();
14955int
14956main ()
14957{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014958return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014959 ;
14960 return 0;
14961}
14962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014963if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014964 ac_cv_lib_readline_rl_callback_handler_install=yes
14965else
Matthias Kloseb9621712010-04-24 17:59:49 +000014966 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014967fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014968rm -f core conftest.err conftest.$ac_objext \
14969 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014970LIBS=$ac_check_lib_save_LIBS
14971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14973$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014974if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014975
Matthias Kloseb9621712010-04-24 17:59:49 +000014976$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014977
14978fi
14979
14980
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014981# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014983/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014984#include <readline/readline.h>
14985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014986if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014987 have_readline=yes
14988else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014989 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014990
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014991fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014992rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014993if test $have_readline = yes
14994then
Matthias Kloseb9621712010-04-24 17:59:49 +000014995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014996/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014997#include <readline/readline.h>
14998
14999_ACEOF
15000if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015001 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015002
Matthias Kloseb9621712010-04-24 17:59:49 +000015003$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015004
15005fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015006rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015007
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015009/* end confdefs.h. */
15010#include <readline/readline.h>
15011
15012_ACEOF
15013if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015014 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015015
Matthias Kloseb9621712010-04-24 17:59:49 +000015016$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015017
15018fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015019rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015020
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015021fi
15022
Martin v. Löwis0daad592001-09-30 21:09:59 +000015023# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15025$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015026if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015027 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015028else
Martin v. Löwis11437992002-04-12 09:54:03 +000015029 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015030LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015032/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015034/* Override any GCC internal prototype to avoid an error.
15035 Use char because int might match the return type of a GCC
15036 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015037#ifdef __cplusplus
15038extern "C"
15039#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015040char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015041int
15042main ()
15043{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015044return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015045 ;
15046 return 0;
15047}
15048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015049if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015050 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015051else
Matthias Kloseb9621712010-04-24 17:59:49 +000015052 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015054rm -f core conftest.err conftest.$ac_objext \
15055 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015056LIBS=$ac_check_lib_save_LIBS
15057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15059$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015060if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015061
Matthias Kloseb9621712010-04-24 17:59:49 +000015062$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015063
Martin v. Löwis0daad592001-09-30 21:09:59 +000015064fi
15065
Michael W. Hudson54241132001-12-07 15:38:26 +000015066
Thomas Wouters89d996e2007-09-08 17:39:28 +000015067# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15069$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015070if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015071 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015072else
15073 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015074LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015076/* end confdefs.h. */
15077
15078/* Override any GCC internal prototype to avoid an error.
15079 Use char because int might match the return type of a GCC
15080 builtin and then its argument prototype would still apply. */
15081#ifdef __cplusplus
15082extern "C"
15083#endif
15084char rl_completion_display_matches_hook ();
15085int
15086main ()
15087{
15088return rl_completion_display_matches_hook ();
15089 ;
15090 return 0;
15091}
15092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015093if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015094 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15095else
Matthias Kloseb9621712010-04-24 17:59:49 +000015096 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015098rm -f core conftest.err conftest.$ac_objext \
15099 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015100LIBS=$ac_check_lib_save_LIBS
15101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15103$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015104if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015105
Matthias Kloseb9621712010-04-24 17:59:49 +000015106$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015107
15108fi
15109
15110
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015111# also in 4.0, but not in editline
15112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15113$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15114if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15115 $as_echo_n "(cached) " >&6
15116else
15117 ac_check_lib_save_LIBS=$LIBS
15118LIBS="-lreadline $READLINE_LIBS $LIBS"
15119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15120/* end confdefs.h. */
15121
15122/* Override any GCC internal prototype to avoid an error.
15123 Use char because int might match the return type of a GCC
15124 builtin and then its argument prototype would still apply. */
15125#ifdef __cplusplus
15126extern "C"
15127#endif
15128char rl_resize_terminal ();
15129int
15130main ()
15131{
15132return rl_resize_terminal ();
15133 ;
15134 return 0;
15135}
15136_ACEOF
15137if ac_fn_c_try_link "$LINENO"; then :
15138 ac_cv_lib_readline_rl_resize_terminal=yes
15139else
15140 ac_cv_lib_readline_rl_resize_terminal=no
15141fi
15142rm -f core conftest.err conftest.$ac_objext \
15143 conftest$ac_exeext conftest.$ac_ext
15144LIBS=$ac_check_lib_save_LIBS
15145fi
15146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15147$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15148if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15149
15150$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15151
15152fi
15153
15154
Martin v. Löwis0daad592001-09-30 21:09:59 +000015155# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15157$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015158if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015159 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015160else
Martin v. Löwis11437992002-04-12 09:54:03 +000015161 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015162LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015164/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015166/* Override any GCC internal prototype to avoid an error.
15167 Use char because int might match the return type of a GCC
15168 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015169#ifdef __cplusplus
15170extern "C"
15171#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015172char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015173int
15174main ()
15175{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015176return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015177 ;
15178 return 0;
15179}
15180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015181if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015182 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015183else
Matthias Kloseb9621712010-04-24 17:59:49 +000015184 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015186rm -f core conftest.err conftest.$ac_objext \
15187 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015188LIBS=$ac_check_lib_save_LIBS
15189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15191$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015192if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015193
Matthias Kloseb9621712010-04-24 17:59:49 +000015194$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015195
Guido van Rossum353ae582001-07-10 16:45:32 +000015196fi
15197
Jack Jansendd19cf82001-12-06 22:36:17 +000015198
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015199# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015201/* end confdefs.h. */
15202#include <readline/readline.h>
15203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015204if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015205 have_readline=yes
15206else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015207 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015208
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015209fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015210rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015211if test $have_readline = yes
15212then
Matthias Kloseb9621712010-04-24 17:59:49 +000015213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015214/* end confdefs.h. */
15215#include <readline/readline.h>
15216
15217_ACEOF
15218if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015219 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015220
Matthias Kloseb9621712010-04-24 17:59:49 +000015221$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015222
15223fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015224rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015225
15226fi
15227
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15229$as_echo_n "checking for append_history in -lreadline... " >&6; }
15230if ${ac_cv_lib_readline_append_history+:} false; then :
15231 $as_echo_n "(cached) " >&6
15232else
15233 ac_check_lib_save_LIBS=$LIBS
15234LIBS="-lreadline $READLINE_LIBS $LIBS"
15235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15236/* end confdefs.h. */
15237
15238/* Override any GCC internal prototype to avoid an error.
15239 Use char because int might match the return type of a GCC
15240 builtin and then its argument prototype would still apply. */
15241#ifdef __cplusplus
15242extern "C"
15243#endif
15244char append_history ();
15245int
15246main ()
15247{
15248return append_history ();
15249 ;
15250 return 0;
15251}
15252_ACEOF
15253if ac_fn_c_try_link "$LINENO"; then :
15254 ac_cv_lib_readline_append_history=yes
15255else
15256 ac_cv_lib_readline_append_history=no
15257fi
15258rm -f core conftest.err conftest.$ac_objext \
15259 conftest$ac_exeext conftest.$ac_ext
15260LIBS=$ac_check_lib_save_LIBS
15261fi
15262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15263$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15264if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15265
15266$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15267
15268fi
15269
15270
Martin v. Löwis82bca632006-02-10 20:49:30 +000015271# End of readline checks: restore LIBS
15272LIBS=$LIBS_no_readline
15273
Matthias Kloseb9621712010-04-24 17:59:49 +000015274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15275$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015276if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015277 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015278else
Martin v. Löwis11437992002-04-12 09:54:03 +000015279
Matthias Kloseb9621712010-04-24 17:59:49 +000015280if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015281 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015282else
Matthias Kloseb9621712010-04-24 17:59:49 +000015283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015284/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015285
15286int main()
15287{
15288 int val1 = nice(1);
15289 if (val1 != -1 && val1 == nice(2))
15290 exit(0);
15291 exit(1);
15292}
15293
Martin v. Löwis11437992002-04-12 09:54:03 +000015294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015295if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015296 ac_cv_broken_nice=yes
15297else
Matthias Kloseb9621712010-04-24 17:59:49 +000015298 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015299fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015300rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15301 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015302fi
15303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015304fi
15305
Matthias Kloseb9621712010-04-24 17:59:49 +000015306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15307$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015308if test "$ac_cv_broken_nice" = yes
15309then
Martin v. Löwis11437992002-04-12 09:54:03 +000015310
Matthias Kloseb9621712010-04-24 17:59:49 +000015311$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015312
15313fi
15314
Matthias Kloseb9621712010-04-24 17:59:49 +000015315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15316$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015317if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015318 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015319else
Matthias Kloseb9621712010-04-24 17:59:49 +000015320 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015321 ac_cv_broken_poll=no
15322else
Matthias Kloseb9621712010-04-24 17:59:49 +000015323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015324/* end confdefs.h. */
15325
15326#include <poll.h>
15327
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015328int main()
15329{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015330 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015331 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015332
15333 close (42);
15334
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015335 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015336 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015337 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015338 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015339 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015340 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015341 return 1;
15342}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015343
15344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015345if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015346 ac_cv_broken_poll=yes
15347else
Matthias Kloseb9621712010-04-24 17:59:49 +000015348 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015350rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15351 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015353
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015354fi
15355
Matthias Kloseb9621712010-04-24 17:59:49 +000015356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15357$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015358if test "$ac_cv_broken_poll" = yes
15359then
15360
Matthias Kloseb9621712010-04-24 17:59:49 +000015361$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015362
15363fi
15364
Brett Cannon43802422005-02-10 20:48:03 +000015365# 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 +000015366# (which is not required by ISO C or UNIX spec) and/or if we support
15367# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015368ac_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 +000015369#include <$ac_cv_struct_tm>
15370
Matthias Kloseb9621712010-04-24 17:59:49 +000015371"
Victor Stinnere0be4232011-10-25 13:06:09 +020015372if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015373
15374cat >>confdefs.h <<_ACEOF
15375#define HAVE_STRUCT_TM_TM_ZONE 1
15376_ACEOF
15377
15378
15379fi
15380
15381if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15382
Matthias Kloseb9621712010-04-24 17:59:49 +000015383$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015384
15385else
Matthias Kloseb9621712010-04-24 17:59:49 +000015386 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15387"
Victor Stinnere0be4232011-10-25 13:06:09 +020015388if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015389 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015390else
Matthias Kloseb9621712010-04-24 17:59:49 +000015391 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015392fi
15393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015394cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015395#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015396_ACEOF
15397
Matthias Kloseb9621712010-04-24 17:59:49 +000015398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15399$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015400if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015401 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015402else
Matthias Kloseb9621712010-04-24 17:59:49 +000015403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015404/* end confdefs.h. */
15405#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015406#if !HAVE_DECL_TZNAME
15407extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015408#endif
15409
15410int
15411main ()
15412{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015413return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015414 ;
15415 return 0;
15416}
15417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015418if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015419 ac_cv_var_tzname=yes
15420else
Matthias Kloseb9621712010-04-24 17:59:49 +000015421 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015423rm -f core conftest.err conftest.$ac_objext \
15424 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015425fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15427$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015428 if test $ac_cv_var_tzname = yes; then
15429
Matthias Kloseb9621712010-04-24 17:59:49 +000015430$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015431
15432 fi
15433fi
15434
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015435
Martin v. Löwis1d459062005-03-14 21:23:33 +000015436# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15438$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015439if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015440 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015441else
15442
Matthias Kloseb9621712010-04-24 17:59:49 +000015443if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015444 ac_cv_working_tzset=no
15445else
Matthias Kloseb9621712010-04-24 17:59:49 +000015446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015447/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015448
15449#include <stdlib.h>
15450#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015451#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015452
15453#if HAVE_TZNAME
15454extern char *tzname[];
15455#endif
15456
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015457int main()
15458{
Brett Cannon18367812003-09-19 00:59:16 +000015459 /* Note that we need to ensure that not only does tzset(3)
15460 do 'something' with localtime, but it works as documented
15461 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015462 This includes making sure that tzname is set properly if
15463 tm->tm_zone does not exist since it is the alternative way
15464 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015465
15466 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015467 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015468 */
15469
Martin v. Löwis1d459062005-03-14 21:23:33 +000015470 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015471 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15472
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015473 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015474 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015475 if (localtime(&groundhogday)->tm_hour != 0)
15476 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015477#if HAVE_TZNAME
15478 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15479 if (strcmp(tzname[0], "UTC") ||
15480 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15481 exit(1);
15482#endif
Brett Cannon18367812003-09-19 00:59:16 +000015483
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015484 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015485 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015486 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015487 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015488#if HAVE_TZNAME
15489 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15490 exit(1);
15491#endif
Brett Cannon18367812003-09-19 00:59:16 +000015492
15493 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15494 tzset();
15495 if (localtime(&groundhogday)->tm_hour != 11)
15496 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015497#if HAVE_TZNAME
15498 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15499 exit(1);
15500#endif
15501
15502#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015503 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15504 exit(1);
15505 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15506 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015507#endif
Brett Cannon18367812003-09-19 00:59:16 +000015508
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015509 exit(0);
15510}
15511
15512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015513if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015514 ac_cv_working_tzset=yes
15515else
Matthias Kloseb9621712010-04-24 17:59:49 +000015516 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015517fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015518rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15519 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015520fi
15521
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015522fi
15523
Matthias Kloseb9621712010-04-24 17:59:49 +000015524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15525$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015526if test "$ac_cv_working_tzset" = yes
15527then
15528
Matthias Kloseb9621712010-04-24 17:59:49 +000015529$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015530
15531fi
15532
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015533# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15535$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015536if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015537 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015538else
Matthias Kloseb9621712010-04-24 17:59:49 +000015539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015540/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015541#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015542int
15543main ()
15544{
15545
15546struct stat st;
15547st.st_mtim.tv_nsec = 1;
15548
15549 ;
15550 return 0;
15551}
15552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015553if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015554 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015555else
Matthias Kloseb9621712010-04-24 17:59:49 +000015556 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15559fi
15560
Matthias Kloseb9621712010-04-24 17:59:49 +000015561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15562$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015563if test "$ac_cv_stat_tv_nsec" = yes
15564then
15565
Matthias Kloseb9621712010-04-24 17:59:49 +000015566$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015567
15568fi
15569
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015570# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15572$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015573if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015574 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015575else
Matthias Kloseb9621712010-04-24 17:59:49 +000015576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015577/* end confdefs.h. */
15578#include <sys/stat.h>
15579int
15580main ()
15581{
15582
15583struct stat st;
15584st.st_mtimespec.tv_nsec = 1;
15585
15586 ;
15587 return 0;
15588}
15589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015590if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015591 ac_cv_stat_tv_nsec2=yes
15592else
Matthias Kloseb9621712010-04-24 17:59:49 +000015593 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15596fi
15597
Matthias Kloseb9621712010-04-24 17:59:49 +000015598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15599$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015600if test "$ac_cv_stat_tv_nsec2" = yes
15601then
15602
Matthias Kloseb9621712010-04-24 17:59:49 +000015603$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015604
15605fi
15606
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015607# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015608ac_save_cppflags="$CPPFLAGS"
15609CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015610
15611for ac_header in curses.h ncurses.h
15612do :
15613 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15614ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15615if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15616 cat >>confdefs.h <<_ACEOF
15617#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15618_ACEOF
15619
15620fi
15621
15622done
15623
15624
15625# On Solaris, term.h requires curses.h
15626for ac_header in term.h
15627do :
15628 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15629#ifdef HAVE_CURSES_H
15630#include <curses.h>
15631#endif
15632
15633"
15634if test "x$ac_cv_header_term_h" = xyes; then :
15635 cat >>confdefs.h <<_ACEOF
15636#define HAVE_TERM_H 1
15637_ACEOF
15638
15639fi
15640
15641done
15642
15643
Jack Jansen666b1e72001-10-31 12:11:48 +000015644# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15646$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015647if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015648 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015649else
Matthias Kloseb9621712010-04-24 17:59:49 +000015650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015651/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015652#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015653int
15654main ()
15655{
Jack Jansen666b1e72001-10-31 12:11:48 +000015656
15657 int rtn;
15658 rtn = mvwdelch(0,0,0);
15659
Martin v. Löwis11437992002-04-12 09:54:03 +000015660 ;
15661 return 0;
15662}
15663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015664if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015665 ac_cv_mvwdelch_is_expression=yes
15666else
Matthias Kloseb9621712010-04-24 17:59:49 +000015667 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015668fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15670fi
15671
Matthias Kloseb9621712010-04-24 17:59:49 +000015672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15673$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015674
15675if test "$ac_cv_mvwdelch_is_expression" = yes
15676then
Martin v. Löwis11437992002-04-12 09:54:03 +000015677
Matthias Kloseb9621712010-04-24 17:59:49 +000015678$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015679
15680fi
15681
Matthias Kloseb9621712010-04-24 17:59:49 +000015682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15683$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015684if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015685 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015686else
Matthias Kloseb9621712010-04-24 17:59:49 +000015687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015688/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015689#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015690int
15691main ()
15692{
Jack Jansen666b1e72001-10-31 12:11:48 +000015693
15694 WINDOW *w;
15695 w->_flags = 0;
15696
Martin v. Löwis11437992002-04-12 09:54:03 +000015697 ;
15698 return 0;
15699}
15700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015701if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015702 ac_cv_window_has_flags=yes
15703else
Matthias Kloseb9621712010-04-24 17:59:49 +000015704 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015705fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15707fi
15708
Matthias Kloseb9621712010-04-24 17:59:49 +000015709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15710$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015711
Jack Jansen666b1e72001-10-31 12:11:48 +000015712
15713if test "$ac_cv_window_has_flags" = yes
15714then
Martin v. Löwis11437992002-04-12 09:54:03 +000015715
Matthias Kloseb9621712010-04-24 17:59:49 +000015716$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015717
15718fi
15719
Matthias Kloseb9621712010-04-24 17:59:49 +000015720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15721$as_echo_n "checking for is_term_resized... " >&6; }
15722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015723/* end confdefs.h. */
15724#include <curses.h>
15725int
15726main ()
15727{
15728void *x=is_term_resized
15729 ;
15730 return 0;
15731}
15732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015733if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015734
Matthias Kloseb9621712010-04-24 17:59:49 +000015735$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015736
Matthias Kloseb159a552010-04-25 21:00:44 +000015737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015738$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015739else
Matthias Kloseb9621712010-04-24 17:59:49 +000015740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15741$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015742
15743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15745
Matthias Kloseb9621712010-04-24 17:59:49 +000015746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15747$as_echo_n "checking for resize_term... " >&6; }
15748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015749/* end confdefs.h. */
15750#include <curses.h>
15751int
15752main ()
15753{
15754void *x=resize_term
15755 ;
15756 return 0;
15757}
15758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015759if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015760
Matthias Kloseb9621712010-04-24 17:59:49 +000015761$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015762
Matthias Kloseb159a552010-04-25 21:00:44 +000015763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015764$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015765else
Matthias Kloseb9621712010-04-24 17:59:49 +000015766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15767$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015768
15769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15771
Matthias Kloseb9621712010-04-24 17:59:49 +000015772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15773$as_echo_n "checking for resizeterm... " >&6; }
15774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015775/* end confdefs.h. */
15776#include <curses.h>
15777int
15778main ()
15779{
15780void *x=resizeterm
15781 ;
15782 return 0;
15783}
15784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015785if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015786
Matthias Kloseb9621712010-04-24 17:59:49 +000015787$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015788
Matthias Kloseb159a552010-04-25 21:00:44 +000015789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015790$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015791else
Matthias Kloseb9621712010-04-24 17:59:49 +000015792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15793$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015794
15795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015797# last curses configure check
15798CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015799
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15801$as_echo "$as_me: checking for device files" >&6;}
15802
15803if test "x$cross_compiling" = xyes; then
15804 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15806$as_echo_n "checking for /dev/ptmx... " >&6; }
15807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15808$as_echo "not set" >&6; }
15809 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15810 fi
15811 if test "${ac_cv_file__dev_ptc+set}" != set; then
15812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15813$as_echo_n "checking for /dev/ptc... " >&6; }
15814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15815$as_echo "not set" >&6; }
15816 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15817 fi
15818fi
15819
Matthias Kloseb9621712010-04-24 17:59:49 +000015820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15821$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015822if ${ac_cv_file__dev_ptmx+:} false; then :
15823 $as_echo_n "(cached) " >&6
15824else
15825 test "$cross_compiling" = yes &&
15826 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15827if test -r "/dev/ptmx"; then
15828 ac_cv_file__dev_ptmx=yes
15829else
15830 ac_cv_file__dev_ptmx=no
15831fi
15832fi
15833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15834$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15835if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015836
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015837fi
15838
15839if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015840
Matthias Kloseb9621712010-04-24 17:59:49 +000015841$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015842
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15845$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015846if ${ac_cv_file__dev_ptc+:} false; then :
15847 $as_echo_n "(cached) " >&6
15848else
15849 test "$cross_compiling" = yes &&
15850 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15851if test -r "/dev/ptc"; then
15852 ac_cv_file__dev_ptc=yes
15853else
15854 ac_cv_file__dev_ptc=no
15855fi
15856fi
15857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15858$as_echo "$ac_cv_file__dev_ptc" >&6; }
15859if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015860
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015861fi
15862
15863if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015864
Matthias Kloseb9621712010-04-24 17:59:49 +000015865$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015866
Neal Norwitz865400f2003-03-21 01:42:58 +000015867fi
15868
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015869if test "$have_long_long" = yes
15870then
Matthias Kloseb9621712010-04-24 17:59:49 +000015871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15872$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015873 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015874 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015875else
Matthias Kloseb9621712010-04-24 17:59:49 +000015876 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015877 ac_cv_have_long_long_format="cross -- assuming no"
15878 if test x$GCC = xyes; then
15879 save_CFLAGS=$CFLAGS
15880 CFLAGS="$CFLAGS -Werror -Wformat"
15881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15882/* end confdefs.h. */
15883
15884 #include <stdio.h>
15885 #include <stddef.h>
15886
15887int
15888main ()
15889{
15890
15891 char *buffer;
15892 sprintf(buffer, "%lld", (long long)123);
15893 sprintf(buffer, "%lld", (long long)-123);
15894 sprintf(buffer, "%llu", (unsigned long long)123);
15895
15896 ;
15897 return 0;
15898}
15899_ACEOF
15900if ac_fn_c_try_compile "$LINENO"; then :
15901 ac_cv_have_long_long_format=yes
15902
15903fi
15904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15905 CFLAGS=$save_CFLAGS
15906 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015907else
Matthias Kloseb9621712010-04-24 17:59:49 +000015908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015909/* end confdefs.h. */
15910
15911 #include <stdio.h>
15912 #include <stddef.h>
15913 #include <string.h>
15914
15915 #ifdef HAVE_SYS_TYPES_H
15916 #include <sys/types.h>
15917 #endif
15918
15919 int main()
15920 {
15921 char buffer[256];
15922
15923 if (sprintf(buffer, "%lld", (long long)123) < 0)
15924 return 1;
15925 if (strcmp(buffer, "123"))
15926 return 1;
15927
15928 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15929 return 1;
15930 if (strcmp(buffer, "-123"))
15931 return 1;
15932
15933 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15934 return 1;
15935 if (strcmp(buffer, "123"))
15936 return 1;
15937
15938 return 0;
15939 }
15940
15941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015942if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015943 ac_cv_have_long_long_format=yes
15944else
Matthias Kloseb9621712010-04-24 17:59:49 +000015945 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015946fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15948 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015949fi
15950
15951
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015952fi
15953
Matthias Kloseb9621712010-04-24 17:59:49 +000015954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15955$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015956fi
15957
Mark Dickinson89d7d412009-12-31 20:50:59 +000015958if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015959then
15960
Matthias Kloseb9621712010-04-24 17:59:49 +000015961$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015962
15963fi
15964
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015965if test $ac_sys_system = Darwin
15966then
15967 LIBS="$LIBS -framework CoreFoundation"
15968fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015969
Matthias Kloseb9621712010-04-24 17:59:49 +000015970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15971$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015972if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015973 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015974else
Matthias Kloseb9621712010-04-24 17:59:49 +000015975 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015976 ac_cv_have_size_t_format="cross -- assuming yes"
15977
Thomas Wouters477c8d52006-05-27 19:21:47 +000015978else
Matthias Kloseb9621712010-04-24 17:59:49 +000015979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015980/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015981
Thomas Wouters477c8d52006-05-27 19:21:47 +000015982#include <stdio.h>
15983#include <stddef.h>
15984#include <string.h>
15985
Christian Heimes2c181612007-12-17 20:04:13 +000015986#ifdef HAVE_SYS_TYPES_H
15987#include <sys/types.h>
15988#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015989
15990#ifdef HAVE_SSIZE_T
15991typedef ssize_t Py_ssize_t;
15992#elif SIZEOF_VOID_P == SIZEOF_LONG
15993typedef long Py_ssize_t;
15994#else
15995typedef int Py_ssize_t;
15996#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015997
Christian Heimes2c181612007-12-17 20:04:13 +000015998int main()
15999{
16000 char buffer[256];
16001
Thomas Wouters477c8d52006-05-27 19:21:47 +000016002 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16003 return 1;
16004
Thomas Wouters89f507f2006-12-13 04:49:30 +000016005 if (strcmp(buffer, "123"))
16006 return 1;
16007
16008 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16009 return 1;
16010
16011 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016012 return 1;
16013
16014 return 0;
16015}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016016
Thomas Wouters477c8d52006-05-27 19:21:47 +000016017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016018if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016019 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016020else
Matthias Kloseb9621712010-04-24 17:59:49 +000016021 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016022fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16024 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016025fi
16026
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16029$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016030if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016031
Matthias Kloseb9621712010-04-24 17:59:49 +000016032$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016033
16034fi
16035
Matthias Kloseb9621712010-04-24 17:59:49 +000016036ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016037#ifdef HAVE_SYS_TYPES_H
16038#include <sys/types.h>
16039#endif
16040#ifdef HAVE_SYS_SOCKET_H
16041#include <sys/socket.h>
16042#endif
16043
Matthias Kloseb9621712010-04-24 17:59:49 +000016044"
Victor Stinnere0be4232011-10-25 13:06:09 +020016045if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016046
Martin v. Löwis11437992002-04-12 09:54:03 +000016047else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016048
Matthias Kloseb9621712010-04-24 17:59:49 +000016049$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016050
16051fi
16052
Michael W. Hudson54241132001-12-07 15:38:26 +000016053
Matthias Kloseb9621712010-04-24 17:59:49 +000016054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16055$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016056if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016057 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016058else
Matthias Kloseb9621712010-04-24 17:59:49 +000016059 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016060 ac_cv_broken_mbstowcs=no
16061else
Matthias Kloseb9621712010-04-24 17:59:49 +000016062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016063/* end confdefs.h. */
16064
Stefan Krah19c21392012-11-22 23:47:32 +010016065#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016066#include<stdlib.h>
16067int main() {
16068 size_t len = -1;
16069 const char *str = "text";
16070 len = mbstowcs(NULL, str, 0);
16071 return (len != 4);
16072}
16073
16074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016075if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016076 ac_cv_broken_mbstowcs=no
16077else
Matthias Kloseb9621712010-04-24 17:59:49 +000016078 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016080rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16081 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016082fi
16083
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016084fi
16085
Matthias Kloseb9621712010-04-24 17:59:49 +000016086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16087$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016088if test "$ac_cv_broken_mbstowcs" = yes
16089then
16090
Matthias Kloseb9621712010-04-24 17:59:49 +000016091$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016092
16093fi
16094
Antoine Pitroub52ec782009-01-25 16:34:23 +000016095# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16097$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016098
16099# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016100if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016101 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016102if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016103then
16104
Matthias Kloseb9621712010-04-24 17:59:49 +000016105$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016106
Matthias Kloseb9621712010-04-24 17:59:49 +000016107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16108$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016109fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016110if test "$withval" = no
16111then
16112
16113$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16114
Matthias Kloseb9621712010-04-24 17:59:49 +000016115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16116$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016117fi
16118
Antoine Pitrou042b1282010-08-13 21:15:58 +000016119else
16120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16121$as_echo "no value specified" >&6; }
16122fi
16123
Antoine Pitroub52ec782009-01-25 16:34:23 +000016124
Matthias Kloseb17289e2012-03-15 19:51:34 +010016125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16126$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16127if ${ac_cv_computed_gotos+:} false; then :
16128 $as_echo_n "(cached) " >&6
16129else
16130 if test "$cross_compiling" = yes; then :
16131 if test "${with_computed_gotos+set}" = set; then
16132 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16133 else
16134 ac_cv_computed_gotos=no
16135 fi
16136else
16137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16138/* end confdefs.h. */
16139
16140int main(int argc, char **argv)
16141{
16142 static void *targets[1] = { &&LABEL1 };
16143 goto LABEL2;
16144LABEL1:
16145 return 0;
16146LABEL2:
16147 goto *targets[0];
16148 return 1;
16149}
16150
16151_ACEOF
16152if ac_fn_c_try_run "$LINENO"; then :
16153 ac_cv_computed_gotos=yes
16154else
16155 ac_cv_computed_gotos=no
16156fi
16157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16158 conftest.$ac_objext conftest.beam conftest.$ac_ext
16159fi
16160
16161fi
16162
16163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16164$as_echo "$ac_cv_computed_gotos" >&6; }
16165case "$ac_cv_computed_gotos" in yes*)
16166
16167$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16168
16169esac
16170
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016171case $ac_sys_system in
16172AIX*)
16173
16174$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16175 ;;
16176esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016177
Michael W. Hudson54241132001-12-07 15:38:26 +000016178
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016179
16180
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016181for h in `(cd $srcdir;echo Python/thread_*.h)`
16182do
16183 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16184done
16185
Michael W. Hudson54241132001-12-07 15:38:26 +000016186
Ned Deily0db50cf2014-07-25 12:41:31 -070016187SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16189$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016190for dir in $SRCDIRS; do
16191 if test ! -d $dir; then
16192 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016193 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016194done
Matthias Kloseb9621712010-04-24 17:59:49 +000016195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16196$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016197
Stefan Krah1919b7e2012-03-21 18:25:23 +010016198# Availability of -O2:
16199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16200$as_echo_n "checking for -O2... " >&6; }
16201saved_cflags="$CFLAGS"
16202CFLAGS="-O2"
16203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16204/* end confdefs.h. */
16205
16206int
16207main ()
16208{
16209
16210
16211 ;
16212 return 0;
16213}
16214_ACEOF
16215if ac_fn_c_try_compile "$LINENO"; then :
16216 have_O2=yes
16217else
16218 have_O2=no
16219fi
16220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16222$as_echo "$have_O2" >&6; }
16223CFLAGS="$saved_cflags"
16224
16225# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16226# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16228$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16229saved_cflags="$CFLAGS"
16230CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16231if test "$have_O2" = no; then
16232 CFLAGS=""
16233fi
16234if test "$cross_compiling" = yes; then :
16235 have_glibc_memmove_bug=undefined
16236else
16237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16238/* end confdefs.h. */
16239
16240#include <stdio.h>
16241#include <stdlib.h>
16242#include <string.h>
16243void foo(void *p, void *q) { memmove(p, q, 19); }
16244int main() {
16245 char a[32] = "123456789000000000";
16246 foo(&a[9], a);
16247 if (strcmp(a, "123456789123456789000000000") != 0)
16248 return 1;
16249 foo(a, &a[9]);
16250 if (strcmp(a, "123456789000000000") != 0)
16251 return 1;
16252 return 0;
16253}
16254
16255_ACEOF
16256if ac_fn_c_try_run "$LINENO"; then :
16257 have_glibc_memmove_bug=no
16258else
16259 have_glibc_memmove_bug=yes
16260fi
16261rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16262 conftest.$ac_objext conftest.beam conftest.$ac_ext
16263fi
16264
16265CFLAGS="$saved_cflags"
16266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16267$as_echo "$have_glibc_memmove_bug" >&6; }
16268if test "$have_glibc_memmove_bug" = yes; then
16269
16270$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16271
16272fi
16273
16274if test "$have_gcc_asm_for_x87" = yes; then
16275 # Some versions of gcc miscompile inline asm:
16276 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16277 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16278 case $CC in
16279 *gcc*)
16280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16281$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16282 saved_cflags="$CFLAGS"
16283 CFLAGS="-O2"
16284 if test "$cross_compiling" = yes; then :
16285 have_ipa_pure_const_bug=undefined
16286else
16287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16288/* end confdefs.h. */
16289
16290 __attribute__((noinline)) int
16291 foo(int *p) {
16292 int r;
16293 asm ( "movl \$6, (%1)\n\t"
16294 "xorl %0, %0\n\t"
16295 : "=r" (r) : "r" (p) : "memory"
16296 );
16297 return r;
16298 }
16299 int main() {
16300 int p = 8;
16301 if ((foo(&p) ? : p) != 6)
16302 return 1;
16303 return 0;
16304 }
16305
16306_ACEOF
16307if ac_fn_c_try_run "$LINENO"; then :
16308 have_ipa_pure_const_bug=no
16309else
16310 have_ipa_pure_const_bug=yes
16311fi
16312rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16313 conftest.$ac_objext conftest.beam conftest.$ac_ext
16314fi
16315
16316 CFLAGS="$saved_cflags"
16317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16318$as_echo "$have_ipa_pure_const_bug" >&6; }
16319 if test "$have_ipa_pure_const_bug" = yes; then
16320
16321$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16322
16323 fi
16324 ;;
16325 esac
16326fi
16327
Victor Stinner4f5366e2015-01-09 02:13:19 +010016328# Check for stdatomic.h
16329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16330$as_echo_n "checking for stdatomic.h... " >&6; }
16331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16332/* end confdefs.h. */
16333
16334
16335 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016336 atomic_int value = ATOMIC_VAR_INIT(1);
16337 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016338 int main() {
16339 int loaded_value = atomic_load(&value);
16340 return 0;
16341 }
16342
16343
16344_ACEOF
16345if ac_fn_c_try_link "$LINENO"; then :
16346 have_stdatomic_h=yes
16347else
16348 have_stdatomic_h=no
16349fi
16350rm -f core conftest.err conftest.$ac_objext \
16351 conftest$ac_exeext conftest.$ac_ext
16352
16353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16354$as_echo "$have_stdatomic_h" >&6; }
16355
16356if test "$have_stdatomic_h" = yes; then
16357
16358$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16359
16360fi
16361
16362# Check for GCC >= 4.7 __atomic builtins
16363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16364$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16366/* end confdefs.h. */
16367
16368
16369 volatile int val = 1;
16370 int main() {
16371 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16372 return 0;
16373 }
16374
16375
16376_ACEOF
16377if ac_fn_c_try_link "$LINENO"; then :
16378 have_builtin_atomic=yes
16379else
16380 have_builtin_atomic=no
16381fi
16382rm -f core conftest.err conftest.$ac_objext \
16383 conftest$ac_exeext conftest.$ac_ext
16384
16385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16386$as_echo "$have_builtin_atomic" >&6; }
16387
16388if test "$have_builtin_atomic" = yes; then
16389
16390$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16391
16392fi
16393
Ned Deily322f5ba2013-11-21 23:01:59 -080016394# ensurepip option
16395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16396$as_echo_n "checking for ensurepip... " >&6; }
16397
16398# Check whether --with-ensurepip was given.
16399if test "${with_ensurepip+set}" = set; then :
16400 withval=$with_ensurepip;
16401else
16402 with_ensurepip=upgrade
16403fi
16404
16405case $with_ensurepip in #(
16406 yes|upgrade) :
16407 ENSUREPIP=upgrade ;; #(
16408 install) :
16409 ENSUREPIP=install ;; #(
16410 no) :
16411 ENSUREPIP=no ;; #(
16412 *) :
16413 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16414esac
16415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16416$as_echo "$ENSUREPIP" >&6; }
16417
16418
Victor Stinner35a97c02015-03-08 02:59:09 +010016419# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16421$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16423/* end confdefs.h. */
16424
16425
16426 #include <dirent.h>
16427
16428 int main() {
16429 struct dirent entry;
16430 return entry.d_type == DT_UNKNOWN;
16431 }
16432
16433
16434_ACEOF
16435if ac_fn_c_try_link "$LINENO"; then :
16436 have_dirent_d_type=yes
16437else
16438 have_dirent_d_type=no
16439fi
16440rm -f core conftest.err conftest.$ac_objext \
16441 conftest$ac_exeext conftest.$ac_ext
16442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16443$as_echo "$have_dirent_d_type" >&6; }
16444
16445if test "$have_dirent_d_type" = yes; then
16446
16447$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16448
16449fi
16450
Victor Stinner9eb57c52015-03-19 22:21:49 +010016451# check if the Linux getrandom() syscall is available
16452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16453$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16455/* end confdefs.h. */
16456
16457
Victor Stinner1b80b242016-04-12 22:34:58 +020016458 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016459 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016460 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016461
16462 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016463 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016464 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016465 const int flags = GRND_NONBLOCK;
16466 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016467 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016468 return 0;
16469 }
16470
16471
16472_ACEOF
16473if ac_fn_c_try_link "$LINENO"; then :
16474 have_getrandom_syscall=yes
16475else
16476 have_getrandom_syscall=no
16477fi
16478rm -f core conftest.err conftest.$ac_objext \
16479 conftest$ac_exeext conftest.$ac_ext
16480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16481$as_echo "$have_getrandom_syscall" >&6; }
16482
16483if test "$have_getrandom_syscall" = yes; then
16484
16485$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16486
16487fi
16488
Victor Stinner3abf44e2015-09-18 15:38:37 +020016489# check if the getrandom() function is available
16490# the test was written for the Solaris function of <sys/random.h>
16491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16492$as_echo_n "checking for the getrandom() function... " >&6; }
16493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16494/* end confdefs.h. */
16495
16496
16497 #include <sys/random.h>
16498
16499 int main() {
16500 char buffer[1];
16501 const size_t buflen = sizeof(buffer);
16502 const int flags = 0;
16503 /* ignore the result, Python checks for ENOSYS at runtime */
16504 (void)getrandom(buffer, buflen, flags);
16505 return 0;
16506 }
16507
16508
16509_ACEOF
16510if ac_fn_c_try_link "$LINENO"; then :
16511 have_getrandom=yes
16512else
16513 have_getrandom=no
16514fi
16515rm -f core conftest.err conftest.$ac_objext \
16516 conftest$ac_exeext conftest.$ac_ext
16517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16518$as_echo "$have_getrandom" >&6; }
16519
16520if test "$have_getrandom" = yes; then
16521
16522$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16523
16524fi
16525
Guido van Rossum627b2d71993-12-24 10:39:16 +000016526# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016527ac_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 +000016528
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016529ac_config_files="$ac_config_files Modules/ld_so_aix"
16530
Martin v. Löwis11437992002-04-12 09:54:03 +000016531cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016532# This file is a shell script that caches the results of configure
16533# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016534# scripts and configure runs, see configure's option --config-cache.
16535# It is not useful on other systems. If it contains results you don't
16536# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016537#
Martin v. Löwis11437992002-04-12 09:54:03 +000016538# config.status only pays attention to the cache file if you give it
16539# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016540#
Skip Montanaro6dead952003-09-25 14:50:04 +000016541# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016542# loading this file, other *unset* `ac_cv_foo' will be assigned the
16543# following values.
16544
16545_ACEOF
16546
Guido van Rossumf78abae1997-01-21 22:02:36 +000016547# The following way of writing the cache mishandles newlines in values,
16548# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016549# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016550# Ultrix sh set writes to stderr and can't be redirected directly,
16551# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016552(
16553 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16554 eval ac_val=\$$ac_var
16555 case $ac_val in #(
16556 *${as_nl}*)
16557 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016558 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16559$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016560 esac
16561 case $ac_var in #(
16562 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016563 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16564 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016565 esac ;;
16566 esac
16567 done
16568
Martin v. Löwis11437992002-04-12 09:54:03 +000016569 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016570 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16571 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016572 # `set' does not quote correctly, so add quotes: double-quote
16573 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016574 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016575 "s/'/'\\\\''/g;
16576 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016577 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016578 *)
16579 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016580 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016581 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016582 esac |
16583 sort
16584) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016585 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016586 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016587 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016588 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016589 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16590 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016591 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16592 :end' >>confcache
16593if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16594 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016595 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016596 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16597$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016598 if test ! -f "$cache_file" || test -h "$cache_file"; then
16599 cat confcache >"$cache_file"
16600 else
16601 case $cache_file in #(
16602 */* | ?:*)
16603 mv -f confcache "$cache_file"$$ &&
16604 mv -f "$cache_file"$$ "$cache_file" ;; #(
16605 *)
16606 mv -f confcache "$cache_file" ;;
16607 esac
16608 fi
16609 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016610 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016611 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16612$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016613 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016614fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016615rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016616
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016617test "x$prefix" = xNONE && prefix=$ac_default_prefix
16618# Let make expand exec_prefix.
16619test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016620
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016621DEFS=-DHAVE_CONFIG_H
16622
Skip Montanaro6dead952003-09-25 14:50:04 +000016623ac_libobjs=
16624ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016625U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016626for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16627 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016628 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016629 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016630 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16631 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016632 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16633 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016634done
16635LIBOBJS=$ac_libobjs
16636
16637LTLIBOBJS=$ac_ltlibobjs
16638
16639
Martin v. Löwis11437992002-04-12 09:54:03 +000016640
Matthias Kloseb9621712010-04-24 17:59:49 +000016641
Victor Stinnere0be4232011-10-25 13:06:09 +020016642: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016643ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016644ac_clean_files_save=$ac_clean_files
16645ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016646{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16647$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16648as_write_fail=0
16649cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016650#! $SHELL
16651# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016652# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016653# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016654# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016655
Martin v. Löwis11437992002-04-12 09:54:03 +000016656debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016657ac_cs_recheck=false
16658ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016659
Matthias Kloseb9621712010-04-24 17:59:49 +000016660SHELL=\${CONFIG_SHELL-$SHELL}
16661export SHELL
16662_ASEOF
16663cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16664## -------------------- ##
16665## M4sh Initialization. ##
16666## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016668# Be more Bourne compatible
16669DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016670if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016671 emulate sh
16672 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016673 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016674 # is contrary to our usage. Disable this feature.
16675 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016676 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016677else
Matthias Kloseb9621712010-04-24 17:59:49 +000016678 case `(set -o) 2>/dev/null` in #(
16679 *posix*) :
16680 set -o posix ;; #(
16681 *) :
16682 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016683esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016684fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016685
16686
Matthias Kloseb9621712010-04-24 17:59:49 +000016687as_nl='
16688'
16689export as_nl
16690# Printing a long string crashes Solaris 7 /usr/bin/printf.
16691as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16692as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16693as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16694# Prefer a ksh shell builtin over an external printf program on Solaris,
16695# but without wasting forks for bash or zsh.
16696if test -z "$BASH_VERSION$ZSH_VERSION" \
16697 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16698 as_echo='print -r --'
16699 as_echo_n='print -rn --'
16700elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16701 as_echo='printf %s\n'
16702 as_echo_n='printf %s'
16703else
16704 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16705 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16706 as_echo_n='/usr/ucb/echo -n'
16707 else
16708 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16709 as_echo_n_body='eval
16710 arg=$1;
16711 case $arg in #(
16712 *"$as_nl"*)
16713 expr "X$arg" : "X\\(.*\\)$as_nl";
16714 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16715 esac;
16716 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16717 '
16718 export as_echo_n_body
16719 as_echo_n='sh -c $as_echo_n_body as_echo'
16720 fi
16721 export as_echo_body
16722 as_echo='sh -c $as_echo_body as_echo'
16723fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016724
16725# The user is always right.
16726if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016727 PATH_SEPARATOR=:
16728 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16729 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16730 PATH_SEPARATOR=';'
16731 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016732fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016734
16735# IFS
16736# We need space, tab and new line, in precisely that order. Quoting is
16737# there to prevent editors from complaining about space-tab.
16738# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16739# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016740IFS=" "" $as_nl"
16741
16742# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016743as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016744case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016745 *[\\/]* ) as_myself=$0 ;;
16746 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016747for as_dir in $PATH
16748do
16749 IFS=$as_save_IFS
16750 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016751 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16752 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016753IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016755 ;;
16756esac
16757# We did not find ourselves, most probably we were run as `sh COMMAND'
16758# in which case we are not to be found in the path.
16759if test "x$as_myself" = x; then
16760 as_myself=$0
16761fi
16762if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016763 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16764 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016765fi
16766
Matthias Kloseb9621712010-04-24 17:59:49 +000016767# Unset variables that we do not need and which cause bugs (e.g. in
16768# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16769# suppresses any "Segmentation fault" message there. '((' could
16770# trigger a bug in pdksh 5.2.14.
16771for as_var in BASH_ENV ENV MAIL MAILPATH
16772do eval test x\${$as_var+set} = xset \
16773 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016774done
16775PS1='$ '
16776PS2='> '
16777PS4='+ '
16778
16779# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016780LC_ALL=C
16781export LC_ALL
16782LANGUAGE=C
16783export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016784
Matthias Kloseb9621712010-04-24 17:59:49 +000016785# CDPATH.
16786(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16787
16788
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016789# as_fn_error STATUS ERROR [LINENO LOG_FD]
16790# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016791# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16792# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016793# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016794as_fn_error ()
16795{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016796 as_status=$1; test $as_status -eq 0 && as_status=1
16797 if test "$4"; then
16798 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16799 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016800 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016801 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016802 as_fn_exit $as_status
16803} # as_fn_error
16804
16805
16806# as_fn_set_status STATUS
16807# -----------------------
16808# Set $? to STATUS, without forking.
16809as_fn_set_status ()
16810{
16811 return $1
16812} # as_fn_set_status
16813
16814# as_fn_exit STATUS
16815# -----------------
16816# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16817as_fn_exit ()
16818{
16819 set +e
16820 as_fn_set_status $1
16821 exit $1
16822} # as_fn_exit
16823
16824# as_fn_unset VAR
16825# ---------------
16826# Portably unset VAR.
16827as_fn_unset ()
16828{
16829 { eval $1=; unset $1;}
16830}
16831as_unset=as_fn_unset
16832# as_fn_append VAR VALUE
16833# ----------------------
16834# Append the text in VALUE to the end of the definition contained in VAR. Take
16835# advantage of any shell optimizations that allow amortized linear growth over
16836# repeated appends, instead of the typical quadratic growth present in naive
16837# implementations.
16838if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16839 eval 'as_fn_append ()
16840 {
16841 eval $1+=\$2
16842 }'
16843else
16844 as_fn_append ()
16845 {
16846 eval $1=\$$1\$2
16847 }
16848fi # as_fn_append
16849
16850# as_fn_arith ARG...
16851# ------------------
16852# Perform arithmetic evaluation on the ARGs, and store the result in the
16853# global $as_val. Take advantage of shells that can avoid forks. The arguments
16854# must be portable across $(()) and expr.
16855if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16856 eval 'as_fn_arith ()
16857 {
16858 as_val=$(( $* ))
16859 }'
16860else
16861 as_fn_arith ()
16862 {
16863 as_val=`expr "$@" || test $? -eq 1`
16864 }
16865fi # as_fn_arith
16866
16867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016868if expr a : '\(a\)' >/dev/null 2>&1 &&
16869 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16870 as_expr=expr
16871else
16872 as_expr=false
16873fi
16874
16875if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16876 as_basename=basename
16877else
16878 as_basename=false
16879fi
16880
Matthias Kloseb9621712010-04-24 17:59:49 +000016881if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16882 as_dirname=dirname
16883else
16884 as_dirname=false
16885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016886
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016887as_me=`$as_basename -- "$0" ||
16888$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16889 X"$0" : 'X\(//\)$' \| \
16890 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016891$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016892 sed '/^.*\/\([^/][^/]*\)\/*$/{
16893 s//\1/
16894 q
16895 }
16896 /^X\/\(\/\/\)$/{
16897 s//\1/
16898 q
16899 }
16900 /^X\/\(\/\).*/{
16901 s//\1/
16902 q
16903 }
16904 s/.*/./; q'`
16905
Matthias Kloseb9621712010-04-24 17:59:49 +000016906# Avoid depending upon Character Ranges.
16907as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16908as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16909as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16910as_cr_digits='0123456789'
16911as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016912
16913ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016914case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016915-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016916 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016917 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016918 xy) ECHO_C='\c';;
16919 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16920 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016921 esac;;
16922*)
16923 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016924esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016925
Martin v. Löwis11437992002-04-12 09:54:03 +000016926rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016927if test -d conf$$.dir; then
16928 rm -f conf$$.dir/conf$$.file
16929else
16930 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016931 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016933if (echo >conf$$.file) 2>/dev/null; then
16934 if ln -s conf$$.file conf$$ 2>/dev/null; then
16935 as_ln_s='ln -s'
16936 # ... but there are two gotchas:
16937 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16938 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016939 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016940 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016941 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016942 elif ln conf$$.file conf$$ 2>/dev/null; then
16943 as_ln_s=ln
16944 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016945 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016946 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016947else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016948 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016950rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16951rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016952
Matthias Kloseb9621712010-04-24 17:59:49 +000016953
16954# as_fn_mkdir_p
16955# -------------
16956# Create "$as_dir" as a directory, including parents if necessary.
16957as_fn_mkdir_p ()
16958{
16959
16960 case $as_dir in #(
16961 -*) as_dir=./$as_dir;;
16962 esac
16963 test -d "$as_dir" || eval $as_mkdir_p || {
16964 as_dirs=
16965 while :; do
16966 case $as_dir in #(
16967 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16968 *) as_qdir=$as_dir;;
16969 esac
16970 as_dirs="'$as_qdir' $as_dirs"
16971 as_dir=`$as_dirname -- "$as_dir" ||
16972$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16973 X"$as_dir" : 'X\(//\)[^/]' \| \
16974 X"$as_dir" : 'X\(//\)$' \| \
16975 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16976$as_echo X"$as_dir" |
16977 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16978 s//\1/
16979 q
16980 }
16981 /^X\(\/\/\)[^/].*/{
16982 s//\1/
16983 q
16984 }
16985 /^X\(\/\/\)$/{
16986 s//\1/
16987 q
16988 }
16989 /^X\(\/\).*/{
16990 s//\1/
16991 q
16992 }
16993 s/.*/./; q'`
16994 test -d "$as_dir" && break
16995 done
16996 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016997 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016998
16999
17000} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017001if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017002 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017003else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017004 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017005 as_mkdir_p=false
17006fi
17007
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017008
17009# as_fn_executable_p FILE
17010# -----------------------
17011# Test if FILE is an executable regular file.
17012as_fn_executable_p ()
17013{
17014 test -f "$1" && test -x "$1"
17015} # as_fn_executable_p
17016as_test_x='test -x'
17017as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017018
17019# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017020as_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 +000017021
17022# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017023as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017024
17025
Martin v. Löwis11437992002-04-12 09:54:03 +000017026exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017027## ----------------------------------- ##
17028## Main body of $CONFIG_STATUS script. ##
17029## ----------------------------------- ##
17030_ASEOF
17031test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017032
Matthias Kloseb9621712010-04-24 17:59:49 +000017033cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17034# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017035# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017036# values after options handling.
17037ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017038This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017039generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017040
17041 CONFIG_FILES = $CONFIG_FILES
17042 CONFIG_HEADERS = $CONFIG_HEADERS
17043 CONFIG_LINKS = $CONFIG_LINKS
17044 CONFIG_COMMANDS = $CONFIG_COMMANDS
17045 $ $0 $@
17046
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017047on `(hostname || uname -n) 2>/dev/null | sed 1q`
17048"
17049
Martin v. Löwis11437992002-04-12 09:54:03 +000017050_ACEOF
17051
Matthias Kloseb9621712010-04-24 17:59:49 +000017052case $ac_config_files in *"
17053"*) set x $ac_config_files; shift; ac_config_files=$*;;
17054esac
17055
17056case $ac_config_headers in *"
17057"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17058esac
17059
17060
17061cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017062# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017063config_files="$ac_config_files"
17064config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017065
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017066_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017067
Matthias Kloseb9621712010-04-24 17:59:49 +000017068cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017069ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017070\`$as_me' instantiates files and other configuration actions
17071from templates according to the current configuration. Unless the files
17072and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017073
Matthias Kloseb9621712010-04-24 17:59:49 +000017074Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017075
17076 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017077 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017078 --config print configuration, then exit
17079 -q, --quiet, --silent
17080 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017081 -d, --debug don't remove temporary files
17082 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017083 --file=FILE[:TEMPLATE]
17084 instantiate the configuration file FILE
17085 --header=FILE[:TEMPLATE]
17086 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017087
17088Configuration files:
17089$config_files
17090
17091Configuration headers:
17092$config_headers
17093
Matthias Kloseb9621712010-04-24 17:59:49 +000017094Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017095
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017097cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17098ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017099ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017100python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017101configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017102 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017103
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017104Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017105This config.status script is free software; the Free Software Foundation
17106gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017107
17108ac_pwd='$ac_pwd'
17109srcdir='$srcdir'
17110INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017111MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017112test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017113_ACEOF
17114
Matthias Kloseb9621712010-04-24 17:59:49 +000017115cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17116# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017117ac_need_defaults=:
17118while test $# != 0
17119do
17120 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017121 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017122 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17123 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017124 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017125 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017126 --*=)
17127 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17128 ac_optarg=
17129 ac_shift=:
17130 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017131 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017132 ac_option=$1
17133 ac_optarg=$2
17134 ac_shift=shift
17135 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017136 esac
17137
Skip Montanaro6dead952003-09-25 14:50:04 +000017138 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017139 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017140 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17141 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017142 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017143 $as_echo "$ac_cs_version"; exit ;;
17144 --config | --confi | --conf | --con | --co | --c )
17145 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017146 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017147 debug=: ;;
17148 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017149 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017150 case $ac_optarg in
17151 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017152 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017153 esac
17154 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017155 ac_need_defaults=false;;
17156 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017157 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017158 case $ac_optarg in
17159 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17160 esac
17161 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017162 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017163 --he | --h)
17164 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017165 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017166Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017167 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017168 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017169 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17170 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17171 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017172
17173 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017174 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017175Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017176
Matthias Kloseb9621712010-04-24 17:59:49 +000017177 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017178 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017179
17180 esac
17181 shift
17182done
17183
Skip Montanaro6dead952003-09-25 14:50:04 +000017184ac_configure_extra_args=
17185
17186if $ac_cs_silent; then
17187 exec 6>/dev/null
17188 ac_configure_extra_args="$ac_configure_extra_args --silent"
17189fi
17190
17191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017192cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017193if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017194 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017195 shift
17196 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17197 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017198 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017199 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017200fi
17201
Martin v. Löwis11437992002-04-12 09:54:03 +000017202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017203cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017204exec 5>>config.log
17205{
17206 echo
17207 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17208## Running $as_me. ##
17209_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017210 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017211} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017214cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017215_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017216
Matthias Kloseb9621712010-04-24 17:59:49 +000017217cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017218
17219# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017220for ac_config_target in $ac_config_targets
17221do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017222 case $ac_config_target in
17223 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17224 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17225 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017226 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17227 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017228 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17229 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017230 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017231 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017232 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017233
Victor Stinnere0be4232011-10-25 13:06:09 +020017234 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017235 esac
17236done
17237
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017238
Martin v. Löwis11437992002-04-12 09:54:03 +000017239# If the user did not use the arguments to specify the items to instantiate,
17240# then the envvar interface is used. Set only those that are not.
17241# We use the long form for the default assignment because of an extremely
17242# bizarre bug on SunOS 4.1.3.
17243if $ac_need_defaults; then
17244 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17245 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17246fi
17247
Skip Montanaro6dead952003-09-25 14:50:04 +000017248# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017249# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017250# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017251# Hook for its removal unless debugging.
17252# Note that there is a small window in which the directory will not be cleaned:
17253# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017254$debug ||
17255{
Victor Stinnere0be4232011-10-25 13:06:09 +020017256 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017257 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017258 : "${ac_tmp:=$tmp}"
17259 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017260' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017261 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017262}
Martin v. Löwis11437992002-04-12 09:54:03 +000017263# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017264
Martin v. Löwis11437992002-04-12 09:54:03 +000017265{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017266 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017267 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017268} ||
17269{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017270 tmp=./conf$$-$RANDOM
17271 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017272} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017273ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017274
Matthias Kloseb9621712010-04-24 17:59:49 +000017275# Set up the scripts for CONFIG_FILES section.
17276# No need to generate them if there are no CONFIG_FILES.
17277# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017278if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017279
Matthias Kloseb9621712010-04-24 17:59:49 +000017280
17281ac_cr=`echo X | tr X '\015'`
17282# On cygwin, bash can eat \r inside `` if the user requested igncr.
17283# But we know of no other shell where ac_cr would be empty at this
17284# point, so we can use a bashism as a fallback.
17285if test "x$ac_cr" = x; then
17286 eval ac_cr=\$\'\\r\'
17287fi
17288ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17289if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017290 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017291else
17292 ac_cs_awk_cr=$ac_cr
17293fi
17294
Victor Stinnere0be4232011-10-25 13:06:09 +020017295echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017296_ACEOF
17297
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017298
Matthias Kloseb9621712010-04-24 17:59:49 +000017299{
17300 echo "cat >conf$$subs.awk <<_ACEOF" &&
17301 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17302 echo "_ACEOF"
17303} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017304 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17305ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017306ac_delim='%!_!# '
17307for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017308 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017309 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017310
Matthias Kloseb9621712010-04-24 17:59:49 +000017311 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17312 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017313 break
17314 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017315 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017316 else
17317 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017318 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017319done
Matthias Kloseb9621712010-04-24 17:59:49 +000017320rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017321
Matthias Kloseb9621712010-04-24 17:59:49 +000017322cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017323cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017325sed -n '
17326h
17327s/^/S["/; s/!.*/"]=/
17328p
17329g
17330s/^[^!]*!//
17331:repl
17332t repl
17333s/'"$ac_delim"'$//
17334t delim
17335:nl
17336h
17337s/\(.\{148\}\)..*/\1/
17338t more1
17339s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17340p
17341n
17342b repl
17343:more1
17344s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17345p
17346g
17347s/.\{148\}//
17348t nl
17349:delim
17350h
17351s/\(.\{148\}\)..*/\1/
17352t more2
17353s/["\\]/\\&/g; s/^/"/; s/$/"/
17354p
17355b
17356:more2
17357s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17358p
17359g
17360s/.\{148\}//
17361t delim
17362' <conf$$subs.awk | sed '
17363/^[^""]/{
17364 N
17365 s/\n//
17366}
17367' >>$CONFIG_STATUS || ac_write_fail=1
17368rm -f conf$$subs.awk
17369cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17370_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017371cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017372 for (key in S) S_is_set[key] = 1
17373 FS = ""
17374
17375}
17376{
17377 line = $ 0
17378 nfields = split(line, field, "@")
17379 substed = 0
17380 len = length(field[1])
17381 for (i = 2; i < nfields; i++) {
17382 key = field[i]
17383 keylen = length(key)
17384 if (S_is_set[key]) {
17385 value = S[key]
17386 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17387 len += length(value) + length(field[++i])
17388 substed = 1
17389 } else
17390 len += 1 + keylen
17391 }
17392
17393 print line
17394}
17395
17396_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017398cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17399if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17400 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17401else
17402 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017403fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017404 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017405_ACEOF
17406
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017407# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17408# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017409# trailing colons and then remove the whole line if VPATH becomes empty
17410# (actually we leave an empty line to preserve line numbers).
17411if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017412 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17413h
17414s///
17415s/^/:/
17416s/[ ]*$/:/
17417s/:\$(srcdir):/:/g
17418s/:\${srcdir}:/:/g
17419s/:@srcdir@:/:/g
17420s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017421s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017422x
17423s/\(=[ ]*\).*/\1/
17424G
17425s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017426s/^[^=]*=[ ]*$//
17427}'
17428fi
17429
Matthias Kloseb9621712010-04-24 17:59:49 +000017430cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017431fi # test -n "$CONFIG_FILES"
17432
Matthias Kloseb9621712010-04-24 17:59:49 +000017433# Set up the scripts for CONFIG_HEADERS section.
17434# No need to generate them if there are no CONFIG_HEADERS.
17435# This happens for instance with `./config.status Makefile'.
17436if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017437cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017438BEGIN {
17439_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017440
Matthias Kloseb9621712010-04-24 17:59:49 +000017441# Transform confdefs.h into an awk script `defines.awk', embedded as
17442# here-document in config.status, that substitutes the proper values into
17443# config.h.in to produce config.h.
17444
17445# Create a delimiter string that does not exist in confdefs.h, to ease
17446# handling of long lines.
17447ac_delim='%!_!# '
17448for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017449 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17450 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017451 break
17452 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017453 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017454 else
17455 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17456 fi
17457done
17458
17459# For the awk script, D is an array of macro values keyed by name,
17460# likewise P contains macro parameters if any. Preserve backslash
17461# newline sequences.
17462
17463ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17464sed -n '
17465s/.\{148\}/&'"$ac_delim"'/g
17466t rset
17467:rset
17468s/^[ ]*#[ ]*define[ ][ ]*/ /
17469t def
17470d
17471:def
17472s/\\$//
17473t bsnl
17474s/["\\]/\\&/g
17475s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17476D["\1"]=" \3"/p
17477s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17478d
17479:bsnl
17480s/["\\]/\\&/g
17481s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17482D["\1"]=" \3\\\\\\n"\\/p
17483t cont
17484s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17485t cont
17486d
17487:cont
17488n
17489s/.\{148\}/&'"$ac_delim"'/g
17490t clear
17491:clear
17492s/\\$//
17493t bsnlc
17494s/["\\]/\\&/g; s/^/"/; s/$/"/p
17495d
17496:bsnlc
17497s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17498b cont
17499' <confdefs.h | sed '
17500s/'"$ac_delim"'/"\\\
17501"/g' >>$CONFIG_STATUS || ac_write_fail=1
17502
17503cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17504 for (key in D) D_is_set[key] = 1
17505 FS = ""
17506}
17507/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17508 line = \$ 0
17509 split(line, arg, " ")
17510 if (arg[1] == "#") {
17511 defundef = arg[2]
17512 mac1 = arg[3]
17513 } else {
17514 defundef = substr(arg[1], 2)
17515 mac1 = arg[2]
17516 }
17517 split(mac1, mac2, "(") #)
17518 macro = mac2[1]
17519 prefix = substr(line, 1, index(line, defundef) - 1)
17520 if (D_is_set[macro]) {
17521 # Preserve the white space surrounding the "#".
17522 print prefix "define", macro P[macro] D[macro]
17523 next
17524 } else {
17525 # Replace #undef with comments. This is necessary, for example,
17526 # in the case of _POSIX_SOURCE, which is predefined and required
17527 # on some systems where configure will not decide to define it.
17528 if (defundef == "undef") {
17529 print "/*", prefix defundef, macro, "*/"
17530 next
17531 }
17532 }
17533}
17534{ print }
17535_ACAWK
17536_ACEOF
17537cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017538 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017539fi # test -n "$CONFIG_HEADERS"
17540
17541
17542eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17543shift
17544for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017545do
17546 case $ac_tag in
17547 :[FHLC]) ac_mode=$ac_tag; continue;;
17548 esac
17549 case $ac_mode$ac_tag in
17550 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017551 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017552 :[FH]-) ac_tag=-:-;;
17553 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17554 esac
17555 ac_save_IFS=$IFS
17556 IFS=:
17557 set x $ac_tag
17558 IFS=$ac_save_IFS
17559 shift
17560 ac_file=$1
17561 shift
17562
17563 case $ac_mode in
17564 :L) ac_source=$1;;
17565 :[FH])
17566 ac_file_inputs=
17567 for ac_f
17568 do
17569 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017570 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017571 *) # Look for the file first in the build tree, then in the source tree
17572 # (if the path is not absolute). The absolute path cannot be DOS-style,
17573 # because $ac_f cannot contain `:'.
17574 test -f "$ac_f" ||
17575 case $ac_f in
17576 [\\/$]*) false;;
17577 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17578 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017579 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017580 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017581 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17582 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017583 done
17584
17585 # Let's still pretend it is `configure' which instantiates (i.e., don't
17586 # use $as_me), people would be surprised to read:
17587 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017588 configure_input='Generated from '`
17589 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17590 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017591 if test x"$ac_file" != x-; then
17592 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017593 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17594$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017595 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017596 # Neutralize special characters interpreted by sed in replacement strings.
17597 case $configure_input in #(
17598 *\&* | *\|* | *\\* )
17599 ac_sed_conf_input=`$as_echo "$configure_input" |
17600 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17601 *) ac_sed_conf_input=$configure_input;;
17602 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017603
17604 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017605 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17606 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017607 esac
17608 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017609 esac
17610
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017611 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017612$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017613 X"$ac_file" : 'X\(//\)[^/]' \| \
17614 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017615 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017616$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017617 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17618 s//\1/
17619 q
17620 }
17621 /^X\(\/\/\)[^/].*/{
17622 s//\1/
17623 q
17624 }
17625 /^X\(\/\/\)$/{
17626 s//\1/
17627 q
17628 }
17629 /^X\(\/\).*/{
17630 s//\1/
17631 q
17632 }
17633 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017634 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017635 ac_builddir=.
17636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017637case "$ac_dir" in
17638.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17639*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017640 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017641 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017642 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017643 case $ac_top_builddir_sub in
17644 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17645 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17646 esac ;;
17647esac
17648ac_abs_top_builddir=$ac_pwd
17649ac_abs_builddir=$ac_pwd$ac_dir_suffix
17650# for backward compatibility:
17651ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017652
17653case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017654 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017655 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017656 ac_top_srcdir=$ac_top_builddir_sub
17657 ac_abs_top_srcdir=$ac_pwd ;;
17658 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017659 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017660 ac_top_srcdir=$srcdir
17661 ac_abs_top_srcdir=$srcdir ;;
17662 *) # Relative name.
17663 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17664 ac_top_srcdir=$ac_top_build_prefix$srcdir
17665 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017666esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017667ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017668
Martin v. Löwis11437992002-04-12 09:54:03 +000017669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017670 case $ac_mode in
17671 :F)
17672 #
17673 # CONFIG_FILE
17674 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017675
17676 case $INSTALL in
17677 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017678 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017679 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017680 ac_MKDIR_P=$MKDIR_P
17681 case $MKDIR_P in
17682 [\\/$]* | ?:[\\/]* ) ;;
17683 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17684 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017685_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017686
Matthias Kloseb9621712010-04-24 17:59:49 +000017687cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017688# If the template does not know about datarootdir, expand it.
17689# FIXME: This hack should be removed a few years after 2.60.
17690ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017691ac_sed_dataroot='
17692/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017693 p
17694 q
17695}
17696/@datadir@/p
17697/@docdir@/p
17698/@infodir@/p
17699/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017700/@mandir@/p'
17701case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017702*datarootdir*) ac_datarootdir_seen=yes;;
17703*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017704 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17705$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017707cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017708 ac_datarootdir_hack='
17709 s&@datadir@&$datadir&g
17710 s&@docdir@&$docdir&g
17711 s&@infodir@&$infodir&g
17712 s&@localedir@&$localedir&g
17713 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017714 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017715esac
17716_ACEOF
17717
17718# Neutralize VPATH when `$srcdir' = `.'.
17719# Shell code in configure.ac might set extrasub.
17720# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017721cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17722ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017723$extrasub
17724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017725cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017726:t
17727/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017728s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017729s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017730s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017731s&@srcdir@&$ac_srcdir&;t t
17732s&@abs_srcdir@&$ac_abs_srcdir&;t t
17733s&@top_srcdir@&$ac_top_srcdir&;t t
17734s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17735s&@builddir@&$ac_builddir&;t t
17736s&@abs_builddir@&$ac_abs_builddir&;t t
17737s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17738s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017739s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017740$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017741"
Victor Stinnere0be4232011-10-25 13:06:09 +020017742eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17743 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017744
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017745test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017746 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17747 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17748 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017749 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017750which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017751$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017752which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017753
Victor Stinnere0be4232011-10-25 13:06:09 +020017754 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017755 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017756 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17757 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017758 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017759 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017760 ;;
17761 :H)
17762 #
17763 # CONFIG_HEADER
17764 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017765 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017766 {
17767 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017768 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17769 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017770 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017771 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017772 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17773$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017774 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017775 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017776 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017777 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017778 fi
17779 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017780 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017781 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017782 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017783 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017784 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017785
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017786
17787 esac
17788
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017789
17790 case $ac_file$ac_mode in
17791 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17792
17793 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017794done # for ac_tag
17795
Guido van Rossum627b2d71993-12-24 10:39:16 +000017796
Matthias Kloseb9621712010-04-24 17:59:49 +000017797as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017798_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017799ac_clean_files=$ac_clean_files_save
17800
Matthias Kloseb9621712010-04-24 17:59:49 +000017801test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017802 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017803
Martin v. Löwis11437992002-04-12 09:54:03 +000017804
17805# configure is writing to config.log, and then calls config.status.
17806# config.status does its own redirection, appending to config.log.
17807# Unfortunately, on DOS this fails, as config.log is still kept open
17808# by configure, so config.status won't be able to write to it; its
17809# output is simply discarded. So we exec the FD to /dev/null,
17810# effectively closing config.log, so it can be properly (re)opened and
17811# appended to by config.status. When coming back to configure, we
17812# need to make the FD available again.
17813if test "$no_create" != yes; then
17814 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017815 ac_config_status_args=
17816 test "$silent" = yes &&
17817 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017818 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017819 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017820 exec 5>>config.log
17821 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17822 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017823 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017824fi
17825if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17827$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017828fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017829
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017830
Christian Heimes75ed8902013-11-20 01:11:18 +010017831echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017832if test ! -f Modules/Setup
17833then
17834 cp $srcdir/Modules/Setup.dist Modules/Setup
17835fi
17836
Christian Heimes75ed8902013-11-20 01:11:18 +010017837echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017838if test ! -f Modules/Setup.local
17839then
17840 echo "# Edit this file for local setup changes" >Modules/Setup.local
17841fi
17842
Christian Heimes75ed8902013-11-20 01:11:18 +010017843echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017844$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17845 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017846 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017847mv config.c Modules