blob: 7b0253059736ff429f816c19959fc550b54379e8 [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
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002893ac_aux_dir=
2894for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2895 if test -f "$ac_dir/install-sh"; then
2896 ac_aux_dir=$ac_dir
2897 ac_install_sh="$ac_aux_dir/install-sh -c"
2898 break
2899 elif test -f "$ac_dir/install.sh"; then
2900 ac_aux_dir=$ac_dir
2901 ac_install_sh="$ac_aux_dir/install.sh -c"
2902 break
2903 elif test -f "$ac_dir/shtool"; then
2904 ac_aux_dir=$ac_dir
2905 ac_install_sh="$ac_aux_dir/shtool install -c"
2906 break
2907 fi
2908done
2909if test -z "$ac_aux_dir"; then
2910 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2911fi
2912
2913# These three variables are undocumented and unsupported,
2914# and are intended to be withdrawn in a future Autoconf release.
2915# They can cause serious problems if a builder's source tree is in a directory
2916# whose full name contains unusual characters.
2917ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2918ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2919ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2920
2921
2922# Make sure we can run config.sub.
2923$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2924 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2925
2926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2927$as_echo_n "checking build system type... " >&6; }
2928if ${ac_cv_build+:} false; then :
2929 $as_echo_n "(cached) " >&6
2930else
2931 ac_build_alias=$build_alias
2932test "x$ac_build_alias" = x &&
2933 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2934test "x$ac_build_alias" = x &&
2935 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2936ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2937 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2938
2939fi
2940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2941$as_echo "$ac_cv_build" >&6; }
2942case $ac_cv_build in
2943*-*-*) ;;
2944*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2945esac
2946build=$ac_cv_build
2947ac_save_IFS=$IFS; IFS='-'
2948set x $ac_cv_build
2949shift
2950build_cpu=$1
2951build_vendor=$2
2952shift; shift
2953# Remember, the first character of IFS is used to create $*,
2954# except with old shells:
2955build_os=$*
2956IFS=$ac_save_IFS
2957case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2958
2959
2960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2961$as_echo_n "checking host system type... " >&6; }
2962if ${ac_cv_host+:} false; then :
2963 $as_echo_n "(cached) " >&6
2964else
2965 if test "x$host_alias" = x; then
2966 ac_cv_host=$ac_cv_build
2967else
2968 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2969 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2970fi
2971
2972fi
2973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2974$as_echo "$ac_cv_host" >&6; }
2975case $ac_cv_host in
2976*-*-*) ;;
2977*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2978esac
2979host=$ac_cv_host
2980ac_save_IFS=$IFS; IFS='-'
2981set x $ac_cv_host
2982shift
2983host_cpu=$1
2984host_vendor=$2
2985shift; shift
2986# Remember, the first character of IFS is used to create $*,
2987# except with old shells:
2988host_os=$*
2989IFS=$ac_save_IFS
2990case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2991
2992
2993
doko@python.orga10e4a92013-01-25 18:45:12 +01002994
2995
Ned Deilyfcbc2462014-08-22 13:32:49 -07002996# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2997rm -f pybuilddir.txt
2998
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002999if test "$cross_compiling" = yes; then
3000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
3001$as_echo_n "checking for python interpreter for cross build... " >&6; }
3002 if test -z "$PYTHON_FOR_BUILD"; then
3003 for interp in python$PACKAGE_VERSION python3 python; do
3004 which $interp >/dev/null 2>&1 || continue
3005 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
3006 break
3007 fi
3008 interp=
3009 done
3010 if test x$interp = x; then
3011 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3012 fi
3013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3014$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01003015 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 +02003016 fi
Christian Heimes954ac032012-12-12 13:10:21 +01003017elif test "$cross_compiling" = maybe; then
3018 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003019else
3020 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3021fi
3022
3023
Martin v. Löwis11437992002-04-12 09:54:03 +00003024
Benjamin Petersond23f8222009-04-05 19:13:16 +00003025if test "$prefix" != "/"; then
3026 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3027fi
3028
3029
Martin v. Löwis11437992002-04-12 09:54:03 +00003030
3031
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003032# We don't use PACKAGE_ variables, and they cause conflicts
3033# with other autoconf-based packages that include Python.h
3034grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3035rm confdefs.h
3036mv confdefs.h.new confdefs.h
3037
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003038
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003039VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003040
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003041# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003042
3043SOVERSION=1.0
3044
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003045# The later defininition of _XOPEN_SOURCE disables certain features
3046# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3047
Matthias Kloseb9621712010-04-24 17:59:49 +00003048$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003049
3050
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003051# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3052# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3053# them.
3054
Matthias Kloseb9621712010-04-24 17:59:49 +00003055$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003056
3057
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003058# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3059# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3060# them.
3061
Matthias Kloseb9621712010-04-24 17:59:49 +00003062$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003063
3064
Martin v. Löwisd6320502004-08-12 13:45:08 +00003065# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3066# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3067
Matthias Kloseb9621712010-04-24 17:59:49 +00003068$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003069
3070
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003071# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3072# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3073# them.
3074
Matthias Kloseb9621712010-04-24 17:59:49 +00003075$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076
3077
3078
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003079define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003080
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003081# Arguments passed to configure.
3082
3083CONFIG_ARGS="$ac_configure_args"
3084
Matthias Kloseb9621712010-04-24 17:59:49 +00003085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3086$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003087# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003088if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003089 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003090 case $enableval in
3091 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003092 # Locate the best usable SDK, see Mac/README.txt for more
3093 # information
3094 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003095 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003096 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003097 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3098 if test ! -d "${enableval}"
3099 then
3100 enableval=/
3101 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003102 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003103 ;;
3104 esac
3105 case $enableval in
3106 no)
3107 UNIVERSALSDK=
3108 enable_universalsdk=
3109 ;;
3110 *)
3111 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003112 if test ! -d "${UNIVERSALSDK}"
3113 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003114 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003115 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003116 ;;
3117 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003118
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003119
Thomas Wouters477c8d52006-05-27 19:21:47 +00003120else
3121
3122 UNIVERSALSDK=
3123 enable_universalsdk=
3124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003125fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003126
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003127if test -n "${UNIVERSALSDK}"
3128then
Matthias Kloseb9621712010-04-24 17:59:49 +00003129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3130$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003131else
Matthias Kloseb9621712010-04-24 17:59:49 +00003132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3133$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003134fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003136
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003137
Ned Deily87adb6e2013-10-18 21:09:56 -07003138ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003139
Ned Deilycbfb9a52012-06-23 16:02:19 -07003140# For backward compatibility reasons we prefer to select '32-bit' if available,
3141# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003142UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003143if test "`uname -s`" = "Darwin"
3144then
3145 if test -n "${UNIVERSALSDK}"
3146 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003147 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003148 then
3149 UNIVERSAL_ARCHS="intel"
3150 fi
3151 fi
3152fi
3153
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003154
Matthias Kloseb9621712010-04-24 17:59:49 +00003155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3156$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003157
3158# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003159if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003160 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003161 UNIVERSAL_ARCHS="$withval"
3162
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003163fi
3164
Ned Deily87adb6e2013-10-18 21:09:56 -07003165if test -n "${UNIVERSALSDK}"
3166then
3167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3168$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3169else
3170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3171$as_echo "no" >&6; }
3172fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003173
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003174
3175# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003176if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003177 withval=$with_framework_name;
3178 PYTHONFRAMEWORK=${withval}
3179 PYTHONFRAMEWORKDIR=${withval}.framework
3180 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3181
3182else
3183
3184 PYTHONFRAMEWORK=Python
3185 PYTHONFRAMEWORKDIR=Python.framework
3186 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3187
3188fi
3189
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003190# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003191if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003192 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003193 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003194 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003195 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003196 esac
3197 case $enableval in
3198 no)
3199 PYTHONFRAMEWORK=
3200 PYTHONFRAMEWORKDIR=no-framework
3201 PYTHONFRAMEWORKPREFIX=
3202 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003203 FRAMEWORKINSTALLFIRST=
3204 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003205 FRAMEWORKALTINSTALLFIRST=
3206 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003207 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003208 if test "x${prefix}" = "xNONE"; then
3209 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3210 else
3211 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3212 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003213 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003214 ;;
3215 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003216 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003217 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003218 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003219 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003220 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3221 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003222 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003223 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003224
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003225 if test "x${prefix}" = "xNONE" ; then
3226 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003227
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003228 else
3229 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3230 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003231
3232 case "${enableval}" in
3233 /System*)
3234 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3235 if test "${prefix}" = "NONE" ; then
3236 # See below
3237 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3238 fi
3239 ;;
3240
3241 /Library*)
3242 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3243 ;;
3244
3245 */Library/Frameworks)
3246 MDIR="`dirname "${enableval}"`"
3247 MDIR="`dirname "${MDIR}"`"
3248 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3249
3250 if test "${prefix}" = "NONE"; then
3251 # User hasn't specified the
3252 # --prefix option, but wants to install
3253 # the framework in a non-default location,
3254 # ensure that the compatibility links get
3255 # installed relative to that prefix as well
3256 # instead of in /usr/local.
3257 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3258 fi
3259 ;;
3260
3261 *)
3262 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3263 ;;
3264 esac
3265
Jack Jansen127e56e2001-09-11 14:41:54 +00003266 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003267
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003268 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003269 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003270 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003272 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003273
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003274 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3275
3276 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3277
Jack Jansene578a632001-08-15 01:27:14 +00003278 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003279
Guido van Rossum563e7081996-09-10 18:20:48 +00003280else
Martin v. Löwis11437992002-04-12 09:54:03 +00003281
Jack Jansene578a632001-08-15 01:27:14 +00003282 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003283 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003284 PYTHONFRAMEWORKPREFIX=
3285 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003286 FRAMEWORKINSTALLFIRST=
3287 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003288 FRAMEWORKALTINSTALLFIRST=
3289 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003290 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003291 if test "x${prefix}" = "xNONE" ; then
3292 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3293 else
3294 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3295 fi
Jack Jansene578a632001-08-15 01:27:14 +00003296 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003297
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003298
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003299fi
3300
Thomas Wouters477c8d52006-05-27 19:21:47 +00003301
3302
Michael W. Hudson54241132001-12-07 15:38:26 +00003303
3304
3305
3306
Jack Jansene578a632001-08-15 01:27:14 +00003307
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003308
3309
3310
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003311
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003312
Ned Deilyb8f944f2013-11-21 22:42:25 -08003313
Jack Jansene578a632001-08-15 01:27:14 +00003314##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003315## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003316## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003317##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003318# Set name for machine-dependent library files
3319
Matthias Kloseb9621712010-04-24 17:59:49 +00003320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3321$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003322if test -z "$MACHDEP"
3323then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003324 # avoid using uname for cross builds
3325 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003326 # ac_sys_system and ac_sys_release are used for setting
3327 # a lot of different things including 'define_xopen_source'
3328 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003329 case "$host" in
3330 *-*-linux*)
3331 ac_sys_system=Linux
3332 ;;
3333 *-*-cygwin*)
3334 ac_sys_system=Cygwin
3335 ;;
3336 *)
3337 # for now, limit cross builds to known configurations
3338 MACHDEP="unknown"
3339 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3340 esac
3341 ac_sys_release=
3342 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003343 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003344 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003345 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003346 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003347 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003348 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003349 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003350 fi
3351 ac_md_system=`echo $ac_sys_system |
3352 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3353 ac_md_release=`echo $ac_sys_release |
3354 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3355 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003356
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003357 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003358 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003359 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003360 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003361 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003362 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003363 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003364fi
Guido van Rossum91922671997-10-09 20:24:13 +00003365
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003366
3367if test "$cross_compiling" = yes; then
3368 case "$host" in
3369 *-*-linux*)
3370 case "$host_cpu" in
3371 arm*)
3372 _host_cpu=arm
3373 ;;
3374 *)
3375 _host_cpu=$host_cpu
3376 esac
3377 ;;
3378 *-*-cygwin*)
3379 _host_cpu=
3380 ;;
3381 *)
3382 # for now, limit cross builds to known configurations
3383 MACHDEP="unknown"
3384 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3385 esac
3386 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3387fi
3388
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003389# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3390# disable features if it is defined, without any means to access these
3391# features as extensions. For these systems, we skip the definition of
3392# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3393# some feature, make sure there is no alternative way to access this
3394# feature. Also, when using wildcards, make sure you have verified the
3395# need for not defining _XOPEN_SOURCE on all systems matching the
3396# wildcard, and that the wildcard does not include future systems
3397# (which may remove their limitations).
3398case $ac_sys_system/$ac_sys_release in
3399 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3400 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003401 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003402 # In addition, Stefan Krah confirms that issue #1244610 exists through
3403 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003404 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003405 define_xopen_source=no
3406 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3407 # also defined. This can be overridden by defining _BSD_SOURCE
3408 # As this has a different meaning on Linux, only define it on OpenBSD
3409
Matthias Kloseb9621712010-04-24 17:59:49 +00003410$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003411
3412 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003413 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003414 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3415 # also defined. This can be overridden by defining _BSD_SOURCE
3416 # As this has a different meaning on Linux, only define it on OpenBSD
3417
Matthias Kloseb9621712010-04-24 17:59:49 +00003418$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003419
3420 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003421 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3422 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3423 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003424 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 +00003425 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003426 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3427 # request to enable features supported by the standard as a request
3428 # to disable features not supported by the standard. The best way
3429 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3430 # entirely and define __EXTENSIONS__ instead.
3431 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003432 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003433 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3434 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003435 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003436 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003437 define_xopen_source=no;;
3438 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003439 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003440 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003441 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003442 # On FreeBSD 4, the math functions C89 does not cover are never defined
3443 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3444 FreeBSD/4.*)
3445 define_xopen_source=no;;
3446 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3447 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3448 # identifies itself as Darwin/7.*
3449 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3450 # disables platform specific features beyond repair.
3451 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3452 # has no effect, don't bother defining them
3453 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003454 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003455 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003456 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003457 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3458 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3459 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003460 AIX/4)
3461 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003462 AIX/5)
3463 if test `uname -r` -eq 1; then
3464 define_xopen_source=no
3465 fi
3466 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003467 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3468 # defining NI_NUMERICHOST.
3469 QNX/6.3.2)
3470 define_xopen_source=no
3471 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003472
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003473esac
3474
3475if test $define_xopen_source = yes
3476then
Victor Stinner14d098d2011-09-07 22:29:43 +02003477 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003478
Victor Stinner14d098d2011-09-07 22:29:43 +02003479$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003480
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003481
3482 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3483 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3484 # several APIs are not declared. Since this is also needed in some
3485 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003486
Matthias Kloseb9621712010-04-24 17:59:49 +00003487$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003488
3489
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003490
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003491$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003492
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003493fi
3494
Christian Heimes647cd872013-12-07 23:39:33 +01003495# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3496case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003497 hp*|HP*)
3498 define_stdc_a1=yes;;
3499 *)
3500 define_stdc_a1=no;;
3501esac
3502
3503if test $define_stdc_a1 = yes
3504then
Christian Heimes647cd872013-12-07 23:39:33 +01003505
3506$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3507
Christian Heimesb02bcae2013-12-08 15:21:08 +01003508fi
Christian Heimes647cd872013-12-07 23:39:33 +01003509
Guido van Rossum91922671997-10-09 20:24:13 +00003510#
3511# SGI compilers allow the specification of the both the ABI and the
3512# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003513# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003514#
3515# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3516# thus supply support for various ABI/ISA combinations. The MACHDEP
3517# variable is also adjusted.
3518#
3519
3520if test ! -z "$SGI_ABI"
3521then
3522 CC="cc $SGI_ABI"
3523 LDFLAGS="$SGI_ABI $LDFLAGS"
3524 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3527$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003528
Jack Jansen6b08a402004-06-03 12:41:45 +00003529# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3530# it may influence the way we can build extensions, so distutils
3531# needs to check it
3532
Thomas Wouters477c8d52006-05-27 19:21:47 +00003533
Jack Jansen6b08a402004-06-03 12:41:45 +00003534CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003535EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003536
Guido van Rossum627b2d71993-12-24 10:39:16 +00003537# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003538
3539# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3540# for debug/optimization stuff. BASECFLAGS is for flags that are required
3541# just to get things to compile and link. Users are free to override OPT
3542# when running configure or make. The build should not break if they do.
3543# BASECFLAGS should generally not be messed with, however.
3544
3545# XXX shouldn't some/most/all of this code be merged with the stuff later
3546# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3548$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003549
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003550# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003551if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003552 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003553 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003554 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003555 without_gcc=yes;;
3556 yes) CC=gcc
3557 without_gcc=no;;
3558 *) CC=$withval
3559 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003560 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003561else
Martin v. Löwis11437992002-04-12 09:54:03 +00003562
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003563 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003564 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003565 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003566 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003567 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003568fi
3569
Matthias Kloseb9621712010-04-24 17:59:49 +00003570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3571$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003572
Zachary Ware5af85642015-12-21 12:09:17 -06003573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3574$as_echo_n "checking for --with-icc... " >&6; }
3575
3576# Check whether --with-icc was given.
3577if test "${with_icc+set}" = set; then :
3578 withval=$with_icc;
3579 case $withval in
3580 no) CC=${CC:-cc}
3581 with_icc=no;;
3582 yes) CC=icc
3583 CXX=icpc
3584 with_icc=yes;;
3585 *) CC=$withval
3586 with_icc=$withval;;
3587 esac
3588else
3589
3590 with_icc=no
3591fi
3592
3593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3594$as_echo "$with_icc" >&6; }
3595
Guido van Rossum8b131c51995-03-09 14:10:13 +00003596# If the user switches compilers, we can't believe the cache
3597if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3598then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003599 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003600(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003601fi
3602
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003603# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3604# when the compiler supports them, but we don't always want -O2, and
3605# we set -g later.
3606if test -z "$CFLAGS"; then
3607 CFLAGS=
3608fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003609
3610if test "$ac_sys_system" = "Darwin"
3611then
3612 # Compiler selection on MacOSX is more complicated than
3613 # AC_PROG_CC can handle, see Mac/README.txt for more
3614 # information
3615 if test -z "${CC}"
3616 then
3617 found_gcc=
3618 found_clang=
3619 as_save_IFS=$IFS; IFS=:
3620 for as_dir in $PATH
3621 do
3622 IFS=$as_save_IFS
3623 if test -x $as_dir/gcc; then
3624 if test -z "${found_gcc}"; then
3625 found_gcc=$as_dir/gcc
3626 fi
3627 fi
3628 if test -x $as_dir/clang; then
3629 if test -z "${found_clang}"; then
3630 found_clang=$as_dir/clang
3631 fi
3632 fi
3633 done
3634 IFS=$as_save_IFS
3635
3636 if test -n "$found_gcc" -a -n "$found_clang"
3637 then
3638 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3639 then
3640 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3641$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3642 CC="$found_clang"
3643 CXX="$found_clang++"
3644 fi
3645
3646
3647 elif test -z "$found_gcc" -a -n "$found_clang"
3648 then
3649 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3650$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3651 CC="$found_clang"
3652 CXX="$found_clang++"
3653
3654 elif test -z "$found_gcc" -a -z "$found_clang"
3655 then
3656 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3657 if test -n "${found_clang}"
3658 then
3659 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3660$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3661 CC="${found_clang}"
3662 CXX="`/usr/bin/xcrun -find clang++`"
3663
3664 # else: use default behaviour
3665 fi
3666 fi
3667 fi
3668fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003669ac_ext=c
3670ac_cpp='$CPP $CPPFLAGS'
3671ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3672ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3673ac_compiler_gnu=$ac_cv_c_compiler_gnu
3674if test -n "$ac_tool_prefix"; then
3675 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3676set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3678$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003679if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003680 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003681else
3682 if test -n "$CC"; then
3683 ac_cv_prog_CC="$CC" # Let the user override the test.
3684else
Martin v. Löwis11437992002-04-12 09:54:03 +00003685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3686for as_dir in $PATH
3687do
3688 IFS=$as_save_IFS
3689 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003691 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003692 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003693 $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 +00003694 break 2
3695 fi
3696done
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003699
Jack Jansendd19cf82001-12-06 22:36:17 +00003700fi
3701fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003702CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003703if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3705$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003706else
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3708$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003709fi
3710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003711
Martin v. Löwis11437992002-04-12 09:54:03 +00003712fi
3713if test -z "$ac_cv_prog_CC"; then
3714 ac_ct_CC=$CC
3715 # Extract the first word of "gcc", so it can be a program name with args.
3716set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3718$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003719if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003721else
3722 if test -n "$ac_ct_CC"; then
3723 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3724else
3725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3726for as_dir in $PATH
3727do
3728 IFS=$as_save_IFS
3729 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003730 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003732 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 $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 +00003734 break 2
3735 fi
3736done
Matthias Kloseb9621712010-04-24 17:59:49 +00003737 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003739
3740fi
3741fi
3742ac_ct_CC=$ac_cv_prog_ac_ct_CC
3743if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3745$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003746else
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3748$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003749fi
3750
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003751 if test "x$ac_ct_CC" = x; then
3752 CC=""
3753 else
3754 case $cross_compiling:$ac_tool_warned in
3755yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003756{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3757$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003758ac_tool_warned=yes ;;
3759esac
3760 CC=$ac_ct_CC
3761 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003762else
3763 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003764fi
3765
Jack Jansendd19cf82001-12-06 22:36:17 +00003766if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767 if test -n "$ac_tool_prefix"; then
3768 # 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 +00003769set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3771$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003772if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003774else
3775 if test -n "$CC"; then
3776 ac_cv_prog_CC="$CC" # Let the user override the test.
3777else
Martin v. Löwis11437992002-04-12 09:54:03 +00003778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3779for as_dir in $PATH
3780do
3781 IFS=$as_save_IFS
3782 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003784 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003785 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 $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 +00003787 break 2
3788 fi
3789done
Matthias Kloseb9621712010-04-24 17:59:49 +00003790 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003791IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003792
3793fi
3794fi
3795CC=$ac_cv_prog_CC
3796if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3798$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003799else
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3801$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003802fi
3803
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003804
Martin v. Löwis11437992002-04-12 09:54:03 +00003805 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003806fi
3807if test -z "$CC"; then
3808 # Extract the first word of "cc", so it can be a program name with args.
3809set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3811$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003812if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003814else
3815 if test -n "$CC"; then
3816 ac_cv_prog_CC="$CC" # Let the user override the test.
3817else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003818 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3820for as_dir in $PATH
3821do
3822 IFS=$as_save_IFS
3823 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003825 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003826 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3827 ac_prog_rejected=yes
3828 continue
3829 fi
3830 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 $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 +00003832 break 2
3833 fi
3834done
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003836IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003837
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003838if test $ac_prog_rejected = yes; then
3839 # We found a bogon in the path, so make sure we never use it.
3840 set dummy $ac_cv_prog_CC
3841 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003842 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003843 # We chose a different compiler from the bogus one.
3844 # However, it has the same basename, so the bogon will be chosen
3845 # first if we set CC to just the basename; use the full file name.
3846 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003847 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003848 fi
3849fi
3850fi
3851fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003852CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003853if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3855$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003856else
Matthias Kloseb9621712010-04-24 17:59:49 +00003857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3858$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003859fi
3860
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861
Martin v. Löwis11437992002-04-12 09:54:03 +00003862fi
3863if test -z "$CC"; then
3864 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003866 do
3867 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3868set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3870$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003871if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003872 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003873else
3874 if test -n "$CC"; then
3875 ac_cv_prog_CC="$CC" # Let the user override the test.
3876else
Martin v. Löwis11437992002-04-12 09:54:03 +00003877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3878for as_dir in $PATH
3879do
3880 IFS=$as_save_IFS
3881 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003882 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003884 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003885 $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 +00003886 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003887 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003888done
Matthias Kloseb9621712010-04-24 17:59:49 +00003889 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003891
3892fi
3893fi
3894CC=$ac_cv_prog_CC
3895if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3897$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003898else
Matthias Kloseb9621712010-04-24 17:59:49 +00003899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3900$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003901fi
3902
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003903
Martin v. Löwis11437992002-04-12 09:54:03 +00003904 test -n "$CC" && break
3905 done
3906fi
3907if test -z "$CC"; then
3908 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003910do
3911 # Extract the first word of "$ac_prog", so it can be a program name with args.
3912set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3914$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003915if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003916 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003917else
3918 if test -n "$ac_ct_CC"; then
3919 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3920else
3921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3922for as_dir in $PATH
3923do
3924 IFS=$as_save_IFS
3925 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003926 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003927 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003928 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003929 $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 +00003930 break 2
3931 fi
3932done
Matthias Kloseb9621712010-04-24 17:59:49 +00003933 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003935
Martin v. Löwis11437992002-04-12 09:54:03 +00003936fi
3937fi
3938ac_ct_CC=$ac_cv_prog_ac_ct_CC
3939if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3941$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003942else
Matthias Kloseb9621712010-04-24 17:59:49 +00003943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3944$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003945fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003946
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003947
Martin v. Löwis11437992002-04-12 09:54:03 +00003948 test -n "$ac_ct_CC" && break
3949done
Michael W. Hudson54241132001-12-07 15:38:26 +00003950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 if test "x$ac_ct_CC" = x; then
3952 CC=""
3953 else
3954 case $cross_compiling:$ac_tool_warned in
3955yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003956{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3957$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958ac_tool_warned=yes ;;
3959esac
3960 CC=$ac_ct_CC
3961 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003962fi
3963
3964fi
3965
3966
Matthias Kloseb9621712010-04-24 17:59:49 +00003967test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3968$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003969as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003970See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003971
3972# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003973$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3974set X $ac_compile
3975ac_compiler=$2
3976for ac_option in --version -v -V -qversion; do
3977 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978case "(($ac_try" in
3979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3980 *) ac_try_echo=$ac_try;;
3981esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003982eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3983$as_echo "$ac_try_echo"; } >&5
3984 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003985 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003986 if test -s conftest.err; then
3987 sed '10a\
3988... rest of stderr output deleted ...
3989 10q' conftest.err >conftest.er1
3990 cat conftest.er1 >&5
3991 fi
3992 rm -f conftest.er1 conftest.err
3993 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3994 test $ac_status = 0; }
3995done
Martin v. Löwis11437992002-04-12 09:54:03 +00003996
Matthias Kloseb9621712010-04-24 17:59:49 +00003997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003998/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003999
Martin v. Löwis11437992002-04-12 09:54:03 +00004000int
4001main ()
4002{
4003
4004 ;
4005 return 0;
4006}
4007_ACEOF
4008ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00004009ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00004010# Try to create an executable without -o first, disregard a.out.
4011# It will help us diagnose broken compilers, and finding out an intuition
4012# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00004013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4014$as_echo_n "checking whether the C compiler works... " >&6; }
4015ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4016
4017# The possible output files:
4018ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004020ac_rmfiles=
4021for ac_file in $ac_files
4022do
4023 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004024 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004025 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4026 esac
4027done
4028rm -f $ac_rmfiles
4029
Matthias Kloseb9621712010-04-24 17:59:49 +00004030if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004031case "(($ac_try" in
4032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4033 *) ac_try_echo=$ac_try;;
4034esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004035eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4036$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004037 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004038 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004039 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4040 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004041 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4042# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4043# in a Makefile. We should not override ac_cv_exeext if it was cached,
4044# so that the user can short-circuit this test for compilers unknown to
4045# Autoconf.
4046for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004047do
4048 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004049 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004050 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004051 ;;
4052 [ab].out )
4053 # We found the default executable, but exeext='' is most
4054 # certainly right.
4055 break;;
4056 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004057 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004058 then :; else
4059 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4060 fi
4061 # We set ac_cv_exeext here because the later test for it is not
4062 # safe: cross compilers may not add the suffix if given an `-o'
4063 # argument, so we may need to know it at that point already.
4064 # Even if this section looks crufty: it has the advantage of
4065 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004066 break;;
4067 * )
4068 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004069 esac
4070done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004071test "$ac_cv_exeext" = no && ac_cv_exeext=
4072
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004073else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004074 ac_file=''
4075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004076if test -z "$ac_file"; then :
4077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4078$as_echo "no" >&6; }
4079$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004080sed 's/^/| /' conftest.$ac_ext >&5
4081
Matthias Kloseb9621712010-04-24 17:59:49 +00004082{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4083$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004084as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004085See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004086else
4087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4088$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004089fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4091$as_echo_n "checking for C compiler default output file name... " >&6; }
4092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4093$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004094ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004095
Matthias Kloseb9621712010-04-24 17:59:49 +00004096rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004097ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4099$as_echo_n "checking for suffix of executables... " >&6; }
4100if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004101case "(($ac_try" in
4102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4103 *) ac_try_echo=$ac_try;;
4104esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004105eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4106$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004107 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004108 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4110 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004111 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4112# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4113# work properly (i.e., refer to `conftest.exe'), while it won't with
4114# `rm'.
4115for ac_file in conftest.exe conftest conftest.*; do
4116 test -f "$ac_file" || continue
4117 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004118 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004119 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4120 break;;
4121 * ) break;;
4122 esac
4123done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004124else
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4126$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004127as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004128See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004130rm -f conftest conftest$ac_cv_exeext
4131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4132$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004133
4134rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004135EXEEXT=$ac_cv_exeext
4136ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4138/* end confdefs.h. */
4139#include <stdio.h>
4140int
4141main ()
4142{
4143FILE *f = fopen ("conftest.out", "w");
4144 return ferror (f) || fclose (f) != 0;
4145
4146 ;
4147 return 0;
4148}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004150ac_clean_files="$ac_clean_files conftest.out"
4151# Check that the compiler produces executables we can run. If not, either
4152# the compiler is broken, or we cross compile.
4153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4154$as_echo_n "checking whether we are cross compiling... " >&6; }
4155if test "$cross_compiling" != yes; then
4156 { { ac_try="$ac_link"
4157case "(($ac_try" in
4158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4159 *) ac_try_echo=$ac_try;;
4160esac
4161eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4162$as_echo "$ac_try_echo"; } >&5
4163 (eval "$ac_link") 2>&5
4164 ac_status=$?
4165 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4166 test $ac_status = 0; }
4167 if { ac_try='./conftest$ac_cv_exeext'
4168 { { case "(($ac_try" in
4169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4170 *) ac_try_echo=$ac_try;;
4171esac
4172eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4173$as_echo "$ac_try_echo"; } >&5
4174 (eval "$ac_try") 2>&5
4175 ac_status=$?
4176 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4177 test $ac_status = 0; }; }; then
4178 cross_compiling=no
4179 else
4180 if test "$cross_compiling" = maybe; then
4181 cross_compiling=yes
4182 else
4183 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4184$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004185as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004186If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004187See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004188 fi
4189 fi
4190fi
4191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4192$as_echo "$cross_compiling" >&6; }
4193
4194rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4195ac_clean_files=$ac_clean_files_save
4196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4197$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004198if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004199 $as_echo_n "(cached) " >&6
4200else
4201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004202/* end confdefs.h. */
4203
4204int
4205main ()
4206{
4207
4208 ;
4209 return 0;
4210}
4211_ACEOF
4212rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004213if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004214case "(($ac_try" in
4215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4216 *) ac_try_echo=$ac_try;;
4217esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004218eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4219$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004220 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004221 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004222 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4223 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224 for ac_file in conftest.o conftest.obj conftest.*; do
4225 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004226 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004228 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4229 break;;
4230 esac
4231done
4232else
Matthias Kloseb9621712010-04-24 17:59:49 +00004233 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004234sed 's/^/| /' conftest.$ac_ext >&5
4235
Matthias Kloseb9621712010-04-24 17:59:49 +00004236{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4237$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004238as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004239See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004240fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004241rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4244$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004245OBJEXT=$ac_cv_objext
4246ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4248$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004249if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004250 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004251else
Matthias Kloseb9621712010-04-24 17:59:49 +00004252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004254
Martin v. Löwis11437992002-04-12 09:54:03 +00004255int
4256main ()
4257{
4258#ifndef __GNUC__
4259 choke me
4260#endif
4261
4262 ;
4263 return 0;
4264}
4265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004266if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004267 ac_compiler_gnu=yes
4268else
Matthias Kloseb9621712010-04-24 17:59:49 +00004269 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004272ac_cv_c_compiler_gnu=$ac_compiler_gnu
4273
4274fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4276$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4277if test $ac_compiler_gnu = yes; then
4278 GCC=yes
4279else
4280 GCC=
4281fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004282ac_test_CFLAGS=${CFLAGS+set}
4283ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4285$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004286if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004287 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004288else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004289 ac_save_c_werror_flag=$ac_c_werror_flag
4290 ac_c_werror_flag=yes
4291 ac_cv_prog_cc_g=no
4292 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004295
Martin v. Löwis11437992002-04-12 09:54:03 +00004296int
4297main ()
4298{
4299
4300 ;
4301 return 0;
4302}
4303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004304if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004305 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004306else
Matthias Kloseb9621712010-04-24 17:59:49 +00004307 CFLAGS=""
4308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309/* end confdefs.h. */
4310
4311int
4312main ()
4313{
4314
4315 ;
4316 return 0;
4317}
4318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004319if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320
Matthias Kloseb9621712010-04-24 17:59:49 +00004321else
4322 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325/* end confdefs.h. */
4326
4327int
4328main ()
4329{
4330
4331 ;
4332 return 0;
4333}
4334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004335if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4343 ac_c_werror_flag=$ac_save_c_werror_flag
4344fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4346$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004347if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004348 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004349elif test $ac_cv_prog_cc_g = yes; then
4350 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004351 CFLAGS="-g -O2"
4352 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004353 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004354 fi
4355else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004356 if test "$GCC" = yes; then
4357 CFLAGS="-O2"
4358 else
4359 CFLAGS=
4360 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004361fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4363$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004364if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004365 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004366else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004368ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004370/* end confdefs.h. */
4371#include <stdarg.h>
4372#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004373struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004374/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4375struct buf { int x; };
4376FILE * (*rcsopen) (struct buf *, struct stat *, int);
4377static char *e (p, i)
4378 char **p;
4379 int i;
4380{
4381 return p[i];
4382}
4383static char *f (char * (*g) (char **, int), char **p, ...)
4384{
4385 char *s;
4386 va_list v;
4387 va_start (v,p);
4388 s = g (p, va_arg (v,int));
4389 va_end (v);
4390 return s;
4391}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004392
4393/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4394 function prototypes and stuff, but not '\xHH' hex character constants.
4395 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004396 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004397 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4398 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004399 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004400int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4401
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004402/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4403 inside strings and character constants. */
4404#define FOO(x) 'x'
4405int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4406
Skip Montanaro6dead952003-09-25 14:50:04 +00004407int test (int i, double x);
4408struct s1 {int (*f) (int a);};
4409struct s2 {int (*f) (double a);};
4410int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4411int argc;
4412char **argv;
4413int
4414main ()
4415{
4416return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4417 ;
4418 return 0;
4419}
4420_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004421for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4422 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004423do
4424 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004425 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004426 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004428rm -f core conftest.err conftest.$ac_objext
4429 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004430done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004431rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004432CC=$ac_save_CC
4433
4434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004435# AC_CACHE_VAL
4436case "x$ac_cv_prog_cc_c89" in
4437 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4439$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004440 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4442$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004443 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004444 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4446$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004447esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004448if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004449
Matthias Kloseb9621712010-04-24 17:59:49 +00004450fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004451
Martin v. Löwis11437992002-04-12 09:54:03 +00004452ac_ext=c
4453ac_cpp='$CPP $CPPFLAGS'
4454ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4455ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4456ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004457
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004458ac_ext=c
4459ac_cpp='$CPP $CPPFLAGS'
4460ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4461ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4462ac_compiler_gnu=$ac_cv_c_compiler_gnu
4463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4464$as_echo_n "checking how to run the C preprocessor... " >&6; }
4465# On Suns, sometimes $CPP names a directory.
4466if test -n "$CPP" && test -d "$CPP"; then
4467 CPP=
4468fi
4469if test -z "$CPP"; then
4470 if ${ac_cv_prog_CPP+:} false; then :
4471 $as_echo_n "(cached) " >&6
4472else
4473 # Double quotes because CPP needs to be expanded
4474 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4475 do
4476 ac_preproc_ok=false
4477for ac_c_preproc_warn_flag in '' yes
4478do
4479 # Use a header file that comes with gcc, so configuring glibc
4480 # with a fresh cross-compiler works.
4481 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4482 # <limits.h> exists even on freestanding compilers.
4483 # On the NeXT, cc -E runs the code through the compiler's parser,
4484 # not just through cpp. "Syntax error" is here to catch this case.
4485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4486/* end confdefs.h. */
4487#ifdef __STDC__
4488# include <limits.h>
4489#else
4490# include <assert.h>
4491#endif
4492 Syntax error
4493_ACEOF
4494if ac_fn_c_try_cpp "$LINENO"; then :
4495
4496else
4497 # Broken: fails on valid input.
4498continue
4499fi
4500rm -f conftest.err conftest.i conftest.$ac_ext
4501
4502 # OK, works on sane cases. Now check whether nonexistent headers
4503 # can be detected and how.
4504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4505/* end confdefs.h. */
4506#include <ac_nonexistent.h>
4507_ACEOF
4508if ac_fn_c_try_cpp "$LINENO"; then :
4509 # Broken: success on invalid input.
4510continue
4511else
4512 # Passes both tests.
4513ac_preproc_ok=:
4514break
4515fi
4516rm -f conftest.err conftest.i conftest.$ac_ext
4517
4518done
4519# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4520rm -f conftest.i conftest.err conftest.$ac_ext
4521if $ac_preproc_ok; then :
4522 break
4523fi
4524
4525 done
4526 ac_cv_prog_CPP=$CPP
4527
4528fi
4529 CPP=$ac_cv_prog_CPP
4530else
4531 ac_cv_prog_CPP=$CPP
4532fi
4533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4534$as_echo "$CPP" >&6; }
4535ac_preproc_ok=false
4536for ac_c_preproc_warn_flag in '' yes
4537do
4538 # Use a header file that comes with gcc, so configuring glibc
4539 # with a fresh cross-compiler works.
4540 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4541 # <limits.h> exists even on freestanding compilers.
4542 # On the NeXT, cc -E runs the code through the compiler's parser,
4543 # not just through cpp. "Syntax error" is here to catch this case.
4544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4545/* end confdefs.h. */
4546#ifdef __STDC__
4547# include <limits.h>
4548#else
4549# include <assert.h>
4550#endif
4551 Syntax error
4552_ACEOF
4553if ac_fn_c_try_cpp "$LINENO"; then :
4554
4555else
4556 # Broken: fails on valid input.
4557continue
4558fi
4559rm -f conftest.err conftest.i conftest.$ac_ext
4560
4561 # OK, works on sane cases. Now check whether nonexistent headers
4562 # can be detected and how.
4563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4564/* end confdefs.h. */
4565#include <ac_nonexistent.h>
4566_ACEOF
4567if ac_fn_c_try_cpp "$LINENO"; then :
4568 # Broken: success on invalid input.
4569continue
4570else
4571 # Passes both tests.
4572ac_preproc_ok=:
4573break
4574fi
4575rm -f conftest.err conftest.i conftest.$ac_ext
4576
4577done
4578# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4579rm -f conftest.i conftest.err conftest.$ac_ext
4580if $ac_preproc_ok; then :
4581
4582else
4583 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4584$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4585as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4586See \`config.log' for more details" "$LINENO" 5; }
4587fi
4588
4589ac_ext=c
4590ac_cpp='$CPP $CPPFLAGS'
4591ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4592ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4593ac_compiler_gnu=$ac_cv_c_compiler_gnu
4594
4595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4596$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4597if ${ac_cv_path_GREP+:} false; then :
4598 $as_echo_n "(cached) " >&6
4599else
4600 if test -z "$GREP"; then
4601 ac_path_GREP_found=false
4602 # Loop through the user's path and test for each of PROGNAME-LIST
4603 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4604for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4605do
4606 IFS=$as_save_IFS
4607 test -z "$as_dir" && as_dir=.
4608 for ac_prog in grep ggrep; do
4609 for ac_exec_ext in '' $ac_executable_extensions; do
4610 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4611 as_fn_executable_p "$ac_path_GREP" || continue
4612# Check for GNU ac_path_GREP and select it if it is found.
4613 # Check for GNU $ac_path_GREP
4614case `"$ac_path_GREP" --version 2>&1` in
4615*GNU*)
4616 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4617*)
4618 ac_count=0
4619 $as_echo_n 0123456789 >"conftest.in"
4620 while :
4621 do
4622 cat "conftest.in" "conftest.in" >"conftest.tmp"
4623 mv "conftest.tmp" "conftest.in"
4624 cp "conftest.in" "conftest.nl"
4625 $as_echo 'GREP' >> "conftest.nl"
4626 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4627 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4628 as_fn_arith $ac_count + 1 && ac_count=$as_val
4629 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4630 # Best one so far, save it but keep looking for a better one
4631 ac_cv_path_GREP="$ac_path_GREP"
4632 ac_path_GREP_max=$ac_count
4633 fi
4634 # 10*(2^10) chars as input seems more than enough
4635 test $ac_count -gt 10 && break
4636 done
4637 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4638esac
4639
4640 $ac_path_GREP_found && break 3
4641 done
4642 done
4643 done
4644IFS=$as_save_IFS
4645 if test -z "$ac_cv_path_GREP"; then
4646 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4647 fi
4648else
4649 ac_cv_path_GREP=$GREP
4650fi
4651
4652fi
4653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4654$as_echo "$ac_cv_path_GREP" >&6; }
4655 GREP="$ac_cv_path_GREP"
4656
4657
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004658
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004659
4660
Matthias Kloseb9621712010-04-24 17:59:49 +00004661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4662$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004664# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004665if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004666 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004667
4668 case $withval in
4669 no) with_cxx_main=no
4670 MAINCC='$(CC)';;
4671 yes) with_cxx_main=yes
4672 MAINCC='$(CXX)';;
4673 *) with_cxx_main=yes
4674 MAINCC=$withval
4675 if test -z "$CXX"
4676 then
4677 CXX=$withval
4678 fi;;
4679 esac
4680else
4681
4682 with_cxx_main=no
4683 MAINCC='$(CC)'
4684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004685fi
4686
Matthias Kloseb9621712010-04-24 17:59:49 +00004687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4688$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004689
4690preset_cxx="$CXX"
4691if test -z "$CXX"
4692then
4693 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004694 gcc) if test -n "$ac_tool_prefix"; then
4695 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4696set dummy ${ac_tool_prefix}g++; ac_word=$2
4697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4698$as_echo_n "checking for $ac_word... " >&6; }
4699if ${ac_cv_path_CXX+:} false; then :
4700 $as_echo_n "(cached) " >&6
4701else
4702 case $CXX in
4703 [\\/]* | ?:[\\/]*)
4704 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4705 ;;
4706 *)
4707 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4708for as_dir in notfound
4709do
4710 IFS=$as_save_IFS
4711 test -z "$as_dir" && as_dir=.
4712 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004713 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004714 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4715 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4716 break 2
4717 fi
4718done
4719 done
4720IFS=$as_save_IFS
4721
4722 ;;
4723esac
4724fi
4725CXX=$ac_cv_path_CXX
4726if test -n "$CXX"; then
4727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4728$as_echo "$CXX" >&6; }
4729else
4730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4731$as_echo "no" >&6; }
4732fi
4733
4734
4735fi
4736if test -z "$ac_cv_path_CXX"; then
4737 ac_pt_CXX=$CXX
4738 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004739set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4741$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004742if ${ac_cv_path_ac_pt_CXX+:} false; then :
4743 $as_echo_n "(cached) " >&6
4744else
4745 case $ac_pt_CXX in
4746 [\\/]* | ?:[\\/]*)
4747 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4748 ;;
4749 *)
4750 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4751for as_dir in notfound
4752do
4753 IFS=$as_save_IFS
4754 test -z "$as_dir" && as_dir=.
4755 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004756 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004757 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4758 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4759 break 2
4760 fi
4761done
4762 done
4763IFS=$as_save_IFS
4764
4765 ;;
4766esac
4767fi
4768ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4769if test -n "$ac_pt_CXX"; then
4770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4771$as_echo "$ac_pt_CXX" >&6; }
4772else
4773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4774$as_echo "no" >&6; }
4775fi
4776
4777 if test "x$ac_pt_CXX" = x; then
4778 CXX="g++"
4779 else
4780 case $cross_compiling:$ac_tool_warned in
4781yes:)
4782{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4783$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4784ac_tool_warned=yes ;;
4785esac
4786 CXX=$ac_pt_CXX
4787 fi
4788else
4789 CXX="$ac_cv_path_CXX"
4790fi
4791 ;;
4792 cc) if test -n "$ac_tool_prefix"; then
4793 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4794set dummy ${ac_tool_prefix}c++; ac_word=$2
4795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4796$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004797if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004798 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004799else
4800 case $CXX in
4801 [\\/]* | ?:[\\/]*)
4802 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4803 ;;
4804 *)
4805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4806for as_dir in notfound
4807do
4808 IFS=$as_save_IFS
4809 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004810 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004811 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004813 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004814 break 2
4815 fi
4816done
Matthias Kloseb9621712010-04-24 17:59:49 +00004817 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004818IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004819
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004820 ;;
4821esac
4822fi
4823CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004824if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4826$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004827else
Matthias Kloseb9621712010-04-24 17:59:49 +00004828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4829$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004831
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004832
4833fi
4834if test -z "$ac_cv_path_CXX"; then
4835 ac_pt_CXX=$CXX
4836 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004837set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4839$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004840if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004841 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004842else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004843 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004844 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004845 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 +00004846 ;;
4847 *)
4848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4849for as_dir in notfound
4850do
4851 IFS=$as_save_IFS
4852 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004853 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004854 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004855 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004857 break 2
4858 fi
4859done
Matthias Kloseb9621712010-04-24 17:59:49 +00004860 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004861IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004862
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004863 ;;
4864esac
4865fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004866ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4867if test -n "$ac_pt_CXX"; then
4868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4869$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004870else
Matthias Kloseb9621712010-04-24 17:59:49 +00004871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4872$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004874
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004875 if test "x$ac_pt_CXX" = x; then
4876 CXX="c++"
4877 else
4878 case $cross_compiling:$ac_tool_warned in
4879yes:)
4880{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4881$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4882ac_tool_warned=yes ;;
4883esac
4884 CXX=$ac_pt_CXX
4885 fi
4886else
4887 CXX="$ac_cv_path_CXX"
4888fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004889 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004890 clang|*/clang) if test -n "$ac_tool_prefix"; then
4891 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4892set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4894$as_echo_n "checking for $ac_word... " >&6; }
4895if ${ac_cv_path_CXX+:} false; then :
4896 $as_echo_n "(cached) " >&6
4897else
4898 case $CXX in
4899 [\\/]* | ?:[\\/]*)
4900 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4901 ;;
4902 *)
4903 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4904for as_dir in notfound
4905do
4906 IFS=$as_save_IFS
4907 test -z "$as_dir" && as_dir=.
4908 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004909 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004910 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4911 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4912 break 2
4913 fi
4914done
4915 done
4916IFS=$as_save_IFS
4917
Ned Deilycbfb9a52012-06-23 16:02:19 -07004918 ;;
4919esac
4920fi
4921CXX=$ac_cv_path_CXX
4922if test -n "$CXX"; then
4923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4924$as_echo "$CXX" >&6; }
4925else
4926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4927$as_echo "no" >&6; }
4928fi
4929
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004930
4931fi
4932if test -z "$ac_cv_path_CXX"; then
4933 ac_pt_CXX=$CXX
4934 # Extract the first word of "clang++", so it can be a program name with args.
4935set dummy clang++; ac_word=$2
4936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4937$as_echo_n "checking for $ac_word... " >&6; }
4938if ${ac_cv_path_ac_pt_CXX+:} false; then :
4939 $as_echo_n "(cached) " >&6
4940else
4941 case $ac_pt_CXX in
4942 [\\/]* | ?:[\\/]*)
4943 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4944 ;;
4945 *)
4946 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4947for as_dir in notfound
4948do
4949 IFS=$as_save_IFS
4950 test -z "$as_dir" && as_dir=.
4951 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004952 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004953 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4954 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4955 break 2
4956 fi
4957done
4958 done
4959IFS=$as_save_IFS
4960
4961 ;;
4962esac
4963fi
4964ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4965if test -n "$ac_pt_CXX"; then
4966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4967$as_echo "$ac_pt_CXX" >&6; }
4968else
4969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4970$as_echo "no" >&6; }
4971fi
4972
4973 if test "x$ac_pt_CXX" = x; then
4974 CXX="clang++"
4975 else
4976 case $cross_compiling:$ac_tool_warned in
4977yes:)
4978{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4979$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4980ac_tool_warned=yes ;;
4981esac
4982 CXX=$ac_pt_CXX
4983 fi
4984else
4985 CXX="$ac_cv_path_CXX"
4986fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004987 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004988 icc|*/icc) if test -n "$ac_tool_prefix"; then
4989 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4990set dummy ${ac_tool_prefix}icpc; ac_word=$2
4991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4992$as_echo_n "checking for $ac_word... " >&6; }
4993if ${ac_cv_path_CXX+:} false; then :
4994 $as_echo_n "(cached) " >&6
4995else
4996 case $CXX in
4997 [\\/]* | ?:[\\/]*)
4998 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4999 ;;
5000 *)
5001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5002for as_dir in notfound
5003do
5004 IFS=$as_save_IFS
5005 test -z "$as_dir" && as_dir=.
5006 for ac_exec_ext in '' $ac_executable_extensions; do
5007 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5008 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5009 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5010 break 2
5011 fi
5012done
5013 done
5014IFS=$as_save_IFS
5015
5016 ;;
5017esac
5018fi
5019CXX=$ac_cv_path_CXX
5020if test -n "$CXX"; then
5021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5022$as_echo "$CXX" >&6; }
5023else
5024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5025$as_echo "no" >&6; }
5026fi
5027
5028
5029fi
5030if test -z "$ac_cv_path_CXX"; then
5031 ac_pt_CXX=$CXX
5032 # Extract the first word of "icpc", so it can be a program name with args.
5033set dummy icpc; ac_word=$2
5034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5035$as_echo_n "checking for $ac_word... " >&6; }
5036if ${ac_cv_path_ac_pt_CXX+:} false; then :
5037 $as_echo_n "(cached) " >&6
5038else
5039 case $ac_pt_CXX in
5040 [\\/]* | ?:[\\/]*)
5041 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5042 ;;
5043 *)
5044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5045for as_dir in notfound
5046do
5047 IFS=$as_save_IFS
5048 test -z "$as_dir" && as_dir=.
5049 for ac_exec_ext in '' $ac_executable_extensions; do
5050 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5051 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5052 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5053 break 2
5054 fi
5055done
5056 done
5057IFS=$as_save_IFS
5058
5059 ;;
5060esac
5061fi
5062ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5063if test -n "$ac_pt_CXX"; then
5064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5065$as_echo "$ac_pt_CXX" >&6; }
5066else
5067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5068$as_echo "no" >&6; }
5069fi
5070
5071 if test "x$ac_pt_CXX" = x; then
5072 CXX="icpc"
5073 else
5074 case $cross_compiling:$ac_tool_warned in
5075yes:)
5076{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5077$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5078ac_tool_warned=yes ;;
5079esac
5080 CXX=$ac_pt_CXX
5081 fi
5082else
5083 CXX="$ac_cv_path_CXX"
5084fi
5085 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005086 esac
5087 if test "$CXX" = "notfound"
5088 then
5089 CXX=""
5090 fi
5091fi
5092if test -z "$CXX"
5093then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005094 if test -n "$ac_tool_prefix"; then
5095 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5096 do
5097 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5098set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5100$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005101if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005102 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005103else
5104 if test -n "$CXX"; then
5105 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5106else
5107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5108for as_dir in $PATH
5109do
5110 IFS=$as_save_IFS
5111 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005113 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005114 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005116 break 2
5117 fi
5118done
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005120IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005121
5122fi
5123fi
5124CXX=$ac_cv_prog_CXX
5125if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5127$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005128else
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5130$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005131fi
5132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005133
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005134 test -n "$CXX" && break
5135 done
5136fi
5137if test -z "$CXX"; then
5138 ac_ct_CXX=$CXX
5139 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5140do
5141 # Extract the first word of "$ac_prog", so it can be a program name with args.
5142set dummy $ac_prog; ac_word=$2
5143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5144$as_echo_n "checking for $ac_word... " >&6; }
5145if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5146 $as_echo_n "(cached) " >&6
5147else
5148 if test -n "$ac_ct_CXX"; then
5149 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5150else
5151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5152for as_dir in $PATH
5153do
5154 IFS=$as_save_IFS
5155 test -z "$as_dir" && as_dir=.
5156 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005157 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005158 ac_cv_prog_ac_ct_CXX="$ac_prog"
5159 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5160 break 2
5161 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005162done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005163 done
5164IFS=$as_save_IFS
5165
5166fi
5167fi
5168ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5169if test -n "$ac_ct_CXX"; then
5170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5171$as_echo "$ac_ct_CXX" >&6; }
5172else
5173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5174$as_echo "no" >&6; }
5175fi
5176
5177
5178 test -n "$ac_ct_CXX" && break
5179done
5180
5181 if test "x$ac_ct_CXX" = x; then
5182 CXX="notfound"
5183 else
5184 case $cross_compiling:$ac_tool_warned in
5185yes:)
5186{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5187$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5188ac_tool_warned=yes ;;
5189esac
5190 CXX=$ac_ct_CXX
5191 fi
5192fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005193
5194 if test "$CXX" = "notfound"
5195 then
5196 CXX=""
5197 fi
5198fi
5199if test "$preset_cxx" != "$CXX"
5200then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005201 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005202
5203 By default, distutils will build C++ extension modules with \"$CXX\".
5204 If this is not intended, then set CXX on the configure command line.
5205 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005206$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005207
5208 By default, distutils will build C++ extension modules with \"$CXX\".
5209 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005210 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005211fi
5212
5213
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005214MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5215
5216
5217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5218$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5219cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005220#undef bfin
5221#undef cris
5222#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005223#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005224#undef hppa
5225#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005226#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005227#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005228#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005229#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005230#undef unix
5231#if defined(__linux__)
5232# if defined(__x86_64__) && defined(__LP64__)
5233 x86_64-linux-gnu
5234# elif defined(__x86_64__) && defined(__ILP32__)
5235 x86_64-linux-gnux32
5236# elif defined(__i386__)
5237 i386-linux-gnu
5238# elif defined(__aarch64__) && defined(__AARCH64EL__)
5239# if defined(__ILP32__)
5240 aarch64_ilp32-linux-gnu
5241# else
5242 aarch64-linux-gnu
5243# endif
5244# elif defined(__aarch64__) && defined(__AARCH64EB__)
5245# if defined(__ILP32__)
5246 aarch64_be_ilp32-linux-gnu
5247# else
5248 aarch64_be-linux-gnu
5249# endif
5250# elif defined(__alpha__)
5251 alpha-linux-gnu
5252# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5253# if defined(__ARMEL__)
5254 arm-linux-gnueabihf
5255# else
5256 armeb-linux-gnueabihf
5257# endif
5258# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5259# if defined(__ARMEL__)
5260 arm-linux-gnueabi
5261# else
5262 armeb-linux-gnueabi
5263# endif
5264# elif defined(__hppa__)
5265 hppa-linux-gnu
5266# elif defined(__ia64__)
5267 ia64-linux-gnu
5268# elif defined(__m68k__) && !defined(__mcoldfire__)
5269 m68k-linux-gnu
5270# elif defined(__mips_hard_float) && defined(_MIPSEL)
5271# if _MIPS_SIM == _ABIO32
5272 mipsel-linux-gnu
5273# elif _MIPS_SIM == _ABIN32
5274 mips64el-linux-gnuabin32
5275# elif _MIPS_SIM == _ABI64
5276 mips64el-linux-gnuabi64
5277# else
5278# error unknown platform triplet
5279# endif
5280# elif defined(__mips_hard_float)
5281# if _MIPS_SIM == _ABIO32
5282 mips-linux-gnu
5283# elif _MIPS_SIM == _ABIN32
5284 mips64-linux-gnuabin32
5285# elif _MIPS_SIM == _ABI64
5286 mips64-linux-gnuabi64
5287# else
5288# error unknown platform triplet
5289# endif
5290# elif defined(__or1k__)
5291 or1k-linux-gnu
5292# elif defined(__powerpc__) && defined(__SPE__)
5293 powerpc-linux-gnuspe
5294# elif defined(__powerpc64__)
5295# if defined(__LITTLE_ENDIAN__)
5296 powerpc64le-linux-gnu
5297# else
5298 powerpc64-linux-gnu
5299# endif
5300# elif defined(__powerpc__)
5301 powerpc-linux-gnu
5302# elif defined(__s390x__)
5303 s390x-linux-gnu
5304# elif defined(__s390__)
5305 s390-linux-gnu
5306# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5307 sh4-linux-gnu
5308# elif defined(__sparc__) && defined(__arch64__)
5309 sparc64-linux-gnu
5310# elif defined(__sparc__)
5311 sparc-linux-gnu
5312# else
5313# error unknown platform triplet
5314# endif
5315#elif defined(__FreeBSD_kernel__)
5316# if defined(__LP64__)
5317 x86_64-kfreebsd-gnu
5318# elif defined(__i386__)
5319 i386-kfreebsd-gnu
5320# else
5321# error unknown platform triplet
5322# endif
5323#elif defined(__gnu_hurd__)
5324 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005325#elif defined(__APPLE__)
5326 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005327#else
5328# error unknown platform triplet
5329#endif
5330
5331EOF
5332
5333if $CPP conftest.c >conftest.out 2>/dev/null; then
5334 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5336$as_echo "$PLATFORM_TRIPLET" >&6; }
5337else
5338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5339$as_echo "none" >&6; }
5340fi
5341rm -f conftest.c conftest.out
5342
5343if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5344 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5345 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5346 fi
5347fi
doko@ubuntu.com55532312016-06-14 08:55:19 +02005348if test x$PLATFORM_TRIPLET = x; then
5349 PLATDIR=plat-$MACHDEP
5350else
5351 PLATDIR=plat-$PLATFORM_TRIPLET
5352fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005353
5354
doko@ubuntu.com55532312016-06-14 08:55:19 +02005355if test x$MULTIARCH != x; then
5356 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5357fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005358
5359
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5361$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5362save_LDFLAGS="$LDFLAGS"
5363LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005364
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5366/* end confdefs.h. */
5367
5368int
5369main ()
5370{
5371
5372 ;
5373 return 0;
5374}
5375_ACEOF
5376if ac_fn_c_try_link "$LINENO"; then :
5377 NO_AS_NEEDED="-Wl,--no-as-needed"
5378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5379$as_echo "yes" >&6; }
5380else
5381 NO_AS_NEEDED=""
5382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5383$as_echo "no" >&6; }
5384fi
5385rm -f core conftest.err conftest.$ac_objext \
5386 conftest$ac_exeext conftest.$ac_ext
5387LDFLAGS="$save_LDFLAGS"
5388
5389
5390
5391# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005392
Matthias Kloseb9621712010-04-24 17:59:49 +00005393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5394$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005395if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005396 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005397else
5398 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5399 then ac_cv_path_EGREP="$GREP -E"
5400 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005401 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005402 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 # Loop through the user's path and test for each of PROGNAME-LIST
5404 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5406do
5407 IFS=$as_save_IFS
5408 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005409 for ac_prog in egrep; do
5410 for ac_exec_ext in '' $ac_executable_extensions; do
5411 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005412 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005413# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005414 # Check for GNU $ac_path_EGREP
5415case `"$ac_path_EGREP" --version 2>&1` in
5416*GNU*)
5417 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5418*)
5419 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005421 while :
5422 do
5423 cat "conftest.in" "conftest.in" >"conftest.tmp"
5424 mv "conftest.tmp" "conftest.in"
5425 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005426 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005427 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5428 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005429 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005430 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5431 # Best one so far, save it but keep looking for a better one
5432 ac_cv_path_EGREP="$ac_path_EGREP"
5433 ac_path_EGREP_max=$ac_count
5434 fi
5435 # 10*(2^10) chars as input seems more than enough
5436 test $ac_count -gt 10 && break
5437 done
5438 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5439esac
5440
Matthias Kloseb9621712010-04-24 17:59:49 +00005441 $ac_path_EGREP_found && break 3
5442 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005443 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005444 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005445IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005446 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005447 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 +00005448 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005449else
5450 ac_cv_path_EGREP=$EGREP
5451fi
5452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005453 fi
5454fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5456$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005457 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005458
5459
Matthias Kloseb9621712010-04-24 17:59:49 +00005460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5461$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005462if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005463 $as_echo_n "(cached) " >&6
5464else
5465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005466/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005467#include <stdlib.h>
5468#include <stdarg.h>
5469#include <string.h>
5470#include <float.h>
5471
5472int
5473main ()
5474{
5475
5476 ;
5477 return 0;
5478}
5479_ACEOF
5480if ac_fn_c_try_compile "$LINENO"; then :
5481 ac_cv_header_stdc=yes
5482else
5483 ac_cv_header_stdc=no
5484fi
5485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5486
5487if test $ac_cv_header_stdc = yes; then
5488 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5490/* end confdefs.h. */
5491#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005492
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005493_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005494if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005495 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005496
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005497else
Matthias Kloseb9621712010-04-24 17:59:49 +00005498 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005499fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005500rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005501
Matthias Kloseb9621712010-04-24 17:59:49 +00005502fi
5503
5504if test $ac_cv_header_stdc = yes; then
5505 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5507/* end confdefs.h. */
5508#include <stdlib.h>
5509
5510_ACEOF
5511if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5512 $EGREP "free" >/dev/null 2>&1; then :
5513
5514else
5515 ac_cv_header_stdc=no
5516fi
5517rm -f conftest*
5518
5519fi
5520
5521if test $ac_cv_header_stdc = yes; then
5522 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5523 if test "$cross_compiling" = yes; then :
5524 :
5525else
5526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5527/* end confdefs.h. */
5528#include <ctype.h>
5529#include <stdlib.h>
5530#if ((' ' & 0x0FF) == 0x020)
5531# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5532# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5533#else
5534# define ISLOWER(c) \
5535 (('a' <= (c) && (c) <= 'i') \
5536 || ('j' <= (c) && (c) <= 'r') \
5537 || ('s' <= (c) && (c) <= 'z'))
5538# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5539#endif
5540
5541#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5542int
5543main ()
5544{
5545 int i;
5546 for (i = 0; i < 256; i++)
5547 if (XOR (islower (i), ISLOWER (i))
5548 || toupper (i) != TOUPPER (i))
5549 return 2;
5550 return 0;
5551}
5552_ACEOF
5553if ac_fn_c_try_run "$LINENO"; then :
5554
5555else
5556 ac_cv_header_stdc=no
5557fi
5558rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5559 conftest.$ac_objext conftest.beam conftest.$ac_ext
5560fi
5561
5562fi
5563fi
5564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5565$as_echo "$ac_cv_header_stdc" >&6; }
5566if test $ac_cv_header_stdc = yes; then
5567
5568$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5569
5570fi
5571
5572# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5573for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5574 inttypes.h stdint.h unistd.h
5575do :
5576 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5577ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5578"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005579if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005580 cat >>confdefs.h <<_ACEOF
5581#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5582_ACEOF
5583
5584fi
5585
5586done
5587
5588
5589
5590 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 +02005591if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005592 MINIX=yes
5593else
5594 MINIX=
5595fi
5596
5597
5598 if test "$MINIX" = yes; then
5599
5600$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5601
5602
5603$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5604
5605
5606$as_echo "#define _MINIX 1" >>confdefs.h
5607
5608 fi
5609
5610
5611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5612$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005613if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005614 $as_echo_n "(cached) " >&6
5615else
5616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5617/* end confdefs.h. */
5618
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005619# define __EXTENSIONS__ 1
5620 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005621int
5622main ()
5623{
5624
5625 ;
5626 return 0;
5627}
5628_ACEOF
5629if ac_fn_c_try_compile "$LINENO"; then :
5630 ac_cv_safe_to_define___extensions__=yes
5631else
5632 ac_cv_safe_to_define___extensions__=no
5633fi
5634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5635fi
5636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5637$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5638 test $ac_cv_safe_to_define___extensions__ = yes &&
5639 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5640
5641 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5642
5643 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5644
5645 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5646
5647 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5648
5649
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651# Check for unsupported systems
5652case $ac_sys_system/$ac_sys_release in
5653atheos*|Linux*/1*)
5654 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5655 echo See README for details.
5656 exit 1;;
5657esac
5658
5659
Matthias Kloseb9621712010-04-24 17:59:49 +00005660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5661$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662
5663# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005664if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665 withval=$with_suffix;
5666 case $withval in
5667 no) EXEEXT=;;
5668 yes) EXEEXT=.exe;;
5669 *) EXEEXT=$withval;;
5670 esac
5671fi
5672
Matthias Kloseb9621712010-04-24 17:59:49 +00005673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5674$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675
5676# Test whether we're running on a non-case-sensitive system, in which
5677# case we give a warning if no ext is given
5678
Matthias Kloseb9621712010-04-24 17:59:49 +00005679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5680$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681if test ! -d CaseSensitiveTestDir; then
5682mkdir CaseSensitiveTestDir
5683fi
5684
5685if test -d casesensitivetestdir
5686then
Matthias Kloseb9621712010-04-24 17:59:49 +00005687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5688$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689 BUILDEXEEXT=.exe
5690else
Matthias Kloseb9621712010-04-24 17:59:49 +00005691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5692$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693 BUILDEXEEXT=$EXEEXT
5694fi
5695rmdir CaseSensitiveTestDir
5696
5697case $MACHDEP in
5698bsdos*)
5699 case $CC in
5700 gcc) CC="$CC -D_HAVE_BSDI";;
5701 esac;;
5702esac
5703
5704case $ac_sys_system in
5705hp*|HP*)
5706 case $CC in
5707 cc|*/cc) CC="$CC -Ae";;
5708 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709esac
5710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711
Matthias Kloseb9621712010-04-24 17:59:49 +00005712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5713$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714if test -z "$LIBRARY"
5715then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005716 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5719$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720
5721# LDLIBRARY is the name of the library to link against (as opposed to the
5722# name of the library into which to insert object files). BLDLIBRARY is also
5723# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5724# is blank as the main program is not linked directly against LDLIBRARY.
5725# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5726# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5727# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5728# DLLLIBRARY is the shared (i.e., DLL) library.
5729#
5730# RUNSHARED is used to run shared python without installed libraries
5731#
5732# INSTSONAME is the name of the shared library that will be use to install
5733# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005734#
5735# LDVERSION is the shared library version number, normally the Python version
5736# with the ABI build flags appended.
5737
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738
5739
5740
5741
5742
5743
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005744
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745LDLIBRARY="$LIBRARY"
5746BLDLIBRARY='$(LDLIBRARY)'
5747INSTSONAME='$(LDLIBRARY)'
5748DLLLIBRARY=''
5749LDLIBRARYDIR=''
5750RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005751LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752
5753# LINKCC is the command that links the python executable -- default is $(CC).
5754# If CXX is set, and if it is needed to link a main function that was
5755# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5756# python might then depend on the C++ runtime
5757# This is altered for AIX in order to build the export list before
5758# linking.
5759
Matthias Kloseb9621712010-04-24 17:59:49 +00005760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5761$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762if test -z "$LINKCC"
5763then
5764 LINKCC='$(PURIFY) $(MAINCC)'
5765 case $ac_sys_system in
5766 AIX*)
5767 exp_extra="\"\""
5768 if test $ac_sys_release -ge 5 -o \
5769 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5770 exp_extra="."
5771 fi
5772 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773 QNX*)
5774 # qcc must be used because the other compilers do not
5775 # support -N.
5776 LINKCC=qcc;;
5777 esac
5778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5780$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781
5782# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5783# make sure we default having it set to "no": this is used by
5784# distutils.unixccompiler to know if it should add --enable-new-dtags
5785# to linker command lines, and failing to detect GNU ld simply results
5786# in the same bahaviour as before.
5787
Matthias Kloseb9621712010-04-24 17:59:49 +00005788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5789$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790ac_prog=ld
5791if test "$GCC" = yes; then
5792 ac_prog=`$CC -print-prog-name=ld`
5793fi
5794case `"$ac_prog" -V 2>&1 < /dev/null` in
5795 *GNU*)
5796 GNULD=yes;;
5797 *)
5798 GNULD=no;;
5799esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5801$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5804$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005805if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005806 $as_echo_n "(cached) " >&6
5807else
5808 ac_cv_c_inline=no
5809for ac_kw in inline __inline__ __inline; do
5810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5811/* end confdefs.h. */
5812#ifndef __cplusplus
5813typedef int foo_t;
5814static $ac_kw foo_t static_foo () {return 0; }
5815$ac_kw foo_t foo () {return 0; }
5816#endif
5817
5818_ACEOF
5819if ac_fn_c_try_compile "$LINENO"; then :
5820 ac_cv_c_inline=$ac_kw
5821fi
5822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5823 test "$ac_cv_c_inline" != no && break
5824done
5825
5826fi
5827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5828$as_echo "$ac_cv_c_inline" >&6; }
5829
5830case $ac_cv_c_inline in
5831 inline | yes) ;;
5832 *)
5833 case $ac_cv_c_inline in
5834 no) ac_val=;;
5835 *) ac_val=$ac_cv_c_inline;;
5836 esac
5837 cat >>confdefs.h <<_ACEOF
5838#ifndef __cplusplus
5839#define inline $ac_val
5840#endif
5841_ACEOF
5842 ;;
5843esac
5844
5845if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005846
5847$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005848
5849
5850fi
5851
5852
Matthias Kloseb9621712010-04-24 17:59:49 +00005853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5854$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005856if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857 enableval=$enable_shared;
5858fi
5859
5860
5861if test -z "$enable_shared"
5862then
5863 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005864 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865 enable_shared="yes";;
5866 *)
5867 enable_shared="no";;
5868 esac
5869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5871$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872
Matthias Kloseb9621712010-04-24 17:59:49 +00005873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5874$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005876if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005877 enableval=$enable_profiling;
5878fi
5879
5880if test "x$enable_profiling" = xyes; then
5881 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005882 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884/* end confdefs.h. */
5885int main() { return 0; }
5886_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005887if ac_fn_c_try_link "$LINENO"; then :
5888
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005890 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005892rm -f core conftest.err conftest.$ac_objext \
5893 conftest$ac_exeext conftest.$ac_ext
5894 CC="$ac_save_cc"
5895else
5896 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5899$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900
doko@ubuntu.comba015832012-06-30 16:52:05 +02005901if test "x$enable_profiling" = xyes; then
5902 BASECFLAGS="-pg $BASECFLAGS"
5903 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904fi
5905
Matthias Kloseb9621712010-04-24 17:59:49 +00005906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5907$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908
5909# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5910# library that we build, but we do not want to link against it (we
5911# will find it with a -framework option). For this reason there is an
5912# extra variable BLDLIBRARY against which Python and the extension
5913# modules are linked, BLDLIBRARY. This is normally the same as
5914# LDLIBRARY, but empty for MacOSX framework builds.
5915if test "$enable_framework"
5916then
5917 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005918 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919 BLDLIBRARY=''
5920else
5921 BLDLIBRARY='$(LDLIBRARY)'
5922fi
5923
5924# Other platforms follow
5925if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005926 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927
Matthias Kloseb9621712010-04-24 17:59:49 +00005928$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929
5930 case $ac_sys_system in
5931 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005932 LDLIBRARY='libpython$(LDVERSION).dll.a'
5933 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934 ;;
5935 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005936 LDLIBRARY='libpython$(LDVERSION).so'
5937 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005938 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005940 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005941 then
5942 PY3LIBRARY=libpython3.so
5943 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005945 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005946 LDLIBRARY='libpython$(LDVERSION).so'
5947 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005948 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005950 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005951 then
5952 PY3LIBRARY=libpython3.so
5953 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954 ;;
5955 hp*|HP*)
5956 case `uname -m` in
5957 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005958 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959 ;;
5960 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005961 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 ;;
5963 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005964 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005965 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005968 LDLIBRARY='libpython$(LDVERSION).dylib'
5969 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005970 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005972 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005973 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005974 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005975 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976
5977 esac
5978else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005979 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980 case $ac_sys_system in
5981 CYGWIN*)
5982 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005983 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984 ;;
5985 esac
5986fi
5987
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005988if test "$cross_compiling" = yes; then
5989 RUNSHARED=
5990fi
5991
Matthias Kloseb9621712010-04-24 17:59:49 +00005992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5993$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994
5995if test -n "$ac_tool_prefix"; then
5996 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5997set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5999$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006000if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006001 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002else
6003 if test -n "$RANLIB"; then
6004 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6005else
6006as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6007for as_dir in $PATH
6008do
6009 IFS=$as_save_IFS
6010 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006011 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006012 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006014 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015 break 2
6016 fi
6017done
Matthias Kloseb9621712010-04-24 17:59:49 +00006018 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019IFS=$as_save_IFS
6020
6021fi
6022fi
6023RANLIB=$ac_cv_prog_RANLIB
6024if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6026$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027else
Matthias Kloseb9621712010-04-24 17:59:49 +00006028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6029$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030fi
6031
6032
6033fi
6034if test -z "$ac_cv_prog_RANLIB"; then
6035 ac_ct_RANLIB=$RANLIB
6036 # Extract the first word of "ranlib", so it can be a program name with args.
6037set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6039$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006040if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006041 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042else
6043 if test -n "$ac_ct_RANLIB"; then
6044 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6045else
6046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6047for as_dir in $PATH
6048do
6049 IFS=$as_save_IFS
6050 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006051 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006052 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006054 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055 break 2
6056 fi
6057done
Matthias Kloseb9621712010-04-24 17:59:49 +00006058 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059IFS=$as_save_IFS
6060
6061fi
6062fi
6063ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6064if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6066$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006067else
Matthias Kloseb9621712010-04-24 17:59:49 +00006068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6069$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070fi
6071
6072 if test "x$ac_ct_RANLIB" = x; then
6073 RANLIB=":"
6074 else
6075 case $cross_compiling:$ac_tool_warned in
6076yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006077{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6078$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006079ac_tool_warned=yes ;;
6080esac
6081 RANLIB=$ac_ct_RANLIB
6082 fi
6083else
6084 RANLIB="$ac_cv_prog_RANLIB"
6085fi
6086
6087
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006088if test -n "$ac_tool_prefix"; then
6089 for ac_prog in ar aal
6090 do
6091 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6092set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6094$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006095if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006096 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006097else
6098 if test -n "$AR"; then
6099 ac_cv_prog_AR="$AR" # Let the user override the test.
6100else
6101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6102for as_dir in $PATH
6103do
6104 IFS=$as_save_IFS
6105 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006106 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006107 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006108 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006109 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006110 break 2
6111 fi
6112done
Matthias Kloseb9621712010-04-24 17:59:49 +00006113 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006114IFS=$as_save_IFS
6115
6116fi
6117fi
6118AR=$ac_cv_prog_AR
6119if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6121$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006122else
Matthias Kloseb9621712010-04-24 17:59:49 +00006123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6124$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006125fi
6126
6127
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006128 test -n "$AR" && break
6129 done
6130fi
6131if test -z "$AR"; then
6132 ac_ct_AR=$AR
6133 for ac_prog in ar aal
6134do
6135 # Extract the first word of "$ac_prog", so it can be a program name with args.
6136set dummy $ac_prog; ac_word=$2
6137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6138$as_echo_n "checking for $ac_word... " >&6; }
6139if ${ac_cv_prog_ac_ct_AR+:} false; then :
6140 $as_echo_n "(cached) " >&6
6141else
6142 if test -n "$ac_ct_AR"; then
6143 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6144else
6145as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6146for as_dir in $PATH
6147do
6148 IFS=$as_save_IFS
6149 test -z "$as_dir" && as_dir=.
6150 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006151 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006152 ac_cv_prog_ac_ct_AR="$ac_prog"
6153 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6154 break 2
6155 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006157 done
6158IFS=$as_save_IFS
6159
6160fi
6161fi
6162ac_ct_AR=$ac_cv_prog_ac_ct_AR
6163if test -n "$ac_ct_AR"; then
6164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6165$as_echo "$ac_ct_AR" >&6; }
6166else
6167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6168$as_echo "no" >&6; }
6169fi
6170
6171
6172 test -n "$ac_ct_AR" && break
6173done
6174
6175 if test "x$ac_ct_AR" = x; then
6176 AR="ar"
6177 else
6178 case $cross_compiling:$ac_tool_warned in
6179yes:)
6180{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6181$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6182ac_tool_warned=yes ;;
6183esac
6184 AR=$ac_ct_AR
6185 fi
6186fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006187
6188
6189# tweak ARFLAGS only if the user didn't set it on the command line
6190
6191if test -z "$ARFLAGS"
6192then
6193 ARFLAGS="rc"
6194fi
6195
doko@ubuntu.com58844492012-06-30 18:25:32 +02006196if test -n "$ac_tool_prefix"; then
6197 for ac_prog in readelf
6198 do
6199 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6200set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6202$as_echo_n "checking for $ac_word... " >&6; }
6203if ${ac_cv_prog_READELF+:} false; then :
6204 $as_echo_n "(cached) " >&6
6205else
6206 if test -n "$READELF"; then
6207 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6208else
6209as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6210for as_dir in $PATH
6211do
6212 IFS=$as_save_IFS
6213 test -z "$as_dir" && as_dir=.
6214 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006215 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006216 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6217 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6218 break 2
6219 fi
6220done
6221 done
6222IFS=$as_save_IFS
6223
6224fi
6225fi
6226READELF=$ac_cv_prog_READELF
6227if test -n "$READELF"; then
6228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6229$as_echo "$READELF" >&6; }
6230else
6231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6232$as_echo "no" >&6; }
6233fi
6234
6235
6236 test -n "$READELF" && break
6237 done
6238fi
6239if test -z "$READELF"; then
6240 ac_ct_READELF=$READELF
6241 for ac_prog in readelf
6242do
6243 # Extract the first word of "$ac_prog", so it can be a program name with args.
6244set dummy $ac_prog; ac_word=$2
6245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6246$as_echo_n "checking for $ac_word... " >&6; }
6247if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6248 $as_echo_n "(cached) " >&6
6249else
6250 if test -n "$ac_ct_READELF"; then
6251 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6252else
6253as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6254for as_dir in $PATH
6255do
6256 IFS=$as_save_IFS
6257 test -z "$as_dir" && as_dir=.
6258 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006259 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006260 ac_cv_prog_ac_ct_READELF="$ac_prog"
6261 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6262 break 2
6263 fi
6264done
6265 done
6266IFS=$as_save_IFS
6267
6268fi
6269fi
6270ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6271if test -n "$ac_ct_READELF"; then
6272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6273$as_echo "$ac_ct_READELF" >&6; }
6274else
6275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6276$as_echo "no" >&6; }
6277fi
6278
6279
6280 test -n "$ac_ct_READELF" && break
6281done
6282
6283 if test "x$ac_ct_READELF" = x; then
6284 READELF=":"
6285 else
6286 case $cross_compiling:$ac_tool_warned in
6287yes:)
6288{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6289$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6290ac_tool_warned=yes ;;
6291esac
6292 READELF=$ac_ct_READELF
6293 fi
6294fi
6295
6296if test "$cross_compiling" = yes; then
6297 case "$READELF" in
6298 readelf|:)
6299 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6300 ;;
6301 esac
6302fi
6303
6304
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006305
Matthias Klosec4c48422012-10-21 23:05:35 +02006306for ac_prog in python$PACKAGE_VERSION python3 python
6307do
6308 # Extract the first word of "$ac_prog", so it can be a program name with args.
6309set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6311$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006312if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006313 $as_echo_n "(cached) " >&6
6314else
Matthias Klosec4c48422012-10-21 23:05:35 +02006315 if test -n "$PYTHON"; then
6316 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006317else
6318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6319for as_dir in $PATH
6320do
6321 IFS=$as_save_IFS
6322 test -z "$as_dir" && as_dir=.
6323 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006324 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006325 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006326 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6327 break 2
6328 fi
6329done
6330 done
6331IFS=$as_save_IFS
6332
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006333fi
6334fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006335PYTHON=$ac_cv_prog_PYTHON
6336if test -n "$PYTHON"; then
6337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6338$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006339else
6340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6341$as_echo "no" >&6; }
6342fi
6343
6344
Matthias Klosec4c48422012-10-21 23:05:35 +02006345 test -n "$PYTHON" && break
6346done
6347test -n "$PYTHON" || PYTHON="not-found"
6348
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006349if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006350 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6351else
6352 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006353fi
6354
6355
Kushal Das02d23a22014-04-15 23:50:06 +05306356for ac_prog in python$PACKAGE_VERSION python3 python
6357do
6358 # Extract the first word of "$ac_prog", so it can be a program name with args.
6359set dummy $ac_prog; ac_word=$2
6360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6361$as_echo_n "checking for $ac_word... " >&6; }
6362if ${ac_cv_prog_PYTHON+:} false; then :
6363 $as_echo_n "(cached) " >&6
6364else
6365 if test -n "$PYTHON"; then
6366 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6367else
6368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6369for as_dir in $PATH
6370do
6371 IFS=$as_save_IFS
6372 test -z "$as_dir" && as_dir=.
6373 for ac_exec_ext in '' $ac_executable_extensions; do
6374 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6375 ac_cv_prog_PYTHON="$ac_prog"
6376 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6377 break 2
6378 fi
6379done
6380 done
6381IFS=$as_save_IFS
6382
6383fi
6384fi
6385PYTHON=$ac_cv_prog_PYTHON
6386if test -n "$PYTHON"; then
6387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6388$as_echo "$PYTHON" >&6; }
6389else
6390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6391$as_echo "no" >&6; }
6392fi
6393
6394
6395 test -n "$PYTHON" && break
6396done
6397test -n "$PYTHON" || PYTHON="not-found"
6398
6399if test "$PYTHON" = not-found; then
6400 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6401else
6402 OPCODEHGEN="$PYTHON"
6403fi
6404
6405
6406
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006407case $MACHDEP in
6408bsdos*|hp*|HP*)
6409 # install -d does not work on BSDI or HP-UX
6410 if test -z "$INSTALL"
6411 then
6412 INSTALL="${srcdir}/install-sh -c"
6413 fi
6414esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006415# Find a good install program. We prefer a C program (faster),
6416# so one script is as good as another. But avoid the broken or
6417# incompatible versions:
6418# SysV /etc/install, /usr/sbin/install
6419# SunOS /usr/etc/install
6420# IRIX /sbin/install
6421# AIX /bin/install
6422# AmigaOS /C/install, which installs bootblocks on floppy discs
6423# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6424# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6425# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6426# OS/2's system install, which has a completely different semantic
6427# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006428# Reject install programs that cannot install multiple files.
6429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6430$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006431if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006432if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006433 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006434else
6435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6436for as_dir in $PATH
6437do
6438 IFS=$as_save_IFS
6439 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006440 # Account for people who put trailing slashes in PATH elements.
6441case $as_dir/ in #((
6442 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006443 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006444 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006445 /usr/ucb/* ) ;;
6446 *)
6447 # OSF1 and SCO ODT 3.0 have their own names for install.
6448 # Don't use installbsd from OSF since it installs stuff as root
6449 # by default.
6450 for ac_prog in ginstall scoinst install; do
6451 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006452 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006453 if test $ac_prog = install &&
6454 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6455 # AIX install. It has an incompatible calling convention.
6456 :
6457 elif test $ac_prog = install &&
6458 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6459 # program-specific install script used by HP pwplus--don't use.
6460 :
6461 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006462 rm -rf conftest.one conftest.two conftest.dir
6463 echo one > conftest.one
6464 echo two > conftest.two
6465 mkdir conftest.dir
6466 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6467 test -s conftest.one && test -s conftest.two &&
6468 test -s conftest.dir/conftest.one &&
6469 test -s conftest.dir/conftest.two
6470 then
6471 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6472 break 3
6473 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006474 fi
6475 fi
6476 done
6477 done
6478 ;;
6479esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006480
6481 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006482IFS=$as_save_IFS
6483
Matthias Kloseb9621712010-04-24 17:59:49 +00006484rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006485
6486fi
6487 if test "${ac_cv_path_install+set}" = set; then
6488 INSTALL=$ac_cv_path_install
6489 else
6490 # As a last resort, use the slow shell script. Don't cache a
6491 # value for INSTALL within a source directory, because that will
6492 # break other packages using the cache if that directory is
6493 # removed, or if the value is a relative name.
6494 INSTALL=$ac_install_sh
6495 fi
6496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6498$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006499
6500# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6501# It thinks the first close brace ends the variable substitution.
6502test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6503
6504test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6505
6506test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6507
Matthias Klose93a0ef12012-03-15 18:08:34 +01006508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6509$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6510if test -z "$MKDIR_P"; then
6511 if ${ac_cv_path_mkdir+:} false; then :
6512 $as_echo_n "(cached) " >&6
6513else
6514 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6515for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6516do
6517 IFS=$as_save_IFS
6518 test -z "$as_dir" && as_dir=.
6519 for ac_prog in mkdir gmkdir; do
6520 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006521 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006522 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6523 'mkdir (GNU coreutils) '* | \
6524 'mkdir (coreutils) '* | \
6525 'mkdir (fileutils) '4.1*)
6526 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6527 break 3;;
6528 esac
6529 done
6530 done
6531 done
6532IFS=$as_save_IFS
6533
6534fi
6535
6536 test -d ./--version && rmdir ./--version
6537 if test "${ac_cv_path_mkdir+set}" = set; then
6538 MKDIR_P="$ac_cv_path_mkdir -p"
6539 else
6540 # As a last resort, use the slow shell script. Don't cache a
6541 # value for MKDIR_P within a source directory, because that will
6542 # break other packages using the cache if that directory is
6543 # removed, or if the value is a relative name.
6544 MKDIR_P="$ac_install_sh -d"
6545 fi
6546fi
6547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6548$as_echo "$MKDIR_P" >&6; }
6549
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006550
6551# Not every filesystem supports hard links
6552
6553if test -z "$LN" ; then
6554 case $ac_sys_system in
6555 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006556 *) LN=ln;;
6557 esac
6558fi
6559
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006560# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006561
6562ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006563
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006564# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6566$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006567
6568# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006569if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006570 withval=$with_pydebug;
6571if test "$withval" != no
6572then
6573
Matthias Kloseb9621712010-04-24 17:59:49 +00006574$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006575
Matthias Kloseb9621712010-04-24 17:59:49 +00006576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6577$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006578 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006579 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006580else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6581$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006582fi
6583else
Matthias Kloseb9621712010-04-24 17:59:49 +00006584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6585$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006586fi
6587
6588
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006589# Enable LTO flags
6590
6591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6592$as_echo_n "checking for --with-lto... " >&6; }
6593
6594# Check whether --with-lto was given.
6595if test "${with_lto+set}" = set; then :
6596 withval=$with_lto;
6597if test "$withval" != no
6598then
6599 Py_LTO='true'
6600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6601$as_echo "yes" >&6; };
6602else
6603 Py_LTO='false'
6604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6605$as_echo "no" >&6; };
6606fi
6607else
6608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6609$as_echo "no" >&6; }
6610fi
6611
6612if test "$Py_LTO" = 'true' ; then
6613 case $CC in
6614 *clang*)
6615 # Any changes made here should be reflected in the GCC+Darwin case below
6616 LTOFLAGS="-flto"
6617 ;;
6618 *gcc*)
6619 case $ac_sys_system in
6620 Darwin*)
6621 LTOFLAGS="-flto"
6622 ;;
6623 *)
6624 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6625 ;;
6626 esac
6627 ;;
6628 esac
6629fi
6630
Brett Cannon7188a3e2015-09-18 15:13:44 -07006631# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006632
6633
6634
6635
6636
6637
Brett Cannon7188a3e2015-09-18 15:13:44 -07006638# Extract the first word of "llvm-profdata", so it can be a program name with args.
6639set dummy llvm-profdata; ac_word=$2
6640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6641$as_echo_n "checking for $ac_word... " >&6; }
6642if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6643 $as_echo_n "(cached) " >&6
6644else
6645 if test -n "$LLVM_PROF_FOUND"; then
6646 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6647else
6648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6649for as_dir in $PATH
6650do
6651 IFS=$as_save_IFS
6652 test -z "$as_dir" && as_dir=.
6653 for ac_exec_ext in '' $ac_executable_extensions; do
6654 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6655 ac_cv_prog_LLVM_PROF_FOUND="found"
6656 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6657 break 2
6658 fi
6659done
6660 done
6661IFS=$as_save_IFS
6662
6663 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6664fi
6665fi
6666LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6667if test -n "$LLVM_PROF_FOUND"; then
6668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6669$as_echo "$LLVM_PROF_FOUND" >&6; }
6670else
6671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6672$as_echo "no" >&6; }
6673fi
6674
6675
6676LLVM_PROF_ERR=no
6677case $CC in
6678 *clang*)
6679 # Any changes made here should be reflected in the GCC+Darwin case below
6680 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6681 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6682 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6683 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6684 if test $LLVM_PROF_FOUND = not-found
6685 then
6686 LLVM_PROF_ERR=yes
6687 fi
6688 ;;
6689 *gcc*)
6690 case $ac_sys_system in
6691 Darwin*)
6692 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6693 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6694 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6695 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6696 if test $LLVM_PROF_FOUND = not-found
6697 then
6698 LLVM_PROF_ERR=yes
6699 fi
6700 ;;
6701 *)
6702 PGO_PROF_GEN_FLAG="-fprofile-generate"
6703 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6704 LLVM_PROF_MERGER="true"
6705 LLVM_PROF_FILE=""
6706 ;;
6707 esac
6708 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006709 *icc*)
6710 PGO_PROF_GEN_FLAG="-prof-gen"
6711 PGO_PROF_USE_FLAG="-prof-use"
6712 LLVM_PROF_MERGER="true"
6713 LLVM_PROF_FILE=""
6714 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006715esac
6716
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006717# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6718# merged with this chunk of code?
6719
6720# Optimizer/debugger flags
6721# ------------------------
6722# (The following bit of code is complicated enough - please keep things
6723# indented properly. Just pretend you're editing Python code. ;-)
6724
6725# There are two parallel sets of case statements below, one that checks to
6726# see if OPT was set and one that does BASECFLAGS setting based upon
6727# compiler and platform. BASECFLAGS tweaks need to be made even if the
6728# user set OPT.
6729
6730# tweak OPT based on compiler and platform, only if the user didn't set
6731# it on the command line
6732
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006733if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006734then
6735 case $GCC in
6736 yes)
6737 if test "$CC" != 'g++' ; then
6738 STRICT_PROTO="-Wstrict-prototypes"
6739 fi
6740 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6741 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6742 WRAP="-fwrapv"
6743 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006744
6745 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006746 case $CC in
6747 *clang*) WRAP="-fwrapv"
6748 ;;
6749 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006750
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006751 case $ac_cv_prog_cc_g in
6752 yes)
6753 if test "$Py_DEBUG" = 'true' ; then
6754 # Optimization messes up debuggers, so turn it off for
6755 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006756 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6757 OPT="-g -Og -Wall $STRICT_PROTO"
6758 else
6759 OPT="-g -O0 -Wall $STRICT_PROTO"
6760 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006761 else
6762 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6763 fi
6764 ;;
6765 *)
6766 OPT="-O3 -Wall $STRICT_PROTO"
6767 ;;
6768 esac
6769 case $ac_sys_system in
6770 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6771 ;;
6772 esac
6773 ;;
6774
6775 *)
6776 OPT="-O"
6777 ;;
6778 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006779fi
6780
6781
6782
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006783
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006784# The -arch flags for universal builds on OSX
6785UNIVERSAL_ARCH_FLAGS=
6786
6787
6788# tweak BASECFLAGS based on compiler and platform
6789case $GCC in
6790yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006791 # Python doesn't violate C99 aliasing rules, but older versions of
6792 # GCC produce warnings for legal Python code. Enable
6793 # -fno-strict-aliasing on versions of GCC that support but produce
6794 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6796$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006797 ac_save_cc="$CC"
6798 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006799 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006800 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006801 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006802else
Matthias Kloseb9621712010-04-24 17:59:49 +00006803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006804/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006805
Matthias Kloseb159a552010-04-25 21:00:44 +00006806
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006807int
6808main ()
6809{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006810
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006811 ;
6812 return 0;
6813}
Matthias Kloseb159a552010-04-25 21:00:44 +00006814
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006816if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006817
6818 CC="$ac_save_cc -fstrict-aliasing"
6819 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006821/* end confdefs.h. */
6822
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006823 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006824int
6825main ()
6826{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006827double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006828 ;
6829 return 0;
6830}
Matthias Kloseb159a552010-04-25 21:00:44 +00006831
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006833if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006834
6835 ac_cv_no_strict_aliasing=no
6836
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006837else
Matthias Kloseb159a552010-04-25 21:00:44 +00006838
6839 ac_cv_no_strict_aliasing=yes
6840
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006841fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006843
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006844else
Matthias Kloseb159a552010-04-25 21:00:44 +00006845
6846 ac_cv_no_strict_aliasing=no
6847
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006848fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006850fi
6851
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006852 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006853 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6855$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006856 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006857 then
6858 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6859 fi
6860
Zachary Ware5af85642015-12-21 12:09:17 -06006861 # ICC doesn't recognize the option, but only emits a warning
6862 ## XXX does it emit an unused result warning and can it be disabled?
6863 case "$CC" in
6864 *icc*)
6865 ac_cv_disable_unused_result_warning=no
6866 ;;
6867 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6869$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6870 ac_save_cc="$CC"
6871 CC="$CC -Wunused-result -Werror"
6872 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006873 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006874 $as_echo_n "(cached) " >&6
6875else
6876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6877/* end confdefs.h. */
6878
6879
6880int
6881main ()
6882{
6883
6884 ;
6885 return 0;
6886}
6887
6888_ACEOF
6889if ac_fn_c_try_compile "$LINENO"; then :
6890
6891 ac_cv_disable_unused_result_warning=yes
6892
6893else
6894
6895 ac_cv_disable_unused_result_warning=no
6896
6897fi
6898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6899fi
6900
6901 CFLAGS="$save_CFLAGS"
6902 CC="$ac_save_cc"
6903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6904$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006905 ;;
6906 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006907
6908 if test $ac_cv_disable_unused_result_warning = yes
6909 then
6910 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6911 fi
6912
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6914$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6915 ac_save_cc="$CC"
6916 CC="$CC -Werror=declaration-after-statement"
6917 save_CFLAGS="$CFLAGS"
6918 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6919 $as_echo_n "(cached) " >&6
6920else
6921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6922/* end confdefs.h. */
6923
6924
6925int
6926main ()
6927{
6928
6929 ;
6930 return 0;
6931}
6932
6933_ACEOF
6934if ac_fn_c_try_compile "$LINENO"; then :
6935
6936 ac_cv_declaration_after_statement_warning=yes
6937
6938else
6939
6940 ac_cv_declaration_after_statement_warning=no
6941
6942fi
6943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6944fi
6945
6946 CFLAGS="$save_CFLAGS"
6947 CC="$ac_save_cc"
6948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6949$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6950
6951 if test $ac_cv_declaration_after_statement_warning = yes
6952 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006953 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006954 fi
6955
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6957$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6958 ac_save_cc="$CC"
6959 CC="$CC -Wsign-compare"
6960 save_CFLAGS="$CFLAGS"
6961 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6962 $as_echo_n "(cached) " >&6
6963else
6964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6965/* end confdefs.h. */
6966
6967
6968int
6969main ()
6970{
6971
6972 ;
6973 return 0;
6974}
6975
6976_ACEOF
6977if ac_fn_c_try_compile "$LINENO"; then :
6978
6979 ac_cv_enable_sign_compare_warning=yes
6980
6981else
6982
6983 ac_cv_enable_sign_compare_warning=no
6984
6985fi
6986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6987fi
6988
6989 CFLAGS="$save_CFLAGS"
6990 CC="$ac_save_cc"
6991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6992$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6993
6994 if test $ac_cv_enable_sign_compare_warning = yes
6995 then
6996 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6997 fi
6998
6999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7000$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7001 ac_save_cc="$CC"
7002 CC="$CC -Wunreachable-code"
7003 save_CFLAGS="$CFLAGS"
7004 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7005 $as_echo_n "(cached) " >&6
7006else
7007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7008/* end confdefs.h. */
7009
7010
7011int
7012main ()
7013{
7014
7015 ;
7016 return 0;
7017}
7018
7019_ACEOF
7020if ac_fn_c_try_compile "$LINENO"; then :
7021
7022 ac_cv_enable_unreachable_code_warning=yes
7023
7024else
7025
7026 ac_cv_enable_unreachable_code_warning=no
7027
7028fi
7029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7030fi
7031
7032 CFLAGS="$save_CFLAGS"
7033 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007034
7035 # Don't enable unreachable code warning in debug mode, since it usually
7036 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007037 # Issue #24324: Unfortunately, the unreachable code warning does not work
7038 # correctly on gcc and has been silently removed from the compiler.
7039 # It is supported on clang but on OS X systems gcc may be an alias
7040 # for clang. Try to determine if the compiler is not really gcc and,
7041 # if so, only then enable the warning.
7042 if test $ac_cv_enable_unreachable_code_warning = yes && \
7043 test "$Py_DEBUG" != "true" && \
7044 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007045 then
7046 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007047 else
7048 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007049 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7051$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007052
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007053 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7054 # support. Without this, treatment of subnormals doesn't follow
7055 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007056 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007057 alpha*)
7058 BASECFLAGS="$BASECFLAGS -mieee"
7059 ;;
7060 esac
7061
7062 case $ac_sys_system in
7063 SCO_SV*)
7064 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7065 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007066
7067 # is there any other compiler on Darwin besides gcc?
7068 Darwin*)
7069 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7070 # used to be here, but non-Apple gcc doesn't accept them.
7071 if test "${CC}" = gcc
7072 then
7073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007074$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007075 case "${UNIVERSALSDK}" in
7076 */MacOSX10.4u.sdk)
7077 # Build using 10.4 SDK, force usage of gcc when the
7078 # compiler is gcc, otherwise the user will get very
7079 # confusing error messages when building on OSX 10.6
7080 CC=gcc-4.0
7081 CPP=cpp-4.0
7082 ;;
7083 esac
7084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007085$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007086 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007087
Ned Deily87adb6e2013-10-18 21:09:56 -07007088 if test "${enable_universalsdk}"
7089 then
7090 case "$UNIVERSAL_ARCHS" in
7091 32-bit)
7092 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7093 LIPO_32BIT_FLAGS=""
7094 ARCH_RUN_32BIT=""
7095 ;;
7096 64-bit)
7097 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7098 LIPO_32BIT_FLAGS=""
7099 ARCH_RUN_32BIT="true"
7100 ;;
7101 all)
7102 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7103 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7104 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7105 ;;
7106 intel)
7107 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7108 LIPO_32BIT_FLAGS="-extract i386"
7109 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7110 ;;
7111 intel-32)
7112 UNIVERSAL_ARCH_FLAGS="-arch i386"
7113 LIPO_32BIT_FLAGS=""
7114 ARCH_RUN_32BIT=""
7115 ;;
7116 3-way)
7117 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7118 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7119 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7120 ;;
7121 *)
7122 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7123 ;;
7124 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007125
Ned Deily87adb6e2013-10-18 21:09:56 -07007126 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7127 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7128 if test "${UNIVERSALSDK}" != "/"
7129 then
7130 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7131 fi
7132 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007133
Ned Deily87adb6e2013-10-18 21:09:56 -07007134 # Calculate an appropriate deployment target for this build:
7135 # The deployment target value is used explicitly to enable certain
7136 # features are enabled (such as builtin libedit support for readline)
7137 # through the use of Apple's Availabiliy Macros and is used as a
7138 # component of the string returned by distutils.get_platform().
7139 #
7140 # Use the value from:
7141 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7142 # 2. the operating system version of the build machine if >= 10.6
7143 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7144 # below to pick either 10.3, 10.4, or 10.5 as the target.
7145 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007146
Ned Deily87adb6e2013-10-18 21:09:56 -07007147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7148$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007149 cur_target_major=`sw_vers -productVersion | \
7150 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7151 cur_target_minor=`sw_vers -productVersion | \
7152 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7153 cur_target="${cur_target_major}.${cur_target_minor}"
7154 if test ${cur_target_major} -eq 10 && \
7155 test ${cur_target_minor} -ge 3 && \
7156 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007157 then
Ned Deily36820b62014-06-25 13:44:22 -07007158 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007159 cur_target=10.3
7160 if test ${enable_universalsdk}
7161 then
7162 case "$UNIVERSAL_ARCHS" in
7163 all|3-way|intel|64-bit)
7164 # These configurations were first supported in 10.5
7165 cur_target='10.5'
7166 ;;
7167 esac
7168 else
7169 if test `/usr/bin/arch` = "i386"
7170 then
7171 # 10.4 was the first release to support Intel archs
7172 cur_target="10.4"
7173 fi
7174 fi
7175 fi
7176 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007177
Ned Deily87adb6e2013-10-18 21:09:56 -07007178 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7179 # environment with a value that is the same as what we'll use
7180 # in the Makefile to ensure that we'll get the same compiler
7181 # environment during configure and build time.
7182 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7183 export MACOSX_DEPLOYMENT_TARGET
7184 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7186$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007187
Ned Deily87adb6e2013-10-18 21:09:56 -07007188 # end of Darwin* tests
7189 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007190 esac
7191 ;;
7192
7193*)
7194 case $ac_sys_system in
7195 OpenUNIX*|UnixWare*)
7196 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7197 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007198 SCO_SV*)
7199 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7200 ;;
7201 esac
7202 ;;
7203esac
7204
Zachary Ware5af85642015-12-21 12:09:17 -06007205# ICC needs -fp-model strict or floats behave badly
7206case "$CC" in
7207*icc*)
7208 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7209 ;;
7210esac
7211
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007212if test "$Py_DEBUG" = 'true'; then
7213 :
7214else
7215 OPT="-DNDEBUG $OPT"
7216fi
7217
7218if test "$ac_arch_flags"
7219then
7220 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7221fi
7222
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007223# On some compilers, pthreads are available without further options
7224# (e.g. MacOS X). On some of these systems, the compiler will not
7225# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7226# So we have to see first whether pthreads are available without
7227# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7229$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007230if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007231 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007232else
Matthias Kloseb9621712010-04-24 17:59:49 +00007233 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007234 ac_cv_pthread_is_default=no
7235else
Matthias Kloseb9621712010-04-24 17:59:49 +00007236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007237/* end confdefs.h. */
7238
Stefan Krah7dba5942012-11-22 22:49:11 +01007239#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007240#include <pthread.h>
7241
7242void* routine(void* p){return NULL;}
7243
7244int main(){
7245 pthread_t p;
7246 if(pthread_create(&p,NULL,routine,NULL)!=0)
7247 return 1;
7248 (void)pthread_detach(p);
7249 return 0;
7250}
7251
7252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007253if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007254
7255 ac_cv_pthread_is_default=yes
7256 ac_cv_kthread=no
7257 ac_cv_pthread=no
7258
7259else
Matthias Kloseb9621712010-04-24 17:59:49 +00007260 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007261fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7263 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007264fi
7265
7266
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007267fi
7268
Matthias Kloseb9621712010-04-24 17:59:49 +00007269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7270$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007271
7272
7273if test $ac_cv_pthread_is_default = yes
7274then
7275 ac_cv_kpthread=no
7276else
7277# -Kpthread, if available, provides the right #defines
7278# and linker options to make pthread_create available
7279# Some compilers won't report that they do not support -Kpthread,
7280# so we need to run a program to see whether it really made the
7281# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7283$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007284if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007285 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007286else
7287 ac_save_cc="$CC"
7288CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007289if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007290 ac_cv_kpthread=no
7291else
Matthias Kloseb9621712010-04-24 17:59:49 +00007292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007293/* end confdefs.h. */
7294
Stefan Krah7dba5942012-11-22 22:49:11 +01007295#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007296#include <pthread.h>
7297
7298void* routine(void* p){return NULL;}
7299
7300int main(){
7301 pthread_t p;
7302 if(pthread_create(&p,NULL,routine,NULL)!=0)
7303 return 1;
7304 (void)pthread_detach(p);
7305 return 0;
7306}
7307
7308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007309if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007310 ac_cv_kpthread=yes
7311else
Matthias Kloseb9621712010-04-24 17:59:49 +00007312 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007313fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7315 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007316fi
7317
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007318CC="$ac_save_cc"
7319fi
7320
Matthias Kloseb9621712010-04-24 17:59:49 +00007321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7322$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007323fi
7324
7325if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7326then
7327# -Kthread, if available, provides the right #defines
7328# and linker options to make pthread_create available
7329# Some compilers won't report that they do not support -Kthread,
7330# so we need to run a program to see whether it really made the
7331# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7333$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007334if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007335 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007336else
7337 ac_save_cc="$CC"
7338CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007339if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007340 ac_cv_kthread=no
7341else
Matthias Kloseb9621712010-04-24 17:59:49 +00007342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007343/* end confdefs.h. */
7344
Stefan Krah7dba5942012-11-22 22:49:11 +01007345#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007346#include <pthread.h>
7347
7348void* routine(void* p){return NULL;}
7349
7350int main(){
7351 pthread_t p;
7352 if(pthread_create(&p,NULL,routine,NULL)!=0)
7353 return 1;
7354 (void)pthread_detach(p);
7355 return 0;
7356}
7357
7358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007359if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007360 ac_cv_kthread=yes
7361else
Matthias Kloseb9621712010-04-24 17:59:49 +00007362 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007363fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007364rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7365 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007366fi
7367
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007368CC="$ac_save_cc"
7369fi
7370
Matthias Kloseb9621712010-04-24 17:59:49 +00007371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7372$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007373fi
7374
7375if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7376then
7377# -pthread, if available, provides the right #defines
7378# and linker options to make pthread_create available
7379# Some compilers won't report that they do not support -pthread,
7380# so we need to run a program to see whether it really made the
7381# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7383$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007384if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007385 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007386else
7387 ac_save_cc="$CC"
7388CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007389if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007390 ac_cv_pthread=no
7391else
Matthias Kloseb9621712010-04-24 17:59:49 +00007392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007393/* end confdefs.h. */
7394
Stefan Krah7dba5942012-11-22 22:49:11 +01007395#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007396#include <pthread.h>
7397
7398void* routine(void* p){return NULL;}
7399
7400int main(){
7401 pthread_t p;
7402 if(pthread_create(&p,NULL,routine,NULL)!=0)
7403 return 1;
7404 (void)pthread_detach(p);
7405 return 0;
7406}
7407
7408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007409if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007410 ac_cv_pthread=yes
7411else
Matthias Kloseb9621712010-04-24 17:59:49 +00007412 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007414rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7415 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007416fi
7417
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007418CC="$ac_save_cc"
7419fi
7420
Matthias Kloseb9621712010-04-24 17:59:49 +00007421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7422$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007423fi
7424
7425# If we have set a CC compiler flag for thread support then
7426# check if it works for CXX, too.
7427ac_cv_cxx_thread=no
7428if test ! -z "$CXX"
7429then
Matthias Kloseb9621712010-04-24 17:59:49 +00007430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7431$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007432ac_save_cxx="$CXX"
7433
7434if test "$ac_cv_kpthread" = "yes"
7435then
7436 CXX="$CXX -Kpthread"
7437 ac_cv_cxx_thread=yes
7438elif test "$ac_cv_kthread" = "yes"
7439then
7440 CXX="$CXX -Kthread"
7441 ac_cv_cxx_thread=yes
7442elif test "$ac_cv_pthread" = "yes"
7443then
7444 CXX="$CXX -pthread"
7445 ac_cv_cxx_thread=yes
7446fi
7447
7448if test $ac_cv_cxx_thread = yes
7449then
7450 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7451 $CXX -c conftest.$ac_ext 2>&5
7452 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7453 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7454 then
7455 ac_cv_cxx_thread=yes
7456 else
7457 ac_cv_cxx_thread=no
7458 fi
7459 rm -fr conftest*
7460fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7462$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007463fi
7464CXX="$ac_save_cxx"
7465
7466
7467# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7469$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007470if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007471 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007472else
Matthias Kloseb9621712010-04-24 17:59:49 +00007473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007474/* end confdefs.h. */
7475#include <stdlib.h>
7476#include <stdarg.h>
7477#include <string.h>
7478#include <float.h>
7479
7480int
7481main ()
7482{
7483
7484 ;
7485 return 0;
7486}
7487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007488if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007489 ac_cv_header_stdc=yes
7490else
Matthias Kloseb9621712010-04-24 17:59:49 +00007491 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007492fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7494
7495if test $ac_cv_header_stdc = yes; then
7496 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007498/* end confdefs.h. */
7499#include <string.h>
7500
7501_ACEOF
7502if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007503 $EGREP "memchr" >/dev/null 2>&1; then :
7504
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007505else
7506 ac_cv_header_stdc=no
7507fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007508rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007509
7510fi
7511
7512if test $ac_cv_header_stdc = yes; then
7513 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007515/* end confdefs.h. */
7516#include <stdlib.h>
7517
7518_ACEOF
7519if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007520 $EGREP "free" >/dev/null 2>&1; then :
7521
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007522else
7523 ac_cv_header_stdc=no
7524fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007525rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007526
7527fi
7528
7529if test $ac_cv_header_stdc = yes; then
7530 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007531 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007532 :
7533else
Matthias Kloseb9621712010-04-24 17:59:49 +00007534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007535/* end confdefs.h. */
7536#include <ctype.h>
7537#include <stdlib.h>
7538#if ((' ' & 0x0FF) == 0x020)
7539# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7540# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7541#else
7542# define ISLOWER(c) \
7543 (('a' <= (c) && (c) <= 'i') \
7544 || ('j' <= (c) && (c) <= 'r') \
7545 || ('s' <= (c) && (c) <= 'z'))
7546# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7547#endif
7548
7549#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7550int
7551main ()
7552{
7553 int i;
7554 for (i = 0; i < 256; i++)
7555 if (XOR (islower (i), ISLOWER (i))
7556 || toupper (i) != TOUPPER (i))
7557 return 2;
7558 return 0;
7559}
7560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007561if ac_fn_c_try_run "$LINENO"; then :
7562
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007563else
Matthias Kloseb9621712010-04-24 17:59:49 +00007564 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007565fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007566rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7567 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007568fi
7569
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007570fi
7571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7573$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007574if test $ac_cv_header_stdc = yes; then
7575
Matthias Kloseb9621712010-04-24 17:59:49 +00007576$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007577
7578fi
7579
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007580for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007581fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007582ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007583sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007584unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007585poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007586sys/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 +01007587sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007588sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007589sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007590sys/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 -07007591libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007592bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007593sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007594do :
7595 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7596ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007597if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007598 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007599#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007600_ACEOF
7601
7602fi
7603
Guido van Rossum627b2d71993-12-24 10:39:16 +00007604done
7605
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007606ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007607for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007608 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7610$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007611if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007612 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007613else
Matthias Kloseb9621712010-04-24 17:59:49 +00007614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007615/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007616#include <sys/types.h>
7617#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007618
Martin v. Löwis11437992002-04-12 09:54:03 +00007619int
7620main ()
7621{
7622if ((DIR *) 0)
7623return 0;
7624 ;
7625 return 0;
7626}
7627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007628if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007629 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007630else
Matthias Kloseb9621712010-04-24 17:59:49 +00007631 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007635eval ac_res=\$$as_ac_Header
7636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7637$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007638if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007639 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007640#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007641_ACEOF
7642
7643ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007644fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007645
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007646done
7647# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7648if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7650$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007651if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007652 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007653else
Martin v. Löwis11437992002-04-12 09:54:03 +00007654 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007657
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007658/* Override any GCC internal prototype to avoid an error.
7659 Use char because int might match the return type of a GCC
7660 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007661#ifdef __cplusplus
7662extern "C"
7663#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007664char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007665int
7666main ()
7667{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007668return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007669 ;
7670 return 0;
7671}
7672_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007673for ac_lib in '' dir; do
7674 if test -z "$ac_lib"; then
7675 ac_res="none required"
7676 else
7677 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007678 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007679 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007680 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007681 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007683rm -f core conftest.err conftest.$ac_objext \
7684 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007685 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007686 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007688done
Victor Stinnere0be4232011-10-25 13:06:09 +02007689if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007690
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007691else
7692 ac_cv_search_opendir=no
7693fi
7694rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007695LIBS=$ac_func_search_save_LIBS
7696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7698$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007699ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007700if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007701 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007702
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007703fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007704
Michael W. Hudson54241132001-12-07 15:38:26 +00007705else
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7707$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007708if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007709 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007710else
7711 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007714
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007715/* Override any GCC internal prototype to avoid an error.
7716 Use char because int might match the return type of a GCC
7717 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007718#ifdef __cplusplus
7719extern "C"
7720#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007721char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007722int
7723main ()
7724{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007725return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007726 ;
7727 return 0;
7728}
7729_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007730for ac_lib in '' x; do
7731 if test -z "$ac_lib"; then
7732 ac_res="none required"
7733 else
7734 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007735 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007736 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007737 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007738 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007740rm -f core conftest.err conftest.$ac_objext \
7741 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007742 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007743 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007745done
Victor Stinnere0be4232011-10-25 13:06:09 +02007746if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007747
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007748else
7749 ac_cv_search_opendir=no
7750fi
7751rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007752LIBS=$ac_func_search_save_LIBS
7753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7755$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007756ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007757if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007758 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007759
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007760fi
7761
7762fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007763
Matthias Kloseb9621712010-04-24 17:59:49 +00007764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7765$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007766if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007767 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007768else
Matthias Kloseb9621712010-04-24 17:59:49 +00007769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007770/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007771#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007772int
7773main ()
7774{
7775return makedev(0, 0);
7776 ;
7777 return 0;
7778}
7779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007780if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007781 ac_cv_header_sys_types_h_makedev=yes
7782else
Matthias Kloseb9621712010-04-24 17:59:49 +00007783 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007785rm -f core conftest.err conftest.$ac_objext \
7786 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007787
7788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7790$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007791
7792if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007793ac_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 +02007794if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007795
Matthias Kloseb9621712010-04-24 17:59:49 +00007796$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007797
7798fi
7799
7800
7801
7802 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007803 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 +02007804if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007805
Matthias Kloseb9621712010-04-24 17:59:49 +00007806$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007807
7808fi
7809
7810
7811 fi
7812fi
7813
Michael W. Hudson54241132001-12-07 15:38:26 +00007814
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007815# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7816for ac_header in net/if.h
7817do :
7818 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7819#ifdef STDC_HEADERS
7820# include <stdlib.h>
7821# include <stddef.h>
7822#else
7823# ifdef HAVE_STDLIB_H
7824# include <stdlib.h>
7825# endif
7826#endif
7827#ifdef HAVE_SYS_SOCKET_H
7828# include <sys/socket.h>
7829#endif
7830
7831"
Victor Stinnere0be4232011-10-25 13:06:09 +02007832if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007833 cat >>confdefs.h <<_ACEOF
7834#define HAVE_NET_IF_H 1
7835_ACEOF
7836
7837fi
7838
7839done
7840
7841
Martin v. Löwis11017b12006-01-14 18:12:57 +00007842# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007843for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007844do :
7845 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 +00007846#ifdef HAVE_ASM_TYPES_H
7847#include <asm/types.h>
7848#endif
7849#ifdef HAVE_SYS_SOCKET_H
7850#include <sys/socket.h>
7851#endif
7852
Matthias Kloseb9621712010-04-24 17:59:49 +00007853"
Victor Stinnere0be4232011-10-25 13:06:09 +02007854if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007855 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007856#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007857_ACEOF
7858
7859fi
7860
7861done
7862
7863
Charles-François Natali47413c12011-10-06 19:47:44 +02007864# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007865for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007866do :
7867 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7868ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7869#ifdef HAVE_SYS_SOCKET_H
7870#include <sys/socket.h>
7871#endif
7872
7873"
7874if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7875 cat >>confdefs.h <<_ACEOF
7876#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7877_ACEOF
7878
7879fi
7880
7881done
7882
7883
Guido van Rossum627b2d71993-12-24 10:39:16 +00007884# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007885was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7887$as_echo_n "checking for clock_t in time.h... " >&6; }
7888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007889/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007890#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007891
7892_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007893if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007894 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007895 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007896else
Martin v. Löwis11437992002-04-12 09:54:03 +00007897
7898
Matthias Kloseb9621712010-04-24 17:59:49 +00007899$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007900
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007901
Guido van Rossum627b2d71993-12-24 10:39:16 +00007902fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007903rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007904
Matthias Kloseb9621712010-04-24 17:59:49 +00007905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7906$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007907
Matthias Kloseb9621712010-04-24 17:59:49 +00007908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7909$as_echo_n "checking for makedev... " >&6; }
7910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007911/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007912
Jesus Cea740f53a2010-04-28 11:35:30 +00007913#if defined(MAJOR_IN_MKDEV)
7914#include <sys/mkdev.h>
7915#elif defined(MAJOR_IN_SYSMACROS)
7916#include <sys/sysmacros.h>
7917#else
7918#include <sys/types.h>
7919#endif
7920
Neal Norwitz11690112002-07-30 01:08:28 +00007921int
7922main ()
7923{
Jesus Cea740f53a2010-04-28 11:35:30 +00007924
7925 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007926 ;
7927 return 0;
7928}
Matthias Kloseb159a552010-04-25 21:00:44 +00007929
Neal Norwitz11690112002-07-30 01:08:28 +00007930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007931if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007932 ac_cv_has_makedev=yes
7933else
Matthias Kloseb9621712010-04-24 17:59:49 +00007934 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007936rm -f core conftest.err conftest.$ac_objext \
7937 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7939$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007940if test "$ac_cv_has_makedev" = "yes"; then
7941
Matthias Kloseb9621712010-04-24 17:59:49 +00007942$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007943
7944fi
7945
Christian Heimes985ecdc2013-11-20 11:46:18 +01007946# byte swapping
7947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7948$as_echo_n "checking for le64toh... " >&6; }
7949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7950/* end confdefs.h. */
7951
7952#ifdef HAVE_ENDIAN_H
7953#include <endian.h>
7954#elif defined(HAVE_SYS_ENDIAN_H)
7955#include <sys/endian.h>
7956#endif
7957
7958int
7959main ()
7960{
7961
7962 le64toh(1)
7963 ;
7964 return 0;
7965}
7966
7967_ACEOF
7968if ac_fn_c_try_link "$LINENO"; then :
7969 ac_cv_has_le64toh=yes
7970else
7971 ac_cv_has_le64toh=no
7972fi
7973rm -f core conftest.err conftest.$ac_objext \
7974 conftest$ac_exeext conftest.$ac_ext
7975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7976$as_echo "$ac_cv_has_le64toh" >&6; }
7977if test "$ac_cv_has_le64toh" = "yes"; then
7978
7979$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7980
7981fi
7982
Martin v. Löwis399a6892002-10-04 10:22:02 +00007983# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7984# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7985# defined, but the compiler does not support pragma redefine_extname,
7986# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7987# structures (such as rlimit64) without declaring them. As a
7988# work-around, disable LFS on such configurations
7989
7990use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7992$as_echo_n "checking Solaris LFS bug... " >&6; }
7993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007994/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007995
7996#define _LARGEFILE_SOURCE 1
7997#define _FILE_OFFSET_BITS 64
7998#include <sys/resource.h>
7999
Martin v. Löwis399a6892002-10-04 10:22:02 +00008000int
8001main ()
8002{
8003struct rlimit foo;
8004 ;
8005 return 0;
8006}
8007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008008if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008009 sol_lfs_bug=no
8010else
Matthias Kloseb9621712010-04-24 17:59:49 +00008011 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8015$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008016if test "$sol_lfs_bug" = "yes"; then
8017 use_lfs=no
8018fi
8019
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008020# Don't use largefile support for GNU/Hurd
8021case $ac_sys_system in GNU*)
8022 use_lfs=no
8023esac
8024
Martin v. Löwis399a6892002-10-04 10:22:02 +00008025if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008026# Two defines needed to enable largefile support on various platforms
8027# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008028case $ac_sys_system/$ac_sys_release in
8029AIX*)
8030
8031$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8032
8033 ;;
8034esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008035
Matthias Kloseb9621712010-04-24 17:59:49 +00008036$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008037
8038
Matthias Kloseb9621712010-04-24 17:59:49 +00008039$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008040
Martin v. Löwis399a6892002-10-04 10:22:02 +00008041fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008042
Guido van Rossum84e7b241996-08-19 21:59:00 +00008043# Add some code to confdefs.h so that the test for off_t works on SCO
8044cat >> confdefs.h <<\EOF
8045#if defined(SCO_DS)
8046#undef _OFF_T
8047#endif
8048EOF
8049
Guido van Rossumef2255b2000-03-10 22:30:29 +00008050# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008051ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008052if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008053
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008054else
Martin v. Löwis11437992002-04-12 09:54:03 +00008055
8056cat >>confdefs.h <<_ACEOF
8057#define mode_t int
8058_ACEOF
8059
8060fi
8061
Matthias Kloseb9621712010-04-24 17:59:49 +00008062ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008063if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008064
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008065else
Martin v. Löwis11437992002-04-12 09:54:03 +00008066
8067cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008068#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008069_ACEOF
8070
8071fi
8072
Matthias Kloseb9621712010-04-24 17:59:49 +00008073ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008074if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008076else
Martin v. Löwis11437992002-04-12 09:54:03 +00008077
8078cat >>confdefs.h <<_ACEOF
8079#define pid_t int
8080_ACEOF
8081
8082fi
8083
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008084
Martin v. Löwis11437992002-04-12 09:54:03 +00008085cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008086#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008087_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008088
Matthias Kloseb9621712010-04-24 17:59:49 +00008089ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008090if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008091
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008092else
Martin v. Löwis11437992002-04-12 09:54:03 +00008093
8094cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008095#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008096_ACEOF
8097
8098fi
8099
Matthias Kloseb9621712010-04-24 17:59:49 +00008100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8101$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008102if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008103 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008104else
Matthias Kloseb9621712010-04-24 17:59:49 +00008105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008106/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008107#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008108
8109_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008110if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008111 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008112 ac_cv_type_uid_t=yes
8113else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008114 ac_cv_type_uid_t=no
8115fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008116rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008117
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8120$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008121if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008122
Matthias Kloseb9621712010-04-24 17:59:49 +00008123$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008124
8125
Matthias Kloseb9621712010-04-24 17:59:49 +00008126$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008127
8128fi
8129
Mark Dickinson983bc162012-12-02 12:11:38 +00008130
8131# There are two separate checks for each of the exact-width integer types we
8132# need. First we check whether the type is available using the usual
8133# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8134# and <stdint.h> where available). We then also use the special type checks of
8135# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8136# directly, #define's uint32_t to be a suitable type.
8137
8138ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8139if test "x$ac_cv_type_uint32_t" = xyes; then :
8140
8141$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8142
8143fi
8144
Matthias Kloseb9621712010-04-24 17:59:49 +00008145ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8146case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008147 no|yes) ;; #(
8148 *)
8149
Matthias Kloseb9621712010-04-24 17:59:49 +00008150$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008151
8152
8153cat >>confdefs.h <<_ACEOF
8154#define uint32_t $ac_cv_c_uint32_t
8155_ACEOF
8156;;
8157 esac
8158
Mark Dickinson983bc162012-12-02 12:11:38 +00008159
8160ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8161if test "x$ac_cv_type_uint64_t" = xyes; then :
8162
8163$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8164
8165fi
8166
Matthias Kloseb9621712010-04-24 17:59:49 +00008167ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8168case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008169 no|yes) ;; #(
8170 *)
8171
Matthias Kloseb9621712010-04-24 17:59:49 +00008172$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008173
8174
8175cat >>confdefs.h <<_ACEOF
8176#define uint64_t $ac_cv_c_uint64_t
8177_ACEOF
8178;;
8179 esac
8180
Mark Dickinson983bc162012-12-02 12:11:38 +00008181
8182ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8183if test "x$ac_cv_type_int32_t" = xyes; then :
8184
8185$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8186
8187fi
8188
Matthias Kloseb9621712010-04-24 17:59:49 +00008189ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8190case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008191 no|yes) ;; #(
8192 *)
8193
8194cat >>confdefs.h <<_ACEOF
8195#define int32_t $ac_cv_c_int32_t
8196_ACEOF
8197;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008198esac
8199
Mark Dickinson983bc162012-12-02 12:11:38 +00008200
8201ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8202if test "x$ac_cv_type_int64_t" = xyes; then :
8203
8204$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8205
8206fi
8207
Matthias Kloseb9621712010-04-24 17:59:49 +00008208ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8209case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008210 no|yes) ;; #(
8211 *)
8212
8213cat >>confdefs.h <<_ACEOF
8214#define int64_t $ac_cv_c_int64_t
8215_ACEOF
8216;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008217esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008218
Mark Dickinson983bc162012-12-02 12:11:38 +00008219
Matthias Kloseb9621712010-04-24 17:59:49 +00008220ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008221if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008222
Matthias Kloseb9621712010-04-24 17:59:49 +00008223$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008224
8225fi
8226
Stefan Krah1919b7e2012-03-21 18:25:23 +01008227ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8228if test "x$ac_cv_type___uint128_t" = xyes; then :
8229
8230$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8231
8232fi
8233
Jack Jansendd19cf82001-12-06 22:36:17 +00008234
Michael W. Hudson54241132001-12-07 15:38:26 +00008235# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008236# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008237# The cast to long int works around a bug in the HP C Compiler
8238# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8239# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8240# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8242$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008243if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008244 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008245else
Matthias Kloseb9621712010-04-24 17:59:49 +00008246 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 +00008247
Martin v. Löwis11437992002-04-12 09:54:03 +00008248else
Matthias Kloseb9621712010-04-24 17:59:49 +00008249 if test "$ac_cv_type_int" = yes; then
8250 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8251$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008252as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008253See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008254 else
8255 ac_cv_sizeof_int=0
8256 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008258
Martin v. Löwis11437992002-04-12 09:54:03 +00008259fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8261$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008262
8263
8264
Martin v. Löwis11437992002-04-12 09:54:03 +00008265cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008266#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008267_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008268
8269
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008270# The cast to long int works around a bug in the HP C Compiler
8271# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8272# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8273# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8275$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008276if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008277 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008278else
Matthias Kloseb9621712010-04-24 17:59:49 +00008279 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 +00008280
Martin v. Löwis11437992002-04-12 09:54:03 +00008281else
Matthias Kloseb9621712010-04-24 17:59:49 +00008282 if test "$ac_cv_type_long" = yes; then
8283 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8284$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008285as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008286See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008287 else
8288 ac_cv_sizeof_long=0
8289 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008290fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008291
Martin v. Löwis11437992002-04-12 09:54:03 +00008292fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8294$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008295
8296
8297
Martin v. Löwis11437992002-04-12 09:54:03 +00008298cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008299#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008300_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008301
8302
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008303# The cast to long int works around a bug in the HP C Compiler
8304# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8305# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8306# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8308$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008309if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008310 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008311else
Matthias Kloseb9621712010-04-24 17:59:49 +00008312 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 +00008313
Martin v. Löwis11437992002-04-12 09:54:03 +00008314else
Matthias Kloseb9621712010-04-24 17:59:49 +00008315 if test "$ac_cv_type_void_p" = yes; then
8316 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8317$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008318as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008319See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008320 else
8321 ac_cv_sizeof_void_p=0
8322 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008323fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008324
Martin v. Löwis11437992002-04-12 09:54:03 +00008325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8327$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008328
8329
8330
Martin v. Löwis11437992002-04-12 09:54:03 +00008331cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008332#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008333_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008334
8335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008336# The cast to long int works around a bug in the HP C Compiler
8337# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8338# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8339# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8341$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008342if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008343 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008344else
Matthias Kloseb9621712010-04-24 17:59:49 +00008345 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 +00008346
Martin v. Löwis11437992002-04-12 09:54:03 +00008347else
Matthias Kloseb9621712010-04-24 17:59:49 +00008348 if test "$ac_cv_type_short" = yes; then
8349 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8350$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008351as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008352See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008353 else
8354 ac_cv_sizeof_short=0
8355 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008356fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008357
Martin v. Löwis11437992002-04-12 09:54:03 +00008358fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8360$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008361
8362
8363
Martin v. Löwis11437992002-04-12 09:54:03 +00008364cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008365#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008366_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008367
8368
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008369# The cast to long int works around a bug in the HP C Compiler
8370# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8371# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8372# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8374$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008375if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008376 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008377else
Matthias Kloseb9621712010-04-24 17:59:49 +00008378 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 +00008379
Martin v. Löwis11437992002-04-12 09:54:03 +00008380else
Matthias Kloseb9621712010-04-24 17:59:49 +00008381 if test "$ac_cv_type_float" = yes; then
8382 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8383$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008384as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008385See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008386 else
8387 ac_cv_sizeof_float=0
8388 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008389fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008390
Martin v. Löwis11437992002-04-12 09:54:03 +00008391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8393$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008394
8395
8396
Martin v. Löwis11437992002-04-12 09:54:03 +00008397cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008398#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008399_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008400
8401
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008402# The cast to long int works around a bug in the HP C Compiler
8403# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8404# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8405# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8407$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008408if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008409 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008410else
Matthias Kloseb9621712010-04-24 17:59:49 +00008411 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 +00008412
Martin v. Löwis11437992002-04-12 09:54:03 +00008413else
Matthias Kloseb9621712010-04-24 17:59:49 +00008414 if test "$ac_cv_type_double" = yes; then
8415 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8416$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008417as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008418See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008419 else
8420 ac_cv_sizeof_double=0
8421 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008423
Martin v. Löwis11437992002-04-12 09:54:03 +00008424fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8426$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008427
8428
8429
Martin v. Löwis11437992002-04-12 09:54:03 +00008430cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008431#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008432_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008433
8434
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008435# The cast to long int works around a bug in the HP C Compiler
8436# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8437# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8438# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8440$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008441if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008442 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008443else
Matthias Kloseb9621712010-04-24 17:59:49 +00008444 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 +00008445
Martin v. Löwis11437992002-04-12 09:54:03 +00008446else
Matthias Kloseb9621712010-04-24 17:59:49 +00008447 if test "$ac_cv_type_fpos_t" = yes; then
8448 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8449$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008450as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008451See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008452 else
8453 ac_cv_sizeof_fpos_t=0
8454 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008455fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008456
Martin v. Löwis11437992002-04-12 09:54:03 +00008457fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8459$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008460
8461
8462
Martin v. Löwis11437992002-04-12 09:54:03 +00008463cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008464#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008465_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008466
Michael W. Hudson54241132001-12-07 15:38:26 +00008467
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008468# The cast to long int works around a bug in the HP C Compiler
8469# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8470# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8471# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8473$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008474if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008475 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008476else
Matthias Kloseb9621712010-04-24 17:59:49 +00008477 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 +00008478
Martin v. Löwis18e16552006-02-15 17:27:45 +00008479else
Matthias Kloseb9621712010-04-24 17:59:49 +00008480 if test "$ac_cv_type_size_t" = yes; then
8481 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8482$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008483as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008484See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008485 else
8486 ac_cv_sizeof_size_t=0
8487 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008489
Martin v. Löwis18e16552006-02-15 17:27:45 +00008490fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8492$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008493
8494
8495
Martin v. Löwis18e16552006-02-15 17:27:45 +00008496cat >>confdefs.h <<_ACEOF
8497#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8498_ACEOF
8499
8500
Christian Heimes400adb02008-02-01 08:12:03 +00008501# The cast to long int works around a bug in the HP C Compiler
8502# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8503# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8504# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8506$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008507if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008508 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008509else
Matthias Kloseb9621712010-04-24 17:59:49 +00008510 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 +00008511
Christian Heimes400adb02008-02-01 08:12:03 +00008512else
Matthias Kloseb9621712010-04-24 17:59:49 +00008513 if test "$ac_cv_type_pid_t" = yes; then
8514 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8515$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008516as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008517See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008518 else
8519 ac_cv_sizeof_pid_t=0
8520 fi
8521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008522
Christian Heimes400adb02008-02-01 08:12:03 +00008523fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8525$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008526
8527
8528
8529cat >>confdefs.h <<_ACEOF
8530#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8531_ACEOF
8532
8533
Michael W. Hudson54241132001-12-07 15:38:26 +00008534
Matthias Kloseb9621712010-04-24 17:59:49 +00008535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8536$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008537have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008539/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008540
Martin v. Löwis11437992002-04-12 09:54:03 +00008541int
8542main ()
8543{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008544long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008545 ;
8546 return 0;
8547}
8548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008549if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008550
8551
Matthias Kloseb9621712010-04-24 17:59:49 +00008552$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008553
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008554 have_long_long=yes
8555
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8559$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008560if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008561# The cast to long int works around a bug in the HP C Compiler
8562# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8563# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8564# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8566$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008567if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008568 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008569else
Matthias Kloseb9621712010-04-24 17:59:49 +00008570 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 +00008571
Martin v. Löwis11437992002-04-12 09:54:03 +00008572else
Matthias Kloseb9621712010-04-24 17:59:49 +00008573 if test "$ac_cv_type_long_long" = yes; then
8574 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8575$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008576as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008577See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008578 else
8579 ac_cv_sizeof_long_long=0
8580 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008582
Martin v. Löwis11437992002-04-12 09:54:03 +00008583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8585$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008586
8587
8588
Martin v. Löwis11437992002-04-12 09:54:03 +00008589cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008590#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008591_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008592
Michael W. Hudson54241132001-12-07 15:38:26 +00008593
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008594fi
8595
Matthias Kloseb9621712010-04-24 17:59:49 +00008596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8597$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008598have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008600/* end confdefs.h. */
8601
8602int
8603main ()
8604{
8605long double x; x = (long double)0;
8606 ;
8607 return 0;
8608}
8609_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008610if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008611
8612
Matthias Kloseb9621712010-04-24 17:59:49 +00008613$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008614
8615 have_long_double=yes
8616
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008617fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8620$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008621if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008622# The cast to long int works around a bug in the HP C Compiler
8623# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8624# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8625# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8627$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008628if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008629 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008630else
Matthias Kloseb9621712010-04-24 17:59:49 +00008631 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 +00008632
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008633else
Matthias Kloseb9621712010-04-24 17:59:49 +00008634 if test "$ac_cv_type_long_double" = yes; then
8635 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8636$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008637as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008638See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008639 else
8640 ac_cv_sizeof_long_double=0
8641 fi
8642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008643
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8646$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008647
8648
8649
8650cat >>confdefs.h <<_ACEOF
8651#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8652_ACEOF
8653
8654
8655fi
8656
8657
Matthias Kloseb9621712010-04-24 17:59:49 +00008658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8659$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008660have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008662/* end confdefs.h. */
8663
8664int
8665main ()
8666{
8667_Bool x; x = (_Bool)0;
8668 ;
8669 return 0;
8670}
8671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008672if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008673
8674
Matthias Kloseb9621712010-04-24 17:59:49 +00008675$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008676
8677 have_c99_bool=yes
8678
Thomas Woutersb2137042007-02-01 18:02:27 +00008679fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8682$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008683if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008684# The cast to long int works around a bug in the HP C Compiler
8685# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8686# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8687# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8689$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008690if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008691 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008692else
Matthias Kloseb9621712010-04-24 17:59:49 +00008693 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 +00008694
Thomas Woutersb2137042007-02-01 18:02:27 +00008695else
Matthias Kloseb9621712010-04-24 17:59:49 +00008696 if test "$ac_cv_type__Bool" = yes; then
8697 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8698$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008699as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008700See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008701 else
8702 ac_cv_sizeof__Bool=0
8703 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008705
Thomas Woutersb2137042007-02-01 18:02:27 +00008706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8708$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008709
8710
8711
Thomas Woutersb2137042007-02-01 18:02:27 +00008712cat >>confdefs.h <<_ACEOF
8713#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8714_ACEOF
8715
8716
8717fi
8718
Matthias Kloseb9621712010-04-24 17:59:49 +00008719ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008720 #include <stdint.h>
8721 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008722 #ifdef HAVE_INTTYPES_H
8723 #include <inttypes.h>
8724 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008725"
Victor Stinnere0be4232011-10-25 13:06:09 +02008726if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008727
8728cat >>confdefs.h <<_ACEOF
8729#define HAVE_UINTPTR_T 1
8730_ACEOF
8731
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008732# The cast to long int works around a bug in the HP C Compiler
8733# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8734# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8735# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8737$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008738if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008739 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008740else
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 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 +00008742
Martin v. Löwis11437992002-04-12 09:54:03 +00008743else
Matthias Kloseb9621712010-04-24 17:59:49 +00008744 if test "$ac_cv_type_uintptr_t" = yes; then
8745 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008747as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008748See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008749 else
8750 ac_cv_sizeof_uintptr_t=0
8751 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008753
Martin v. Löwis11437992002-04-12 09:54:03 +00008754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8756$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008757
8758
8759
Martin v. Löwis11437992002-04-12 09:54:03 +00008760cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008761#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008762_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008763
Michael W. Hudson54241132001-12-07 15:38:26 +00008764
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008765fi
8766
Thomas Wouters89f507f2006-12-13 04:49:30 +00008767
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008768# The cast to long int works around a bug in the HP C Compiler
8769# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8770# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8771# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8773$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008774if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008775 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008776else
Matthias Kloseb9621712010-04-24 17:59:49 +00008777 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008778#ifdef HAVE_SYS_TYPES_H
8779#include <sys/types.h>
8780#endif
8781
Matthias Kloseb9621712010-04-24 17:59:49 +00008782"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008783
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008784else
Matthias Kloseb9621712010-04-24 17:59:49 +00008785 if test "$ac_cv_type_off_t" = yes; then
8786 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008788as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008789See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008790 else
8791 ac_cv_sizeof_off_t=0
8792 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008794
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8797$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008798
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008799
8800
Martin v. Löwis11437992002-04-12 09:54:03 +00008801cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008802#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008803_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008804
Michael W. Hudson54241132001-12-07 15:38:26 +00008805
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008806
Matthias Kloseb9621712010-04-24 17:59:49 +00008807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8808$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008809if test "$have_long_long" = yes
8810then
8811if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008812 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008813
Matthias Kloseb9621712010-04-24 17:59:49 +00008814$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008815
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8817$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008818else
Matthias Kloseb9621712010-04-24 17:59:49 +00008819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8820$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008821fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008822else
Matthias Kloseb9621712010-04-24 17:59:49 +00008823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8824$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008825fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008826
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008827# The cast to long int works around a bug in the HP C Compiler
8828# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8829# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8830# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8832$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008833if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008834 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008835else
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008837#ifdef HAVE_SYS_TYPES_H
8838#include <sys/types.h>
8839#endif
8840#ifdef HAVE_TIME_H
8841#include <time.h>
8842#endif
8843
Matthias Kloseb9621712010-04-24 17:59:49 +00008844"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008845
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008846else
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 if test "$ac_cv_type_time_t" = yes; then
8848 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8849$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008850as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008851See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008852 else
8853 ac_cv_sizeof_time_t=0
8854 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008856
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8859$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008860
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008861
8862
Martin v. Löwis11437992002-04-12 09:54:03 +00008863cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008864#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008865_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008866
Michael W. Hudson54241132001-12-07 15:38:26 +00008867
8868
Trent Mick635f6fb2000-08-23 21:33:05 +00008869# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008870ac_save_cc="$CC"
8871if test "$ac_cv_kpthread" = "yes"
8872then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008873elif test "$ac_cv_kthread" = "yes"
8874then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008875elif test "$ac_cv_pthread" = "yes"
8876then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008877fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008878
Matthias Kloseb9621712010-04-24 17:59:49 +00008879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8880$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008881have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008883/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008884
8885 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008886int
8887main ()
8888{
Guido van Rossum12580492000-09-24 16:47:19 +00008889pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008890 ;
8891 return 0;
8892}
Matthias Kloseb159a552010-04-25 21:00:44 +00008893
Martin v. Löwis11437992002-04-12 09:54:03 +00008894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008895if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008896 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8900$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008901if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008902 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008903# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8904# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8905# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8907$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008908if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008909 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008910else
Matthias Kloseb9621712010-04-24 17:59:49 +00008911 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008912#ifdef HAVE_PTHREAD_H
8913#include <pthread.h>
8914#endif
8915
Matthias Kloseb9621712010-04-24 17:59:49 +00008916"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008917
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008918else
Matthias Kloseb9621712010-04-24 17:59:49 +00008919 if test "$ac_cv_type_pthread_t" = yes; then
8920 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8921$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008922as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008923See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008924 else
8925 ac_cv_sizeof_pthread_t=0
8926 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008928
Trent Mick635f6fb2000-08-23 21:33:05 +00008929fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8931$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008932
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008933
8934
Martin v. Löwis11437992002-04-12 09:54:03 +00008935cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008936#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008937_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008938
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008939
Trent Mick635f6fb2000-08-23 21:33:05 +00008940fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008941CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008942
Michael W. Hudson54241132001-12-07 15:38:26 +00008943
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008944case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008945 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008946 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8947 ;;
8948 Darwin/*)
8949 OTHER_LIBTOOL_OPT=""
8950 ;;
8951esac
8952
8953
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008954
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008955case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008956 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008957 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8958 if test "${enable_universalsdk}"; then
8959 :
8960 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008961 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008962 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008963 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008964 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008965 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008966 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008967 if test ${gcc_version} '<' 4.0
8968 then
8969 LIBTOOL_CRUFT="-lcc_dynamic"
8970 else
8971 LIBTOOL_CRUFT=""
8972 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008973 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008974 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008975else
Matthias Kloseb9621712010-04-24 17:59:49 +00008976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008977/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008978
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008979 #include <unistd.h>
8980 int main(int argc, char*argv[])
8981 {
8982 if (sizeof(long) == 4) {
8983 return 0;
8984 } else {
8985 return 1;
8986 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008987 }
8988
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008990if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008991 ac_osx_32bit=yes
8992else
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8996 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008997fi
8998
8999
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009000 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009001 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009002 i386)
9003 MACOSX_DEFAULT_ARCH="i386"
9004 ;;
9005 ppc)
9006 MACOSX_DEFAULT_ARCH="ppc"
9007 ;;
9008 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009009 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009010 ;;
9011 esac
9012 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009013 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009014 i386)
9015 MACOSX_DEFAULT_ARCH="x86_64"
9016 ;;
9017 ppc)
9018 MACOSX_DEFAULT_ARCH="ppc64"
9019 ;;
9020 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009021 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009022 ;;
9023 esac
9024
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009025 fi
9026
9027 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009028 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009029 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009030esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9032$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009033if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009034then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009035 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009036 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009037 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009038
Matthias Kloseb9621712010-04-24 17:59:49 +00009039$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009040
Matthias Kloseb9621712010-04-24 17:59:49 +00009041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9042$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009043 if test $enable_shared = "yes"
9044 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009045 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 +00009046 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009047else
Matthias Kloseb9621712010-04-24 17:59:49 +00009048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9049$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009050fi
9051
Matthias Kloseb9621712010-04-24 17:59:49 +00009052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9053$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009054case $ac_sys_system/$ac_sys_release in
9055 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009056
Matthias Kloseb9621712010-04-24 17:59:49 +00009057$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009058
Matthias Kloseb9621712010-04-24 17:59:49 +00009059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9060$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009061 ;;
9062 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9064$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009065 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009066esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009067
Guido van Rossum0a516c91994-09-12 10:58:40 +00009068# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009069
Michael W. Hudson54241132001-12-07 15:38:26 +00009070
9071
9072
9073
Benjamin Peterson99f03762010-04-11 22:15:28 +00009074
Thomas Wouters477c8d52006-05-27 19:21:47 +00009075
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009076# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9077# -- usually .so, .sl on HP-UX, .dll on Cygwin
9078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9079$as_echo_n "checking the extension of shared libraries... " >&6; }
9080if test -z "$SHLIB_SUFFIX"; then
9081 case $ac_sys_system in
9082 hp*|HP*)
9083 case `uname -m` in
9084 ia64) SHLIB_SUFFIX=.so;;
9085 *) SHLIB_SUFFIX=.sl;;
9086 esac
9087 ;;
9088 CYGWIN*) SHLIB_SUFFIX=.dll;;
9089 *) SHLIB_SUFFIX=.so;;
9090 esac
9091fi
9092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9093$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009094
Guido van Rossum0a516c91994-09-12 10:58:40 +00009095# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009096# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009097# (Shared libraries in this instance are shared modules to be loaded into
9098# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9100$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009101if test -z "$LDSHARED"
9102then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009103 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009104 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009105 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009106 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009107 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009108 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009109 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009110 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009111 if test "$GCC" = "yes" ; then
9112 LDSHARED='$(CC) -shared'
9113 LDCXXSHARED='$(CXX) -shared'
9114 else
9115 LDSHARED='$(CC) -G'
9116 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009117 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009118 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009119 if test "$GCC" = "yes" ; then
9120 LDSHARED='$(CC) -shared'
9121 LDCXXSHARED='$(CXX) -shared'
9122 else
9123 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009124 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009125 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009126 LDSHARED='$(CC) -bundle'
9127 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009128 if test "$enable_framework" ; then
9129 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009130 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9131 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009132 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009133 else
9134 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009135 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009136 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009137 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009138 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009139 LDSHARED='$(CC) -bundle'
9140 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009141 if test "$enable_framework" ; then
9142 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009143 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9144 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009145 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009146 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009147 # No framework, use the Python app as bundle-loader
9148 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009149 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009150 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009151 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009152 Darwin/*)
9153 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9154 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009155
Ned Deily36820b62014-06-25 13:44:22 -07009156 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9157 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9158 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9159 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9160 if test ${dep_target_major} -eq 10 && \
9161 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009162 then
Ned Deily36820b62014-06-25 13:44:22 -07009163 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009164 LDSHARED='$(CC) -bundle'
9165 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009166 if test "$enable_framework" ; then
9167 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009168 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9169 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009170 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009171 else
9172 # No framework, use the Python app as bundle-loader
9173 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9174 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009175 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009176 fi
Ned Deily36820b62014-06-25 13:44:22 -07009177 else
9178 # building for OS X 10.3 and later
9179 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9180 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9181 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009182 fi
9183 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009184 Linux*|GNU*|QNX*)
9185 LDSHARED='$(CC) -shared'
9186 LDCXXSHARED='$(CXX) -shared';;
9187 BSD/OS*/4*)
9188 LDSHARED="gcc -shared"
9189 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009190 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009191 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009192 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009193 LDSHARED='$(CC) -shared'
9194 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009195 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009196 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009197 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009198 OpenBSD*)
9199 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9200 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009201 LDSHARED='$(CC) -shared $(CCSHARED)'
9202 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009203 else
9204 case `uname -r` in
9205 [01].* | 2.[0-7] | 2.[0-7].*)
9206 LDSHARED="ld -Bshareable ${LDFLAGS}"
9207 ;;
9208 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009209 LDSHARED='$(CC) -shared $(CCSHARED)'
9210 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009211 ;;
9212 esac
9213 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009214 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009215 LDSHARED='$(CC) -shared'
9216 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009217 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009218 if test "$GCC" = "yes" ; then
9219 LDSHARED='$(CC) -shared'
9220 LDCXXSHARED='$(CXX) -shared'
9221 else
9222 LDSHARED='$(CC) -G'
9223 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009224 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009225 SCO_SV*)
9226 LDSHARED='$(CC) -Wl,-G,-Bexport'
9227 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9228 CYGWIN*)
9229 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9230 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009231 *) LDSHARED="ld";;
9232 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009233fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9235$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009236LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009237BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009238# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009239# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9241$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009242if test -z "$CCSHARED"
9243then
Guido van Rossum07397971997-04-29 21:49:50 +00009244 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009245 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009246 then CCSHARED="-fPIC";
9247 elif test `uname -p` = sparc;
9248 then CCSHARED="-xcode=pic32";
9249 else CCSHARED="-Kpic";
9250 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009251 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009252 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009253 else CCSHARED="+z";
9254 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009255 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009256 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009257 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009258 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009259 if test "$GCC" = "yes"
9260 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009261 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009262 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009263 SCO_SV*)
9264 if test "$GCC" = "yes"
9265 then CCSHARED="-fPIC"
9266 else CCSHARED="-Kpic -belf"
9267 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009268 IRIX*/6*) case $CC in
9269 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009270 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009271 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009272 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009273fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9275$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009276# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009277# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9279$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009280if test -z "$LINKFORSHARED"
9281then
Guido van Rossum07397971997-04-29 21:49:50 +00009282 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009283 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009284 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009285 LINKFORSHARED="-Wl,-E -Wl,+s";;
9286# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009287 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009288 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009289 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009290 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009291 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009292
9293 # Issue #18075: the default maximum stack size (8MBytes) is too
9294 # small for the default recursion limit. Increase the stack size
9295 # to ensure that tests don't crash
9296 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9297
Jack Jansene578a632001-08-15 01:27:14 +00009298 if test "$enable_framework"
9299 then
Jack Jansenda49e192005-01-07 13:08:22 +00009300 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009301 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009302 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009303 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009304 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009305 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009306 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009307 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9308 then
9309 LINKFORSHARED="-Wl,--export-dynamic"
9310 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009311 SunOS/5*) case $CC in
9312 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009313 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009314 then
9315 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009316 fi;;
9317 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009318 CYGWIN*)
9319 if test $enable_shared = "no"
9320 then
9321 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9322 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009323 QNX*)
9324 # -Wl,-E causes the symbols to be added to the dynamic
9325 # symbol table so that they can be found when a module
9326 # is loaded. -N 2048K causes the stack size to be set
9327 # to 2048 kilobytes so that the stack doesn't overflow
9328 # when running test_compile.py.
9329 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009330 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009331fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9333$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009334
Michael W. Hudson54241132001-12-07 15:38:26 +00009335
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009336
Matthias Kloseb9621712010-04-24 17:59:49 +00009337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9338$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009339if test ! "$LIBRARY" = "$LDLIBRARY"
9340then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009341 case $ac_sys_system in
9342 CYGWIN*)
9343 # Cygwin needs CCSHARED when building extension DLLs
9344 # but not when building the interpreter DLL.
9345 CFLAGSFORSHARED='';;
9346 *)
9347 CFLAGSFORSHARED='$(CCSHARED)'
9348 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009349fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9351$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009352
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009353# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9354# library (with --enable-shared).
9355# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009356# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9357# if it is not required, since it creates a dependency of the shared library
9358# to LIBS. This, in turn, means that applications linking the shared libpython
9359# don't need to link LIBS explicitly. The default should be only changed
9360# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009361
Matthias Kloseb9621712010-04-24 17:59:49 +00009362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9363$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009364case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009365 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009366 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009367esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9369$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009370
9371
Guido van Rossum627b2d71993-12-24 10:39:16 +00009372# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9374$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009375if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009376 $as_echo_n "(cached) " >&6
9377else
9378 ac_check_lib_save_LIBS=$LIBS
9379LIBS="-lsendfile $LIBS"
9380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9381/* end confdefs.h. */
9382
9383/* Override any GCC internal prototype to avoid an error.
9384 Use char because int might match the return type of a GCC
9385 builtin and then its argument prototype would still apply. */
9386#ifdef __cplusplus
9387extern "C"
9388#endif
9389char sendfile ();
9390int
9391main ()
9392{
9393return sendfile ();
9394 ;
9395 return 0;
9396}
9397_ACEOF
9398if ac_fn_c_try_link "$LINENO"; then :
9399 ac_cv_lib_sendfile_sendfile=yes
9400else
9401 ac_cv_lib_sendfile_sendfile=no
9402fi
9403rm -f core conftest.err conftest.$ac_objext \
9404 conftest$ac_exeext conftest.$ac_ext
9405LIBS=$ac_check_lib_save_LIBS
9406fi
9407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9408$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009409if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009410 cat >>confdefs.h <<_ACEOF
9411#define HAVE_LIBSENDFILE 1
9412_ACEOF
9413
9414 LIBS="-lsendfile $LIBS"
9415
9416fi
9417
Matthias Kloseb9621712010-04-24 17:59:49 +00009418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9419$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009420if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009421 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009422else
Martin v. Löwis11437992002-04-12 09:54:03 +00009423 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009424LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009427
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009428/* Override any GCC internal prototype to avoid an error.
9429 Use char because int might match the return type of a GCC
9430 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009431#ifdef __cplusplus
9432extern "C"
9433#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009434char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009435int
9436main ()
9437{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009438return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009439 ;
9440 return 0;
9441}
9442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009443if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009445else
Matthias Kloseb9621712010-04-24 17:59:49 +00009446 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009447fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009448rm -f core conftest.err conftest.$ac_objext \
9449 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009450LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009451fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9453$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009454if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009455 cat >>confdefs.h <<_ACEOF
9456#define HAVE_LIBDL 1
9457_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009458
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009459 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009460
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009461fi
9462 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9464$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009465if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009466 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009467else
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009469LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009472
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009473/* Override any GCC internal prototype to avoid an error.
9474 Use char because int might match the return type of a GCC
9475 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009476#ifdef __cplusplus
9477extern "C"
9478#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009479char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009480int
9481main ()
9482{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009483return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009484 ;
9485 return 0;
9486}
9487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009488if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009489 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009490else
Matthias Kloseb9621712010-04-24 17:59:49 +00009491 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009493rm -f core conftest.err conftest.$ac_objext \
9494 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009495LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9498$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009499if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009500 cat >>confdefs.h <<_ACEOF
9501#define HAVE_LIBDLD 1
9502_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009503
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009504 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009505
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009506fi
9507 # Dynamic linking for HP-UX
Victor Stinnerbeeb5122014-11-28 13:28:25 +01009508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
9509$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
9510if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
9511 $as_echo_n "(cached) " >&6
9512else
9513 ac_check_lib_save_LIBS=$LIBS
9514LIBS="-lcrypto $LIBS"
9515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9516/* end confdefs.h. */
9517
9518/* Override any GCC internal prototype to avoid an error.
9519 Use char because int might match the return type of a GCC
9520 builtin and then its argument prototype would still apply. */
9521#ifdef __cplusplus
9522extern "C"
9523#endif
9524char RAND_egd ();
9525int
9526main ()
9527{
9528return RAND_egd ();
9529 ;
9530 return 0;
9531}
9532_ACEOF
9533if ac_fn_c_try_link "$LINENO"; then :
9534 ac_cv_lib_crypto_RAND_egd=yes
9535else
9536 ac_cv_lib_crypto_RAND_egd=no
9537fi
9538rm -f core conftest.err conftest.$ac_objext \
9539 conftest$ac_exeext conftest.$ac_ext
9540LIBS=$ac_check_lib_save_LIBS
9541fi
9542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
9543$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
9544if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
9545
9546$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
9547
9548fi
9549
Martin v. Löwis519adae2003-09-20 10:47:47 +00009550
Georg Brandlb1441c72009-01-03 22:33:39 +00009551# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009552if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9554$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009555if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009556 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009557else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009558 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009560/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009562/* Override any GCC internal prototype to avoid an error.
9563 Use char because int might match the return type of a GCC
9564 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009565#ifdef __cplusplus
9566extern "C"
9567#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009568char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009569int
9570main ()
9571{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009572return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009573 ;
9574 return 0;
9575}
9576_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009577for ac_lib in '' pthread rt posix4; do
9578 if test -z "$ac_lib"; then
9579 ac_res="none required"
9580 else
9581 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009582 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009583 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009584 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009585 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009587rm -f core conftest.err conftest.$ac_objext \
9588 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009589 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009590 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009592done
Victor Stinnere0be4232011-10-25 13:06:09 +02009593if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009595else
9596 ac_cv_search_sem_init=no
9597fi
9598rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009599LIBS=$ac_func_search_save_LIBS
9600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9602$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009603ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009604if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009606
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009607fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009608 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009609 # posix4 on Solaris 2.6
9610 # pthread (first!) on Linux
9611fi
9612
Martin v. Löwis19d17342003-06-14 21:03:05 +00009613# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9615$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009616if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009617 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009618else
9619 ac_check_lib_save_LIBS=$LIBS
9620LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009622/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009624/* Override any GCC internal prototype to avoid an error.
9625 Use char because int might match the return type of a GCC
9626 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009627#ifdef __cplusplus
9628extern "C"
9629#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009630char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009631int
9632main ()
9633{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009635 ;
9636 return 0;
9637}
9638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009639if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009640 ac_cv_lib_intl_textdomain=yes
9641else
Matthias Kloseb9621712010-04-24 17:59:49 +00009642 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009644rm -f core conftest.err conftest.$ac_objext \
9645 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009646LIBS=$ac_check_lib_save_LIBS
9647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9649$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009650if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009651
Matthias Kloseb9621712010-04-24 17:59:49 +00009652$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009653
Brett Cannonc6d936e2009-06-07 20:09:53 +00009654 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009655fi
9656
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009657
9658# checks for system dependent C++ extensions support
9659case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009660 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9661$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009663/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009664
Georg Brandl59e87bd2011-02-15 19:48:59 +00009665 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009666int
9667main ()
9668{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009669loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009670 ;
9671 return 0;
9672}
Matthias Kloseb159a552010-04-25 21:00:44 +00009673
Martin v. Löwis11437992002-04-12 09:54:03 +00009674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009675if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009676
Matthias Kloseb159a552010-04-25 21:00:44 +00009677
Matthias Kloseb9621712010-04-24 17:59:49 +00009678$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009679
Matthias Kloseb159a552010-04-25 21:00:44 +00009680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009681$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009682
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009683else
Matthias Kloseb159a552010-04-25 21:00:44 +00009684
9685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009686$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009687
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009689rm -f core conftest.err conftest.$ac_objext \
9690 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009691 *) ;;
9692esac
9693
Christian Heimes985ecdc2013-11-20 11:46:18 +01009694# check for systems that require aligned memory access
9695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9696$as_echo_n "checking aligned memory access is required... " >&6; }
9697if test "$cross_compiling" = yes; then :
9698 aligned_required=yes
9699else
9700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9701/* end confdefs.h. */
9702
9703int main()
9704{
9705 char s[16];
9706 int i, *p1, *p2;
9707 for (i=0; i < 16; i++)
9708 s[i] = i;
9709 p1 = (int*)(s+1);
9710 p2 = (int*)(s+2);
9711 if (*p1 == *p2)
9712 return 1;
9713 return 0;
9714}
9715
9716_ACEOF
9717if ac_fn_c_try_run "$LINENO"; then :
9718 aligned_required=no
9719else
9720 aligned_required=yes
9721fi
9722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9723 conftest.$ac_objext conftest.beam conftest.$ac_ext
9724fi
9725
9726
9727if test "$aligned_required" = yes ; then
9728
9729$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9730
9731fi
9732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9733$as_echo "$aligned_required" >&6; }
9734
9735
9736# str, bytes and memoryview hash algorithm
9737
9738
9739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9740$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9741
9742# Check whether --with-hash_algorithm was given.
9743if test "${with_hash_algorithm+set}" = set; then :
9744 withval=$with_hash_algorithm;
9745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9746$as_echo "$withval" >&6; }
9747case "$withval" in
9748 siphash24)
9749 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9750
9751 ;;
9752 fnv)
9753 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9754
9755 ;;
9756 *)
9757 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9758 ;;
9759esac
9760
9761else
9762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9763$as_echo "default" >&6; }
9764fi
9765
9766
Charles-François Natalid30b0222014-05-08 23:08:51 +01009767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9768$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9769
9770# Check whether --with-address_sanitizer was given.
9771if test "${with_address_sanitizer+set}" = set; then :
9772 withval=$with_address_sanitizer;
9773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9774$as_echo "$withval" >&6; }
9775BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9776LDFLAGS="-fsanitize=address $LDFLAGS"
9777
9778else
9779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9780$as_echo "no" >&6; }
9781fi
9782
9783
Guido van Rossum70c7f481998-03-26 18:44:10 +00009784# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9786$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009787if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009788 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009789else
Martin v. Löwis11437992002-04-12 09:54:03 +00009790 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009791LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009793/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009795/* Override any GCC internal prototype to avoid an error.
9796 Use char because int might match the return type of a GCC
9797 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009798#ifdef __cplusplus
9799extern "C"
9800#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009801char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009802int
9803main ()
9804{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009805return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009806 ;
9807 return 0;
9808}
9809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009810if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009811 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009812else
Matthias Kloseb9621712010-04-24 17:59:49 +00009813 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009815rm -f core conftest.err conftest.$ac_objext \
9816 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009817LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9820$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009821if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009822 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009823fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009824 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9826$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009827if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009828 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009829else
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009831LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009835/* Override any GCC internal prototype to avoid an error.
9836 Use char because int might match the return type of a GCC
9837 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009838#ifdef __cplusplus
9839extern "C"
9840#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009841char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009842int
9843main ()
9844{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009845return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009846 ;
9847 return 0;
9848}
9849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009850if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009851 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009852else
Matthias Kloseb9621712010-04-24 17:59:49 +00009853 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009855rm -f core conftest.err conftest.$ac_objext \
9856 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009857LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9860$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009861if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009862 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009863fi
9864 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009865
Matthias Kloseb9621712010-04-24 17:59:49 +00009866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9867$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009868
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009869# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009870if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009871 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9873$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009874LIBS="$withval $LIBS"
9875
9876else
Matthias Kloseb9621712010-04-24 17:59:49 +00009877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9878$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009879fi
9880
Guido van Rossum7f43da71994-08-01 12:15:30 +00009881
Victor Stinner8291b5e2015-03-20 16:03:14 +01009882
9883
9884
9885
9886
9887
9888
9889if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9890 if test -n "$ac_tool_prefix"; then
9891 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9892set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9894$as_echo_n "checking for $ac_word... " >&6; }
9895if ${ac_cv_path_PKG_CONFIG+:} false; then :
9896 $as_echo_n "(cached) " >&6
9897else
9898 case $PKG_CONFIG in
9899 [\\/]* | ?:[\\/]*)
9900 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9901 ;;
9902 *)
9903 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9904for as_dir in $PATH
9905do
9906 IFS=$as_save_IFS
9907 test -z "$as_dir" && as_dir=.
9908 for ac_exec_ext in '' $ac_executable_extensions; do
9909 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9910 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9911 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9912 break 2
9913 fi
9914done
9915 done
9916IFS=$as_save_IFS
9917
9918 ;;
9919esac
9920fi
9921PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9922if test -n "$PKG_CONFIG"; then
9923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9924$as_echo "$PKG_CONFIG" >&6; }
9925else
9926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9927$as_echo "no" >&6; }
9928fi
9929
9930
9931fi
9932if test -z "$ac_cv_path_PKG_CONFIG"; then
9933 ac_pt_PKG_CONFIG=$PKG_CONFIG
9934 # Extract the first word of "pkg-config", so it can be a program name with args.
9935set dummy pkg-config; ac_word=$2
9936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9937$as_echo_n "checking for $ac_word... " >&6; }
9938if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9939 $as_echo_n "(cached) " >&6
9940else
9941 case $ac_pt_PKG_CONFIG in
9942 [\\/]* | ?:[\\/]*)
9943 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9944 ;;
9945 *)
9946 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9947for as_dir in $PATH
9948do
9949 IFS=$as_save_IFS
9950 test -z "$as_dir" && as_dir=.
9951 for ac_exec_ext in '' $ac_executable_extensions; do
9952 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9953 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9954 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9955 break 2
9956 fi
9957done
9958 done
9959IFS=$as_save_IFS
9960
9961 ;;
9962esac
9963fi
9964ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9965if test -n "$ac_pt_PKG_CONFIG"; then
9966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9967$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9968else
9969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9970$as_echo "no" >&6; }
9971fi
9972
9973 if test "x$ac_pt_PKG_CONFIG" = x; then
9974 PKG_CONFIG=""
9975 else
9976 case $cross_compiling:$ac_tool_warned in
9977yes:)
9978{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9979$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9980ac_tool_warned=yes ;;
9981esac
9982 PKG_CONFIG=$ac_pt_PKG_CONFIG
9983 fi
9984else
9985 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9986fi
9987
9988fi
9989if test -n "$PKG_CONFIG"; then
9990 _pkg_min_version=0.9.0
9991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9992$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9993 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9995$as_echo "yes" >&6; }
9996 else
9997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9998$as_echo "no" >&6; }
9999 PKG_CONFIG=""
10000 fi
10001fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010002
10003# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10005$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010006
10007# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010008if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010009 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010010else
10011 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010012fi
10013
10014
Matthias Kloseb9621712010-04-24 17:59:49 +000010015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10016$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010017
10018# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10020$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010021
10022# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010023if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010024 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +000010025else
10026 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010027fi
10028
10029
10030if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010031 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10032else
10033 LIBFFI_INCLUDEDIR=""
10034fi
10035
10036
Matthias Kloseb9621712010-04-24 17:59:49 +000010037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10038$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010039
Stefan Krah60187b52012-03-23 19:06:27 +010010040# Check for use of the system libmpdec library
10041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10042$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10043
10044# Check whether --with-system_libmpdec was given.
10045if test "${with_system_libmpdec+set}" = set; then :
10046 withval=$with_system_libmpdec;
10047else
10048 with_system_libmpdec="no"
10049fi
10050
10051
10052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10053$as_echo "$with_system_libmpdec" >&6; }
10054
Benjamin Peterson076ed002010-10-31 17:11:02 +000010055# Check for support for loadable sqlite extensions
10056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10057$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10058# Check whether --enable-loadable-sqlite-extensions was given.
10059if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10060 enableval=$enable_loadable_sqlite_extensions;
10061else
10062 enable_loadable_sqlite_extensions="no"
10063fi
10064
10065
10066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10067$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10068
Ned Deilyd819b932013-09-06 01:07:05 -070010069# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10070
10071
10072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10073$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10074
10075# Check whether --with-tcltk-includes was given.
10076if test "${with_tcltk_includes+set}" = set; then :
10077 withval=$with_tcltk_includes;
10078else
10079 with_tcltk_includes="default"
10080fi
10081
10082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10083$as_echo "$with_tcltk_includes" >&6; }
10084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10085$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10086
10087# Check whether --with-tcltk-libs was given.
10088if test "${with_tcltk_libs+set}" = set; then :
10089 withval=$with_tcltk_libs;
10090else
10091 with_tcltk_libs="default"
10092fi
10093
10094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10095$as_echo "$with_tcltk_libs" >&6; }
10096if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10097then
10098 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10099 then
10100 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10101 fi
10102 TCLTK_INCLUDES=""
10103 TCLTK_LIBS=""
10104else
10105 TCLTK_INCLUDES="$with_tcltk_includes"
10106 TCLTK_LIBS="$with_tcltk_libs"
10107fi
10108
Matthias Klose55708cc2009-04-30 08:06:49 +000010109# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10111$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010112
10113# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010114if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010115 withval=$with_dbmliborder;
10116if test x$with_dbmliborder = xyes
10117then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010118as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010119else
10120 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10121 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10122 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010123 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010124 fi
10125 done
10126fi
10127fi
10128
Matthias Kloseb9621712010-04-24 17:59:49 +000010129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10130$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010131
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010132# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010133
10134
Matthias Kloseb9621712010-04-24 17:59:49 +000010135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10136$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010138# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010139if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010140 withval=$with_signal_module;
10141fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010142
10143
10144if test -z "$with_signal_module"
10145then with_signal_module="yes"
10146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10148$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010149
10150if test "${with_signal_module}" = "yes"; then
10151 USE_SIGNAL_MODULE=""
10152 SIGNAL_OBJS=""
10153else
10154 USE_SIGNAL_MODULE="#"
10155 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10156fi
10157
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010158# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010159
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010160USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010162
Martin v. Löwis11437992002-04-12 09:54:03 +000010163
10164# Templates for things AC_DEFINEd more than once.
10165# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010166
10167
Martin v. Löwis11437992002-04-12 09:54:03 +000010168
Matthias Kloseb9621712010-04-24 17:59:49 +000010169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10170$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010172# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010173if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010174 withval=$with_threads;
10175fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010176
10177
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010178# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010180# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010181if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182 withval=$with_thread; with_threads=$with_thread
10183fi
10184
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010185
10186if test -z "$with_threads"
10187then with_threads="yes"
10188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10190$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010191
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010192
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010193if test "$with_threads" = "no"
10194then
10195 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010196elif test "$ac_cv_pthread_is_default" = yes
10197then
Matthias Kloseb9621712010-04-24 17:59:49 +000010198 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010199
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010200 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010201 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010202
10203 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010204 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010205elif test "$ac_cv_kpthread" = "yes"
10206then
10207 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010208 if test "$ac_cv_cxx_thread" = "yes"; then
10209 CXX="$CXX -Kpthread"
10210 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010211 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010212
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010213 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010214 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010215elif test "$ac_cv_kthread" = "yes"
10216then
10217 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010218 if test "$ac_cv_cxx_thread" = "yes"; then
10219 CXX="$CXX -Kthread"
10220 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010221 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010222
10223 posix_threads=yes
10224 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010225elif test "$ac_cv_pthread" = "yes"
10226then
10227 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010228 if test "$ac_cv_cxx_thread" = "yes"; then
10229 CXX="$CXX -pthread"
10230 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010231 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010232
10233 posix_threads=yes
10234 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010235else
10236 if test ! -z "$with_threads" -a -d "$with_threads"
10237 then LDFLAGS="$LDFLAGS -L$with_threads"
10238 fi
10239 if test ! -z "$withval" -a -d "$withval"
10240 then LDFLAGS="$LDFLAGS -L$withval"
10241 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010242
10243 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010244 # define _POSIX_THREADS in unistd.h. Some apparently don't
10245 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10247$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010249/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010250
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010251#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010252#ifdef _POSIX_THREADS
10253yes
10254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010255
10256_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010257if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010258 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010259 unistd_defines_pthreads=yes
10260else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010261 unistd_defines_pthreads=no
10262fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010263rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010264
Matthias Kloseb9621712010-04-24 17:59:49 +000010265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10266$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010267
Matthias Kloseb9621712010-04-24 17:59:49 +000010268 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010269
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010270 # Just looking for pthread_create in libpthread is not enough:
10271 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10272 # So we really have to include pthread.h, and then link.
10273 _libs=$LIBS
10274 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10276$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010278/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010279
10280#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010281#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010282
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010283void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010284int
10285main ()
10286{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010287
10288pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010289 ;
10290 return 0;
10291}
10292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010293if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010294
Matthias Kloseb9621712010-04-24 17:59:49 +000010295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10296$as_echo "yes" >&6; }
10297 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010298
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010299 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010300 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010301else
Martin v. Löwis11437992002-04-12 09:54:03 +000010302
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010303 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010304 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010305if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010306 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010307
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010308 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010309 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010310else
Guido van Rossumad678af1998-10-02 14:42:15 +000010311
Matthias Kloseb9621712010-04-24 17:59:49 +000010312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10313$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010314if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010315 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010316else
Martin v. Löwis11437992002-04-12 09:54:03 +000010317 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010318LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010320/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010322/* Override any GCC internal prototype to avoid an error.
10323 Use char because int might match the return type of a GCC
10324 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010325#ifdef __cplusplus
10326extern "C"
10327#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010328char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010329int
10330main ()
10331{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010332return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010333 ;
10334 return 0;
10335}
10336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010337if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010338 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010339else
Matthias Kloseb9621712010-04-24 17:59:49 +000010340 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010341fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010342rm -f core conftest.err conftest.$ac_objext \
10343 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010344LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010345fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10347$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010348if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010349 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010350
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010351 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010352 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010353 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010354else
Greg Steinadf63d62000-07-05 10:38:09 +000010355
Matthias Kloseb9621712010-04-24 17:59:49 +000010356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10357$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010358if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010359 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010360else
Martin v. Löwis11437992002-04-12 09:54:03 +000010361 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010362LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010364/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010365
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010366/* Override any GCC internal prototype to avoid an error.
10367 Use char because int might match the return type of a GCC
10368 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010369#ifdef __cplusplus
10370extern "C"
10371#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010372char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010373int
10374main ()
10375{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010376return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010377 ;
10378 return 0;
10379}
10380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010381if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010382 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010383else
Matthias Kloseb9621712010-04-24 17:59:49 +000010384 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010385fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010386rm -f core conftest.err conftest.$ac_objext \
10387 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010388LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10391$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010392if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010393 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010394
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010395 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010396 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010397 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010398else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010399
Matthias Kloseb9621712010-04-24 17:59:49 +000010400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10401$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010402if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010403 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010404else
Martin v. Löwis11437992002-04-12 09:54:03 +000010405 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010406LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010409
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010410/* Override any GCC internal prototype to avoid an error.
10411 Use char because int might match the return type of a GCC
10412 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010413#ifdef __cplusplus
10414extern "C"
10415#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010416char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010417int
10418main ()
10419{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010420return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010421 ;
10422 return 0;
10423}
10424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010425if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010426 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010427else
Matthias Kloseb9621712010-04-24 17:59:49 +000010428 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010429fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010430rm -f core conftest.err conftest.$ac_objext \
10431 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010432LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010433fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10435$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010436if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010437 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010438
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010439 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010440 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010441 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010442else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010443
Matthias Kloseb9621712010-04-24 17:59:49 +000010444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10445$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010446if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010447 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010448else
Martin v. Löwis11437992002-04-12 09:54:03 +000010449 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010450LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010452/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010454/* Override any GCC internal prototype to avoid an error.
10455 Use char because int might match the return type of a GCC
10456 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010457#ifdef __cplusplus
10458extern "C"
10459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010460char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010461int
10462main ()
10463{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010464return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010465 ;
10466 return 0;
10467}
10468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010469if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010470 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010471else
Matthias Kloseb9621712010-04-24 17:59:49 +000010472 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010473fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010474rm -f core conftest.err conftest.$ac_objext \
10475 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010476LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010477fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10479$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010480if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010481 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010482
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010483 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010484 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010485 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010486else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010487
Martin v. Löwis130fb172001-07-19 11:00:41 +000010488 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010489fi
10490
Guido van Rossum627b2d71993-12-24 10:39:16 +000010491
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010492fi
10493
Guido van Rossum0be3e491997-05-22 20:33:33 +000010494fi
10495
Guido van Rossum49545951997-12-02 19:28:29 +000010496fi
10497
Guido van Rossumb93a8621998-05-07 13:27:32 +000010498fi
10499
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010500fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010501rm -f core conftest.err conftest.$ac_objext \
10502 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010503
Matthias Kloseb9621712010-04-24 17:59:49 +000010504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10505$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010506if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010507 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010508else
Martin v. Löwis11437992002-04-12 09:54:03 +000010509 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010510LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010512/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010514/* Override any GCC internal prototype to avoid an error.
10515 Use char because int might match the return type of a GCC
10516 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010517#ifdef __cplusplus
10518extern "C"
10519#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010520char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010521int
10522main ()
10523{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010524return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010525 ;
10526 return 0;
10527}
10528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010529if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010530 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010531else
Matthias Kloseb9621712010-04-24 17:59:49 +000010532 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010533fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010534rm -f core conftest.err conftest.$ac_objext \
10535 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010536LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010537fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10539$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010540if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010541 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010542
Martin v. Löwis130fb172001-07-19 11:00:41 +000010543 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010544 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010545 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010546fi
10547
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010548
Neal Norwitza978ab02002-11-02 16:58:05 +000010549 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10551$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010552if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010553 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010554else
Martin v. Löwis11437992002-04-12 09:54:03 +000010555 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010556LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010558/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010559
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010560/* Override any GCC internal prototype to avoid an error.
10561 Use char because int might match the return type of a GCC
10562 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010563#ifdef __cplusplus
10564extern "C"
10565#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010566char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010567int
10568main ()
10569{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010570return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010571 ;
10572 return 0;
10573}
10574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010575if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010576 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010577else
Matthias Kloseb9621712010-04-24 17:59:49 +000010578 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010580rm -f core conftest.err conftest.$ac_objext \
10581 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010582LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10585$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010586if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010587 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010588
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010589 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010590 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010591 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010592fi
10593
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010594 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010595fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010596
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010597if test "$posix_threads" = "yes"; then
10598 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010599
Matthias Kloseb9621712010-04-24 17:59:49 +000010600$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010601
10602 fi
10603
10604 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10605 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010606 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010607$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010608
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010609 ;;
10610 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010611$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010612
10613 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010614 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010615$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010616
10617 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010618 esac
10619
Matthias Kloseb9621712010-04-24 17:59:49 +000010620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10621$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010622 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010623 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010624else
Matthias Kloseb9621712010-04-24 17:59:49 +000010625 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010626 ac_cv_pthread_system_supported=no
10627else
Matthias Kloseb9621712010-04-24 17:59:49 +000010628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010629/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010630
10631 #include <stdio.h>
10632 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010633 void *foo(void *parm) {
10634 return NULL;
10635 }
10636 main() {
10637 pthread_attr_t attr;
10638 pthread_t id;
10639 if (pthread_attr_init(&attr)) exit(-1);
10640 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10641 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10642 exit(0);
10643 }
10644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010645if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010646 ac_cv_pthread_system_supported=yes
10647else
Matthias Kloseb9621712010-04-24 17:59:49 +000010648 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010649fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10651 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010652fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010654
Guido van Rossum627b2d71993-12-24 10:39:16 +000010655fi
10656
Matthias Kloseb9621712010-04-24 17:59:49 +000010657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10658$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010659 if test "$ac_cv_pthread_system_supported" = "yes"; then
10660
Matthias Kloseb9621712010-04-24 17:59:49 +000010661$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010662
10663 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010664 for ac_func in pthread_sigmask
10665do :
10666 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010667if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010668 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010669#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010670_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010671 case $ac_sys_system in
10672 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010673
Matthias Kloseb9621712010-04-24 17:59:49 +000010674$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010675
10676 ;;
10677 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010678fi
10679done
10680
Christian Heimesf77b4b22013-08-21 13:26:05 +020010681 for ac_func in pthread_atfork
10682do :
10683 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10684if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10685 cat >>confdefs.h <<_ACEOF
10686#define HAVE_PTHREAD_ATFORK 1
10687_ACEOF
10688
10689fi
10690done
10691
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010692fi
10693
10694
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010695# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010696
Matthias Kloseb9621712010-04-24 17:59:49 +000010697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10698$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010699# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010700if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010701 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010702 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10704$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010705 ipv6=no
10706 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010707 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10708$as_echo "yes" >&6; }
10709 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010710
10711 ipv6=yes
10712 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010713 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010714else
Martin v. Löwis11437992002-04-12 09:54:03 +000010715
Matthias Kloseb9621712010-04-24 17:59:49 +000010716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010717/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010718 /* AF_INET6 available check */
10719#include <sys/types.h>
10720#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010721int
10722main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010723{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010724int domain = AF_INET6;
10725 ;
10726 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010727}
Martin v. Löwis11437992002-04-12 09:54:03 +000010728_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010729if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010730
Matthias Kloseb9621712010-04-24 17:59:49 +000010731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10732$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010733 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010734
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010735else
Matthias Kloseb159a552010-04-25 21:00:44 +000010736
Matthias Kloseb9621712010-04-24 17:59:49 +000010737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10738$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010739 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010740
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010741fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010743
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010744if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10746$as_echo_n "checking if RFC2553 API is available... " >&6; }
10747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010748/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010749
10750 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010751#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010752int
10753main ()
10754{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010755struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010756 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010757 ;
10758 return 0;
10759}
Matthias Kloseb159a552010-04-25 21:00:44 +000010760
Martin v. Löwis11437992002-04-12 09:54:03 +000010761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010762if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010763
10764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010765$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010766 ipv6=yes
10767
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010768else
Matthias Kloseb159a552010-04-25 21:00:44 +000010769
10770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010771$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010772 ipv6=no
10773
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010776fi
10777
10778if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010779 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010780
10781fi
10782
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010783fi
10784
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010785
10786ipv6type=unknown
10787ipv6lib=none
10788ipv6trylibc=no
10789
10790if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10792$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010793 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10794 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795 case $i in
10796 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010798/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010799
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010800#include <netinet/in.h>
10801#ifdef IPV6_INRIA_VERSION
10802yes
10803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010804_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010805if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010807 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010808fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010809rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010810
10811 ;;
10812 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010814/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010815
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010816#include <netinet/in.h>
10817#ifdef __KAME__
10818yes
10819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010820_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010821if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010822 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823 ipv6type=$i;
10824 ipv6lib=inet6
10825 ipv6libdir=/usr/local/v6/lib
10826 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010827fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010828rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010829
10830 ;;
10831 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010833/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010834
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835#include <features.h>
10836#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10837yes
10838#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010839_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010840if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010841 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010842 ipv6type=$i;
10843 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010844fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010845rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846
10847 ;;
10848 linux-inet6)
10849 if test -d /usr/inet6; then
10850 ipv6type=$i
10851 ipv6lib=inet6
10852 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010853 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010854 fi
10855 ;;
10856 solaris)
10857 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010858 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010859 ipv6type=$i
10860 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010861 fi
10862 fi
10863 ;;
10864 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010866/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010867
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010868#include <sys/param.h>
10869#ifdef _TOSHIBA_INET6
10870yes
10871#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010872_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010873if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010875 ipv6type=$i;
10876 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010877 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010878fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010879rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010880
10881 ;;
10882 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010884/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010885
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010886#include </usr/local/v6/include/sys/v6config.h>
10887#ifdef __V6D__
10888yes
10889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010890_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010891if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010893 ipv6type=$i;
10894 ipv6lib=v6;
10895 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010896 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010897fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010898rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010899
10900 ;;
10901 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010903/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010904
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010905#include <sys/param.h>
10906#ifdef _ZETA_MINAMI_INET6
10907yes
10908#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010909_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010910if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010911 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010912 ipv6type=$i;
10913 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010914 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010915fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010916rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010917
10918 ;;
10919 esac
10920 if test "$ipv6type" != "unknown"; then
10921 break
10922 fi
10923 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10925$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010926fi
10927
10928if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10929 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10930 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10931 echo "using lib$ipv6lib"
10932 else
10933 if test $ipv6trylibc = "yes"; then
10934 echo "using libc"
10935 else
10936 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10937 echo "You need to fetch lib$ipv6lib.a from appropriate"
10938 echo 'ipv6 kit and compile beforehand.'
10939 exit 1
10940 fi
10941 fi
10942fi
10943
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10945$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10947/* end confdefs.h. */
10948 /* CAN_RAW_FD_FRAMES available check */
10949#include <linux/can/raw.h>
10950int
10951main ()
10952{
10953int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10954 ;
10955 return 0;
10956}
10957_ACEOF
10958if ac_fn_c_try_compile "$LINENO"; then :
10959
10960
10961$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10962
10963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10964$as_echo "yes" >&6; }
10965
10966else
10967
10968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10969$as_echo "no" >&6; }
10970
10971fi
10972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10973
Matthias Kloseb9621712010-04-24 17:59:49 +000010974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10975$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010977/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010978
10979 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010980int
10981main ()
10982{
10983FSIORefNum fRef = 0
10984 ;
10985 return 0;
10986}
Matthias Kloseb159a552010-04-25 21:00:44 +000010987
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010989if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010990
Matthias Kloseb159a552010-04-25 21:00:44 +000010991
Matthias Kloseb9621712010-04-24 17:59:49 +000010992$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010993
Matthias Kloseb9621712010-04-24 17:59:49 +000010994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10995$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010996
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010997else
Matthias Kloseb159a552010-04-25 21:00:44 +000010998
Matthias Kloseb9621712010-04-24 17:59:49 +000010999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11000$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011001
11002fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000011003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11004
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011005# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11007$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011008
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011009# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011010if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011011 withval=$with_doc_strings;
11012fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011013
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011014
11015if test -z "$with_doc_strings"
11016then with_doc_strings="yes"
11017fi
11018if test "$with_doc_strings" != "no"
11019then
11020
Matthias Kloseb9621712010-04-24 17:59:49 +000011021$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011022
11023fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11025$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011026
Antoine Pitrou042b1282010-08-13 21:15:58 +000011027# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000011028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
11029$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011030
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011031# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011032if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011033 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011034if test "$withval" != no
11035then
11036
Matthias Kloseb9621712010-04-24 17:59:49 +000011037$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011038
Matthias Kloseb9621712010-04-24 17:59:49 +000011039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11040$as_echo "yes" >&6; }
11041else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11042$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011043fi
11044else
Matthias Kloseb9621712010-04-24 17:59:49 +000011045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11046$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011047fi
11048
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011049
11050# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11052$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011054# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011055if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011056 withval=$with_pymalloc;
11057fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011058
Neil Schemenauera35c6882001-02-27 04:45:05 +000011059
Neil Schemenauer16c22972002-03-22 15:34:49 +000011060if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011061then
11062 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011063fi
11064if test "$with_pymalloc" != "no"
11065then
Martin v. Löwis11437992002-04-12 09:54:03 +000011066
Matthias Kloseb9621712010-04-24 17:59:49 +000011067$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011068
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011069 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011070fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11072$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011073
Benjamin Peterson05159c42009-12-03 03:01:27 +000011074# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11076$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011077
11078# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011079if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011080 withval=$with_valgrind;
11081else
11082 with_valgrind=no
11083fi
11084
Matthias Kloseb9621712010-04-24 17:59:49 +000011085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11086$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011087if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011088 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 +020011089if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011090
Matthias Kloseb9621712010-04-24 17:59:49 +000011091$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011092
11093else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011094 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011095
11096fi
11097
11098
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011099 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011100fi
11101
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011102# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011103
Guido van Rossum98935bf2001-09-05 19:13:16 +000011104DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011105
Guido van Rossume97ee181999-12-20 21:27:22 +000011106# the dlopen() function means we might want to use dynload_shlib.o. some
11107# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011108for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011109do :
11110 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011111if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011112 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011113#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011114_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011115
Guido van Rossume97ee181999-12-20 21:27:22 +000011116fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011117done
Guido van Rossume97ee181999-12-20 21:27:22 +000011118
Michael W. Hudson54241132001-12-07 15:38:26 +000011119
Guido van Rossume97ee181999-12-20 21:27:22 +000011120# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11121# loading of modules.
11122
Matthias Kloseb9621712010-04-24 17:59:49 +000011123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11124$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011125if test -z "$DYNLOADFILE"
11126then
11127 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011128 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11129 if test "$ac_cv_func_dlopen" = yes
11130 then DYNLOADFILE="dynload_shlib.o"
11131 else DYNLOADFILE="dynload_aix.o"
11132 fi
11133 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011134 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011135 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11136 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011137 *)
11138 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11139 # out any dynamic loading
11140 if test "$ac_cv_func_dlopen" = yes
11141 then DYNLOADFILE="dynload_shlib.o"
11142 else DYNLOADFILE="dynload_stub.o"
11143 fi
11144 ;;
11145 esac
11146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11148$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011149if test "$DYNLOADFILE" != "dynload_stub.o"
11150then
Martin v. Löwis11437992002-04-12 09:54:03 +000011151
Matthias Kloseb9621712010-04-24 17:59:49 +000011152$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011153
11154fi
11155
Neil Schemenauer4e425612001-06-19 15:44:15 +000011156# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11157
Michael W. Hudson54241132001-12-07 15:38:26 +000011158
Matthias Kloseb9621712010-04-24 17:59:49 +000011159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11160$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011161if test -z "$MACHDEP_OBJS"
11162then
Jack Jansene578a632001-08-15 01:27:14 +000011163 MACHDEP_OBJS=$extra_machdep_objs
11164else
11165 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011166fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011167if test -z "$MACHDEP_OBJS"; then
11168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11169$as_echo "none" >&6; }
11170else
11171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11172$as_echo "$MACHDEP_OBJS" >&6; }
11173fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011174
Guido van Rossum627b2d71993-12-24 10:39:16 +000011175# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011176for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011177 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011178 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011179 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011180 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011181 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011182 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011183 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11184 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011185 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011186 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011187 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011188 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011189 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011190 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011191 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11192 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011193 sigaction sigaltstack siginterrupt sigpending sigrelse \
11194 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011195 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011196 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011197 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011198do :
11199 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11200ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011201if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011202 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011203#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011204_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011205
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011206fi
11207done
11208
Michael W. Hudson54241132001-12-07 15:38:26 +000011209
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011210ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11211 #include <dirent.h>
11212"
11213if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11214
11215$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11216
11217fi
11218
11219
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011220# For some functions, having a definition is not sufficient, since
11221# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11223$as_echo_n "checking for chroot... " >&6; }
11224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011225/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011226#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011227int
11228main ()
11229{
11230void *x=chroot
11231 ;
11232 return 0;
11233}
11234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011235if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011236
Matthias Kloseb9621712010-04-24 17:59:49 +000011237$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011238
Matthias Kloseb159a552010-04-25 21:00:44 +000011239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011240$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011241else
Matthias Kloseb9621712010-04-24 17:59:49 +000011242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11243$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011244
11245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11248$as_echo_n "checking for link... " >&6; }
11249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011250/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011251#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011252int
11253main ()
11254{
11255void *x=link
11256 ;
11257 return 0;
11258}
11259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011260if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011261
Matthias Kloseb9621712010-04-24 17:59:49 +000011262$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011263
Matthias Kloseb159a552010-04-25 21:00:44 +000011264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011265$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011266else
Matthias Kloseb9621712010-04-24 17:59:49 +000011267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11268$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011269
11270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11273$as_echo_n "checking for symlink... " >&6; }
11274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011275/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011276#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011277int
11278main ()
11279{
11280void *x=symlink
11281 ;
11282 return 0;
11283}
11284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011285if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011286
Matthias Kloseb9621712010-04-24 17:59:49 +000011287$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011288
Matthias Kloseb159a552010-04-25 21:00:44 +000011289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011290$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011291else
Matthias Kloseb9621712010-04-24 17:59:49 +000011292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11293$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011294
11295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11298$as_echo_n "checking for fchdir... " >&6; }
11299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011300/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011301#include <unistd.h>
11302int
11303main ()
11304{
11305void *x=fchdir
11306 ;
11307 return 0;
11308}
11309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011310if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011311
Matthias Kloseb9621712010-04-24 17:59:49 +000011312$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011313
Matthias Kloseb159a552010-04-25 21:00:44 +000011314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011315$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011316else
Matthias Kloseb9621712010-04-24 17:59:49 +000011317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11318$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011319
11320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11323$as_echo_n "checking for fsync... " >&6; }
11324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011325/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011326#include <unistd.h>
11327int
11328main ()
11329{
11330void *x=fsync
11331 ;
11332 return 0;
11333}
11334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011335if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011336
Matthias Kloseb9621712010-04-24 17:59:49 +000011337$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011338
Matthias Kloseb159a552010-04-25 21:00:44 +000011339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011340$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011341else
Matthias Kloseb9621712010-04-24 17:59:49 +000011342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11343$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011344
11345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11348$as_echo_n "checking for fdatasync... " >&6; }
11349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011350/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011351#include <unistd.h>
11352int
11353main ()
11354{
11355void *x=fdatasync
11356 ;
11357 return 0;
11358}
11359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011360if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011361
Matthias Kloseb9621712010-04-24 17:59:49 +000011362$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011363
Matthias Kloseb159a552010-04-25 21:00:44 +000011364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011365$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011366else
Matthias Kloseb9621712010-04-24 17:59:49 +000011367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11368$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011369
11370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11373$as_echo_n "checking for epoll... " >&6; }
11374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011375/* end confdefs.h. */
11376#include <sys/epoll.h>
11377int
11378main ()
11379{
11380void *x=epoll_create
11381 ;
11382 return 0;
11383}
11384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011385if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011386
Matthias Kloseb9621712010-04-24 17:59:49 +000011387$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011388
Matthias Kloseb159a552010-04-25 21:00:44 +000011389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011390$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011391else
Matthias Kloseb9621712010-04-24 17:59:49 +000011392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11393$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011394
11395fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11398$as_echo_n "checking for epoll_create1... " >&6; }
11399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11400/* end confdefs.h. */
11401#include <sys/epoll.h>
11402int
11403main ()
11404{
11405void *x=epoll_create1
11406 ;
11407 return 0;
11408}
11409_ACEOF
11410if ac_fn_c_try_compile "$LINENO"; then :
11411
11412$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11413
11414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11415$as_echo "yes" >&6; }
11416else
11417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11418$as_echo "no" >&6; }
11419
11420fi
11421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11423$as_echo_n "checking for kqueue... " >&6; }
11424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011425/* end confdefs.h. */
11426
11427#include <sys/types.h>
11428#include <sys/event.h>
11429
11430int
11431main ()
11432{
11433int x=kqueue()
11434 ;
11435 return 0;
11436}
11437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011438if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011439
Matthias Kloseb9621712010-04-24 17:59:49 +000011440$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011441
Matthias Kloseb159a552010-04-25 21:00:44 +000011442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011443$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011444else
Matthias Kloseb9621712010-04-24 17:59:49 +000011445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11446$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011447
11448fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11451$as_echo_n "checking for prlimit... " >&6; }
11452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11453/* end confdefs.h. */
11454
11455#include <sys/time.h>
11456#include <sys/resource.h>
11457
11458int
11459main ()
11460{
11461void *x=prlimit
11462 ;
11463 return 0;
11464}
11465_ACEOF
11466if ac_fn_c_try_compile "$LINENO"; then :
11467
11468$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11469
11470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11471$as_echo "yes" >&6; }
11472else
11473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11474$as_echo "no" >&6; }
11475
11476fi
11477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11478
Martin v. Löwisd5843682002-11-21 20:41:28 +000011479# On some systems (eg. FreeBSD 5), we would find a definition of the
11480# functions ctermid_r, setgroups in the library, but no prototype
11481# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11482# address to avoid compiler warnings and potential miscompilations
11483# because of the missing prototypes.
11484
Matthias Kloseb9621712010-04-24 17:59:49 +000011485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11486$as_echo_n "checking for ctermid_r... " >&6; }
11487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011488/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011489
Martin v. Löwisd5843682002-11-21 20:41:28 +000011490#include <stdio.h>
11491
Martin v. Löwisd5843682002-11-21 20:41:28 +000011492int
11493main ()
11494{
11495void* p = ctermid_r
11496 ;
11497 return 0;
11498}
11499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011500if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011501
Matthias Kloseb9621712010-04-24 17:59:49 +000011502$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011503
Matthias Kloseb159a552010-04-25 21:00:44 +000011504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011505$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011506else
Matthias Kloseb9621712010-04-24 17:59:49 +000011507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11508$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011509
11510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11512
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11514$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011515if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011516 $as_echo_n "(cached) " >&6
11517else
11518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011519/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011520#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011521int
11522main ()
11523{
11524void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011525
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011526 ;
11527 return 0;
11528}
11529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011530if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011531 ac_cv_flock_decl=yes
11532else
11533 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011534
11535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011537
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011538fi
11539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11540$as_echo "$ac_cv_flock_decl" >&6; }
11541if test "x${ac_cv_flock_decl}" = xyes; then
11542 for ac_func in flock
11543do :
11544 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011545if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011546 cat >>confdefs.h <<_ACEOF
11547#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011548_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011549
Antoine Pitroua3000072010-09-07 14:52:42 +000011550else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011552$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011553if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011554 $as_echo_n "(cached) " >&6
11555else
11556 ac_check_lib_save_LIBS=$LIBS
11557LIBS="-lbsd $LIBS"
11558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11559/* end confdefs.h. */
11560
11561/* Override any GCC internal prototype to avoid an error.
11562 Use char because int might match the return type of a GCC
11563 builtin and then its argument prototype would still apply. */
11564#ifdef __cplusplus
11565extern "C"
11566#endif
11567char flock ();
11568int
11569main ()
11570{
11571return flock ();
11572 ;
11573 return 0;
11574}
11575_ACEOF
11576if ac_fn_c_try_link "$LINENO"; then :
11577 ac_cv_lib_bsd_flock=yes
11578else
11579 ac_cv_lib_bsd_flock=no
11580fi
11581rm -f core conftest.err conftest.$ac_objext \
11582 conftest$ac_exeext conftest.$ac_ext
11583LIBS=$ac_check_lib_save_LIBS
11584fi
11585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11586$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011587if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011588 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011589
11590
11591$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11592
11593
11594fi
11595
11596
11597fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011598done
11599
Antoine Pitroua3000072010-09-07 14:52:42 +000011600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011601
Matthias Kloseb9621712010-04-24 17:59:49 +000011602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11603$as_echo_n "checking for getpagesize... " >&6; }
11604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011605/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011606
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011607#include <unistd.h>
11608
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011609int
11610main ()
11611{
11612void* p = getpagesize
11613 ;
11614 return 0;
11615}
11616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011617if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011618
Matthias Kloseb9621712010-04-24 17:59:49 +000011619$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011620
Matthias Kloseb159a552010-04-25 21:00:44 +000011621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011622$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011623else
Matthias Kloseb9621712010-04-24 17:59:49 +000011624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11625$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011626
11627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011629
Victor Stinner984890f2011-11-24 13:53:38 +010011630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11631$as_echo_n "checking for broken unsetenv... " >&6; }
11632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11633/* end confdefs.h. */
11634
11635#include <stdlib.h>
11636
11637int
11638main ()
11639{
11640int res = unsetenv("DUMMY")
11641 ;
11642 return 0;
11643}
11644_ACEOF
11645if ac_fn_c_try_compile "$LINENO"; then :
11646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11647$as_echo "no" >&6; }
11648else
11649
11650$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11651
11652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11653$as_echo "yes" >&6; }
11654
11655fi
11656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11657
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011658for ac_prog in true
11659do
11660 # Extract the first word of "$ac_prog", so it can be a program name with args.
11661set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11663$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011664if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011665 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011666else
11667 if test -n "$TRUE"; then
11668 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11669else
11670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11671for as_dir in $PATH
11672do
11673 IFS=$as_save_IFS
11674 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011675 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011676 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011677 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011678 $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 +000011679 break 2
11680 fi
11681done
Matthias Kloseb9621712010-04-24 17:59:49 +000011682 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011683IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011684
11685fi
11686fi
11687TRUE=$ac_cv_prog_TRUE
11688if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11690$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011691else
Matthias Kloseb9621712010-04-24 17:59:49 +000011692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11693$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011694fi
11695
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011696
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011697 test -n "$TRUE" && break
11698done
11699test -n "$TRUE" || TRUE="/bin/true"
11700
11701
Matthias Kloseb9621712010-04-24 17:59:49 +000011702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11703$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011704if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011705 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011706else
11707 ac_check_lib_save_LIBS=$LIBS
11708LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011710/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011712/* Override any GCC internal prototype to avoid an error.
11713 Use char because int might match the return type of a GCC
11714 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011715#ifdef __cplusplus
11716extern "C"
11717#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011718char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011719int
11720main ()
11721{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011722return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011723 ;
11724 return 0;
11725}
11726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011727if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011728 ac_cv_lib_c_inet_aton=yes
11729else
Matthias Kloseb9621712010-04-24 17:59:49 +000011730 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011732rm -f core conftest.err conftest.$ac_objext \
11733 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011734LIBS=$ac_check_lib_save_LIBS
11735fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11737$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011738if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011739 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011740else
Matthias Kloseb9621712010-04-24 17:59:49 +000011741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11742$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011743if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011744 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011745else
11746 ac_check_lib_save_LIBS=$LIBS
11747LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011749/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011750
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011751/* Override any GCC internal prototype to avoid an error.
11752 Use char because int might match the return type of a GCC
11753 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011754#ifdef __cplusplus
11755extern "C"
11756#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011757char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011758int
11759main ()
11760{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011761return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011762 ;
11763 return 0;
11764}
11765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011766if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011767 ac_cv_lib_resolv_inet_aton=yes
11768else
Matthias Kloseb9621712010-04-24 17:59:49 +000011769 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011770fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011771rm -f core conftest.err conftest.$ac_objext \
11772 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011773LIBS=$ac_check_lib_save_LIBS
11774fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11776$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011777if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011778 cat >>confdefs.h <<_ACEOF
11779#define HAVE_LIBRESOLV 1
11780_ACEOF
11781
11782 LIBS="-lresolv $LIBS"
11783
11784fi
11785
11786
11787fi
11788
11789
Christian Heimesd0764e22007-12-04 15:00:33 +000011790# On Tru64, chflags seems to be present, but calling it will
11791# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11793$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011794if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011795 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011796else
Matthias Kloseb9621712010-04-24 17:59:49 +000011797 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011798 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011799else
Matthias Kloseb9621712010-04-24 17:59:49 +000011800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011801/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011802
Christian Heimesd0764e22007-12-04 15:00:33 +000011803#include <sys/stat.h>
11804#include <unistd.h>
11805int main(int argc, char*argv[])
11806{
11807 if(chflags(argv[0], 0) != 0)
11808 return 1;
11809 return 0;
11810}
Ned Deily3eb67d52011-06-28 00:00:28 -070011811
Christian Heimesd0764e22007-12-04 15:00:33 +000011812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011813if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011814 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011815else
Matthias Kloseb9621712010-04-24 17:59:49 +000011816 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011817fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11819 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011820fi
11821
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011822
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011823fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11825$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011826if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011827 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011828if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011829 ac_cv_have_chflags="yes"
11830else
11831 ac_cv_have_chflags="no"
11832fi
11833
11834fi
11835if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011836
Matthias Kloseb9621712010-04-24 17:59:49 +000011837$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011838
11839fi
11840
Matthias Kloseb9621712010-04-24 17:59:49 +000011841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11842$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011843if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011844 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011845else
Matthias Kloseb9621712010-04-24 17:59:49 +000011846 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011847 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011848else
Matthias Kloseb9621712010-04-24 17:59:49 +000011849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011850/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011851
Christian Heimesd0764e22007-12-04 15:00:33 +000011852#include <sys/stat.h>
11853#include <unistd.h>
11854int main(int argc, char*argv[])
11855{
11856 if(lchflags(argv[0], 0) != 0)
11857 return 1;
11858 return 0;
11859}
Ned Deily3eb67d52011-06-28 00:00:28 -070011860
Christian Heimesd0764e22007-12-04 15:00:33 +000011861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011862if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011863 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011864else
Matthias Kloseb9621712010-04-24 17:59:49 +000011865 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011867rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11868 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011869fi
11870
11871
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011872fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11874$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011875if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011876 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011877if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011878 ac_cv_have_lchflags="yes"
11879else
11880 ac_cv_have_lchflags="no"
11881fi
11882
11883fi
11884if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011885
Matthias Kloseb9621712010-04-24 17:59:49 +000011886$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011887
11888fi
11889
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011890case $ac_sys_system/$ac_sys_release in
11891Darwin/*)
11892 _CUR_CFLAGS="${CFLAGS}"
11893 _CUR_LDFLAGS="${LDFLAGS}"
11894 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11895 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11896 ;;
11897esac
11898
Matthias Kloseb9621712010-04-24 17:59:49 +000011899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11900$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011901if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011902 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011903else
11904 ac_check_lib_save_LIBS=$LIBS
11905LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011907/* end confdefs.h. */
11908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011909/* Override any GCC internal prototype to avoid an error.
11910 Use char because int might match the return type of a GCC
11911 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011912#ifdef __cplusplus
11913extern "C"
11914#endif
11915char inflateCopy ();
11916int
11917main ()
11918{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011919return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011920 ;
11921 return 0;
11922}
11923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011924if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011925 ac_cv_lib_z_inflateCopy=yes
11926else
Matthias Kloseb9621712010-04-24 17:59:49 +000011927 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011929rm -f core conftest.err conftest.$ac_objext \
11930 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011931LIBS=$ac_check_lib_save_LIBS
11932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11934$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011935if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011936
Matthias Kloseb9621712010-04-24 17:59:49 +000011937$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011938
11939fi
11940
11941
11942case $ac_sys_system/$ac_sys_release in
11943Darwin/*)
11944 CFLAGS="${_CUR_CFLAGS}"
11945 LDFLAGS="${_CUR_LDFLAGS}"
11946 ;;
11947esac
11948
Matthias Kloseb9621712010-04-24 17:59:49 +000011949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11950$as_echo_n "checking for hstrerror... " >&6; }
11951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011952/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011953
Martin v. Löwise9416172003-05-03 10:12:45 +000011954#include <netdb.h>
11955
Martin v. Löwise9416172003-05-03 10:12:45 +000011956int
11957main ()
11958{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011959void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011960 ;
11961 return 0;
11962}
11963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011964if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011965
Matthias Kloseb9621712010-04-24 17:59:49 +000011966$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011967
Matthias Kloseb159a552010-04-25 21:00:44 +000011968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011969$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011970else
Matthias Kloseb9621712010-04-24 17:59:49 +000011971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11972$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011973
11974fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011975rm -f core conftest.err conftest.$ac_objext \
11976 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011977
Matthias Kloseb9621712010-04-24 17:59:49 +000011978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11979$as_echo_n "checking for inet_aton... " >&6; }
11980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011981/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011982
Martin v. Löwis86d66262006-02-17 08:40:11 +000011983#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011984#include <sys/socket.h>
11985#include <netinet/in.h>
11986#include <arpa/inet.h>
11987
Martin v. Löwise9416172003-05-03 10:12:45 +000011988int
11989main ()
11990{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011991void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011992 ;
11993 return 0;
11994}
11995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011996if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011997
Matthias Kloseb9621712010-04-24 17:59:49 +000011998$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011999
Matthias Kloseb159a552010-04-25 21:00:44 +000012000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012001$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012002else
Matthias Kloseb9621712010-04-24 17:59:49 +000012003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12004$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012005
12006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012007rm -f core conftest.err conftest.$ac_objext \
12008 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012009
Matthias Kloseb9621712010-04-24 17:59:49 +000012010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12011$as_echo_n "checking for inet_pton... " >&6; }
12012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012013/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012014
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012015#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012016#include <sys/socket.h>
12017#include <netinet/in.h>
12018#include <arpa/inet.h>
12019
Martin v. Löwise9416172003-05-03 10:12:45 +000012020int
12021main ()
12022{
12023void* p = inet_pton
12024 ;
12025 return 0;
12026}
12027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012028if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012029
Matthias Kloseb9621712010-04-24 17:59:49 +000012030$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012031
Matthias Kloseb159a552010-04-25 21:00:44 +000012032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012033$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012034else
Matthias Kloseb9621712010-04-24 17:59:49 +000012035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12036$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012037
12038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012040
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012041# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12043$as_echo_n "checking for setgroups... " >&6; }
12044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012045/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012046
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012047#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012048#ifdef HAVE_GRP_H
12049#include <grp.h>
12050#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012051
Martin v. Löwisd5843682002-11-21 20:41:28 +000012052int
12053main ()
12054{
12055void* p = setgroups
12056 ;
12057 return 0;
12058}
12059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012060if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012061
Matthias Kloseb9621712010-04-24 17:59:49 +000012062$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012063
Matthias Kloseb159a552010-04-25 21:00:44 +000012064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012065$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012066else
Matthias Kloseb9621712010-04-24 17:59:49 +000012067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12068$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012069
12070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012072
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012073# check for openpty and forkpty
12074
12075for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012076do :
12077 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012078if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012079 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012080#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012081_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012082
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012083else
Matthias Kloseb9621712010-04-24 17:59:49 +000012084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12085$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012086if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012087 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012088else
Martin v. Löwis11437992002-04-12 09:54:03 +000012089 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012090LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012092/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012094/* Override any GCC internal prototype to avoid an error.
12095 Use char because int might match the return type of a GCC
12096 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012097#ifdef __cplusplus
12098extern "C"
12099#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012100char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012101int
12102main ()
12103{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012104return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012105 ;
12106 return 0;
12107}
12108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012109if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012110 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012111else
Matthias Kloseb9621712010-04-24 17:59:49 +000012112 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012113fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012114rm -f core conftest.err conftest.$ac_objext \
12115 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012116LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012117fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12119$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012120if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012122 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012123else
Matthias Kloseb9621712010-04-24 17:59:49 +000012124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12125$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012126if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012127 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012128else
12129 ac_check_lib_save_LIBS=$LIBS
12130LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012132/* end confdefs.h. */
12133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012134/* Override any GCC internal prototype to avoid an error.
12135 Use char because int might match the return type of a GCC
12136 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012137#ifdef __cplusplus
12138extern "C"
12139#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012140char openpty ();
12141int
12142main ()
12143{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012144return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012145 ;
12146 return 0;
12147}
12148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012149if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012150 ac_cv_lib_bsd_openpty=yes
12151else
Matthias Kloseb9621712010-04-24 17:59:49 +000012152 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012154rm -f core conftest.err conftest.$ac_objext \
12155 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012156LIBS=$ac_check_lib_save_LIBS
12157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12159$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012160if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012161 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012162 LIBS="$LIBS -lbsd"
12163fi
12164
12165
12166fi
12167
Fred Drake8cef4cf2000-06-28 16:40:38 +000012168
12169fi
12170done
12171
12172for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012173do :
12174 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012175if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012176 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012177#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012178_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012179
Fred Drake8cef4cf2000-06-28 16:40:38 +000012180else
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12182$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012183if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012185else
Martin v. Löwis11437992002-04-12 09:54:03 +000012186 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012187LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012191/* Override any GCC internal prototype to avoid an error.
12192 Use char because int might match the return type of a GCC
12193 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012194#ifdef __cplusplus
12195extern "C"
12196#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012197char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012198int
12199main ()
12200{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012201return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012202 ;
12203 return 0;
12204}
12205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012206if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012207 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012208else
Matthias Kloseb9621712010-04-24 17:59:49 +000012209 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012211rm -f core conftest.err conftest.$ac_objext \
12212 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012213LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12216$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012217if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012218 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012219 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012220else
Matthias Kloseb9621712010-04-24 17:59:49 +000012221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12222$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012223if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012224 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012225else
12226 ac_check_lib_save_LIBS=$LIBS
12227LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012229/* end confdefs.h. */
12230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012231/* Override any GCC internal prototype to avoid an error.
12232 Use char because int might match the return type of a GCC
12233 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012234#ifdef __cplusplus
12235extern "C"
12236#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012237char forkpty ();
12238int
12239main ()
12240{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012241return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012242 ;
12243 return 0;
12244}
12245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012246if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012247 ac_cv_lib_bsd_forkpty=yes
12248else
Matthias Kloseb9621712010-04-24 17:59:49 +000012249 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012250fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012251rm -f core conftest.err conftest.$ac_objext \
12252 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012253LIBS=$ac_check_lib_save_LIBS
12254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12256$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012257if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012258 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012259 LIBS="$LIBS -lbsd"
12260fi
12261
12262
12263fi
12264
Fred Drake8cef4cf2000-06-28 16:40:38 +000012265
12266fi
12267done
12268
Jack Jansendd19cf82001-12-06 22:36:17 +000012269
Christian Heimesb186d002008-03-18 15:15:01 +000012270# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012271for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012272do :
12273 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012274if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012275 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012276#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012277_ACEOF
12278
12279fi
12280done
12281
12282
Michael W. Hudson54241132001-12-07 15:38:26 +000012283# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012284for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012285do :
12286 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12287ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012288if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012289 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012290#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012291_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012292
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012293fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012294done
12295
Michael W. Hudson54241132001-12-07 15:38:26 +000012296
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012297ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012298if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012299 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012300
Martin v. Löwis1142de32002-03-29 16:28:31 +000012301else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012302 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012303 *" dup2.$ac_objext "* ) ;;
12304 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012305 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012306esac
12307
Martin v. Löwis1142de32002-03-29 16:28:31 +000012308fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012309
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012310ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012311if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012312 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12313
12314else
12315 case " $LIBOBJS " in
12316 *" strdup.$ac_objext "* ) ;;
12317 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12318 ;;
12319esac
12320
12321fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012322
12323
12324for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012325do :
12326 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012327if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012328 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012329#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012332/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012333#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012334int
12335main ()
12336{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012337getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012338 ;
12339 return 0;
12340}
12341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012342if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012343
Matthias Kloseb9621712010-04-24 17:59:49 +000012344$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012345
Guido van Rossum627b2d71993-12-24 10:39:16 +000012346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012348
Guido van Rossum627b2d71993-12-24 10:39:16 +000012349fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012350done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012351
Jack Jansen150753c2003-03-29 22:07:47 +000012352for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012353do :
12354 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012355if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012356 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012357#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012360/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012361#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012362int
12363main ()
12364{
12365setpgrp(0,0);
12366 ;
12367 return 0;
12368}
12369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012370if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012371
Matthias Kloseb9621712010-04-24 17:59:49 +000012372$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012373
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012376
12377fi
12378done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012379
Thomas Wouters3a584202000-08-05 23:28:51 +000012380for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012381do :
12382 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012383if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012384 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012385#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012388/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012389#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012390int
12391main ()
12392{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012393gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012394 ;
12395 return 0;
12396}
12397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012398if ac_fn_c_try_compile "$LINENO"; then :
12399
Guido van Rossum627b2d71993-12-24 10:39:16 +000012400else
Skip Montanaro6dead952003-09-25 14:50:04 +000012401
Matthias Kloseb9621712010-04-24 17:59:49 +000012402$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012403
Martin v. Löwis11437992002-04-12 09:54:03 +000012404
Guido van Rossum627b2d71993-12-24 10:39:16 +000012405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012407
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012408fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012409done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012410
Michael W. Hudson54241132001-12-07 15:38:26 +000012411
Victor Stinnere0be4232011-10-25 13:06:09 +020012412for ac_func in clock_gettime
12413do :
12414 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12415if test "x$ac_cv_func_clock_gettime" = xyes; then :
12416 cat >>confdefs.h <<_ACEOF
12417#define HAVE_CLOCK_GETTIME 1
12418_ACEOF
12419
12420else
12421
12422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12423$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12424if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12425 $as_echo_n "(cached) " >&6
12426else
12427 ac_check_lib_save_LIBS=$LIBS
12428LIBS="-lrt $LIBS"
12429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12430/* end confdefs.h. */
12431
12432/* Override any GCC internal prototype to avoid an error.
12433 Use char because int might match the return type of a GCC
12434 builtin and then its argument prototype would still apply. */
12435#ifdef __cplusplus
12436extern "C"
12437#endif
12438char clock_gettime ();
12439int
12440main ()
12441{
12442return clock_gettime ();
12443 ;
12444 return 0;
12445}
12446_ACEOF
12447if ac_fn_c_try_link "$LINENO"; then :
12448 ac_cv_lib_rt_clock_gettime=yes
12449else
12450 ac_cv_lib_rt_clock_gettime=no
12451fi
12452rm -f core conftest.err conftest.$ac_objext \
12453 conftest$ac_exeext conftest.$ac_ext
12454LIBS=$ac_check_lib_save_LIBS
12455fi
12456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12457$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12458if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12459
Victor Stinner7efb8332014-08-29 15:41:08 +020012460 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012461 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12462
12463
12464$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12465
12466
12467fi
12468
12469
12470fi
12471done
12472
12473
12474for ac_func in clock_getres
12475do :
12476 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12477if test "x$ac_cv_func_clock_getres" = xyes; then :
12478 cat >>confdefs.h <<_ACEOF
12479#define HAVE_CLOCK_GETRES 1
12480_ACEOF
12481
12482else
12483
12484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12485$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12486if ${ac_cv_lib_rt_clock_getres+:} false; then :
12487 $as_echo_n "(cached) " >&6
12488else
12489 ac_check_lib_save_LIBS=$LIBS
12490LIBS="-lrt $LIBS"
12491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12492/* end confdefs.h. */
12493
12494/* Override any GCC internal prototype to avoid an error.
12495 Use char because int might match the return type of a GCC
12496 builtin and then its argument prototype would still apply. */
12497#ifdef __cplusplus
12498extern "C"
12499#endif
12500char clock_getres ();
12501int
12502main ()
12503{
12504return clock_getres ();
12505 ;
12506 return 0;
12507}
12508_ACEOF
12509if ac_fn_c_try_link "$LINENO"; then :
12510 ac_cv_lib_rt_clock_getres=yes
12511else
12512 ac_cv_lib_rt_clock_getres=no
12513fi
12514rm -f core conftest.err conftest.$ac_objext \
12515 conftest$ac_exeext conftest.$ac_ext
12516LIBS=$ac_check_lib_save_LIBS
12517fi
12518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12519$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12520if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12521
12522 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12523
12524
12525fi
12526
12527
12528fi
12529done
12530
12531
Matthias Kloseb9621712010-04-24 17:59:49 +000012532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12533$as_echo_n "checking for major... " >&6; }
12534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012535/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012536
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012537#if defined(MAJOR_IN_MKDEV)
12538#include <sys/mkdev.h>
12539#elif defined(MAJOR_IN_SYSMACROS)
12540#include <sys/sysmacros.h>
12541#else
12542#include <sys/types.h>
12543#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012544
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012545int
12546main ()
12547{
12548
12549 makedev(major(0),minor(0));
12550
12551 ;
12552 return 0;
12553}
12554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012555if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012556
12557
Matthias Kloseb9621712010-04-24 17:59:49 +000012558$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012559
Matthias Kloseb9621712010-04-24 17:59:49 +000012560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12561$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012562
12563else
Skip Montanaro6dead952003-09-25 14:50:04 +000012564
Matthias Kloseb9621712010-04-24 17:59:49 +000012565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12566$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012567
12568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012569rm -f core conftest.err conftest.$ac_objext \
12570 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012571
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012572# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012573# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12575$as_echo_n "checking for getaddrinfo... " >&6; }
12576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012577/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012578
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012579#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012580#include <sys/socket.h>
12581#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012582#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012583
Martin v. Löwis11437992002-04-12 09:54:03 +000012584int
12585main ()
12586{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012587getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012588 ;
12589 return 0;
12590}
12591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012592if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012593 have_getaddrinfo=yes
12594else
Matthias Kloseb9621712010-04-24 17:59:49 +000012595 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012596fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012597rm -f core conftest.err conftest.$ac_objext \
12598 conftest$ac_exeext conftest.$ac_ext
12599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12600$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012601if test $have_getaddrinfo = yes
12602then
Matthias Kloseb9621712010-04-24 17:59:49 +000012603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12604$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012605 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012606 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012607else
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012609
12610if test "${enable_ipv6+set}" = set; then
12611 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12612else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012613 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012614fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012615else
Matthias Kloseb9621712010-04-24 17:59:49 +000012616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012617/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012618
Stefan Krah19c21392012-11-22 23:47:32 +010012619#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012620#include <sys/types.h>
12621#include <netdb.h>
12622#include <string.h>
12623#include <sys/socket.h>
12624#include <netinet/in.h>
12625
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012626int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012627{
12628 int passive, gaierr, inet4 = 0, inet6 = 0;
12629 struct addrinfo hints, *ai, *aitop;
12630 char straddr[INET6_ADDRSTRLEN], strport[16];
12631
12632 for (passive = 0; passive <= 1; passive++) {
12633 memset(&hints, 0, sizeof(hints));
12634 hints.ai_family = AF_UNSPEC;
12635 hints.ai_flags = passive ? AI_PASSIVE : 0;
12636 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012637 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012638 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12639 (void)gai_strerror(gaierr);
12640 goto bad;
12641 }
12642 for (ai = aitop; ai; ai = ai->ai_next) {
12643 if (ai->ai_addr == NULL ||
12644 ai->ai_addrlen == 0 ||
12645 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12646 straddr, sizeof(straddr), strport, sizeof(strport),
12647 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12648 goto bad;
12649 }
12650 switch (ai->ai_family) {
12651 case AF_INET:
12652 if (strcmp(strport, "54321") != 0) {
12653 goto bad;
12654 }
12655 if (passive) {
12656 if (strcmp(straddr, "0.0.0.0") != 0) {
12657 goto bad;
12658 }
12659 } else {
12660 if (strcmp(straddr, "127.0.0.1") != 0) {
12661 goto bad;
12662 }
12663 }
12664 inet4++;
12665 break;
12666 case AF_INET6:
12667 if (strcmp(strport, "54321") != 0) {
12668 goto bad;
12669 }
12670 if (passive) {
12671 if (strcmp(straddr, "::") != 0) {
12672 goto bad;
12673 }
12674 } else {
12675 if (strcmp(straddr, "::1") != 0) {
12676 goto bad;
12677 }
12678 }
12679 inet6++;
12680 break;
12681 case AF_UNSPEC:
12682 goto bad;
12683 break;
12684 default:
12685 /* another family support? */
12686 break;
12687 }
12688 }
12689 }
12690
12691 if (!(inet4 == 0 || inet4 == 2))
12692 goto bad;
12693 if (!(inet6 == 0 || inet6 == 2))
12694 goto bad;
12695
12696 if (aitop)
12697 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012698 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012699
12700 bad:
12701 if (aitop)
12702 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012703 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012704}
12705
Martin v. Löwis11437992002-04-12 09:54:03 +000012706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012707if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012708 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012709else
Matthias Kloseb9621712010-04-24 17:59:49 +000012710 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012711fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012712rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12713 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012715
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012716fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012717
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012719
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12721$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12722
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012723if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012724then
12725 if test $ipv6 = yes
12726 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012727 echo 'Fatal: You must get working getaddrinfo() function.'
12728 echo ' or you can specify "--disable-ipv6"'.
12729 exit 1
12730 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012731else
Martin v. Löwis11437992002-04-12 09:54:03 +000012732
Matthias Kloseb9621712010-04-24 17:59:49 +000012733$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012734
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012735fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012736
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012737for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012738do :
12739 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012740if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012741 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012742#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012743_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012744
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012745fi
12746done
12747
Michael W. Hudson54241132001-12-07 15:38:26 +000012748
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012749# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12751$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012752if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012753 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012754else
Matthias Kloseb9621712010-04-24 17:59:49 +000012755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012756/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012757#include <sys/types.h>
12758#include <sys/time.h>
12759#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012760
Martin v. Löwis11437992002-04-12 09:54:03 +000012761int
12762main ()
12763{
12764if ((struct tm *) 0)
12765return 0;
12766 ;
12767 return 0;
12768}
12769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012770if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012771 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012772else
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012776fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12778$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012779if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012780
Matthias Kloseb9621712010-04-24 17:59:49 +000012781$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012782
12783fi
12784
Matthias Kloseb9621712010-04-24 17:59:49 +000012785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12786$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012787if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012788 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012789else
Matthias Kloseb9621712010-04-24 17:59:49 +000012790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012791/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012792#include <sys/types.h>
12793#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012794
Martin v. Löwis11437992002-04-12 09:54:03 +000012795int
12796main ()
12797{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012798struct tm tm;
12799 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012800 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012801 ;
12802 return 0;
12803}
12804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012805if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012806 ac_cv_struct_tm=time.h
12807else
Matthias Kloseb9621712010-04-24 17:59:49 +000012808 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12813$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012814if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012815
Matthias Kloseb9621712010-04-24 17:59:49 +000012816$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012817
12818fi
12819
Matthias Kloseb9621712010-04-24 17:59:49 +000012820ac_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 +000012821#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012822
Matthias Kloseb9621712010-04-24 17:59:49 +000012823"
Victor Stinnere0be4232011-10-25 13:06:09 +020012824if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012825
12826cat >>confdefs.h <<_ACEOF
12827#define HAVE_STRUCT_TM_TM_ZONE 1
12828_ACEOF
12829
12830
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012831fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012832
Martin v. Löwis11437992002-04-12 09:54:03 +000012833if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12834
Matthias Kloseb9621712010-04-24 17:59:49 +000012835$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012836
12837else
Matthias Kloseb9621712010-04-24 17:59:49 +000012838 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12839"
Victor Stinnere0be4232011-10-25 13:06:09 +020012840if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012841 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012842else
Matthias Kloseb9621712010-04-24 17:59:49 +000012843 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012844fi
12845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012846cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012847#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012848_ACEOF
12849
Matthias Kloseb9621712010-04-24 17:59:49 +000012850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12851$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012852if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012853 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012854else
Matthias Kloseb9621712010-04-24 17:59:49 +000012855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012856/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012857#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012858#if !HAVE_DECL_TZNAME
12859extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012860#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012861
Martin v. Löwis11437992002-04-12 09:54:03 +000012862int
12863main ()
12864{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012865return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012866 ;
12867 return 0;
12868}
12869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012870if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012871 ac_cv_var_tzname=yes
12872else
Matthias Kloseb9621712010-04-24 17:59:49 +000012873 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012874fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012875rm -f core conftest.err conftest.$ac_objext \
12876 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012877fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12879$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012880 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012881
Matthias Kloseb9621712010-04-24 17:59:49 +000012882$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012883
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012884 fi
12885fi
12886
Matthias Kloseb9621712010-04-24 17:59:49 +000012887ac_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 +020012888if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012889
12890cat >>confdefs.h <<_ACEOF
12891#define HAVE_STRUCT_STAT_ST_RDEV 1
12892_ACEOF
12893
12894
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012895fi
12896
Matthias Kloseb9621712010-04-24 17:59:49 +000012897ac_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 +020012898if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012899
Martin v. Löwis11437992002-04-12 09:54:03 +000012900cat >>confdefs.h <<_ACEOF
12901#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12902_ACEOF
12903
12904
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012905fi
12906
Matthias Kloseb9621712010-04-24 17:59:49 +000012907ac_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 +020012908if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012909
12910cat >>confdefs.h <<_ACEOF
12911#define HAVE_STRUCT_STAT_ST_FLAGS 1
12912_ACEOF
12913
12914
12915fi
12916
Matthias Kloseb9621712010-04-24 17:59:49 +000012917ac_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 +020012918if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012919
12920cat >>confdefs.h <<_ACEOF
12921#define HAVE_STRUCT_STAT_ST_GEN 1
12922_ACEOF
12923
12924
12925fi
12926
Matthias Kloseb9621712010-04-24 17:59:49 +000012927ac_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 +020012928if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012929
12930cat >>confdefs.h <<_ACEOF
12931#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12932_ACEOF
12933
12934
12935fi
12936
Matthias Kloseb9621712010-04-24 17:59:49 +000012937ac_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 +020012938if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012939
Martin v. Löwis11437992002-04-12 09:54:03 +000012940cat >>confdefs.h <<_ACEOF
12941#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12942_ACEOF
12943
12944
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012945fi
12946
Stefan Krah267b6392016-04-26 01:09:18 +020012947ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12948 #include <sys/types.h>
12949 #include <pwd.h>
12950
12951"
12952if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12953
12954cat >>confdefs.h <<_ACEOF
12955#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12956_ACEOF
12957
12958
12959fi
12960ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12961 #include <sys/types.h>
12962 #include <pwd.h>
12963
12964"
12965if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12966
12967cat >>confdefs.h <<_ACEOF
12968#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12969_ACEOF
12970
12971
12972fi
12973
Michael W. Hudson54241132001-12-07 15:38:26 +000012974
Matthias Kloseb9621712010-04-24 17:59:49 +000012975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12976$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012977if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012978 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012979else
Matthias Kloseb159a552010-04-25 21:00:44 +000012980
Matthias Kloseb9621712010-04-24 17:59:49 +000012981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012982/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012983#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012984int
12985main ()
12986{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012987return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012988 ;
12989 return 0;
12990}
12991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012992if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012993 ac_cv_header_time_altzone=yes
12994else
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012999fi
13000
Matthias Kloseb9621712010-04-24 17:59:49 +000013001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13002$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013003if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013004
Matthias Kloseb9621712010-04-24 17:59:49 +000013005$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013006
13007fi
13008
Guido van Rossumda88dad1995-01-26 00:46:29 +000013009was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13011$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013013/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013014
13015#include <sys/types.h>
13016#include <sys/select.h>
13017#include <sys/time.h>
13018
Martin v. Löwis11437992002-04-12 09:54:03 +000013019int
13020main ()
13021{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013022;
Martin v. Löwis11437992002-04-12 09:54:03 +000013023 ;
13024 return 0;
13025}
13026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013027if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013028
13029
Matthias Kloseb9621712010-04-24 17:59:49 +000013030$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013031
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013032 was_it_defined=yes
13033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013034fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13037$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013038
Matthias Kloseb9621712010-04-24 17:59:49 +000013039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13040$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013041if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013042 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013043else
Matthias Kloseb9621712010-04-24 17:59:49 +000013044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013045/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013046#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013047int
13048main ()
13049{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013050struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013051 ;
13052 return 0;
13053}
13054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013055if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013056 ac_cv_struct_addrinfo=yes
13057else
Matthias Kloseb9621712010-04-24 17:59:49 +000013058 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013059fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13061fi
13062
Matthias Kloseb9621712010-04-24 17:59:49 +000013063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13064$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013065if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013066
Matthias Kloseb9621712010-04-24 17:59:49 +000013067$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013068
13069fi
13070
Matthias Kloseb9621712010-04-24 17:59:49 +000013071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13072$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013073if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013074 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013075else
Matthias Kloseb9621712010-04-24 17:59:49 +000013076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013077/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013078
13079# include <sys/types.h>
13080# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013081int
13082main ()
13083{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013084struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013085 ;
13086 return 0;
13087}
13088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013089if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013090 ac_cv_struct_sockaddr_storage=yes
13091else
Matthias Kloseb9621712010-04-24 17:59:49 +000013092 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13095fi
13096
Matthias Kloseb9621712010-04-24 17:59:49 +000013097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13098$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013099if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013100
Matthias Kloseb9621712010-04-24 17:59:49 +000013101$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013102
13103fi
13104
Guido van Rossum627b2d71993-12-24 10:39:16 +000013105# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013106
Matthias Kloseb9621712010-04-24 17:59:49 +000013107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13108$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013109if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013110 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013111else
Matthias Kloseb9621712010-04-24 17:59:49 +000013112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013114$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013115int
13116main ()
13117{
13118static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013119test_array [0] = 0;
13120return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013121
13122 ;
13123 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013124}
Martin v. Löwis11437992002-04-12 09:54:03 +000013125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013126if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013127 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013128else
Matthias Kloseb9621712010-04-24 17:59:49 +000013129 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13134$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013135if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013136 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013137
13138fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013139
Matthias Kloseb9621712010-04-24 17:59:49 +000013140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13141$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013142if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013143 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013144else
Matthias Kloseb9621712010-04-24 17:59:49 +000013145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013146/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013147
Martin v. Löwis11437992002-04-12 09:54:03 +000013148int
13149main ()
13150{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013151
Martin v. Löwis11437992002-04-12 09:54:03 +000013152#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013153 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013154 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013155 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013156 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013157 char const *const *pcpcc;
13158 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013159 /* NEC SVR4.0.2 mips cc rejects this. */
13160 struct point {int x, y;};
13161 static struct point const zero = {0,0};
13162 /* AIX XL C 1.02.0.0 rejects this.
13163 It does not let you subtract one const X* pointer from another in
13164 an arm of an if-expression whose if-part is not a constant
13165 expression */
13166 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013167 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013168 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013169 ++pcpcc;
13170 ppc = (char**) pcpcc;
13171 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013172 { /* SCO 3.2v4 cc rejects this sort of thing. */
13173 char tx;
13174 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013175 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013176
Martin v. Löwis11437992002-04-12 09:54:03 +000013177 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013178 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013179 }
13180 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13181 int x[] = {25, 17};
13182 const int *foo = &x[0];
13183 ++foo;
13184 }
13185 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13186 typedef const int *iptr;
13187 iptr p = 0;
13188 ++p;
13189 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013190 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013191 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013192 struct s { int j; const int *ap[3]; } bx;
13193 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013194 }
13195 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13196 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013197 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013198 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013199 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013200#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013201
Martin v. Löwis11437992002-04-12 09:54:03 +000013202 ;
13203 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013204}
Martin v. Löwis11437992002-04-12 09:54:03 +000013205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013206if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013207 ac_cv_c_const=yes
13208else
Matthias Kloseb9621712010-04-24 17:59:49 +000013209 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013210fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13214$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013215if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013216
Matthias Kloseb9621712010-04-24 17:59:49 +000013217$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013218
13219fi
13220
Michael W. Hudson54241132001-12-07 15:38:26 +000013221
Guido van Rossumda88dad1995-01-26 00:46:29 +000013222works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13224$as_echo_n "checking for working volatile... " >&6; }
13225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013226/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013227
Martin v. Löwis11437992002-04-12 09:54:03 +000013228int
13229main ()
13230{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013231volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013232 ;
13233 return 0;
13234}
13235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013236if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013237 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013238else
Skip Montanaro6dead952003-09-25 14:50:04 +000013239
Matthias Kloseb9621712010-04-24 17:59:49 +000013240$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013241
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013242
Guido van Rossum627b2d71993-12-24 10:39:16 +000013243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13246$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013247
Guido van Rossumda88dad1995-01-26 00:46:29 +000013248works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13250$as_echo_n "checking for working signed char... " >&6; }
13251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013252/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013253
Martin v. Löwis11437992002-04-12 09:54:03 +000013254int
13255main ()
13256{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013257signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013258 ;
13259 return 0;
13260}
13261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013262if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013263 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013264else
Skip Montanaro6dead952003-09-25 14:50:04 +000013265
Matthias Kloseb9621712010-04-24 17:59:49 +000013266$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013267
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013268
Guido van Rossum7f43da71994-08-01 12:15:30 +000013269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13272$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013273
Guido van Rossumda88dad1995-01-26 00:46:29 +000013274have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13276$as_echo_n "checking for prototypes... " >&6; }
13277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013278/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013279int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013280int
13281main ()
13282{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013283return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013284 ;
13285 return 0;
13286}
13287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013288if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013289
Matthias Kloseb9621712010-04-24 17:59:49 +000013290$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013291
Matthias Kloseb159a552010-04-25 21:00:44 +000013292 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13296$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013297
Guido van Rossumda88dad1995-01-26 00:46:29 +000013298works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13300$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013302/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013303
13304#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013305int foo(int x, ...) {
13306 va_list va;
13307 va_start(va, x);
13308 va_arg(va, int);
13309 va_arg(va, char *);
13310 va_arg(va, double);
13311 return 0;
13312}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013313
Martin v. Löwis11437992002-04-12 09:54:03 +000013314int
13315main ()
13316{
Guido van Rossum90eea071996-08-30 20:58:57 +000013317return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013318 ;
13319 return 0;
13320}
13321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013322if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013323
13324
Matthias Kloseb9621712010-04-24 17:59:49 +000013325$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013326
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013327 works=yes
13328
Guido van Rossum627b2d71993-12-24 10:39:16 +000013329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13332$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013333
Martin v. Löwisd6320502004-08-12 13:45:08 +000013334# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13336$as_echo_n "checking for socketpair... " >&6; }
13337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013338/* end confdefs.h. */
13339
13340#include <sys/types.h>
13341#include <sys/socket.h>
13342
13343int
13344main ()
13345{
13346void *x=socketpair
13347 ;
13348 return 0;
13349}
13350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013351if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013352
Matthias Kloseb9621712010-04-24 17:59:49 +000013353$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013354
Matthias Kloseb159a552010-04-25 21:00:44 +000013355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013356$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013357else
Matthias Kloseb9621712010-04-24 17:59:49 +000013358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13359$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013360
13361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013363
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013364# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13366$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013368/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013369#include <sys/types.h>
13370#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013371int
13372main ()
13373{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013374struct sockaddr x;
13375x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013376 ;
13377 return 0;
13378}
13379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013380if ac_fn_c_try_compile "$LINENO"; then :
13381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13382$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013383
Matthias Kloseb9621712010-04-24 17:59:49 +000013384$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013385
13386else
Matthias Kloseb9621712010-04-24 17:59:49 +000013387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13388$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013389
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013392
Guido van Rossumda88dad1995-01-26 00:46:29 +000013393va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13395$as_echo_n "checking whether va_list is an array... " >&6; }
13396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013397/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013398
13399#ifdef HAVE_STDARG_PROTOTYPES
13400#include <stdarg.h>
13401#else
13402#include <varargs.h>
13403#endif
13404
Martin v. Löwis11437992002-04-12 09:54:03 +000013405int
13406main ()
13407{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013408va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013409 ;
13410 return 0;
13411}
13412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013413if ac_fn_c_try_compile "$LINENO"; then :
13414
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013415else
Skip Montanaro6dead952003-09-25 14:50:04 +000013416
Martin v. Löwis11437992002-04-12 09:54:03 +000013417
Matthias Kloseb9621712010-04-24 17:59:49 +000013418$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013419
Guido van Rossumda88dad1995-01-26 00:46:29 +000013420 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013421
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13425$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013426
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013427# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013428
13429
Matthias Kloseb9621712010-04-24 17:59:49 +000013430ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013431if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013432
Matthias Kloseb9621712010-04-24 17:59:49 +000013433 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013434
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13436$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013437 OLD_CFLAGS=$CFLAGS
13438 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013440/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013441
13442# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013443
Martin v. Löwis11437992002-04-12 09:54:03 +000013444int
13445main ()
13446{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013447
13448 char *name;
13449 struct hostent *he, *res;
13450 char buffer[2048];
13451 int buflen = 2048;
13452 int h_errnop;
13453
13454 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013455
13456 ;
13457 return 0;
13458}
13459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013460if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013461
Matthias Kloseb9621712010-04-24 17:59:49 +000013462 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013463
Martin v. Löwis11437992002-04-12 09:54:03 +000013464
Matthias Kloseb9621712010-04-24 17:59:49 +000013465$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013466
Matthias Kloseb9621712010-04-24 17:59:49 +000013467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13468$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013469
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013470else
Skip Montanaro6dead952003-09-25 14:50:04 +000013471
Matthias Kloseb9621712010-04-24 17:59:49 +000013472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13473$as_echo "no" >&6; }
13474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13475$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013477/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013478
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013479# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013480
Martin v. Löwis11437992002-04-12 09:54:03 +000013481int
13482main ()
13483{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013484
13485 char *name;
13486 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013487 char buffer[2048];
13488 int buflen = 2048;
13489 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013490
Matthias Kloseb159a552010-04-25 21:00:44 +000013491 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013492
13493 ;
13494 return 0;
13495}
13496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013497if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013498
Matthias Kloseb9621712010-04-24 17:59:49 +000013499 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013500
Martin v. Löwis11437992002-04-12 09:54:03 +000013501
Matthias Kloseb159a552010-04-25 21:00:44 +000013502$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013503
Matthias Kloseb9621712010-04-24 17:59:49 +000013504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13505$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013506
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013507else
Skip Montanaro6dead952003-09-25 14:50:04 +000013508
Matthias Kloseb9621712010-04-24 17:59:49 +000013509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13510$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13512$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13514/* end confdefs.h. */
13515
13516# include <netdb.h>
13517
13518int
13519main ()
13520{
13521
13522 char *name;
13523 struct hostent *he;
13524 struct hostent_data data;
13525
13526 (void) gethostbyname_r(name, he, &data);
13527
13528 ;
13529 return 0;
13530}
13531_ACEOF
13532if ac_fn_c_try_compile "$LINENO"; then :
13533
13534 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13535
13536
13537$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13538
13539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13540$as_echo "yes" >&6; }
13541
13542else
13543
13544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13545$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013546
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013549
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013552
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013555 CFLAGS=$OLD_CFLAGS
13556
13557else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013558
Matthias Kloseb9621712010-04-24 17:59:49 +000013559 for ac_func in gethostbyname
13560do :
13561 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013562if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013563 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013564#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013565_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013566
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013567fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013568done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013569
Michael W. Hudson54241132001-12-07 15:38:26 +000013570
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013571fi
13572
Michael W. Hudson54241132001-12-07 15:38:26 +000013573
13574
13575
13576
13577
13578
Guido van Rossum627b2d71993-12-24 10:39:16 +000013579# checks for system services
13580# (none yet)
13581
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013582# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013583ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013584if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013585
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013586else
Matthias Kloseb9621712010-04-24 17:59:49 +000013587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13588$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013589if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013590 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013591else
Martin v. Löwis11437992002-04-12 09:54:03 +000013592 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013593LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013595/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013597/* Override any GCC internal prototype to avoid an error.
13598 Use char because int might match the return type of a GCC
13599 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013600#ifdef __cplusplus
13601extern "C"
13602#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013603char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013604int
13605main ()
13606{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013607return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013608 ;
13609 return 0;
13610}
13611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013612if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013613 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013614else
Matthias Kloseb9621712010-04-24 17:59:49 +000013615 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013616fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013617rm -f core conftest.err conftest.$ac_objext \
13618 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013619LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013620fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13622$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013623if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013624 cat >>confdefs.h <<_ACEOF
13625#define HAVE_LIBIEEE 1
13626_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013627
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013628 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013629
Guido van Rossum627b2d71993-12-24 10:39:16 +000013630fi
13631
Michael W. Hudson54241132001-12-07 15:38:26 +000013632
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013633fi
13634
Michael W. Hudson54241132001-12-07 15:38:26 +000013635
Guido van Rossum7f253911997-05-09 02:42:48 +000013636# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13638$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013640# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013641if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013642 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013643if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013644then
13645
Matthias Kloseb9621712010-04-24 17:59:49 +000013646$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013647
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13649$as_echo "yes" >&6; }
13650else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13651$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013652fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013653else
Matthias Kloseb9621712010-04-24 17:59:49 +000013654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13655$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013656fi
13657
Guido van Rossum7f253911997-05-09 02:42:48 +000013658
Guido van Rossum7f43da71994-08-01 12:15:30 +000013659# check for --with-libm=...
13660
Guido van Rossum563e7081996-09-10 18:20:48 +000013661case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013662Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013663*) LIBM=-lm
13664esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13666$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013668# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013669if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013670 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013671if test "$withval" = no
13672then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13674$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013675elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013676then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13678$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013679else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013680fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013681else
Matthias Kloseb9621712010-04-24 17:59:49 +000013682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13683$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013684fi
13685
Guido van Rossum7f43da71994-08-01 12:15:30 +000013686
13687# check for --with-libc=...
13688
Matthias Kloseb9621712010-04-24 17:59:49 +000013689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13690$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013691
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013692# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013693if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013694 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013695if test "$withval" = no
13696then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13698$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013699elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013700then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13702$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013703else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013704fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013705else
Matthias Kloseb9621712010-04-24 17:59:49 +000013706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13707$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013708fi
13709
Guido van Rossum7f43da71994-08-01 12:15:30 +000013710
Stefan Krah1919b7e2012-03-21 18:25:23 +010013711# **************************************
13712# * Check for gcc x64 inline assembler *
13713# **************************************
13714
13715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13716$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13718/* end confdefs.h. */
13719
13720int
13721main ()
13722{
13723
13724 __asm__ __volatile__ ("movq %rcx, %rax");
13725
13726 ;
13727 return 0;
13728}
13729_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013730if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013731 have_gcc_asm_for_x64=yes
13732else
13733 have_gcc_asm_for_x64=no
13734fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013735rm -f core conftest.err conftest.$ac_objext \
13736 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13738$as_echo "$have_gcc_asm_for_x64" >&6; }
13739if test "$have_gcc_asm_for_x64" = yes
13740then
13741
13742$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13743
13744fi
13745
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013746# **************************************************
13747# * Check for various properties of floating point *
13748# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013749
Matthias Kloseb9621712010-04-24 17:59:49 +000013750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13751$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013752if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013753 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013754else
13755
Matthias Kloseb9621712010-04-24 17:59:49 +000013756if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013757 ac_cv_little_endian_double=no
13758else
Matthias Kloseb9621712010-04-24 17:59:49 +000013759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013760/* end confdefs.h. */
13761
13762#include <string.h>
13763int main() {
13764 double x = 9006104071832581.0;
13765 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13766 return 0;
13767 else
13768 return 1;
13769}
13770
13771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013772if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013773 ac_cv_little_endian_double=yes
13774else
Matthias Kloseb9621712010-04-24 17:59:49 +000013775 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013776fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13778 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013779fi
13780
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013781fi
13782
Matthias Kloseb9621712010-04-24 17:59:49 +000013783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13784$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013785if test "$ac_cv_little_endian_double" = yes
13786then
13787
Matthias Kloseb9621712010-04-24 17:59:49 +000013788$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013789
13790fi
13791
Matthias Kloseb9621712010-04-24 17:59:49 +000013792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13793$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013794if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013795 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013796else
13797
Matthias Kloseb9621712010-04-24 17:59:49 +000013798if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013799 ac_cv_big_endian_double=no
13800else
Matthias Kloseb9621712010-04-24 17:59:49 +000013801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013802/* end confdefs.h. */
13803
13804#include <string.h>
13805int main() {
13806 double x = 9006104071832581.0;
13807 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13808 return 0;
13809 else
13810 return 1;
13811}
13812
13813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013814if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013815 ac_cv_big_endian_double=yes
13816else
Matthias Kloseb9621712010-04-24 17:59:49 +000013817 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013818fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013819rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13820 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013821fi
13822
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013823fi
13824
Matthias Kloseb9621712010-04-24 17:59:49 +000013825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13826$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013827if test "$ac_cv_big_endian_double" = yes
13828then
13829
Matthias Kloseb9621712010-04-24 17:59:49 +000013830$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013831
13832fi
13833
13834# Some ARM platforms use a mixed-endian representation for doubles.
13835# While Python doesn't currently have full support for these platforms
13836# (see e.g., issue 1762561), we can at least make sure that float <-> string
13837# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13839$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013840if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013841 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013842else
13843
Matthias Kloseb9621712010-04-24 17:59:49 +000013844if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013845 ac_cv_mixed_endian_double=no
13846else
Matthias Kloseb9621712010-04-24 17:59:49 +000013847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013848/* end confdefs.h. */
13849
13850#include <string.h>
13851int main() {
13852 double x = 9006104071832581.0;
13853 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13854 return 0;
13855 else
13856 return 1;
13857}
13858
13859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013860if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013861 ac_cv_mixed_endian_double=yes
13862else
Matthias Kloseb9621712010-04-24 17:59:49 +000013863 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013864fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013865rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13866 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013867fi
13868
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013869fi
13870
Matthias Kloseb9621712010-04-24 17:59:49 +000013871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13872$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013873if test "$ac_cv_mixed_endian_double" = yes
13874then
13875
Matthias Kloseb9621712010-04-24 17:59:49 +000013876$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013877
13878fi
13879
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013880# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013881# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013882# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013883# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013884# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013885# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013886
13887# This inline assembler syntax may also work for suncc and icc,
13888# so we try it on all platforms.
13889
Matthias Kloseb9621712010-04-24 17:59:49 +000013890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13891$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013893/* end confdefs.h. */
13894
13895int
13896main ()
13897{
13898
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013899 unsigned short cw;
13900 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13901 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013902
13903 ;
13904 return 0;
13905}
13906_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013907if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013908 have_gcc_asm_for_x87=yes
13909else
Matthias Kloseb9621712010-04-24 17:59:49 +000013910 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013911fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013912rm -f core conftest.err conftest.$ac_objext \
13913 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13915$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013916if test "$have_gcc_asm_for_x87" = yes
13917then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013918
Matthias Kloseb9621712010-04-24 17:59:49 +000013919$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013920
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013921fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013922
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13924$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13926/* end confdefs.h. */
13927
13928int
13929main ()
13930{
13931
13932 unsigned int fpcr;
13933 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13934 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13935
13936 ;
13937 return 0;
13938}
13939_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013940if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013941 have_gcc_asm_for_mc68881=yes
13942else
13943 have_gcc_asm_for_mc68881=no
13944fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013945rm -f core conftest.err conftest.$ac_objext \
13946 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13948$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13949if test "$have_gcc_asm_for_mc68881" = yes
13950then
13951
13952$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13953
13954fi
13955
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013956# Detect whether system arithmetic is subject to x87-style double
13957# rounding issues. The result of this test has little meaning on non
13958# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13959# mode is round-to-nearest and double rounding issues are present, and
13960# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13962$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013963# $BASECFLAGS may affect the result
13964ac_save_cc="$CC"
13965CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013966if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013967 ac_cv_x87_double_rounding=no
13968else
Matthias Kloseb9621712010-04-24 17:59:49 +000013969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013970/* end confdefs.h. */
13971
13972#include <stdlib.h>
13973#include <math.h>
13974int main() {
13975 volatile double x, y, z;
13976 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13977 x = 0.99999999999999989; /* 1-2**-53 */
13978 y = 1./x;
13979 if (y != 1.)
13980 exit(0);
13981 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13982 x = 1e16;
13983 y = 2.99999;
13984 z = x + y;
13985 if (z != 1e16+4.)
13986 exit(0);
13987 /* both tests show evidence of double rounding */
13988 exit(1);
13989}
13990
13991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013992if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013993 ac_cv_x87_double_rounding=no
13994else
Matthias Kloseb9621712010-04-24 17:59:49 +000013995 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013996fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13998 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013999fi
14000
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014001CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14003$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014004if test "$ac_cv_x87_double_rounding" = yes
14005then
14006
Matthias Kloseb9621712010-04-24 17:59:49 +000014007$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014008
14009fi
14010
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014011# ************************************
14012# * Check for mathematical functions *
14013# ************************************
14014
14015LIBS_SAVE=$LIBS
14016LIBS="$LIBS $LIBM"
14017
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014018for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14019do :
14020 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14021ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014022if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014023 cat >>confdefs.h <<_ACEOF
14024#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14025_ACEOF
14026
14027fi
14028done
14029
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014030for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014031do :
14032 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14033ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014034if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014035 cat >>confdefs.h <<_ACEOF
14036#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14037_ACEOF
14038
14039fi
14040done
14041
14042ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14043"
Victor Stinnere0be4232011-10-25 13:06:09 +020014044if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014045 ac_have_decl=1
14046else
14047 ac_have_decl=0
14048fi
14049
14050cat >>confdefs.h <<_ACEOF
14051#define HAVE_DECL_ISINF $ac_have_decl
14052_ACEOF
14053ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14054"
Victor Stinnere0be4232011-10-25 13:06:09 +020014055if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014056 ac_have_decl=1
14057else
14058 ac_have_decl=0
14059fi
14060
14061cat >>confdefs.h <<_ACEOF
14062#define HAVE_DECL_ISNAN $ac_have_decl
14063_ACEOF
14064ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14065"
Victor Stinnere0be4232011-10-25 13:06:09 +020014066if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014067 ac_have_decl=1
14068else
14069 ac_have_decl=0
14070fi
14071
14072cat >>confdefs.h <<_ACEOF
14073#define HAVE_DECL_ISFINITE $ac_have_decl
14074_ACEOF
14075
14076
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014077# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14078# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14080$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014081if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014082 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014083else
14084
Matthias Kloseb9621712010-04-24 17:59:49 +000014085if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014086 ac_cv_tanh_preserves_zero_sign=no
14087else
Matthias Kloseb9621712010-04-24 17:59:49 +000014088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014089/* end confdefs.h. */
14090
14091#include <math.h>
14092#include <stdlib.h>
14093int main() {
14094 /* return 0 if either negative zeros don't exist
14095 on this platform or if negative zeros exist
14096 and tanh(-0.) == -0. */
14097 if (atan2(0., -1.) == atan2(-0., -1.) ||
14098 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14099 else exit(1);
14100}
14101
14102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014103if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014104 ac_cv_tanh_preserves_zero_sign=yes
14105else
Matthias Kloseb9621712010-04-24 17:59:49 +000014106 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014107fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014108rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14109 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014110fi
14111
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014112fi
14113
Matthias Kloseb9621712010-04-24 17:59:49 +000014114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14115$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014116if test "$ac_cv_tanh_preserves_zero_sign" = yes
14117then
14118
Matthias Kloseb9621712010-04-24 17:59:49 +000014119$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014120
14121fi
14122
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014123if test "$ac_cv_func_log1p" = yes
14124then
14125 # On some versions of AIX, log1p(-0.) returns 0. instead of
14126 # -0. See issue #9920.
14127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14128$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014129 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014130 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014131else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014132
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014133 if test "$cross_compiling" = yes; then :
14134 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014135else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14137/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014138
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014139 #include <math.h>
14140 #include <stdlib.h>
14141 int main() {
14142 /* Fail if the signs of log1p(-0.) and -0. can be
14143 distinguished. */
14144 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14145 return 0;
14146 else
14147 return 1;
14148 }
14149
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014150_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014151if ac_fn_c_try_run "$LINENO"; then :
14152 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014153else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014154 ac_cv_log1p_drops_zero_sign=yes
14155fi
14156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14157 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014158fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014159
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014160fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014161
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14163$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14164fi
14165if test "$ac_cv_log1p_drops_zero_sign" = yes
14166then
14167
14168$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14169
14170fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014171
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014172LIBS=$LIBS_SAVE
14173
Mark Dickinsona614f042009-11-28 12:48:43 +000014174# For multiprocessing module, check that sem_open
14175# actually works. For FreeBSD versions <= 7.2,
14176# the kernel module that provides POSIX semaphores
14177# isn't loaded by default, so an attempt to call
14178# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14180$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014181if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014182 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014183else
Matthias Kloseb9621712010-04-24 17:59:49 +000014184 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014185 ac_cv_posix_semaphores_enabled=yes
14186else
Matthias Kloseb9621712010-04-24 17:59:49 +000014187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014188/* end confdefs.h. */
14189
14190#include <unistd.h>
14191#include <fcntl.h>
14192#include <stdio.h>
14193#include <semaphore.h>
14194#include <sys/stat.h>
14195
14196int main(void) {
14197 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14198 if (a == SEM_FAILED) {
14199 perror("sem_open");
14200 return 1;
14201 }
14202 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014203 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014204 return 0;
14205}
14206
14207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014208if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014209 ac_cv_posix_semaphores_enabled=yes
14210else
Matthias Kloseb9621712010-04-24 17:59:49 +000014211 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014213rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14214 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014215fi
14216
14217
Mark Dickinsona614f042009-11-28 12:48:43 +000014218fi
14219
Matthias Kloseb9621712010-04-24 17:59:49 +000014220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14221$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014222if test $ac_cv_posix_semaphores_enabled = no
14223then
14224
Matthias Kloseb9621712010-04-24 17:59:49 +000014225$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014226
14227fi
14228
Mark Dickinson10683072009-04-18 21:18:19 +000014229# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14231$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014232if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014233 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014234else
Matthias Kloseb9621712010-04-24 17:59:49 +000014235 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014236 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014237else
Matthias Kloseb9621712010-04-24 17:59:49 +000014238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014239/* end confdefs.h. */
14240
14241#include <unistd.h>
14242#include <fcntl.h>
14243#include <stdio.h>
14244#include <semaphore.h>
14245#include <sys/stat.h>
14246
14247int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014248 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014249 int count;
14250 int res;
14251 if(a==SEM_FAILED){
14252 perror("sem_open");
14253 return 1;
14254
14255 }
14256 res = sem_getvalue(a, &count);
14257 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014258 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014259 return res==-1 ? 1 : 0;
14260}
14261
Mark Dickinson10683072009-04-18 21:18:19 +000014262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014263if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014264 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014265else
Matthias Kloseb9621712010-04-24 17:59:49 +000014266 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014267fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014268rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14269 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014270fi
14271
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014272
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014273fi
14274
Matthias Kloseb9621712010-04-24 17:59:49 +000014275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14276$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014277if test $ac_cv_broken_sem_getvalue = yes
14278then
14279
Matthias Kloseb9621712010-04-24 17:59:49 +000014280$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014281
14282fi
14283
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014284ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14285"
14286if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14287 ac_have_decl=1
14288else
14289 ac_have_decl=0
14290fi
14291
14292cat >>confdefs.h <<_ACEOF
14293#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14294_ACEOF
14295ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14296"
14297if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14298 ac_have_decl=1
14299else
14300 ac_have_decl=0
14301fi
14302
14303cat >>confdefs.h <<_ACEOF
14304#define HAVE_DECL_RTLD_NOW $ac_have_decl
14305_ACEOF
14306ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14307"
14308if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14309 ac_have_decl=1
14310else
14311 ac_have_decl=0
14312fi
14313
14314cat >>confdefs.h <<_ACEOF
14315#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14316_ACEOF
14317ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14318"
14319if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14320 ac_have_decl=1
14321else
14322 ac_have_decl=0
14323fi
14324
14325cat >>confdefs.h <<_ACEOF
14326#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14327_ACEOF
14328ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14329"
14330if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14331 ac_have_decl=1
14332else
14333 ac_have_decl=0
14334fi
14335
14336cat >>confdefs.h <<_ACEOF
14337#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14338_ACEOF
14339ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14340"
14341if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14342 ac_have_decl=1
14343else
14344 ac_have_decl=0
14345fi
14346
14347cat >>confdefs.h <<_ACEOF
14348#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14349_ACEOF
14350ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14351"
14352if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14353 ac_have_decl=1
14354else
14355 ac_have_decl=0
14356fi
14357
14358cat >>confdefs.h <<_ACEOF
14359#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14360_ACEOF
14361
14362
Mark Dickinsonbd792642009-03-18 20:06:12 +000014363# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14365$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014366# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014367if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014368 enableval=$enable_big_digits; case $enable_big_digits in
14369yes)
14370 enable_big_digits=30 ;;
14371no)
14372 enable_big_digits=15 ;;
1437315|30)
14374 ;;
14375*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014376 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 +000014377esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14379$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014380
14381cat >>confdefs.h <<_ACEOF
14382#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14383_ACEOF
14384
14385
14386else
Matthias Kloseb9621712010-04-24 17:59:49 +000014387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14388$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014389fi
14390
14391
Guido van Rossumef2255b2000-03-10 22:30:29 +000014392# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014393ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014394if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014395
14396
Matthias Kloseb9621712010-04-24 17:59:49 +000014397$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014398
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014399 wchar_h="yes"
14400
Guido van Rossumef2255b2000-03-10 22:30:29 +000014401else
Martin v. Löwis11437992002-04-12 09:54:03 +000014402 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014403
14404fi
14405
Michael W. Hudson54241132001-12-07 15:38:26 +000014406
Martin v. Löwis11437992002-04-12 09:54:03 +000014407
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014408# determine wchar_t size
14409if test "$wchar_h" = yes
14410then
Matthias Kloseb9621712010-04-24 17:59:49 +000014411 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014412# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14413# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14414# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14416$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014417if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014418 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014419else
Matthias Kloseb9621712010-04-24 17:59:49 +000014420 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14421"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014422
Martin v. Löwis11437992002-04-12 09:54:03 +000014423else
Matthias Kloseb9621712010-04-24 17:59:49 +000014424 if test "$ac_cv_type_wchar_t" = yes; then
14425 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14426$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014427as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014428See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014429 else
14430 ac_cv_sizeof_wchar_t=0
14431 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014432fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014433
Martin v. Löwis11437992002-04-12 09:54:03 +000014434fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14436$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014437
14438
14439
Martin v. Löwis11437992002-04-12 09:54:03 +000014440cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014441#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014442_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014443
Michael W. Hudson54241132001-12-07 15:38:26 +000014444
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014445fi
14446
Matthias Kloseb9621712010-04-24 17:59:49 +000014447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14448$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014449have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014451/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014452
14453#include <tcl.h>
14454#if TCL_UTF_MAX != 6
14455# error "NOT UCS4_TCL"
14456#endif
14457int
14458main ()
14459{
14460
14461 ;
14462 return 0;
14463}
14464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014465if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014466
14467
Matthias Kloseb9621712010-04-24 17:59:49 +000014468$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014469
14470 have_ucs4_tcl=yes
14471
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14475$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014476
Skip Montanaro6dead952003-09-25 14:50:04 +000014477# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014478if test "$wchar_h" = yes
14479then
14480 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14482$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014483 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014484 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014485else
14486
Matthias Kloseb9621712010-04-24 17:59:49 +000014487 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014488 ac_cv_wchar_t_signed=yes
14489else
Matthias Kloseb9621712010-04-24 17:59:49 +000014490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014491/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014492
14493 #include <wchar.h>
14494 int main()
14495 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014496 /* Success: exit code 0 */
14497 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014498 }
14499
14500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014501if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014502 ac_cv_wchar_t_signed=yes
14503else
Matthias Kloseb9621712010-04-24 17:59:49 +000014504 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014505fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14507 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014508fi
14509
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014510fi
14511
Matthias Kloseb9621712010-04-24 17:59:49 +000014512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14513$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014514fi
14515
Georg Brandl52d168a2008-01-07 18:10:24 +000014516# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014517if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014518 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014519then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014520 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014521
Matthias Kloseb9621712010-04-24 17:59:49 +000014522$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014523
Georg Brandl52d168a2008-01-07 18:10:24 +000014524else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014525 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014526fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14528$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014529
14530# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14532$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014533if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014534 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014535else
Matthias Kloseb9621712010-04-24 17:59:49 +000014536 ac_cv_c_bigendian=unknown
14537 # See if we're dealing with a universal compiler.
14538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14539/* end confdefs.h. */
14540#ifndef __APPLE_CC__
14541 not a universal capable compiler
14542 #endif
14543 typedef int dummy;
14544
Skip Montanaro6dead952003-09-25 14:50:04 +000014545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014546if ac_fn_c_try_compile "$LINENO"; then :
14547
14548 # Check for potential -arch flags. It is not universal unless
14549 # there are at least two -arch flags with different values.
14550 ac_arch=
14551 ac_prev=
14552 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14553 if test -n "$ac_prev"; then
14554 case $ac_word in
14555 i?86 | x86_64 | ppc | ppc64)
14556 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14557 ac_arch=$ac_word
14558 else
14559 ac_cv_c_bigendian=universal
14560 break
14561 fi
14562 ;;
14563 esac
14564 ac_prev=
14565 elif test "x$ac_word" = "x-arch"; then
14566 ac_prev=arch
14567 fi
14568 done
14569fi
14570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14571 if test $ac_cv_c_bigendian = unknown; then
14572 # See if sys/param.h defines the BYTE_ORDER macro.
14573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014574/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014575#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014576 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014577
Martin v. Löwis11437992002-04-12 09:54:03 +000014578int
14579main ()
14580{
Matthias Kloseb9621712010-04-24 17:59:49 +000014581#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14582 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14583 && LITTLE_ENDIAN)
14584 bogus endian macros
14585 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014586
14587 ;
14588 return 0;
14589}
14590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014591if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014592 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014594/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014595#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014596 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014597
Martin v. Löwis11437992002-04-12 09:54:03 +000014598int
14599main ()
14600{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014601#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014602 not big endian
14603 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014604
14605 ;
14606 return 0;
14607}
14608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014609if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014610 ac_cv_c_bigendian=yes
14611else
Matthias Kloseb9621712010-04-24 17:59:49 +000014612 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014615fi
14616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14617 fi
14618 if test $ac_cv_c_bigendian = unknown; then
14619 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014621/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014622#include <limits.h>
14623
Martin v. Löwis11437992002-04-12 09:54:03 +000014624int
14625main ()
14626{
Matthias Kloseb9621712010-04-24 17:59:49 +000014627#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14628 bogus endian macros
14629 #endif
14630
Martin v. Löwis11437992002-04-12 09:54:03 +000014631 ;
14632 return 0;
14633}
14634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014635if ac_fn_c_try_compile "$LINENO"; then :
14636 # It does; now see whether it defined to _BIG_ENDIAN or not.
14637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14638/* end confdefs.h. */
14639#include <limits.h>
14640
14641int
14642main ()
14643{
14644#ifndef _BIG_ENDIAN
14645 not big endian
14646 #endif
14647
14648 ;
14649 return 0;
14650}
14651_ACEOF
14652if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014653 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014654else
Matthias Kloseb9621712010-04-24 17:59:49 +000014655 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14658fi
14659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14660 fi
14661 if test $ac_cv_c_bigendian = unknown; then
14662 # Compile a test program.
14663 if test "$cross_compiling" = yes; then :
14664 # Try to guess by grepping values from an object file.
14665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14666/* end confdefs.h. */
14667short int ascii_mm[] =
14668 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14669 short int ascii_ii[] =
14670 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14671 int use_ascii (int i) {
14672 return ascii_mm[i] + ascii_ii[i];
14673 }
14674 short int ebcdic_ii[] =
14675 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14676 short int ebcdic_mm[] =
14677 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14678 int use_ebcdic (int i) {
14679 return ebcdic_mm[i] + ebcdic_ii[i];
14680 }
14681 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682
Matthias Kloseb9621712010-04-24 17:59:49 +000014683int
14684main ()
14685{
14686return use_ascii (foo) == use_ebcdic (foo);
14687 ;
14688 return 0;
14689}
14690_ACEOF
14691if ac_fn_c_try_compile "$LINENO"; then :
14692 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14693 ac_cv_c_bigendian=yes
14694 fi
14695 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14696 if test "$ac_cv_c_bigendian" = unknown; then
14697 ac_cv_c_bigendian=no
14698 else
14699 # finding both strings is unlikely to happen, but who knows?
14700 ac_cv_c_bigendian=unknown
14701 fi
14702 fi
14703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014705else
Matthias Kloseb9621712010-04-24 17:59:49 +000014706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014707/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014708$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014709int
14710main ()
14711{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014712
Matthias Kloseb9621712010-04-24 17:59:49 +000014713 /* Are we little or big endian? From Harbison&Steele. */
14714 union
14715 {
14716 long int l;
14717 char c[sizeof (long int)];
14718 } u;
14719 u.l = 1;
14720 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014721
14722 ;
14723 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014724}
Martin v. Löwis11437992002-04-12 09:54:03 +000014725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014726if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014727 ac_cv_c_bigendian=no
14728else
Matthias Kloseb9621712010-04-24 17:59:49 +000014729 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014730fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014731rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14732 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014734
Matthias Kloseb9621712010-04-24 17:59:49 +000014735 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14738$as_echo "$ac_cv_c_bigendian" >&6; }
14739 case $ac_cv_c_bigendian in #(
14740 yes)
14741 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14742;; #(
14743 no)
14744 ;; #(
14745 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014746
Matthias Kloseb9621712010-04-24 17:59:49 +000014747$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014748
Matthias Kloseb9621712010-04-24 17:59:49 +000014749 ;; #(
14750 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014751 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014752 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014753 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014754
Michael W. Hudson54241132001-12-07 15:38:26 +000014755
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014756# ABI version string for Python extension modules. This appears between the
14757# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14758# from the following attributes which affect the ABI of this Python build (in
14759# this order):
14760#
14761# * The Python implementation (always 'cpython-' for us)
14762# * The major and minor version numbers
14763# * --with-pydebug (adds a 'd')
14764# * --with-pymalloc (adds a 'm')
14765# * --with-wide-unicode (adds a 'u')
14766#
14767# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014768# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14769# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014770
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14772$as_echo_n "checking ABIFLAGS... " >&6; }
14773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14774$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14776$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014777SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14779$as_echo "$SOABI" >&6; }
14780
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014781
14782case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014783 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014784 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14785 *)
14786 EXT_SUFFIX=${SHLIB_SUFFIX};;
14787esac
14788
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14790$as_echo_n "checking LDVERSION... " >&6; }
14791LDVERSION='$(VERSION)$(ABIFLAGS)'
14792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14793$as_echo "$LDVERSION" >&6; }
14794
doko@python.org87421192013-01-26 11:39:31 +010014795
doko@ubuntu.com55532312016-06-14 08:55:19 +020014796if test x$PLATFORM_TRIPLET = x; then
14797 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14798else
14799 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14800fi
doko@python.org87421192013-01-26 11:39:31 +010014801
14802
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014803# Check whether right shifting a negative integer extends the sign bit
14804# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14806$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014807if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014808 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014809else
Martin v. Löwis11437992002-04-12 09:54:03 +000014810
Matthias Kloseb9621712010-04-24 17:59:49 +000014811if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014812 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014813else
Matthias Kloseb9621712010-04-24 17:59:49 +000014814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014815/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014816
14817int main()
14818{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014819 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014820}
14821
Martin v. Löwis11437992002-04-12 09:54:03 +000014822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014823if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014824 ac_cv_rshift_extends_sign=yes
14825else
Matthias Kloseb9621712010-04-24 17:59:49 +000014826 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014827fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14829 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014830fi
14831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014832fi
14833
Matthias Kloseb9621712010-04-24 17:59:49 +000014834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14835$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014836if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014837then
Martin v. Löwis11437992002-04-12 09:54:03 +000014838
Matthias Kloseb9621712010-04-24 17:59:49 +000014839$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014840
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014841fi
14842
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014843# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14845$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014846if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014847 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014848else
Martin v. Löwis11437992002-04-12 09:54:03 +000014849
Matthias Kloseb9621712010-04-24 17:59:49 +000014850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014851/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014852#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014853int
14854main ()
14855{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014856
14857 FILE *f = fopen("/dev/null", "r");
14858 flockfile(f);
14859 getc_unlocked(f);
14860 funlockfile(f);
14861
Martin v. Löwis11437992002-04-12 09:54:03 +000014862 ;
14863 return 0;
14864}
14865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014866if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014867 ac_cv_have_getc_unlocked=yes
14868else
Matthias Kloseb9621712010-04-24 17:59:49 +000014869 ac_cv_have_getc_unlocked=no
14870fi
14871rm -f core conftest.err conftest.$ac_objext \
14872 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014874
Matthias Kloseb9621712010-04-24 17:59:49 +000014875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14876$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014877if test "$ac_cv_have_getc_unlocked" = yes
14878then
Martin v. Löwis11437992002-04-12 09:54:03 +000014879
Matthias Kloseb9621712010-04-24 17:59:49 +000014880$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014881
14882fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014883
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014884# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014885# save the value of LIBS so we don't actually link Python with readline
14886LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014887
Gregory P. Smith18820942008-09-07 06:24:49 +000014888# On some systems we need to link readline to a termcap compatible
14889# library. NOTE: Keep the precedence of listed libraries synchronised
14890# with setup.py.
14891py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14893$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014894for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014895 if test -z "$py_libtermcap"; then
14896 READLINE_LIBS="-lreadline"
14897 else
14898 READLINE_LIBS="-lreadline -l$py_libtermcap"
14899 fi
14900 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014902/* end confdefs.h. */
14903
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014904/* Override any GCC internal prototype to avoid an error.
14905 Use char because int might match the return type of a GCC
14906 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014907#ifdef __cplusplus
14908extern "C"
14909#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014910char readline ();
14911int
14912main ()
14913{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014914return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014915 ;
14916 return 0;
14917}
14918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014919if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014920 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014922rm -f core conftest.err conftest.$ac_objext \
14923 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014924 if test $py_cv_lib_readline = yes; then
14925 break
14926 fi
14927done
14928# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14929#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014930if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14932$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014933else
Matthias Kloseb9621712010-04-24 17:59:49 +000014934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14935$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014936
Matthias Kloseb9621712010-04-24 17:59:49 +000014937$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014938
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014939fi
14940
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014941# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14943$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014944if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014945 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014946else
14947 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014948LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014950/* end confdefs.h. */
14951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014952/* Override any GCC internal prototype to avoid an error.
14953 Use char because int might match the return type of a GCC
14954 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014955#ifdef __cplusplus
14956extern "C"
14957#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014958char rl_callback_handler_install ();
14959int
14960main ()
14961{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014962return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014963 ;
14964 return 0;
14965}
14966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014967if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014968 ac_cv_lib_readline_rl_callback_handler_install=yes
14969else
Matthias Kloseb9621712010-04-24 17:59:49 +000014970 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014972rm -f core conftest.err conftest.$ac_objext \
14973 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014974LIBS=$ac_check_lib_save_LIBS
14975fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14977$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014978if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014979
Matthias Kloseb9621712010-04-24 17:59:49 +000014980$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014981
14982fi
14983
14984
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014985# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014987/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014988#include <readline/readline.h>
14989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014990if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014991 have_readline=yes
14992else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014993 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014994
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014995fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014996rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014997if test $have_readline = yes
14998then
Matthias Kloseb9621712010-04-24 17:59:49 +000014999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015000/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015001#include <readline/readline.h>
15002
15003_ACEOF
15004if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015005 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015006
Matthias Kloseb9621712010-04-24 17:59:49 +000015007$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015008
15009fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015010rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015011
Matthias Kloseb9621712010-04-24 17:59:49 +000015012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015013/* end confdefs.h. */
15014#include <readline/readline.h>
15015
15016_ACEOF
15017if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015018 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015019
Matthias Kloseb9621712010-04-24 17:59:49 +000015020$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015021
15022fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015023rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015024
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015025fi
15026
Martin v. Löwis0daad592001-09-30 21:09:59 +000015027# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15029$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015030if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015031 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015032else
Martin v. Löwis11437992002-04-12 09:54:03 +000015033 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015034LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015036/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015038/* Override any GCC internal prototype to avoid an error.
15039 Use char because int might match the return type of a GCC
15040 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015041#ifdef __cplusplus
15042extern "C"
15043#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015044char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015045int
15046main ()
15047{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015048return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 ;
15050 return 0;
15051}
15052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015053if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015054 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015055else
Matthias Kloseb9621712010-04-24 17:59:49 +000015056 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015058rm -f core conftest.err conftest.$ac_objext \
15059 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015060LIBS=$ac_check_lib_save_LIBS
15061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15063$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015064if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015065
Matthias Kloseb9621712010-04-24 17:59:49 +000015066$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015067
Martin v. Löwis0daad592001-09-30 21:09:59 +000015068fi
15069
Michael W. Hudson54241132001-12-07 15:38:26 +000015070
Thomas Wouters89d996e2007-09-08 17:39:28 +000015071# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15073$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015074if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015075 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015076else
15077 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015078LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015080/* end confdefs.h. */
15081
15082/* Override any GCC internal prototype to avoid an error.
15083 Use char because int might match the return type of a GCC
15084 builtin and then its argument prototype would still apply. */
15085#ifdef __cplusplus
15086extern "C"
15087#endif
15088char rl_completion_display_matches_hook ();
15089int
15090main ()
15091{
15092return rl_completion_display_matches_hook ();
15093 ;
15094 return 0;
15095}
15096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015097if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015098 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15099else
Matthias Kloseb9621712010-04-24 17:59:49 +000015100 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015102rm -f core conftest.err conftest.$ac_objext \
15103 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015104LIBS=$ac_check_lib_save_LIBS
15105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15107$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015108if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015109
Matthias Kloseb9621712010-04-24 17:59:49 +000015110$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015111
15112fi
15113
15114
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015115# also in 4.0, but not in editline
15116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15117$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15118if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15119 $as_echo_n "(cached) " >&6
15120else
15121 ac_check_lib_save_LIBS=$LIBS
15122LIBS="-lreadline $READLINE_LIBS $LIBS"
15123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15124/* end confdefs.h. */
15125
15126/* Override any GCC internal prototype to avoid an error.
15127 Use char because int might match the return type of a GCC
15128 builtin and then its argument prototype would still apply. */
15129#ifdef __cplusplus
15130extern "C"
15131#endif
15132char rl_resize_terminal ();
15133int
15134main ()
15135{
15136return rl_resize_terminal ();
15137 ;
15138 return 0;
15139}
15140_ACEOF
15141if ac_fn_c_try_link "$LINENO"; then :
15142 ac_cv_lib_readline_rl_resize_terminal=yes
15143else
15144 ac_cv_lib_readline_rl_resize_terminal=no
15145fi
15146rm -f core conftest.err conftest.$ac_objext \
15147 conftest$ac_exeext conftest.$ac_ext
15148LIBS=$ac_check_lib_save_LIBS
15149fi
15150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15151$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15152if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15153
15154$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15155
15156fi
15157
15158
Martin v. Löwis0daad592001-09-30 21:09:59 +000015159# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15161$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015162if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015163 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015164else
Martin v. Löwis11437992002-04-12 09:54:03 +000015165 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015166LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015168/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015170/* Override any GCC internal prototype to avoid an error.
15171 Use char because int might match the return type of a GCC
15172 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015173#ifdef __cplusplus
15174extern "C"
15175#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015176char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015177int
15178main ()
15179{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015180return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015181 ;
15182 return 0;
15183}
15184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015185if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015186 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015187else
Matthias Kloseb9621712010-04-24 17:59:49 +000015188 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015190rm -f core conftest.err conftest.$ac_objext \
15191 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015192LIBS=$ac_check_lib_save_LIBS
15193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15195$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015196if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015197
Matthias Kloseb9621712010-04-24 17:59:49 +000015198$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015199
Guido van Rossum353ae582001-07-10 16:45:32 +000015200fi
15201
Jack Jansendd19cf82001-12-06 22:36:17 +000015202
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015203# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015205/* end confdefs.h. */
15206#include <readline/readline.h>
15207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015208if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015209 have_readline=yes
15210else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015211 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015212
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015213fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015214rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015215if test $have_readline = yes
15216then
Matthias Kloseb9621712010-04-24 17:59:49 +000015217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015218/* end confdefs.h. */
15219#include <readline/readline.h>
15220
15221_ACEOF
15222if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015223 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015224
Matthias Kloseb9621712010-04-24 17:59:49 +000015225$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015226
15227fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015228rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015229
15230fi
15231
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15233$as_echo_n "checking for append_history in -lreadline... " >&6; }
15234if ${ac_cv_lib_readline_append_history+:} false; then :
15235 $as_echo_n "(cached) " >&6
15236else
15237 ac_check_lib_save_LIBS=$LIBS
15238LIBS="-lreadline $READLINE_LIBS $LIBS"
15239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15240/* end confdefs.h. */
15241
15242/* Override any GCC internal prototype to avoid an error.
15243 Use char because int might match the return type of a GCC
15244 builtin and then its argument prototype would still apply. */
15245#ifdef __cplusplus
15246extern "C"
15247#endif
15248char append_history ();
15249int
15250main ()
15251{
15252return append_history ();
15253 ;
15254 return 0;
15255}
15256_ACEOF
15257if ac_fn_c_try_link "$LINENO"; then :
15258 ac_cv_lib_readline_append_history=yes
15259else
15260 ac_cv_lib_readline_append_history=no
15261fi
15262rm -f core conftest.err conftest.$ac_objext \
15263 conftest$ac_exeext conftest.$ac_ext
15264LIBS=$ac_check_lib_save_LIBS
15265fi
15266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15267$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15268if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15269
15270$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15271
15272fi
15273
15274
Martin v. Löwis82bca632006-02-10 20:49:30 +000015275# End of readline checks: restore LIBS
15276LIBS=$LIBS_no_readline
15277
Matthias Kloseb9621712010-04-24 17:59:49 +000015278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15279$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015280if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015281 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015282else
Martin v. Löwis11437992002-04-12 09:54:03 +000015283
Matthias Kloseb9621712010-04-24 17:59:49 +000015284if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015285 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015286else
Matthias Kloseb9621712010-04-24 17:59:49 +000015287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015288/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015289
15290int main()
15291{
15292 int val1 = nice(1);
15293 if (val1 != -1 && val1 == nice(2))
15294 exit(0);
15295 exit(1);
15296}
15297
Martin v. Löwis11437992002-04-12 09:54:03 +000015298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015299if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015300 ac_cv_broken_nice=yes
15301else
Matthias Kloseb9621712010-04-24 17:59:49 +000015302 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015303fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015304rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15305 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015306fi
15307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015308fi
15309
Matthias Kloseb9621712010-04-24 17:59:49 +000015310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15311$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015312if test "$ac_cv_broken_nice" = yes
15313then
Martin v. Löwis11437992002-04-12 09:54:03 +000015314
Matthias Kloseb9621712010-04-24 17:59:49 +000015315$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015316
15317fi
15318
Matthias Kloseb9621712010-04-24 17:59:49 +000015319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15320$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015321if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015322 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015323else
Matthias Kloseb9621712010-04-24 17:59:49 +000015324 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015325 ac_cv_broken_poll=no
15326else
Matthias Kloseb9621712010-04-24 17:59:49 +000015327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015328/* end confdefs.h. */
15329
15330#include <poll.h>
15331
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015332int main()
15333{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015334 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015335 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015336
15337 close (42);
15338
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015339 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015340 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015341 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015342 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015343 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015344 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015345 return 1;
15346}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015347
15348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015349if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015350 ac_cv_broken_poll=yes
15351else
Matthias Kloseb9621712010-04-24 17:59:49 +000015352 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015353fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015354rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15355 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015357
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015358fi
15359
Matthias Kloseb9621712010-04-24 17:59:49 +000015360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15361$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015362if test "$ac_cv_broken_poll" = yes
15363then
15364
Matthias Kloseb9621712010-04-24 17:59:49 +000015365$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015366
15367fi
15368
Brett Cannon43802422005-02-10 20:48:03 +000015369# 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 +000015370# (which is not required by ISO C or UNIX spec) and/or if we support
15371# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015372ac_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 +000015373#include <$ac_cv_struct_tm>
15374
Matthias Kloseb9621712010-04-24 17:59:49 +000015375"
Victor Stinnere0be4232011-10-25 13:06:09 +020015376if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015377
15378cat >>confdefs.h <<_ACEOF
15379#define HAVE_STRUCT_TM_TM_ZONE 1
15380_ACEOF
15381
15382
15383fi
15384
15385if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15386
Matthias Kloseb9621712010-04-24 17:59:49 +000015387$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015388
15389else
Matthias Kloseb9621712010-04-24 17:59:49 +000015390 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15391"
Victor Stinnere0be4232011-10-25 13:06:09 +020015392if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015393 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015394else
Matthias Kloseb9621712010-04-24 17:59:49 +000015395 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015396fi
15397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015398cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015399#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015400_ACEOF
15401
Matthias Kloseb9621712010-04-24 17:59:49 +000015402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15403$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015404if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015405 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015406else
Matthias Kloseb9621712010-04-24 17:59:49 +000015407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015408/* end confdefs.h. */
15409#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015410#if !HAVE_DECL_TZNAME
15411extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015412#endif
15413
15414int
15415main ()
15416{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015417return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015418 ;
15419 return 0;
15420}
15421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015422if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015423 ac_cv_var_tzname=yes
15424else
Matthias Kloseb9621712010-04-24 17:59:49 +000015425 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015426fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015427rm -f core conftest.err conftest.$ac_objext \
15428 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015429fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15431$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015432 if test $ac_cv_var_tzname = yes; then
15433
Matthias Kloseb9621712010-04-24 17:59:49 +000015434$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015435
15436 fi
15437fi
15438
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015439
Martin v. Löwis1d459062005-03-14 21:23:33 +000015440# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15442$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015443if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015444 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015445else
15446
Matthias Kloseb9621712010-04-24 17:59:49 +000015447if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015448 ac_cv_working_tzset=no
15449else
Matthias Kloseb9621712010-04-24 17:59:49 +000015450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015451/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015452
15453#include <stdlib.h>
15454#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015455#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015456
15457#if HAVE_TZNAME
15458extern char *tzname[];
15459#endif
15460
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015461int main()
15462{
Brett Cannon18367812003-09-19 00:59:16 +000015463 /* Note that we need to ensure that not only does tzset(3)
15464 do 'something' with localtime, but it works as documented
15465 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015466 This includes making sure that tzname is set properly if
15467 tm->tm_zone does not exist since it is the alternative way
15468 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015469
15470 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015471 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015472 */
15473
Martin v. Löwis1d459062005-03-14 21:23:33 +000015474 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015475 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15476
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015477 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015478 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015479 if (localtime(&groundhogday)->tm_hour != 0)
15480 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015481#if HAVE_TZNAME
15482 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15483 if (strcmp(tzname[0], "UTC") ||
15484 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15485 exit(1);
15486#endif
Brett Cannon18367812003-09-19 00:59:16 +000015487
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015488 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015489 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015490 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015491 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015492#if HAVE_TZNAME
15493 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15494 exit(1);
15495#endif
Brett Cannon18367812003-09-19 00:59:16 +000015496
15497 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15498 tzset();
15499 if (localtime(&groundhogday)->tm_hour != 11)
15500 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015501#if HAVE_TZNAME
15502 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15503 exit(1);
15504#endif
15505
15506#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015507 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15508 exit(1);
15509 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15510 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015511#endif
Brett Cannon18367812003-09-19 00:59:16 +000015512
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015513 exit(0);
15514}
15515
15516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015517if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015518 ac_cv_working_tzset=yes
15519else
Matthias Kloseb9621712010-04-24 17:59:49 +000015520 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015521fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015522rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15523 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015524fi
15525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015526fi
15527
Matthias Kloseb9621712010-04-24 17:59:49 +000015528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15529$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015530if test "$ac_cv_working_tzset" = yes
15531then
15532
Matthias Kloseb9621712010-04-24 17:59:49 +000015533$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015534
15535fi
15536
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015537# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15539$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015540if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015541 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015542else
Matthias Kloseb9621712010-04-24 17:59:49 +000015543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015544/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015545#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015546int
15547main ()
15548{
15549
15550struct stat st;
15551st.st_mtim.tv_nsec = 1;
15552
15553 ;
15554 return 0;
15555}
15556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015557if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015558 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015559else
Matthias Kloseb9621712010-04-24 17:59:49 +000015560 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15563fi
15564
Matthias Kloseb9621712010-04-24 17:59:49 +000015565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15566$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015567if test "$ac_cv_stat_tv_nsec" = yes
15568then
15569
Matthias Kloseb9621712010-04-24 17:59:49 +000015570$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015571
15572fi
15573
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015574# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15576$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015577if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015578 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015579else
Matthias Kloseb9621712010-04-24 17:59:49 +000015580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015581/* end confdefs.h. */
15582#include <sys/stat.h>
15583int
15584main ()
15585{
15586
15587struct stat st;
15588st.st_mtimespec.tv_nsec = 1;
15589
15590 ;
15591 return 0;
15592}
15593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015594if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015595 ac_cv_stat_tv_nsec2=yes
15596else
Matthias Kloseb9621712010-04-24 17:59:49 +000015597 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15600fi
15601
Matthias Kloseb9621712010-04-24 17:59:49 +000015602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15603$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015604if test "$ac_cv_stat_tv_nsec2" = yes
15605then
15606
Matthias Kloseb9621712010-04-24 17:59:49 +000015607$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015608
15609fi
15610
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015611# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015612ac_save_cppflags="$CPPFLAGS"
15613CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015614
15615for ac_header in curses.h ncurses.h
15616do :
15617 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15618ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15619if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15620 cat >>confdefs.h <<_ACEOF
15621#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15622_ACEOF
15623
15624fi
15625
15626done
15627
15628
15629# On Solaris, term.h requires curses.h
15630for ac_header in term.h
15631do :
15632 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15633#ifdef HAVE_CURSES_H
15634#include <curses.h>
15635#endif
15636
15637"
15638if test "x$ac_cv_header_term_h" = xyes; then :
15639 cat >>confdefs.h <<_ACEOF
15640#define HAVE_TERM_H 1
15641_ACEOF
15642
15643fi
15644
15645done
15646
15647
Jack Jansen666b1e72001-10-31 12:11:48 +000015648# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15650$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015651if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015652 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015653else
Matthias Kloseb9621712010-04-24 17:59:49 +000015654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015655/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015656#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015657int
15658main ()
15659{
Jack Jansen666b1e72001-10-31 12:11:48 +000015660
15661 int rtn;
15662 rtn = mvwdelch(0,0,0);
15663
Martin v. Löwis11437992002-04-12 09:54:03 +000015664 ;
15665 return 0;
15666}
15667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015668if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015669 ac_cv_mvwdelch_is_expression=yes
15670else
Matthias Kloseb9621712010-04-24 17:59:49 +000015671 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15674fi
15675
Matthias Kloseb9621712010-04-24 17:59:49 +000015676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15677$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015678
15679if test "$ac_cv_mvwdelch_is_expression" = yes
15680then
Martin v. Löwis11437992002-04-12 09:54:03 +000015681
Matthias Kloseb9621712010-04-24 17:59:49 +000015682$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015683
15684fi
15685
Matthias Kloseb9621712010-04-24 17:59:49 +000015686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15687$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015688if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015689 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015690else
Matthias Kloseb9621712010-04-24 17:59:49 +000015691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015692/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015693#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015694int
15695main ()
15696{
Jack Jansen666b1e72001-10-31 12:11:48 +000015697
15698 WINDOW *w;
15699 w->_flags = 0;
15700
Martin v. Löwis11437992002-04-12 09:54:03 +000015701 ;
15702 return 0;
15703}
15704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015705if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015706 ac_cv_window_has_flags=yes
15707else
Matthias Kloseb9621712010-04-24 17:59:49 +000015708 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015709fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15711fi
15712
Matthias Kloseb9621712010-04-24 17:59:49 +000015713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15714$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015715
Jack Jansen666b1e72001-10-31 12:11:48 +000015716
15717if test "$ac_cv_window_has_flags" = yes
15718then
Martin v. Löwis11437992002-04-12 09:54:03 +000015719
Matthias Kloseb9621712010-04-24 17:59:49 +000015720$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015721
15722fi
15723
Matthias Kloseb9621712010-04-24 17:59:49 +000015724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15725$as_echo_n "checking for is_term_resized... " >&6; }
15726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015727/* end confdefs.h. */
15728#include <curses.h>
15729int
15730main ()
15731{
15732void *x=is_term_resized
15733 ;
15734 return 0;
15735}
15736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015737if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015738
Matthias Kloseb9621712010-04-24 17:59:49 +000015739$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015740
Matthias Kloseb159a552010-04-25 21:00:44 +000015741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015742$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015743else
Matthias Kloseb9621712010-04-24 17:59:49 +000015744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15745$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015746
15747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15749
Matthias Kloseb9621712010-04-24 17:59:49 +000015750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15751$as_echo_n "checking for resize_term... " >&6; }
15752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015753/* end confdefs.h. */
15754#include <curses.h>
15755int
15756main ()
15757{
15758void *x=resize_term
15759 ;
15760 return 0;
15761}
15762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015763if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015764
Matthias Kloseb9621712010-04-24 17:59:49 +000015765$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015766
Matthias Kloseb159a552010-04-25 21:00:44 +000015767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015768$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015769else
Matthias Kloseb9621712010-04-24 17:59:49 +000015770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15771$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015772
15773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15775
Matthias Kloseb9621712010-04-24 17:59:49 +000015776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15777$as_echo_n "checking for resizeterm... " >&6; }
15778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015779/* end confdefs.h. */
15780#include <curses.h>
15781int
15782main ()
15783{
15784void *x=resizeterm
15785 ;
15786 return 0;
15787}
15788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015789if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015790
Matthias Kloseb9621712010-04-24 17:59:49 +000015791$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015792
Matthias Kloseb159a552010-04-25 21:00:44 +000015793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015794$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015795else
Matthias Kloseb9621712010-04-24 17:59:49 +000015796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15797$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015798
15799fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015801# last curses configure check
15802CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015803
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15805$as_echo "$as_me: checking for device files" >&6;}
15806
15807if test "x$cross_compiling" = xyes; then
15808 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15810$as_echo_n "checking for /dev/ptmx... " >&6; }
15811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15812$as_echo "not set" >&6; }
15813 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15814 fi
15815 if test "${ac_cv_file__dev_ptc+set}" != set; then
15816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15817$as_echo_n "checking for /dev/ptc... " >&6; }
15818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15819$as_echo "not set" >&6; }
15820 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15821 fi
15822fi
15823
Matthias Kloseb9621712010-04-24 17:59:49 +000015824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15825$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015826if ${ac_cv_file__dev_ptmx+:} false; then :
15827 $as_echo_n "(cached) " >&6
15828else
15829 test "$cross_compiling" = yes &&
15830 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15831if test -r "/dev/ptmx"; then
15832 ac_cv_file__dev_ptmx=yes
15833else
15834 ac_cv_file__dev_ptmx=no
15835fi
15836fi
15837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15838$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15839if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015840
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015841fi
15842
15843if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015844
Matthias Kloseb9621712010-04-24 17:59:49 +000015845$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015846
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15849$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015850if ${ac_cv_file__dev_ptc+:} false; then :
15851 $as_echo_n "(cached) " >&6
15852else
15853 test "$cross_compiling" = yes &&
15854 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15855if test -r "/dev/ptc"; then
15856 ac_cv_file__dev_ptc=yes
15857else
15858 ac_cv_file__dev_ptc=no
15859fi
15860fi
15861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15862$as_echo "$ac_cv_file__dev_ptc" >&6; }
15863if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015864
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015865fi
15866
15867if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015868
Matthias Kloseb9621712010-04-24 17:59:49 +000015869$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015870
Neal Norwitz865400f2003-03-21 01:42:58 +000015871fi
15872
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015873if test "$have_long_long" = yes
15874then
Matthias Kloseb9621712010-04-24 17:59:49 +000015875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15876$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015877 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015878 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015879else
Matthias Kloseb9621712010-04-24 17:59:49 +000015880 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015881 ac_cv_have_long_long_format="cross -- assuming no"
15882 if test x$GCC = xyes; then
15883 save_CFLAGS=$CFLAGS
15884 CFLAGS="$CFLAGS -Werror -Wformat"
15885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15886/* end confdefs.h. */
15887
15888 #include <stdio.h>
15889 #include <stddef.h>
15890
15891int
15892main ()
15893{
15894
15895 char *buffer;
15896 sprintf(buffer, "%lld", (long long)123);
15897 sprintf(buffer, "%lld", (long long)-123);
15898 sprintf(buffer, "%llu", (unsigned long long)123);
15899
15900 ;
15901 return 0;
15902}
15903_ACEOF
15904if ac_fn_c_try_compile "$LINENO"; then :
15905 ac_cv_have_long_long_format=yes
15906
15907fi
15908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15909 CFLAGS=$save_CFLAGS
15910 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015911else
Matthias Kloseb9621712010-04-24 17:59:49 +000015912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015913/* end confdefs.h. */
15914
15915 #include <stdio.h>
15916 #include <stddef.h>
15917 #include <string.h>
15918
15919 #ifdef HAVE_SYS_TYPES_H
15920 #include <sys/types.h>
15921 #endif
15922
15923 int main()
15924 {
15925 char buffer[256];
15926
15927 if (sprintf(buffer, "%lld", (long long)123) < 0)
15928 return 1;
15929 if (strcmp(buffer, "123"))
15930 return 1;
15931
15932 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15933 return 1;
15934 if (strcmp(buffer, "-123"))
15935 return 1;
15936
15937 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15938 return 1;
15939 if (strcmp(buffer, "123"))
15940 return 1;
15941
15942 return 0;
15943 }
15944
15945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015946if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015947 ac_cv_have_long_long_format=yes
15948else
Matthias Kloseb9621712010-04-24 17:59:49 +000015949 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015951rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15952 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015953fi
15954
15955
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015956fi
15957
Matthias Kloseb9621712010-04-24 17:59:49 +000015958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15959$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015960fi
15961
Mark Dickinson89d7d412009-12-31 20:50:59 +000015962if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015963then
15964
Matthias Kloseb9621712010-04-24 17:59:49 +000015965$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015966
15967fi
15968
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015969if test $ac_sys_system = Darwin
15970then
15971 LIBS="$LIBS -framework CoreFoundation"
15972fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015973
Matthias Kloseb9621712010-04-24 17:59:49 +000015974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15975$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015976if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015977 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015978else
Matthias Kloseb9621712010-04-24 17:59:49 +000015979 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015980 ac_cv_have_size_t_format="cross -- assuming yes"
15981
Thomas Wouters477c8d52006-05-27 19:21:47 +000015982else
Matthias Kloseb9621712010-04-24 17:59:49 +000015983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015984/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015985
Thomas Wouters477c8d52006-05-27 19:21:47 +000015986#include <stdio.h>
15987#include <stddef.h>
15988#include <string.h>
15989
Christian Heimes2c181612007-12-17 20:04:13 +000015990#ifdef HAVE_SYS_TYPES_H
15991#include <sys/types.h>
15992#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015993
15994#ifdef HAVE_SSIZE_T
15995typedef ssize_t Py_ssize_t;
15996#elif SIZEOF_VOID_P == SIZEOF_LONG
15997typedef long Py_ssize_t;
15998#else
15999typedef int Py_ssize_t;
16000#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016001
Christian Heimes2c181612007-12-17 20:04:13 +000016002int main()
16003{
16004 char buffer[256];
16005
Thomas Wouters477c8d52006-05-27 19:21:47 +000016006 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16007 return 1;
16008
Thomas Wouters89f507f2006-12-13 04:49:30 +000016009 if (strcmp(buffer, "123"))
16010 return 1;
16011
16012 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16013 return 1;
16014
16015 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016016 return 1;
16017
16018 return 0;
16019}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016020
Thomas Wouters477c8d52006-05-27 19:21:47 +000016021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016022if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016023 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016024else
Matthias Kloseb9621712010-04-24 17:59:49 +000016025 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016026fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016027rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16028 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016029fi
16030
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016031fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16033$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016034if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016035
Matthias Kloseb9621712010-04-24 17:59:49 +000016036$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016037
16038fi
16039
Matthias Kloseb9621712010-04-24 17:59:49 +000016040ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016041#ifdef HAVE_SYS_TYPES_H
16042#include <sys/types.h>
16043#endif
16044#ifdef HAVE_SYS_SOCKET_H
16045#include <sys/socket.h>
16046#endif
16047
Matthias Kloseb9621712010-04-24 17:59:49 +000016048"
Victor Stinnere0be4232011-10-25 13:06:09 +020016049if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016050
Martin v. Löwis11437992002-04-12 09:54:03 +000016051else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016052
Matthias Kloseb9621712010-04-24 17:59:49 +000016053$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016054
16055fi
16056
Michael W. Hudson54241132001-12-07 15:38:26 +000016057
Matthias Kloseb9621712010-04-24 17:59:49 +000016058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16059$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016060if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016061 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016062else
Matthias Kloseb9621712010-04-24 17:59:49 +000016063 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016064 ac_cv_broken_mbstowcs=no
16065else
Matthias Kloseb9621712010-04-24 17:59:49 +000016066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016067/* end confdefs.h. */
16068
Stefan Krah19c21392012-11-22 23:47:32 +010016069#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016070#include<stdlib.h>
16071int main() {
16072 size_t len = -1;
16073 const char *str = "text";
16074 len = mbstowcs(NULL, str, 0);
16075 return (len != 4);
16076}
16077
16078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016079if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016080 ac_cv_broken_mbstowcs=no
16081else
Matthias Kloseb9621712010-04-24 17:59:49 +000016082 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016084rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16085 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016086fi
16087
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016088fi
16089
Matthias Kloseb9621712010-04-24 17:59:49 +000016090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16091$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016092if test "$ac_cv_broken_mbstowcs" = yes
16093then
16094
Matthias Kloseb9621712010-04-24 17:59:49 +000016095$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016096
16097fi
16098
Antoine Pitroub52ec782009-01-25 16:34:23 +000016099# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16101$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016102
16103# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016104if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016105 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016106if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016107then
16108
Matthias Kloseb9621712010-04-24 17:59:49 +000016109$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016110
Matthias Kloseb9621712010-04-24 17:59:49 +000016111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16112$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016113fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016114if test "$withval" = no
16115then
16116
16117$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16118
Matthias Kloseb9621712010-04-24 17:59:49 +000016119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16120$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016121fi
16122
Antoine Pitrou042b1282010-08-13 21:15:58 +000016123else
16124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16125$as_echo "no value specified" >&6; }
16126fi
16127
Antoine Pitroub52ec782009-01-25 16:34:23 +000016128
Matthias Kloseb17289e2012-03-15 19:51:34 +010016129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16130$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16131if ${ac_cv_computed_gotos+:} false; then :
16132 $as_echo_n "(cached) " >&6
16133else
16134 if test "$cross_compiling" = yes; then :
16135 if test "${with_computed_gotos+set}" = set; then
16136 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16137 else
16138 ac_cv_computed_gotos=no
16139 fi
16140else
16141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16142/* end confdefs.h. */
16143
16144int main(int argc, char **argv)
16145{
16146 static void *targets[1] = { &&LABEL1 };
16147 goto LABEL2;
16148LABEL1:
16149 return 0;
16150LABEL2:
16151 goto *targets[0];
16152 return 1;
16153}
16154
16155_ACEOF
16156if ac_fn_c_try_run "$LINENO"; then :
16157 ac_cv_computed_gotos=yes
16158else
16159 ac_cv_computed_gotos=no
16160fi
16161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16162 conftest.$ac_objext conftest.beam conftest.$ac_ext
16163fi
16164
16165fi
16166
16167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16168$as_echo "$ac_cv_computed_gotos" >&6; }
16169case "$ac_cv_computed_gotos" in yes*)
16170
16171$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16172
16173esac
16174
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016175case $ac_sys_system in
16176AIX*)
16177
16178$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16179 ;;
16180esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016181
Michael W. Hudson54241132001-12-07 15:38:26 +000016182
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016183
16184
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016185for h in `(cd $srcdir;echo Python/thread_*.h)`
16186do
16187 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16188done
16189
Michael W. Hudson54241132001-12-07 15:38:26 +000016190
Ned Deily0db50cf2014-07-25 12:41:31 -070016191SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16193$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016194for dir in $SRCDIRS; do
16195 if test ! -d $dir; then
16196 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016197 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016198done
Matthias Kloseb9621712010-04-24 17:59:49 +000016199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16200$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016201
Stefan Krah1919b7e2012-03-21 18:25:23 +010016202# Availability of -O2:
16203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16204$as_echo_n "checking for -O2... " >&6; }
16205saved_cflags="$CFLAGS"
16206CFLAGS="-O2"
16207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16208/* end confdefs.h. */
16209
16210int
16211main ()
16212{
16213
16214
16215 ;
16216 return 0;
16217}
16218_ACEOF
16219if ac_fn_c_try_compile "$LINENO"; then :
16220 have_O2=yes
16221else
16222 have_O2=no
16223fi
16224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16226$as_echo "$have_O2" >&6; }
16227CFLAGS="$saved_cflags"
16228
16229# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16230# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16232$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16233saved_cflags="$CFLAGS"
16234CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16235if test "$have_O2" = no; then
16236 CFLAGS=""
16237fi
16238if test "$cross_compiling" = yes; then :
16239 have_glibc_memmove_bug=undefined
16240else
16241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16242/* end confdefs.h. */
16243
16244#include <stdio.h>
16245#include <stdlib.h>
16246#include <string.h>
16247void foo(void *p, void *q) { memmove(p, q, 19); }
16248int main() {
16249 char a[32] = "123456789000000000";
16250 foo(&a[9], a);
16251 if (strcmp(a, "123456789123456789000000000") != 0)
16252 return 1;
16253 foo(a, &a[9]);
16254 if (strcmp(a, "123456789000000000") != 0)
16255 return 1;
16256 return 0;
16257}
16258
16259_ACEOF
16260if ac_fn_c_try_run "$LINENO"; then :
16261 have_glibc_memmove_bug=no
16262else
16263 have_glibc_memmove_bug=yes
16264fi
16265rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16266 conftest.$ac_objext conftest.beam conftest.$ac_ext
16267fi
16268
16269CFLAGS="$saved_cflags"
16270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16271$as_echo "$have_glibc_memmove_bug" >&6; }
16272if test "$have_glibc_memmove_bug" = yes; then
16273
16274$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16275
16276fi
16277
16278if test "$have_gcc_asm_for_x87" = yes; then
16279 # Some versions of gcc miscompile inline asm:
16280 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16281 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16282 case $CC in
16283 *gcc*)
16284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16285$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16286 saved_cflags="$CFLAGS"
16287 CFLAGS="-O2"
16288 if test "$cross_compiling" = yes; then :
16289 have_ipa_pure_const_bug=undefined
16290else
16291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16292/* end confdefs.h. */
16293
16294 __attribute__((noinline)) int
16295 foo(int *p) {
16296 int r;
16297 asm ( "movl \$6, (%1)\n\t"
16298 "xorl %0, %0\n\t"
16299 : "=r" (r) : "r" (p) : "memory"
16300 );
16301 return r;
16302 }
16303 int main() {
16304 int p = 8;
16305 if ((foo(&p) ? : p) != 6)
16306 return 1;
16307 return 0;
16308 }
16309
16310_ACEOF
16311if ac_fn_c_try_run "$LINENO"; then :
16312 have_ipa_pure_const_bug=no
16313else
16314 have_ipa_pure_const_bug=yes
16315fi
16316rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16317 conftest.$ac_objext conftest.beam conftest.$ac_ext
16318fi
16319
16320 CFLAGS="$saved_cflags"
16321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16322$as_echo "$have_ipa_pure_const_bug" >&6; }
16323 if test "$have_ipa_pure_const_bug" = yes; then
16324
16325$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16326
16327 fi
16328 ;;
16329 esac
16330fi
16331
Victor Stinner4f5366e2015-01-09 02:13:19 +010016332# Check for stdatomic.h
16333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16334$as_echo_n "checking for stdatomic.h... " >&6; }
16335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16336/* end confdefs.h. */
16337
16338
16339 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016340 atomic_int value = ATOMIC_VAR_INIT(1);
16341 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016342 int main() {
16343 int loaded_value = atomic_load(&value);
16344 return 0;
16345 }
16346
16347
16348_ACEOF
16349if ac_fn_c_try_link "$LINENO"; then :
16350 have_stdatomic_h=yes
16351else
16352 have_stdatomic_h=no
16353fi
16354rm -f core conftest.err conftest.$ac_objext \
16355 conftest$ac_exeext conftest.$ac_ext
16356
16357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16358$as_echo "$have_stdatomic_h" >&6; }
16359
16360if test "$have_stdatomic_h" = yes; then
16361
16362$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16363
16364fi
16365
16366# Check for GCC >= 4.7 __atomic builtins
16367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16368$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16370/* end confdefs.h. */
16371
16372
16373 volatile int val = 1;
16374 int main() {
16375 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16376 return 0;
16377 }
16378
16379
16380_ACEOF
16381if ac_fn_c_try_link "$LINENO"; then :
16382 have_builtin_atomic=yes
16383else
16384 have_builtin_atomic=no
16385fi
16386rm -f core conftest.err conftest.$ac_objext \
16387 conftest$ac_exeext conftest.$ac_ext
16388
16389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16390$as_echo "$have_builtin_atomic" >&6; }
16391
16392if test "$have_builtin_atomic" = yes; then
16393
16394$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16395
16396fi
16397
Ned Deily322f5ba2013-11-21 23:01:59 -080016398# ensurepip option
16399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16400$as_echo_n "checking for ensurepip... " >&6; }
16401
16402# Check whether --with-ensurepip was given.
16403if test "${with_ensurepip+set}" = set; then :
16404 withval=$with_ensurepip;
16405else
16406 with_ensurepip=upgrade
16407fi
16408
16409case $with_ensurepip in #(
16410 yes|upgrade) :
16411 ENSUREPIP=upgrade ;; #(
16412 install) :
16413 ENSUREPIP=install ;; #(
16414 no) :
16415 ENSUREPIP=no ;; #(
16416 *) :
16417 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16418esac
16419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16420$as_echo "$ENSUREPIP" >&6; }
16421
16422
Victor Stinner35a97c02015-03-08 02:59:09 +010016423# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16425$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16427/* end confdefs.h. */
16428
16429
16430 #include <dirent.h>
16431
16432 int main() {
16433 struct dirent entry;
16434 return entry.d_type == DT_UNKNOWN;
16435 }
16436
16437
16438_ACEOF
16439if ac_fn_c_try_link "$LINENO"; then :
16440 have_dirent_d_type=yes
16441else
16442 have_dirent_d_type=no
16443fi
16444rm -f core conftest.err conftest.$ac_objext \
16445 conftest$ac_exeext conftest.$ac_ext
16446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16447$as_echo "$have_dirent_d_type" >&6; }
16448
16449if test "$have_dirent_d_type" = yes; then
16450
16451$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16452
16453fi
16454
Victor Stinner9eb57c52015-03-19 22:21:49 +010016455# check if the Linux getrandom() syscall is available
16456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16457$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16459/* end confdefs.h. */
16460
16461
Victor Stinner1b80b242016-04-12 22:34:58 +020016462 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016463 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016464 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016465
16466 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016467 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016468 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016469 const int flags = GRND_NONBLOCK;
16470 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016471 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016472 return 0;
16473 }
16474
16475
16476_ACEOF
16477if ac_fn_c_try_link "$LINENO"; then :
16478 have_getrandom_syscall=yes
16479else
16480 have_getrandom_syscall=no
16481fi
16482rm -f core conftest.err conftest.$ac_objext \
16483 conftest$ac_exeext conftest.$ac_ext
16484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16485$as_echo "$have_getrandom_syscall" >&6; }
16486
16487if test "$have_getrandom_syscall" = yes; then
16488
16489$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16490
16491fi
16492
Victor Stinner3abf44e2015-09-18 15:38:37 +020016493# check if the getrandom() function is available
16494# the test was written for the Solaris function of <sys/random.h>
16495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16496$as_echo_n "checking for the getrandom() function... " >&6; }
16497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16498/* end confdefs.h. */
16499
16500
16501 #include <sys/random.h>
16502
16503 int main() {
16504 char buffer[1];
16505 const size_t buflen = sizeof(buffer);
16506 const int flags = 0;
16507 /* ignore the result, Python checks for ENOSYS at runtime */
16508 (void)getrandom(buffer, buflen, flags);
16509 return 0;
16510 }
16511
16512
16513_ACEOF
16514if ac_fn_c_try_link "$LINENO"; then :
16515 have_getrandom=yes
16516else
16517 have_getrandom=no
16518fi
16519rm -f core conftest.err conftest.$ac_objext \
16520 conftest$ac_exeext conftest.$ac_ext
16521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16522$as_echo "$have_getrandom" >&6; }
16523
16524if test "$have_getrandom" = yes; then
16525
16526$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16527
16528fi
16529
Guido van Rossum627b2d71993-12-24 10:39:16 +000016530# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016531ac_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 +000016532
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016533ac_config_files="$ac_config_files Modules/ld_so_aix"
16534
Martin v. Löwis11437992002-04-12 09:54:03 +000016535cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016536# This file is a shell script that caches the results of configure
16537# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016538# scripts and configure runs, see configure's option --config-cache.
16539# It is not useful on other systems. If it contains results you don't
16540# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016541#
Martin v. Löwis11437992002-04-12 09:54:03 +000016542# config.status only pays attention to the cache file if you give it
16543# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016544#
Skip Montanaro6dead952003-09-25 14:50:04 +000016545# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016546# loading this file, other *unset* `ac_cv_foo' will be assigned the
16547# following values.
16548
16549_ACEOF
16550
Guido van Rossumf78abae1997-01-21 22:02:36 +000016551# The following way of writing the cache mishandles newlines in values,
16552# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016553# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016554# Ultrix sh set writes to stderr and can't be redirected directly,
16555# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016556(
16557 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16558 eval ac_val=\$$ac_var
16559 case $ac_val in #(
16560 *${as_nl}*)
16561 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016562 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16563$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016564 esac
16565 case $ac_var in #(
16566 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016567 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16568 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016569 esac ;;
16570 esac
16571 done
16572
Martin v. Löwis11437992002-04-12 09:54:03 +000016573 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016574 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16575 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016576 # `set' does not quote correctly, so add quotes: double-quote
16577 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016578 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016579 "s/'/'\\\\''/g;
16580 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016581 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016582 *)
16583 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016584 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016585 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016586 esac |
16587 sort
16588) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016589 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016590 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016591 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016592 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016593 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16594 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016595 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16596 :end' >>confcache
16597if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16598 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016599 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016600 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16601$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016602 if test ! -f "$cache_file" || test -h "$cache_file"; then
16603 cat confcache >"$cache_file"
16604 else
16605 case $cache_file in #(
16606 */* | ?:*)
16607 mv -f confcache "$cache_file"$$ &&
16608 mv -f "$cache_file"$$ "$cache_file" ;; #(
16609 *)
16610 mv -f confcache "$cache_file" ;;
16611 esac
16612 fi
16613 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016614 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016615 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16616$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016617 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016618fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016619rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016620
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016621test "x$prefix" = xNONE && prefix=$ac_default_prefix
16622# Let make expand exec_prefix.
16623test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016624
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016625DEFS=-DHAVE_CONFIG_H
16626
Skip Montanaro6dead952003-09-25 14:50:04 +000016627ac_libobjs=
16628ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016629U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016630for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16631 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016632 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016633 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016634 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16635 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016636 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16637 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016638done
16639LIBOBJS=$ac_libobjs
16640
16641LTLIBOBJS=$ac_ltlibobjs
16642
16643
Martin v. Löwis11437992002-04-12 09:54:03 +000016644
Matthias Kloseb9621712010-04-24 17:59:49 +000016645
Victor Stinnere0be4232011-10-25 13:06:09 +020016646: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016647ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016648ac_clean_files_save=$ac_clean_files
16649ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016650{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16651$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16652as_write_fail=0
16653cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016654#! $SHELL
16655# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016656# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016657# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016658# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016659
Martin v. Löwis11437992002-04-12 09:54:03 +000016660debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016661ac_cs_recheck=false
16662ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016663
Matthias Kloseb9621712010-04-24 17:59:49 +000016664SHELL=\${CONFIG_SHELL-$SHELL}
16665export SHELL
16666_ASEOF
16667cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16668## -------------------- ##
16669## M4sh Initialization. ##
16670## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016672# Be more Bourne compatible
16673DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016674if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016675 emulate sh
16676 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016677 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016678 # is contrary to our usage. Disable this feature.
16679 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016680 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016681else
Matthias Kloseb9621712010-04-24 17:59:49 +000016682 case `(set -o) 2>/dev/null` in #(
16683 *posix*) :
16684 set -o posix ;; #(
16685 *) :
16686 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016687esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016688fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016689
16690
Matthias Kloseb9621712010-04-24 17:59:49 +000016691as_nl='
16692'
16693export as_nl
16694# Printing a long string crashes Solaris 7 /usr/bin/printf.
16695as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16696as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16697as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16698# Prefer a ksh shell builtin over an external printf program on Solaris,
16699# but without wasting forks for bash or zsh.
16700if test -z "$BASH_VERSION$ZSH_VERSION" \
16701 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16702 as_echo='print -r --'
16703 as_echo_n='print -rn --'
16704elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16705 as_echo='printf %s\n'
16706 as_echo_n='printf %s'
16707else
16708 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16709 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16710 as_echo_n='/usr/ucb/echo -n'
16711 else
16712 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16713 as_echo_n_body='eval
16714 arg=$1;
16715 case $arg in #(
16716 *"$as_nl"*)
16717 expr "X$arg" : "X\\(.*\\)$as_nl";
16718 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16719 esac;
16720 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16721 '
16722 export as_echo_n_body
16723 as_echo_n='sh -c $as_echo_n_body as_echo'
16724 fi
16725 export as_echo_body
16726 as_echo='sh -c $as_echo_body as_echo'
16727fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016728
16729# The user is always right.
16730if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016731 PATH_SEPARATOR=:
16732 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16733 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16734 PATH_SEPARATOR=';'
16735 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016736fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016737
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016738
16739# IFS
16740# We need space, tab and new line, in precisely that order. Quoting is
16741# there to prevent editors from complaining about space-tab.
16742# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16743# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016744IFS=" "" $as_nl"
16745
16746# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016747as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016748case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016749 *[\\/]* ) as_myself=$0 ;;
16750 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016751for as_dir in $PATH
16752do
16753 IFS=$as_save_IFS
16754 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016755 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16756 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016757IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016758
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016759 ;;
16760esac
16761# We did not find ourselves, most probably we were run as `sh COMMAND'
16762# in which case we are not to be found in the path.
16763if test "x$as_myself" = x; then
16764 as_myself=$0
16765fi
16766if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016767 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16768 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016769fi
16770
Matthias Kloseb9621712010-04-24 17:59:49 +000016771# Unset variables that we do not need and which cause bugs (e.g. in
16772# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16773# suppresses any "Segmentation fault" message there. '((' could
16774# trigger a bug in pdksh 5.2.14.
16775for as_var in BASH_ENV ENV MAIL MAILPATH
16776do eval test x\${$as_var+set} = xset \
16777 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016778done
16779PS1='$ '
16780PS2='> '
16781PS4='+ '
16782
16783# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016784LC_ALL=C
16785export LC_ALL
16786LANGUAGE=C
16787export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016788
Matthias Kloseb9621712010-04-24 17:59:49 +000016789# CDPATH.
16790(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16791
16792
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016793# as_fn_error STATUS ERROR [LINENO LOG_FD]
16794# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016795# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16796# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016797# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016798as_fn_error ()
16799{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016800 as_status=$1; test $as_status -eq 0 && as_status=1
16801 if test "$4"; then
16802 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16803 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016804 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016805 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016806 as_fn_exit $as_status
16807} # as_fn_error
16808
16809
16810# as_fn_set_status STATUS
16811# -----------------------
16812# Set $? to STATUS, without forking.
16813as_fn_set_status ()
16814{
16815 return $1
16816} # as_fn_set_status
16817
16818# as_fn_exit STATUS
16819# -----------------
16820# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16821as_fn_exit ()
16822{
16823 set +e
16824 as_fn_set_status $1
16825 exit $1
16826} # as_fn_exit
16827
16828# as_fn_unset VAR
16829# ---------------
16830# Portably unset VAR.
16831as_fn_unset ()
16832{
16833 { eval $1=; unset $1;}
16834}
16835as_unset=as_fn_unset
16836# as_fn_append VAR VALUE
16837# ----------------------
16838# Append the text in VALUE to the end of the definition contained in VAR. Take
16839# advantage of any shell optimizations that allow amortized linear growth over
16840# repeated appends, instead of the typical quadratic growth present in naive
16841# implementations.
16842if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16843 eval 'as_fn_append ()
16844 {
16845 eval $1+=\$2
16846 }'
16847else
16848 as_fn_append ()
16849 {
16850 eval $1=\$$1\$2
16851 }
16852fi # as_fn_append
16853
16854# as_fn_arith ARG...
16855# ------------------
16856# Perform arithmetic evaluation on the ARGs, and store the result in the
16857# global $as_val. Take advantage of shells that can avoid forks. The arguments
16858# must be portable across $(()) and expr.
16859if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16860 eval 'as_fn_arith ()
16861 {
16862 as_val=$(( $* ))
16863 }'
16864else
16865 as_fn_arith ()
16866 {
16867 as_val=`expr "$@" || test $? -eq 1`
16868 }
16869fi # as_fn_arith
16870
16871
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016872if expr a : '\(a\)' >/dev/null 2>&1 &&
16873 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16874 as_expr=expr
16875else
16876 as_expr=false
16877fi
16878
16879if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16880 as_basename=basename
16881else
16882 as_basename=false
16883fi
16884
Matthias Kloseb9621712010-04-24 17:59:49 +000016885if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16886 as_dirname=dirname
16887else
16888 as_dirname=false
16889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016891as_me=`$as_basename -- "$0" ||
16892$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16893 X"$0" : 'X\(//\)$' \| \
16894 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016895$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016896 sed '/^.*\/\([^/][^/]*\)\/*$/{
16897 s//\1/
16898 q
16899 }
16900 /^X\/\(\/\/\)$/{
16901 s//\1/
16902 q
16903 }
16904 /^X\/\(\/\).*/{
16905 s//\1/
16906 q
16907 }
16908 s/.*/./; q'`
16909
Matthias Kloseb9621712010-04-24 17:59:49 +000016910# Avoid depending upon Character Ranges.
16911as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16912as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16913as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16914as_cr_digits='0123456789'
16915as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016916
16917ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016918case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016919-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016920 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016921 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016922 xy) ECHO_C='\c';;
16923 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16924 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016925 esac;;
16926*)
16927 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016928esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016929
Martin v. Löwis11437992002-04-12 09:54:03 +000016930rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016931if test -d conf$$.dir; then
16932 rm -f conf$$.dir/conf$$.file
16933else
16934 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016935 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016936fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016937if (echo >conf$$.file) 2>/dev/null; then
16938 if ln -s conf$$.file conf$$ 2>/dev/null; then
16939 as_ln_s='ln -s'
16940 # ... but there are two gotchas:
16941 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16942 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016943 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016944 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016945 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016946 elif ln conf$$.file conf$$ 2>/dev/null; then
16947 as_ln_s=ln
16948 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016949 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016950 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016951else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016952 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016954rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16955rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016956
Matthias Kloseb9621712010-04-24 17:59:49 +000016957
16958# as_fn_mkdir_p
16959# -------------
16960# Create "$as_dir" as a directory, including parents if necessary.
16961as_fn_mkdir_p ()
16962{
16963
16964 case $as_dir in #(
16965 -*) as_dir=./$as_dir;;
16966 esac
16967 test -d "$as_dir" || eval $as_mkdir_p || {
16968 as_dirs=
16969 while :; do
16970 case $as_dir in #(
16971 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16972 *) as_qdir=$as_dir;;
16973 esac
16974 as_dirs="'$as_qdir' $as_dirs"
16975 as_dir=`$as_dirname -- "$as_dir" ||
16976$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16977 X"$as_dir" : 'X\(//\)[^/]' \| \
16978 X"$as_dir" : 'X\(//\)$' \| \
16979 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16980$as_echo X"$as_dir" |
16981 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16982 s//\1/
16983 q
16984 }
16985 /^X\(\/\/\)[^/].*/{
16986 s//\1/
16987 q
16988 }
16989 /^X\(\/\/\)$/{
16990 s//\1/
16991 q
16992 }
16993 /^X\(\/\).*/{
16994 s//\1/
16995 q
16996 }
16997 s/.*/./; q'`
16998 test -d "$as_dir" && break
16999 done
17000 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017001 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017002
17003
17004} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017005if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017006 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017007else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017008 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017009 as_mkdir_p=false
17010fi
17011
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017012
17013# as_fn_executable_p FILE
17014# -----------------------
17015# Test if FILE is an executable regular file.
17016as_fn_executable_p ()
17017{
17018 test -f "$1" && test -x "$1"
17019} # as_fn_executable_p
17020as_test_x='test -x'
17021as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017022
17023# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017024as_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 +000017025
17026# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017027as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017028
17029
Martin v. Löwis11437992002-04-12 09:54:03 +000017030exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017031## ----------------------------------- ##
17032## Main body of $CONFIG_STATUS script. ##
17033## ----------------------------------- ##
17034_ASEOF
17035test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017036
Matthias Kloseb9621712010-04-24 17:59:49 +000017037cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17038# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017039# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017040# values after options handling.
17041ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017042This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017043generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017044
17045 CONFIG_FILES = $CONFIG_FILES
17046 CONFIG_HEADERS = $CONFIG_HEADERS
17047 CONFIG_LINKS = $CONFIG_LINKS
17048 CONFIG_COMMANDS = $CONFIG_COMMANDS
17049 $ $0 $@
17050
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017051on `(hostname || uname -n) 2>/dev/null | sed 1q`
17052"
17053
Martin v. Löwis11437992002-04-12 09:54:03 +000017054_ACEOF
17055
Matthias Kloseb9621712010-04-24 17:59:49 +000017056case $ac_config_files in *"
17057"*) set x $ac_config_files; shift; ac_config_files=$*;;
17058esac
17059
17060case $ac_config_headers in *"
17061"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17062esac
17063
17064
17065cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017066# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017067config_files="$ac_config_files"
17068config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017069
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017070_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017071
Matthias Kloseb9621712010-04-24 17:59:49 +000017072cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017073ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017074\`$as_me' instantiates files and other configuration actions
17075from templates according to the current configuration. Unless the files
17076and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017077
Matthias Kloseb9621712010-04-24 17:59:49 +000017078Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017079
17080 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017081 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017082 --config print configuration, then exit
17083 -q, --quiet, --silent
17084 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017085 -d, --debug don't remove temporary files
17086 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017087 --file=FILE[:TEMPLATE]
17088 instantiate the configuration file FILE
17089 --header=FILE[:TEMPLATE]
17090 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017091
17092Configuration files:
17093$config_files
17094
17095Configuration headers:
17096$config_headers
17097
Matthias Kloseb9621712010-04-24 17:59:49 +000017098Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017101cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17102ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017103ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017104python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017105configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017106 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017107
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017108Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017109This config.status script is free software; the Free Software Foundation
17110gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017111
17112ac_pwd='$ac_pwd'
17113srcdir='$srcdir'
17114INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017115MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017116test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017117_ACEOF
17118
Matthias Kloseb9621712010-04-24 17:59:49 +000017119cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17120# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017121ac_need_defaults=:
17122while test $# != 0
17123do
17124 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017125 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017126 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17127 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017128 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017129 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017130 --*=)
17131 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17132 ac_optarg=
17133 ac_shift=:
17134 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017135 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017136 ac_option=$1
17137 ac_optarg=$2
17138 ac_shift=shift
17139 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017140 esac
17141
Skip Montanaro6dead952003-09-25 14:50:04 +000017142 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017143 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017144 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17145 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017146 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017147 $as_echo "$ac_cs_version"; exit ;;
17148 --config | --confi | --conf | --con | --co | --c )
17149 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017150 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017151 debug=: ;;
17152 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017153 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017154 case $ac_optarg in
17155 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017156 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017157 esac
17158 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017159 ac_need_defaults=false;;
17160 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017161 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017162 case $ac_optarg in
17163 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17164 esac
17165 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017166 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017167 --he | --h)
17168 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017169 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017170Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017171 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017172 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017173 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17174 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17175 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017176
17177 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017178 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017179Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017180
Matthias Kloseb9621712010-04-24 17:59:49 +000017181 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017182 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017183
17184 esac
17185 shift
17186done
17187
Skip Montanaro6dead952003-09-25 14:50:04 +000017188ac_configure_extra_args=
17189
17190if $ac_cs_silent; then
17191 exec 6>/dev/null
17192 ac_configure_extra_args="$ac_configure_extra_args --silent"
17193fi
17194
17195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017196cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017197if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017198 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017199 shift
17200 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17201 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017202 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017203 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017204fi
17205
Martin v. Löwis11437992002-04-12 09:54:03 +000017206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017207cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017208exec 5>>config.log
17209{
17210 echo
17211 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17212## Running $as_me. ##
17213_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017214 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017215} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017218cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017219_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017220
Matthias Kloseb9621712010-04-24 17:59:49 +000017221cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017222
17223# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017224for ac_config_target in $ac_config_targets
17225do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017226 case $ac_config_target in
17227 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17228 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17229 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017230 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17231 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017232 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17233 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017234 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017235 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017236 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017237
Victor Stinnere0be4232011-10-25 13:06:09 +020017238 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017239 esac
17240done
17241
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017242
Martin v. Löwis11437992002-04-12 09:54:03 +000017243# If the user did not use the arguments to specify the items to instantiate,
17244# then the envvar interface is used. Set only those that are not.
17245# We use the long form for the default assignment because of an extremely
17246# bizarre bug on SunOS 4.1.3.
17247if $ac_need_defaults; then
17248 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17249 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17250fi
17251
Skip Montanaro6dead952003-09-25 14:50:04 +000017252# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017253# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017254# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017255# Hook for its removal unless debugging.
17256# Note that there is a small window in which the directory will not be cleaned:
17257# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017258$debug ||
17259{
Victor Stinnere0be4232011-10-25 13:06:09 +020017260 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017261 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017262 : "${ac_tmp:=$tmp}"
17263 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017264' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017265 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017266}
Martin v. Löwis11437992002-04-12 09:54:03 +000017267# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017268
Martin v. Löwis11437992002-04-12 09:54:03 +000017269{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017270 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017271 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017272} ||
17273{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017274 tmp=./conf$$-$RANDOM
17275 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017276} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017277ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017278
Matthias Kloseb9621712010-04-24 17:59:49 +000017279# Set up the scripts for CONFIG_FILES section.
17280# No need to generate them if there are no CONFIG_FILES.
17281# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017282if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017283
Matthias Kloseb9621712010-04-24 17:59:49 +000017284
17285ac_cr=`echo X | tr X '\015'`
17286# On cygwin, bash can eat \r inside `` if the user requested igncr.
17287# But we know of no other shell where ac_cr would be empty at this
17288# point, so we can use a bashism as a fallback.
17289if test "x$ac_cr" = x; then
17290 eval ac_cr=\$\'\\r\'
17291fi
17292ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17293if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017294 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017295else
17296 ac_cs_awk_cr=$ac_cr
17297fi
17298
Victor Stinnere0be4232011-10-25 13:06:09 +020017299echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017300_ACEOF
17301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017302
Matthias Kloseb9621712010-04-24 17:59:49 +000017303{
17304 echo "cat >conf$$subs.awk <<_ACEOF" &&
17305 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17306 echo "_ACEOF"
17307} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017308 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17309ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017310ac_delim='%!_!# '
17311for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017312 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017313 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017314
Matthias Kloseb9621712010-04-24 17:59:49 +000017315 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17316 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017317 break
17318 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017319 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017320 else
17321 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017322 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017323done
Matthias Kloseb9621712010-04-24 17:59:49 +000017324rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017325
Matthias Kloseb9621712010-04-24 17:59:49 +000017326cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017327cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017329sed -n '
17330h
17331s/^/S["/; s/!.*/"]=/
17332p
17333g
17334s/^[^!]*!//
17335:repl
17336t repl
17337s/'"$ac_delim"'$//
17338t delim
17339:nl
17340h
17341s/\(.\{148\}\)..*/\1/
17342t more1
17343s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17344p
17345n
17346b repl
17347:more1
17348s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17349p
17350g
17351s/.\{148\}//
17352t nl
17353:delim
17354h
17355s/\(.\{148\}\)..*/\1/
17356t more2
17357s/["\\]/\\&/g; s/^/"/; s/$/"/
17358p
17359b
17360:more2
17361s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17362p
17363g
17364s/.\{148\}//
17365t delim
17366' <conf$$subs.awk | sed '
17367/^[^""]/{
17368 N
17369 s/\n//
17370}
17371' >>$CONFIG_STATUS || ac_write_fail=1
17372rm -f conf$$subs.awk
17373cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17374_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017375cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017376 for (key in S) S_is_set[key] = 1
17377 FS = ""
17378
17379}
17380{
17381 line = $ 0
17382 nfields = split(line, field, "@")
17383 substed = 0
17384 len = length(field[1])
17385 for (i = 2; i < nfields; i++) {
17386 key = field[i]
17387 keylen = length(key)
17388 if (S_is_set[key]) {
17389 value = S[key]
17390 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17391 len += length(value) + length(field[++i])
17392 substed = 1
17393 } else
17394 len += 1 + keylen
17395 }
17396
17397 print line
17398}
17399
17400_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017402cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17403if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17404 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17405else
17406 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017407fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017408 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017409_ACEOF
17410
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017411# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17412# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017413# trailing colons and then remove the whole line if VPATH becomes empty
17414# (actually we leave an empty line to preserve line numbers).
17415if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017416 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17417h
17418s///
17419s/^/:/
17420s/[ ]*$/:/
17421s/:\$(srcdir):/:/g
17422s/:\${srcdir}:/:/g
17423s/:@srcdir@:/:/g
17424s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017425s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017426x
17427s/\(=[ ]*\).*/\1/
17428G
17429s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017430s/^[^=]*=[ ]*$//
17431}'
17432fi
17433
Matthias Kloseb9621712010-04-24 17:59:49 +000017434cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017435fi # test -n "$CONFIG_FILES"
17436
Matthias Kloseb9621712010-04-24 17:59:49 +000017437# Set up the scripts for CONFIG_HEADERS section.
17438# No need to generate them if there are no CONFIG_HEADERS.
17439# This happens for instance with `./config.status Makefile'.
17440if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017441cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017442BEGIN {
17443_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017444
Matthias Kloseb9621712010-04-24 17:59:49 +000017445# Transform confdefs.h into an awk script `defines.awk', embedded as
17446# here-document in config.status, that substitutes the proper values into
17447# config.h.in to produce config.h.
17448
17449# Create a delimiter string that does not exist in confdefs.h, to ease
17450# handling of long lines.
17451ac_delim='%!_!# '
17452for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017453 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17454 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017455 break
17456 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017457 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017458 else
17459 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17460 fi
17461done
17462
17463# For the awk script, D is an array of macro values keyed by name,
17464# likewise P contains macro parameters if any. Preserve backslash
17465# newline sequences.
17466
17467ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17468sed -n '
17469s/.\{148\}/&'"$ac_delim"'/g
17470t rset
17471:rset
17472s/^[ ]*#[ ]*define[ ][ ]*/ /
17473t def
17474d
17475:def
17476s/\\$//
17477t bsnl
17478s/["\\]/\\&/g
17479s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17480D["\1"]=" \3"/p
17481s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17482d
17483:bsnl
17484s/["\\]/\\&/g
17485s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17486D["\1"]=" \3\\\\\\n"\\/p
17487t cont
17488s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17489t cont
17490d
17491:cont
17492n
17493s/.\{148\}/&'"$ac_delim"'/g
17494t clear
17495:clear
17496s/\\$//
17497t bsnlc
17498s/["\\]/\\&/g; s/^/"/; s/$/"/p
17499d
17500:bsnlc
17501s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17502b cont
17503' <confdefs.h | sed '
17504s/'"$ac_delim"'/"\\\
17505"/g' >>$CONFIG_STATUS || ac_write_fail=1
17506
17507cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17508 for (key in D) D_is_set[key] = 1
17509 FS = ""
17510}
17511/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17512 line = \$ 0
17513 split(line, arg, " ")
17514 if (arg[1] == "#") {
17515 defundef = arg[2]
17516 mac1 = arg[3]
17517 } else {
17518 defundef = substr(arg[1], 2)
17519 mac1 = arg[2]
17520 }
17521 split(mac1, mac2, "(") #)
17522 macro = mac2[1]
17523 prefix = substr(line, 1, index(line, defundef) - 1)
17524 if (D_is_set[macro]) {
17525 # Preserve the white space surrounding the "#".
17526 print prefix "define", macro P[macro] D[macro]
17527 next
17528 } else {
17529 # Replace #undef with comments. This is necessary, for example,
17530 # in the case of _POSIX_SOURCE, which is predefined and required
17531 # on some systems where configure will not decide to define it.
17532 if (defundef == "undef") {
17533 print "/*", prefix defundef, macro, "*/"
17534 next
17535 }
17536 }
17537}
17538{ print }
17539_ACAWK
17540_ACEOF
17541cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017542 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017543fi # test -n "$CONFIG_HEADERS"
17544
17545
17546eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17547shift
17548for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017549do
17550 case $ac_tag in
17551 :[FHLC]) ac_mode=$ac_tag; continue;;
17552 esac
17553 case $ac_mode$ac_tag in
17554 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017555 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017556 :[FH]-) ac_tag=-:-;;
17557 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17558 esac
17559 ac_save_IFS=$IFS
17560 IFS=:
17561 set x $ac_tag
17562 IFS=$ac_save_IFS
17563 shift
17564 ac_file=$1
17565 shift
17566
17567 case $ac_mode in
17568 :L) ac_source=$1;;
17569 :[FH])
17570 ac_file_inputs=
17571 for ac_f
17572 do
17573 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017574 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017575 *) # Look for the file first in the build tree, then in the source tree
17576 # (if the path is not absolute). The absolute path cannot be DOS-style,
17577 # because $ac_f cannot contain `:'.
17578 test -f "$ac_f" ||
17579 case $ac_f in
17580 [\\/$]*) false;;
17581 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17582 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017583 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017584 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017585 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17586 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017587 done
17588
17589 # Let's still pretend it is `configure' which instantiates (i.e., don't
17590 # use $as_me), people would be surprised to read:
17591 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017592 configure_input='Generated from '`
17593 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17594 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017595 if test x"$ac_file" != x-; then
17596 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017597 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17598$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017599 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017600 # Neutralize special characters interpreted by sed in replacement strings.
17601 case $configure_input in #(
17602 *\&* | *\|* | *\\* )
17603 ac_sed_conf_input=`$as_echo "$configure_input" |
17604 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17605 *) ac_sed_conf_input=$configure_input;;
17606 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017607
17608 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017609 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17610 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017611 esac
17612 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017613 esac
17614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017615 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017616$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017617 X"$ac_file" : 'X\(//\)[^/]' \| \
17618 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017619 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017620$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017621 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17622 s//\1/
17623 q
17624 }
17625 /^X\(\/\/\)[^/].*/{
17626 s//\1/
17627 q
17628 }
17629 /^X\(\/\/\)$/{
17630 s//\1/
17631 q
17632 }
17633 /^X\(\/\).*/{
17634 s//\1/
17635 q
17636 }
17637 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017638 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017639 ac_builddir=.
17640
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017641case "$ac_dir" in
17642.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17643*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017644 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017645 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017646 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017647 case $ac_top_builddir_sub in
17648 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17649 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17650 esac ;;
17651esac
17652ac_abs_top_builddir=$ac_pwd
17653ac_abs_builddir=$ac_pwd$ac_dir_suffix
17654# for backward compatibility:
17655ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017656
17657case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017658 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017659 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017660 ac_top_srcdir=$ac_top_builddir_sub
17661 ac_abs_top_srcdir=$ac_pwd ;;
17662 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017663 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017664 ac_top_srcdir=$srcdir
17665 ac_abs_top_srcdir=$srcdir ;;
17666 *) # Relative name.
17667 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17668 ac_top_srcdir=$ac_top_build_prefix$srcdir
17669 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017670esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017671ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017672
Martin v. Löwis11437992002-04-12 09:54:03 +000017673
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017674 case $ac_mode in
17675 :F)
17676 #
17677 # CONFIG_FILE
17678 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017679
17680 case $INSTALL in
17681 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017682 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017683 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017684 ac_MKDIR_P=$MKDIR_P
17685 case $MKDIR_P in
17686 [\\/$]* | ?:[\\/]* ) ;;
17687 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17688 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017689_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017690
Matthias Kloseb9621712010-04-24 17:59:49 +000017691cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017692# If the template does not know about datarootdir, expand it.
17693# FIXME: This hack should be removed a few years after 2.60.
17694ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017695ac_sed_dataroot='
17696/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017697 p
17698 q
17699}
17700/@datadir@/p
17701/@docdir@/p
17702/@infodir@/p
17703/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017704/@mandir@/p'
17705case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017706*datarootdir*) ac_datarootdir_seen=yes;;
17707*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017708 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17709$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017711cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017712 ac_datarootdir_hack='
17713 s&@datadir@&$datadir&g
17714 s&@docdir@&$docdir&g
17715 s&@infodir@&$infodir&g
17716 s&@localedir@&$localedir&g
17717 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017718 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017719esac
17720_ACEOF
17721
17722# Neutralize VPATH when `$srcdir' = `.'.
17723# Shell code in configure.ac might set extrasub.
17724# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017725cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17726ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017727$extrasub
17728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017729cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017730:t
17731/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017732s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017733s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017734s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017735s&@srcdir@&$ac_srcdir&;t t
17736s&@abs_srcdir@&$ac_abs_srcdir&;t t
17737s&@top_srcdir@&$ac_top_srcdir&;t t
17738s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17739s&@builddir@&$ac_builddir&;t t
17740s&@abs_builddir@&$ac_abs_builddir&;t t
17741s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17742s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017743s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017744$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017745"
Victor Stinnere0be4232011-10-25 13:06:09 +020017746eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17747 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017749test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017750 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17751 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17752 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017754which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017755$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017756which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017757
Victor Stinnere0be4232011-10-25 13:06:09 +020017758 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017759 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017760 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17761 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017762 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017763 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017764 ;;
17765 :H)
17766 #
17767 # CONFIG_HEADER
17768 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017769 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017770 {
17771 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017772 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17773 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017774 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017775 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017776 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17777$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017778 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017779 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017780 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017781 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017782 fi
17783 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017784 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017785 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017786 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017787 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017788 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017789
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017790
17791 esac
17792
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017793
17794 case $ac_file$ac_mode in
17795 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17796
17797 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017798done # for ac_tag
17799
Guido van Rossum627b2d71993-12-24 10:39:16 +000017800
Matthias Kloseb9621712010-04-24 17:59:49 +000017801as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017802_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017803ac_clean_files=$ac_clean_files_save
17804
Matthias Kloseb9621712010-04-24 17:59:49 +000017805test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017806 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017807
Martin v. Löwis11437992002-04-12 09:54:03 +000017808
17809# configure is writing to config.log, and then calls config.status.
17810# config.status does its own redirection, appending to config.log.
17811# Unfortunately, on DOS this fails, as config.log is still kept open
17812# by configure, so config.status won't be able to write to it; its
17813# output is simply discarded. So we exec the FD to /dev/null,
17814# effectively closing config.log, so it can be properly (re)opened and
17815# appended to by config.status. When coming back to configure, we
17816# need to make the FD available again.
17817if test "$no_create" != yes; then
17818 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017819 ac_config_status_args=
17820 test "$silent" = yes &&
17821 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017822 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017823 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017824 exec 5>>config.log
17825 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17826 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017827 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017828fi
17829if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17831$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017832fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017833
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017834
Christian Heimes75ed8902013-11-20 01:11:18 +010017835echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017836if test ! -f Modules/Setup
17837then
17838 cp $srcdir/Modules/Setup.dist Modules/Setup
17839fi
17840
Christian Heimes75ed8902013-11-20 01:11:18 +010017841echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017842if test ! -f Modules/Setup.local
17843then
17844 echo "# Edit this file for local setup changes" >Modules/Setup.local
17845fi
17846
Christian Heimes75ed8902013-11-20 01:11:18 +010017847echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017848$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17849 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017850 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017851mv config.c Modules