blob: ecefde4cfb9be70224193a100ce60fd861061ec7 [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.
Larry Hastingsf5002bd2014-03-16 23:05:59 -07003# Generated by GNU Autoconf 2.69 for python 3.5.
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'
Larry Hastingsf5002bd2014-03-16 23:05:59 -0700583PACKAGE_VERSION='3.5'
584PACKAGE_STRING='python 3.5'
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
Benjamin Peterson0f3cde12014-12-15 00:00:23 -0500653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000655PKG_CONFIG
656SHLIBS
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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000670ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000671LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100672MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000673INSTALL_DATA
674INSTALL_SCRIPT
675INSTALL_PROGRAM
Kushal Das02d23a22014-04-15 23:50:06 +0530676OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200677PYTHON
678ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200679ac_ct_READELF
680READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000681ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200682ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000683AR
684RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000685USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000686GNULD
687LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000688LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000689RUNSHARED
690INSTSONAME
691LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000692PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000693BLDLIBRARY
694DLLLIBRARY
695LDLIBRARY
696LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100697MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000698BUILDEXEEXT
699EGREP
700GREP
701CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200702NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200703ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000704MAINCC
705CXX
706OBJEXT
707EXEEXT
708ac_ct_CC
709CPPFLAGS
710LDFLAGS
711CFLAGS
712CC
713EXPORT_MACOSX_DEPLOYMENT_TARGET
714CONFIGURE_MACOSX_DEPLOYMENT_TARGET
715SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200716_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000718FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000719FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800720FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000721FRAMEWORKALTINSTALLLAST
722FRAMEWORKALTINSTALLFIRST
723FRAMEWORKINSTALLLAST
724FRAMEWORKINSTALLFIRST
725PYTHONFRAMEWORKINSTALLDIR
726PYTHONFRAMEWORKPREFIX
727PYTHONFRAMEWORKDIR
728PYTHONFRAMEWORKIDENTIFIER
729PYTHONFRAMEWORK
730LIPO_32BIT_FLAGS
731ARCH_RUN_32BIT
732UNIVERSALSDK
733CONFIG_ARGS
734SOVERSION
735VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200736PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100737host_os
738host_vendor
739host_cpu
740host
741build_os
742build_vendor
743build_cpu
744build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500745HAS_HG
746HGBRANCH
747HGTAG
748HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400749BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000750target_alias
751host_alias
752build_alias
753LIBS
754ECHO_T
755ECHO_N
756ECHO_C
757DEFS
758mandir
759localedir
760libdir
761psdir
762pdfdir
763dvidir
764htmldir
765infodir
766docdir
767oldincludedir
768includedir
769localstatedir
770sharedstatedir
771sysconfdir
772datadir
773datarootdir
774libexecdir
775sbindir
776bindir
777program_transform_name
778prefix
779exec_prefix
780PACKAGE_URL
781PACKAGE_BUGREPORT
782PACKAGE_STRING
783PACKAGE_VERSION
784PACKAGE_TARNAME
785PACKAGE_NAME
786PATH_SEPARATOR
787SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000788ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000789ac_user_opts='
790enable_option_checking
791enable_universalsdk
792with_universal_archs
793with_framework_name
794enable_framework
795with_gcc
796with_cxx_main
797with_suffix
798enable_shared
799enable_profiling
800with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100801with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100802with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000803with_libs
804with_system_expat
805with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100806with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000807enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700808with_tcltk_includes
809with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000810with_dbmliborder
811with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_threads
813with_thread
814enable_ipv6
815with_doc_strings
816with_tsc
817with_pymalloc
818with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000819with_fpectl
820with_libm
821with_libc
822enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000823with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800824with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000825'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000826 ac_precious_vars='build_alias
827host_alias
828target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100829MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000830CC
831CFLAGS
832LDFLAGS
833LIBS
834CPPFLAGS
Benjamin Peterson0f3cde12014-12-15 00:00:23 -0500835CPP
836PKG_CONFIG
837PKG_CONFIG_PATH
838PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839
Guido van Rossum627b2d71993-12-24 10:39:16 +0000840
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000842ac_init_help=
843ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000844ac_unrecognized_opts=
845ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846# The variables have the same names as the options, with
847# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000848cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851no_recursion=
852prefix=NONE
853program_prefix=NONE
854program_suffix=NONE
855program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860x_includes=NONE
861x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000862
863# Installation directory options.
864# These are left unexpanded so users can "make install exec_prefix=/foo"
865# and all the variables that are supposed to be based on exec_prefix
866# by default will actually change.
867# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000868# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000869bindir='${exec_prefix}/bin'
870sbindir='${exec_prefix}/sbin'
871libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000872datarootdir='${prefix}/share'
873datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000874sysconfdir='${prefix}/etc'
875sharedstatedir='${prefix}/com'
876localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000877includedir='${prefix}/include'
878oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000879docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
880infodir='${datarootdir}/info'
881htmldir='${docdir}'
882dvidir='${docdir}'
883pdfdir='${docdir}'
884psdir='${docdir}'
885libdir='${exec_prefix}/lib'
886localedir='${datarootdir}/locale'
887mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000892do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893 # If the previous option needs an argument, assign it.
894 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896 ac_prev=
897 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000898 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000900 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200901 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
902 *=) ac_optarg= ;;
903 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000904 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906 # Accept the important Cygnus configure options, so we can diagnose typos.
907
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000908 case $ac_dashdash$ac_option in
909 --)
910 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912 -bindir | --bindir | --bindi | --bind | --bin | --bi)
913 ac_prev=bindir ;;
914 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000915 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000916
917 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000922 -cache-file | --cache-file | --cache-fil | --cache-fi \
923 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
924 ac_prev=cache_file ;;
925 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
926 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 cache_file=$ac_optarg ;;
928
929 --config-cache | -C)
930 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000934 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000937 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
938 | --dataroo | --dataro | --datar)
939 ac_prev=datarootdir ;;
940 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
941 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
942 datarootdir=$ac_optarg ;;
943
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000945 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000946 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000947 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200948 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000949 ac_useropt_orig=$ac_useropt
950 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
951 case $ac_user_opts in
952 *"
953"enable_$ac_useropt"
954"*) ;;
955 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
956 ac_unrecognized_sep=', ';;
957 esac
958 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000959
960 -docdir | --docdir | --docdi | --doc | --do)
961 ac_prev=docdir ;;
962 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
963 docdir=$ac_optarg ;;
964
965 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
966 ac_prev=dvidir ;;
967 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
968 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000969
970 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000971 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000972 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000973 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200974 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000975 ac_useropt_orig=$ac_useropt
976 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
977 case $ac_user_opts in
978 *"
979"enable_$ac_useropt"
980"*) ;;
981 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
982 ac_unrecognized_sep=', ';;
983 esac
984 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
987 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
988 | --exec | --exe | --ex)
989 ac_prev=exec_prefix ;;
990 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
991 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
992 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994
995 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000996 # Obsolete; use --with-gas.
997 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 -help | --help | --hel | --he | -h)
1000 ac_init_help=long ;;
1001 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1002 ac_init_help=recursive ;;
1003 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1004 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
1006 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001011 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1012 ac_prev=htmldir ;;
1013 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1014 | --ht=*)
1015 htmldir=$ac_optarg ;;
1016
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001017 -includedir | --includedir | --includedi | --included | --include \
1018 | --includ | --inclu | --incl | --inc)
1019 ac_prev=includedir ;;
1020 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1021 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023
1024 -infodir | --infodir | --infodi | --infod | --info | --inf)
1025 ac_prev=infodir ;;
1026 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -libdir | --libdir | --libdi | --libd)
1030 ac_prev=libdir ;;
1031 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001033
1034 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1035 | --libexe | --libex | --libe)
1036 ac_prev=libexecdir ;;
1037 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1038 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001041 -localedir | --localedir | --localedi | --localed | --locale)
1042 ac_prev=localedir ;;
1043 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1044 localedir=$ac_optarg ;;
1045
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001047 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048 ac_prev=localstatedir ;;
1049 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001050 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
1053 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1054 ac_prev=mandir ;;
1055 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001059 # Obsolete; use --without-fp.
1060 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
1062 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064 no_create=yes ;;
1065
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001066 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1067 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1068 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1071 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1072 | --oldin | --oldi | --old | --ol | --o)
1073 ac_prev=oldincludedir ;;
1074 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1075 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1076 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1080 ac_prev=prefix ;;
1081 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
1084 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1085 | --program-pre | --program-pr | --program-p)
1086 ac_prev=program_prefix ;;
1087 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1088 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
1091 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1092 | --program-suf | --program-su | --program-s)
1093 ac_prev=program_suffix ;;
1094 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1095 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
1098 -program-transform-name | --program-transform-name \
1099 | --program-transform-nam | --program-transform-na \
1100 | --program-transform-n | --program-transform- \
1101 | --program-transform | --program-transfor \
1102 | --program-transfo | --program-transf \
1103 | --program-trans | --program-tran \
1104 | --progr-tra | --program-tr | --program-t)
1105 ac_prev=program_transform_name ;;
1106 -program-transform-name=* | --program-transform-name=* \
1107 | --program-transform-nam=* | --program-transform-na=* \
1108 | --program-transform-n=* | --program-transform-=* \
1109 | --program-transform=* | --program-transfor=* \
1110 | --program-transfo=* | --program-transf=* \
1111 | --program-trans=* | --program-tran=* \
1112 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001115 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1116 ac_prev=pdfdir ;;
1117 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1118 pdfdir=$ac_optarg ;;
1119
1120 -psdir | --psdir | --psdi | --psd | --ps)
1121 ac_prev=psdir ;;
1122 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1123 psdir=$ac_optarg ;;
1124
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1126 | -silent | --silent | --silen | --sile | --sil)
1127 silent=yes ;;
1128
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001129 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1130 ac_prev=sbindir ;;
1131 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1132 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001134
1135 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1136 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1137 | --sharedst | --shareds | --shared | --share | --shar \
1138 | --sha | --sh)
1139 ac_prev=sharedstatedir ;;
1140 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1141 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1142 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1143 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001145
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001146 -site | --site | --sit)
1147 ac_prev=site ;;
1148 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001150
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1152 ac_prev=srcdir ;;
1153 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1157 | --syscon | --sysco | --sysc | --sys | --sy)
1158 ac_prev=sysconfdir ;;
1159 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1160 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001162
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167
1168 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1169 verbose=yes ;;
1170
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 -version | --version | --versio | --versi | --vers | -V)
1172 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173
1174 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001175 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001178 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001179 ac_useropt_orig=$ac_useropt
1180 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1181 case $ac_user_opts in
1182 *"
1183"with_$ac_useropt"
1184"*) ;;
1185 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1186 ac_unrecognized_sep=', ';;
1187 esac
1188 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189
1190 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001191 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001192 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001194 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001195 ac_useropt_orig=$ac_useropt
1196 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1197 case $ac_user_opts in
1198 *"
1199"with_$ac_useropt"
1200"*) ;;
1201 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1202 ac_unrecognized_sep=', ';;
1203 esac
1204 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001206 --x)
1207 # Obsolete; use --with-x.
1208 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209
1210 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1211 | --x-incl | --x-inc | --x-in | --x-i)
1212 ac_prev=x_includes ;;
1213 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1214 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001215 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216
1217 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1218 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1219 ac_prev=x_libraries ;;
1220 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1221 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001223
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001224 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1225Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226 ;;
1227
Martin v. Löwis11437992002-04-12 09:54:03 +00001228 *=*)
1229 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1230 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001231 case $ac_envvar in #(
1232 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001233 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001234 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001235 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001236 export $ac_envvar ;;
1237
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001238 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001240 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001242 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001243 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244 ;;
1245
1246 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001247done
1248
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001251 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001252fi
1253
Matthias Kloseb9621712010-04-24 17:59:49 +00001254if test -n "$ac_unrecognized_opts"; then
1255 case $enable_option_checking in
1256 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001257 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001258 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1259 esac
1260fi
1261
1262# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001263for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1264 datadir sysconfdir sharedstatedir localstatedir includedir \
1265 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1266 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001267do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001268 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001269 # Remove trailing slashes.
1270 case $ac_val in
1271 */ )
1272 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1273 eval $ac_var=\$ac_val;;
1274 esac
1275 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001276 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277 [\\/$]* | ?:[\\/]* ) continue;;
1278 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001279 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001280 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001281done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282
Martin v. Löwis11437992002-04-12 09:54:03 +00001283# There might be people who depend on the old broken behavior: `$host'
1284# used to hold the argument of --host etc.
1285# FIXME: To remove some day.
1286build=$build_alias
1287host=$host_alias
1288target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001289
Martin v. Löwis11437992002-04-12 09:54:03 +00001290# FIXME: To remove some day.
1291if test "x$host_alias" != x; then
1292 if test "x$build_alias" = x; then
1293 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001294 elif test "x$build_alias" != "x$host_alias"; then
1295 cross_compiling=yes
1296 fi
1297fi
1298
1299ac_tool_prefix=
1300test -n "$host_alias" && ac_tool_prefix=$host_alias-
1301
1302test "$silent" = yes && exec 6>/dev/null
1303
Guido van Rossum627b2d71993-12-24 10:39:16 +00001304
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001305ac_pwd=`pwd` && test -n "$ac_pwd" &&
1306ac_ls_di=`ls -di .` &&
1307ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001308 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001310 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001311
1312
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313# Find the source files, if location was not specified.
1314if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001315 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001316 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001317 ac_confdir=`$as_dirname -- "$as_myself" ||
1318$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1319 X"$as_myself" : 'X\(//\)[^/]' \| \
1320 X"$as_myself" : 'X\(//\)$' \| \
1321 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1322$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001323 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1324 s//\1/
1325 q
1326 }
1327 /^X\(\/\/\)[^/].*/{
1328 s//\1/
1329 q
1330 }
1331 /^X\(\/\/\)$/{
1332 s//\1/
1333 q
1334 }
1335 /^X\(\/\).*/{
1336 s//\1/
1337 q
1338 }
1339 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001340 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001342 srcdir=..
1343 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001344else
1345 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347if test ! -r "$srcdir/$ac_unique_file"; then
1348 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001349 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001351ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1352ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001353 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001354 pwd)`
1355# When building in place, set srcdir=.
1356if test "$ac_abs_confdir" = "$ac_pwd"; then
1357 srcdir=.
1358fi
1359# Remove unnecessary trailing slashes from srcdir.
1360# Double slashes in file names in object file debugging info
1361# mess up M-x gdb in Emacs.
1362case $srcdir in
1363*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1364esac
1365for ac_var in $ac_precious_vars; do
1366 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1367 eval ac_env_${ac_var}_value=\$${ac_var}
1368 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1369 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1370done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001371
Martin v. Löwis11437992002-04-12 09:54:03 +00001372#
1373# Report the --help message.
1374#
1375if test "$ac_init_help" = "long"; then
1376 # Omit some internal or obsolete options to make the list less imposing.
1377 # This message is too long to be a string in the A/UX 3.1 sh.
1378 cat <<_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001379\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001380
1381Usage: $0 [OPTION]... [VAR=VALUE]...
1382
1383To assign environment variables (e.g., CC, CFLAGS...), specify them as
1384VAR=VALUE. See below for descriptions of some of the useful variables.
1385
1386Defaults for the options are specified in brackets.
1387
1388Configuration:
1389 -h, --help display this help and exit
1390 --help=short display options specific to this package
1391 --help=recursive display the short help of all the included packages
1392 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001393 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001394 --cache-file=FILE cache test results in FILE [disabled]
1395 -C, --config-cache alias for \`--cache-file=config.cache'
1396 -n, --no-create do not create output files
1397 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1398
Martin v. Löwis11437992002-04-12 09:54:03 +00001399Installation directories:
1400 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001401 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001402 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001403 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001404
1405By default, \`make install' will install all the files in
1406\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1407an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1408for instance \`--prefix=\$HOME'.
1409
1410For better control, use the options below.
1411
1412Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001413 --bindir=DIR user executables [EPREFIX/bin]
1414 --sbindir=DIR system admin executables [EPREFIX/sbin]
1415 --libexecdir=DIR program executables [EPREFIX/libexec]
1416 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1417 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1418 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1419 --libdir=DIR object code libraries [EPREFIX/lib]
1420 --includedir=DIR C header files [PREFIX/include]
1421 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1422 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1423 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1424 --infodir=DIR info documentation [DATAROOTDIR/info]
1425 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1426 --mandir=DIR man documentation [DATAROOTDIR/man]
1427 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1428 --htmldir=DIR html documentation [DOCDIR]
1429 --dvidir=DIR dvi documentation [DOCDIR]
1430 --pdfdir=DIR pdf documentation [DOCDIR]
1431 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001432_ACEOF
1433
1434 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001435
1436System types:
1437 --build=BUILD configure for building on BUILD [guessed]
1438 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001439_ACEOF
1440fi
1441
1442if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001443 case $ac_init_help in
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001444 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001445 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001446 cat <<\_ACEOF
1447
1448Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001449 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001450 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1451 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001452 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001453 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001454 --enable-framework[=INSTALLDIR]
1455 Build (MacOSX|Darwin) framework
1456 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001457 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001458 --enable-loadable-sqlite-extensions
1459 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001460 --enable-ipv6 Enable ipv6 (with ipv4) support
1461 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001462 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001463 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001464
1465Optional Packages:
1466 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1467 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001468 --with-universal-archs=ARCH
1469 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001470 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001471 --with-framework-name=FRAMEWORK
1472 specify an alternate name of the framework built
1473 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001474 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001475 --with-cxx-main=<compiler>
1476 compile main() and link python executable with C++
1477 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --with-suffix=.exe set executable suffix
1479 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001480 --with-hash-algorithm=[fnv|siphash24]
1481 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001482 --with-address-sanitizer
1483 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001484 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001485 --with-system-expat build pyexpat module using an installed expat
1486 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001487 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001488 --with-system-libmpdec build _decimal module using an installed libmpdec
1489 library
Ned Deilyd819b932013-09-06 01:07:05 -07001490 --with-tcltk-includes='-I...'
1491 override search for Tcl and Tk include files
1492 --with-tcltk-libs='-L...'
1493 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001494 --with-dbmliborder=db1:db2:...
1495 order to check db backends for dbm. Valid value is a
1496 colon separated string with the backend names
1497 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001499 --with(out)-threads[=DIRECTORY]
1500 disable/enable thread support
1501 --with(out)-thread[=DIRECTORY]
1502 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001503 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001504 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001505 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001506 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001507 --with-fpectl enable SIGFPE catching
1508 --with-libm=STRING math library
1509 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001510 --with(out)-computed-gotos
1511 Use computed gotos in evaluation loop (enabled by
1512 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001513 --with(out)-ensurepip=[=upgrade]
1514 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001515
1516Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001517 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001518 CC C compiler command
1519 CFLAGS C compiler flags
1520 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1521 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001522 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001523 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001524 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001525 CPP C preprocessor
Benjamin Peterson0f3cde12014-12-15 00:00:23 -05001526 PKG_CONFIG path to pkg-config utility
1527 PKG_CONFIG_PATH
1528 directories to add to pkg-config's search path
1529 PKG_CONFIG_LIBDIR
1530 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001531
1532Use these variables to override the choices made by `configure' or to help
1533it to find libraries and programs with nonstandard names/locations.
1534
Georg Brandle2e15612009-05-20 18:25:10 +00001535Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001536_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001537ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001538fi
1539
1540if test "$ac_init_help" = "recursive"; then
1541 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001542 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001543 test -d "$ac_dir" ||
1544 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1545 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001546 ac_builddir=.
1547
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548case "$ac_dir" in
1549.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1550*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001551 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001552 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001553 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001554 case $ac_top_builddir_sub in
1555 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1556 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1557 esac ;;
1558esac
1559ac_abs_top_builddir=$ac_pwd
1560ac_abs_builddir=$ac_pwd$ac_dir_suffix
1561# for backward compatibility:
1562ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001563
1564case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001565 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001566 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 ac_top_srcdir=$ac_top_builddir_sub
1568 ac_abs_top_srcdir=$ac_pwd ;;
1569 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001570 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001571 ac_top_srcdir=$srcdir
1572 ac_abs_top_srcdir=$srcdir ;;
1573 *) # Relative name.
1574 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1575 ac_top_srcdir=$ac_top_build_prefix$srcdir
1576 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001577esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001579
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 cd "$ac_dir" || { ac_status=$?; continue; }
1581 # Check for guested configure.
1582 if test -f "$ac_srcdir/configure.gnu"; then
1583 echo &&
1584 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1585 elif test -f "$ac_srcdir/configure"; then
1586 echo &&
1587 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001589 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 fi || ac_status=$?
1591 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001592 done
1593fi
1594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001596if $ac_init_version; then
1597 cat <<\_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001598python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001599generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001600
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001601Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001602This configure script is free software; the Free Software Foundation
1603gives unlimited permission to copy, distribute and modify it.
1604_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001605 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001606fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001607
1608## ------------------------ ##
1609## Autoconf initialization. ##
1610## ------------------------ ##
1611
1612# ac_fn_c_try_compile LINENO
1613# --------------------------
1614# Try to compile conftest.$ac_ext, and return whether this succeeded.
1615ac_fn_c_try_compile ()
1616{
1617 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1618 rm -f conftest.$ac_objext
1619 if { { ac_try="$ac_compile"
1620case "(($ac_try" in
1621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1622 *) ac_try_echo=$ac_try;;
1623esac
1624eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1625$as_echo "$ac_try_echo"; } >&5
1626 (eval "$ac_compile") 2>conftest.err
1627 ac_status=$?
1628 if test -s conftest.err; then
1629 grep -v '^ *+' conftest.err >conftest.er1
1630 cat conftest.er1 >&5
1631 mv -f conftest.er1 conftest.err
1632 fi
1633 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1634 test $ac_status = 0; } && {
1635 test -z "$ac_c_werror_flag" ||
1636 test ! -s conftest.err
1637 } && test -s conftest.$ac_objext; then :
1638 ac_retval=0
1639else
1640 $as_echo "$as_me: failed program was:" >&5
1641sed 's/^/| /' conftest.$ac_ext >&5
1642
1643 ac_retval=1
1644fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001645 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001646 as_fn_set_status $ac_retval
1647
1648} # ac_fn_c_try_compile
1649
Matthias Kloseb9621712010-04-24 17:59:49 +00001650# ac_fn_c_try_link LINENO
1651# -----------------------
1652# Try to link conftest.$ac_ext, and return whether this succeeded.
1653ac_fn_c_try_link ()
1654{
1655 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1656 rm -f conftest.$ac_objext conftest$ac_exeext
1657 if { { ac_try="$ac_link"
1658case "(($ac_try" in
1659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1660 *) ac_try_echo=$ac_try;;
1661esac
1662eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1663$as_echo "$ac_try_echo"; } >&5
1664 (eval "$ac_link") 2>conftest.err
1665 ac_status=$?
1666 if test -s conftest.err; then
1667 grep -v '^ *+' conftest.err >conftest.er1
1668 cat conftest.er1 >&5
1669 mv -f conftest.er1 conftest.err
1670 fi
1671 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1672 test $ac_status = 0; } && {
1673 test -z "$ac_c_werror_flag" ||
1674 test ! -s conftest.err
1675 } && test -s conftest$ac_exeext && {
1676 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001677 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001678 }; then :
1679 ac_retval=0
1680else
1681 $as_echo "$as_me: failed program was:" >&5
1682sed 's/^/| /' conftest.$ac_ext >&5
1683
1684 ac_retval=1
1685fi
1686 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1687 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1688 # interfere with the next link command; also delete a directory that is
1689 # left behind by Apple's compiler. We do this before executing the actions.
1690 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001691 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001692 as_fn_set_status $ac_retval
1693
1694} # ac_fn_c_try_link
1695
Matthias Kloseb9621712010-04-24 17:59:49 +00001696# ac_fn_c_try_cpp LINENO
1697# ----------------------
1698# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1699ac_fn_c_try_cpp ()
1700{
1701 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1702 if { { ac_try="$ac_cpp conftest.$ac_ext"
1703case "(($ac_try" in
1704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1705 *) ac_try_echo=$ac_try;;
1706esac
1707eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1708$as_echo "$ac_try_echo"; } >&5
1709 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1710 ac_status=$?
1711 if test -s conftest.err; then
1712 grep -v '^ *+' conftest.err >conftest.er1
1713 cat conftest.er1 >&5
1714 mv -f conftest.er1 conftest.err
1715 fi
1716 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001717 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001718 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1719 test ! -s conftest.err
1720 }; then :
1721 ac_retval=0
1722else
1723 $as_echo "$as_me: failed program was:" >&5
1724sed 's/^/| /' conftest.$ac_ext >&5
1725
1726 ac_retval=1
1727fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001728 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001729 as_fn_set_status $ac_retval
1730
1731} # ac_fn_c_try_cpp
1732
1733# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1734# -------------------------------------------------------
1735# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1736# the include files in INCLUDES and setting the cache variable VAR
1737# accordingly.
1738ac_fn_c_check_header_mongrel ()
1739{
1740 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001741 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1743$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001744if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001745 $as_echo_n "(cached) " >&6
1746fi
1747eval ac_res=\$$3
1748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1749$as_echo "$ac_res" >&6; }
1750else
1751 # Is the header compilable?
1752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1753$as_echo_n "checking $2 usability... " >&6; }
1754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1755/* end confdefs.h. */
1756$4
1757#include <$2>
1758_ACEOF
1759if ac_fn_c_try_compile "$LINENO"; then :
1760 ac_header_compiler=yes
1761else
1762 ac_header_compiler=no
1763fi
1764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1766$as_echo "$ac_header_compiler" >&6; }
1767
1768# Is the header present?
1769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1770$as_echo_n "checking $2 presence... " >&6; }
1771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1772/* end confdefs.h. */
1773#include <$2>
1774_ACEOF
1775if ac_fn_c_try_cpp "$LINENO"; then :
1776 ac_header_preproc=yes
1777else
1778 ac_header_preproc=no
1779fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001780rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1782$as_echo "$ac_header_preproc" >&6; }
1783
1784# So? What about this header?
1785case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1786 yes:no: )
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1788$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1790$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1791 ;;
1792 no:yes:* )
1793 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1794$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1796$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1798$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1799 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1800$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1801 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1802$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001803( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001804## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001805## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001806 ) | sed "s/^/$as_me: WARNING: /" >&2
1807 ;;
1808esac
1809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1810$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001811if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001812 $as_echo_n "(cached) " >&6
1813else
1814 eval "$3=\$ac_header_compiler"
1815fi
1816eval ac_res=\$$3
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1818$as_echo "$ac_res" >&6; }
1819fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001820 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001821
1822} # ac_fn_c_check_header_mongrel
1823
1824# ac_fn_c_try_run LINENO
1825# ----------------------
1826# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1827# that executables *can* be run.
1828ac_fn_c_try_run ()
1829{
1830 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1831 if { { ac_try="$ac_link"
1832case "(($ac_try" in
1833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1834 *) ac_try_echo=$ac_try;;
1835esac
1836eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1837$as_echo "$ac_try_echo"; } >&5
1838 (eval "$ac_link") 2>&5
1839 ac_status=$?
1840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1841 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1842 { { case "(($ac_try" in
1843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1844 *) ac_try_echo=$ac_try;;
1845esac
1846eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1847$as_echo "$ac_try_echo"; } >&5
1848 (eval "$ac_try") 2>&5
1849 ac_status=$?
1850 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1851 test $ac_status = 0; }; }; then :
1852 ac_retval=0
1853else
1854 $as_echo "$as_me: program exited with status $ac_status" >&5
1855 $as_echo "$as_me: failed program was:" >&5
1856sed 's/^/| /' conftest.$ac_ext >&5
1857
1858 ac_retval=$ac_status
1859fi
1860 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001861 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001862 as_fn_set_status $ac_retval
1863
1864} # ac_fn_c_try_run
1865
1866# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1867# -------------------------------------------------------
1868# Tests whether HEADER exists and can be compiled using the include files in
1869# INCLUDES, setting the cache variable VAR accordingly.
1870ac_fn_c_check_header_compile ()
1871{
1872 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1874$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001875if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001876 $as_echo_n "(cached) " >&6
1877else
1878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1879/* end confdefs.h. */
1880$4
1881#include <$2>
1882_ACEOF
1883if ac_fn_c_try_compile "$LINENO"; then :
1884 eval "$3=yes"
1885else
1886 eval "$3=no"
1887fi
1888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1889fi
1890eval ac_res=\$$3
1891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1892$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001893 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001894
1895} # ac_fn_c_check_header_compile
1896
Matthias Kloseb9621712010-04-24 17:59:49 +00001897# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1898# -------------------------------------------
1899# Tests whether TYPE exists after having included INCLUDES, setting cache
1900# variable VAR accordingly.
1901ac_fn_c_check_type ()
1902{
1903 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1905$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001906if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001907 $as_echo_n "(cached) " >&6
1908else
1909 eval "$3=no"
1910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1911/* end confdefs.h. */
1912$4
1913int
1914main ()
1915{
1916if (sizeof ($2))
1917 return 0;
1918 ;
1919 return 0;
1920}
1921_ACEOF
1922if ac_fn_c_try_compile "$LINENO"; then :
1923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1924/* end confdefs.h. */
1925$4
1926int
1927main ()
1928{
1929if (sizeof (($2)))
1930 return 0;
1931 ;
1932 return 0;
1933}
1934_ACEOF
1935if ac_fn_c_try_compile "$LINENO"; then :
1936
1937else
1938 eval "$3=yes"
1939fi
1940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1941fi
1942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1943fi
1944eval ac_res=\$$3
1945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1946$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001947 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001948
1949} # ac_fn_c_check_type
1950
1951# ac_fn_c_find_uintX_t LINENO BITS VAR
1952# ------------------------------------
1953# Finds an unsigned integer type with width BITS, setting cache variable VAR
1954# accordingly.
1955ac_fn_c_find_uintX_t ()
1956{
1957 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1959$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001960if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001961 $as_echo_n "(cached) " >&6
1962else
1963 eval "$3=no"
1964 # Order is important - never check a type that is potentially smaller
1965 # than half of the expected target width.
1966 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1967 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1969/* end confdefs.h. */
1970$ac_includes_default
1971int
1972main ()
1973{
1974static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001975test_array [0] = 0;
1976return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001977
1978 ;
1979 return 0;
1980}
1981_ACEOF
1982if ac_fn_c_try_compile "$LINENO"; then :
1983 case $ac_type in #(
1984 uint$2_t) :
1985 eval "$3=yes" ;; #(
1986 *) :
1987 eval "$3=\$ac_type" ;;
1988esac
1989fi
1990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001991 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001992
1993else
1994 break
1995fi
1996 done
1997fi
1998eval ac_res=\$$3
1999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2000$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002001 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002002
2003} # ac_fn_c_find_uintX_t
2004
2005# ac_fn_c_find_intX_t LINENO BITS VAR
2006# -----------------------------------
2007# Finds a signed integer type with width BITS, setting cache variable VAR
2008# accordingly.
2009ac_fn_c_find_intX_t ()
2010{
2011 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2013$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002014if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002015 $as_echo_n "(cached) " >&6
2016else
2017 eval "$3=no"
2018 # Order is important - never check a type that is potentially smaller
2019 # than half of the expected target width.
2020 for ac_type in int$2_t 'int' 'long int' \
2021 'long long int' 'short int' 'signed char'; do
2022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2023/* end confdefs.h. */
2024$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002025 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002026int
2027main ()
2028{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002029static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002030test_array [0] = 0;
2031return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002032
2033 ;
2034 return 0;
2035}
2036_ACEOF
2037if ac_fn_c_try_compile "$LINENO"; then :
2038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2039/* end confdefs.h. */
2040$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002041 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002042int
2043main ()
2044{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002045static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002046 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002047test_array [0] = 0;
2048return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002049
2050 ;
2051 return 0;
2052}
2053_ACEOF
2054if ac_fn_c_try_compile "$LINENO"; then :
2055
2056else
2057 case $ac_type in #(
2058 int$2_t) :
2059 eval "$3=yes" ;; #(
2060 *) :
2061 eval "$3=\$ac_type" ;;
2062esac
2063fi
2064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2065fi
2066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002067 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002068
2069else
2070 break
2071fi
2072 done
2073fi
2074eval ac_res=\$$3
2075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2076$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002077 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002078
2079} # ac_fn_c_find_intX_t
2080
2081# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2082# --------------------------------------------
2083# Tries to find the compile-time value of EXPR in a program that includes
2084# INCLUDES, setting VAR accordingly. Returns whether the value could be
2085# computed
2086ac_fn_c_compute_int ()
2087{
2088 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2089 if test "$cross_compiling" = yes; then
2090 # Depending upon the size, compute the lo and hi bounds.
2091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2092/* end confdefs.h. */
2093$4
2094int
2095main ()
2096{
2097static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002098test_array [0] = 0;
2099return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002100
2101 ;
2102 return 0;
2103}
2104_ACEOF
2105if ac_fn_c_try_compile "$LINENO"; then :
2106 ac_lo=0 ac_mid=0
2107 while :; do
2108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2109/* end confdefs.h. */
2110$4
2111int
2112main ()
2113{
2114static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002115test_array [0] = 0;
2116return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002117
2118 ;
2119 return 0;
2120}
2121_ACEOF
2122if ac_fn_c_try_compile "$LINENO"; then :
2123 ac_hi=$ac_mid; break
2124else
2125 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2126 if test $ac_lo -le $ac_mid; then
2127 ac_lo= ac_hi=
2128 break
2129 fi
2130 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2131fi
2132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2133 done
2134else
2135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2136/* end confdefs.h. */
2137$4
2138int
2139main ()
2140{
2141static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002142test_array [0] = 0;
2143return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002144
2145 ;
2146 return 0;
2147}
2148_ACEOF
2149if ac_fn_c_try_compile "$LINENO"; then :
2150 ac_hi=-1 ac_mid=-1
2151 while :; do
2152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2153/* end confdefs.h. */
2154$4
2155int
2156main ()
2157{
2158static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002159test_array [0] = 0;
2160return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002161
2162 ;
2163 return 0;
2164}
2165_ACEOF
2166if ac_fn_c_try_compile "$LINENO"; then :
2167 ac_lo=$ac_mid; break
2168else
2169 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2170 if test $ac_mid -le $ac_hi; then
2171 ac_lo= ac_hi=
2172 break
2173 fi
2174 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2175fi
2176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2177 done
2178else
2179 ac_lo= ac_hi=
2180fi
2181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2182fi
2183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2184# Binary search between lo and hi bounds.
2185while test "x$ac_lo" != "x$ac_hi"; do
2186 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2188/* end confdefs.h. */
2189$4
2190int
2191main ()
2192{
2193static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002194test_array [0] = 0;
2195return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002196
2197 ;
2198 return 0;
2199}
2200_ACEOF
2201if ac_fn_c_try_compile "$LINENO"; then :
2202 ac_hi=$ac_mid
2203else
2204 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2205fi
2206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2207done
2208case $ac_lo in #((
2209?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2210'') ac_retval=1 ;;
2211esac
2212 else
2213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2214/* end confdefs.h. */
2215$4
2216static long int longval () { return $2; }
2217static unsigned long int ulongval () { return $2; }
2218#include <stdio.h>
2219#include <stdlib.h>
2220int
2221main ()
2222{
2223
2224 FILE *f = fopen ("conftest.val", "w");
2225 if (! f)
2226 return 1;
2227 if (($2) < 0)
2228 {
2229 long int i = longval ();
2230 if (i != ($2))
2231 return 1;
2232 fprintf (f, "%ld", i);
2233 }
2234 else
2235 {
2236 unsigned long int i = ulongval ();
2237 if (i != ($2))
2238 return 1;
2239 fprintf (f, "%lu", i);
2240 }
2241 /* Do not output a trailing newline, as this causes \r\n confusion
2242 on some platforms. */
2243 return ferror (f) || fclose (f) != 0;
2244
2245 ;
2246 return 0;
2247}
2248_ACEOF
2249if ac_fn_c_try_run "$LINENO"; then :
2250 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2251else
2252 ac_retval=1
2253fi
2254rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2255 conftest.$ac_objext conftest.beam conftest.$ac_ext
2256rm -f conftest.val
2257
2258 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002259 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002260 as_fn_set_status $ac_retval
2261
2262} # ac_fn_c_compute_int
2263
2264# ac_fn_c_check_func LINENO FUNC VAR
2265# ----------------------------------
2266# Tests whether FUNC exists, setting the cache variable VAR accordingly
2267ac_fn_c_check_func ()
2268{
2269 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2271$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002272if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002273 $as_echo_n "(cached) " >&6
2274else
2275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276/* end confdefs.h. */
2277/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2278 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2279#define $2 innocuous_$2
2280
2281/* System header to define __stub macros and hopefully few prototypes,
2282 which can conflict with char $2 (); below.
2283 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2284 <limits.h> exists even on freestanding compilers. */
2285
2286#ifdef __STDC__
2287# include <limits.h>
2288#else
2289# include <assert.h>
2290#endif
2291
2292#undef $2
2293
2294/* Override any GCC internal prototype to avoid an error.
2295 Use char because int might match the return type of a GCC
2296 builtin and then its argument prototype would still apply. */
2297#ifdef __cplusplus
2298extern "C"
2299#endif
2300char $2 ();
2301/* The GNU C library defines this for functions which it implements
2302 to always fail with ENOSYS. Some functions are actually named
2303 something starting with __ and the normal name is an alias. */
2304#if defined __stub_$2 || defined __stub___$2
2305choke me
2306#endif
2307
2308int
2309main ()
2310{
2311return $2 ();
2312 ;
2313 return 0;
2314}
2315_ACEOF
2316if ac_fn_c_try_link "$LINENO"; then :
2317 eval "$3=yes"
2318else
2319 eval "$3=no"
2320fi
2321rm -f core conftest.err conftest.$ac_objext \
2322 conftest$ac_exeext conftest.$ac_ext
2323fi
2324eval ac_res=\$$3
2325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2326$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002327 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002328
2329} # ac_fn_c_check_func
2330
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002331# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2332# ---------------------------------------------
2333# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2334# accordingly.
2335ac_fn_c_check_decl ()
2336{
2337 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2338 as_decl_name=`echo $2|sed 's/ *(.*//'`
2339 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2341$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2342if eval \${$3+:} false; then :
2343 $as_echo_n "(cached) " >&6
2344else
2345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2346/* end confdefs.h. */
2347$4
2348int
2349main ()
2350{
2351#ifndef $as_decl_name
2352#ifdef __cplusplus
2353 (void) $as_decl_use;
2354#else
2355 (void) $as_decl_name;
2356#endif
2357#endif
2358
2359 ;
2360 return 0;
2361}
2362_ACEOF
2363if ac_fn_c_try_compile "$LINENO"; then :
2364 eval "$3=yes"
2365else
2366 eval "$3=no"
2367fi
2368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2369fi
2370eval ac_res=\$$3
2371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2372$as_echo "$ac_res" >&6; }
2373 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2374
2375} # ac_fn_c_check_decl
2376
Matthias Kloseb9621712010-04-24 17:59:49 +00002377# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2378# ----------------------------------------------------
2379# Tries to find if the field MEMBER exists in type AGGR, after including
2380# INCLUDES, setting cache variable VAR accordingly.
2381ac_fn_c_check_member ()
2382{
2383 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2385$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002386if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002387 $as_echo_n "(cached) " >&6
2388else
2389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2390/* end confdefs.h. */
2391$5
2392int
2393main ()
2394{
2395static $2 ac_aggr;
2396if (ac_aggr.$3)
2397return 0;
2398 ;
2399 return 0;
2400}
2401_ACEOF
2402if ac_fn_c_try_compile "$LINENO"; then :
2403 eval "$4=yes"
2404else
2405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2406/* end confdefs.h. */
2407$5
2408int
2409main ()
2410{
2411static $2 ac_aggr;
2412if (sizeof ac_aggr.$3)
2413return 0;
2414 ;
2415 return 0;
2416}
2417_ACEOF
2418if ac_fn_c_try_compile "$LINENO"; then :
2419 eval "$4=yes"
2420else
2421 eval "$4=no"
2422fi
2423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2424fi
2425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2426fi
2427eval ac_res=\$$4
2428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2429$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002430 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002431
2432} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002433cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002434This file contains any messages produced by compilers while
2435running configure, to aid debugging if configure makes a mistake.
2436
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002437It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002438generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002439
2440 $ $0 $@
2441
2442_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002443exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002444{
2445cat <<_ASUNAME
2446## --------- ##
2447## Platform. ##
2448## --------- ##
2449
2450hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2451uname -m = `(uname -m) 2>/dev/null || echo unknown`
2452uname -r = `(uname -r) 2>/dev/null || echo unknown`
2453uname -s = `(uname -s) 2>/dev/null || echo unknown`
2454uname -v = `(uname -v) 2>/dev/null || echo unknown`
2455
2456/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2457/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2458
2459/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2460/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2461/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002463/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2464/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2465/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2466
2467_ASUNAME
2468
2469as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2470for as_dir in $PATH
2471do
2472 IFS=$as_save_IFS
2473 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002474 $as_echo "PATH: $as_dir"
2475 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002477
2478} >&5
2479
2480cat >&5 <<_ACEOF
2481
2482
2483## ----------- ##
2484## Core tests. ##
2485## ----------- ##
2486
2487_ACEOF
2488
2489
2490# Keep a trace of the command line.
2491# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002492# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002493# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002494# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002495ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002496ac_configure_args0=
2497ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002498ac_must_keep_next=false
2499for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002500do
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 for ac_arg
2502 do
2503 case $ac_arg in
2504 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2505 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2506 | -silent | --silent | --silen | --sile | --sil)
2507 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 esac
2511 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002516 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002518 case $ac_arg in
2519 *=* | --config-cache | -C | -disable-* | --disable-* \
2520 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2521 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2522 | -with-* | --with-* | -without-* | --without-* | --x)
2523 case "$ac_configure_args0 " in
2524 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2525 esac
2526 ;;
2527 -* ) ac_must_keep_next=true ;;
2528 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002529 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002531 ;;
2532 esac
2533 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002534done
Matthias Kloseb9621712010-04-24 17:59:49 +00002535{ ac_configure_args0=; unset ac_configure_args0;}
2536{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002537
2538# When interrupted or exit'd, cleanup temporary files, and complete
2539# config.log. We remove comments because anyway the quotes in there
2540# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541# WARNING: Use '\'' to represent an apostrophe within the trap.
2542# 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 +00002543trap 'exit_status=$?
2544 # Save into config.log some information that might help in debugging.
2545 {
2546 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002547
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002548 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002549## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002550## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002551 echo
2552 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553(
2554 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2555 eval ac_val=\$$ac_var
2556 case $ac_val in #(
2557 *${as_nl}*)
2558 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002559 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2560$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002561 esac
2562 case $ac_var in #(
2563 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002564 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2565 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566 esac ;;
2567 esac
2568 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002569 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002570 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2571 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573 "s/'\''/'\''\\\\'\'''\''/g;
2574 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2575 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002576 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002578 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579 esac |
2580 sort
2581)
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002583
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002584 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002585## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002586## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002587 echo
2588 for ac_var in $ac_subst_vars
2589 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590 eval ac_val=\$$ac_var
2591 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002592 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002595 done | sort
2596 echo
2597
2598 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002599 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002601## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002602 echo
2603 for ac_var in $ac_subst_files
2604 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605 eval ac_val=\$$ac_var
2606 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002610 done | sort
2611 echo
2612 fi
2613
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002615 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002616## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002617## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 echo
2621 fi
2622 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 $as_echo "$as_me: caught signal $ac_signal"
2624 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626 rm -f core *.core core.conftest.* &&
2627 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002630for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002631 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002632done
2633ac_signal=0
2634
2635# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002637
Matthias Kloseb9621712010-04-24 17:59:49 +00002638$as_echo "/* confdefs.h */" > confdefs.h
2639
Martin v. Löwis11437992002-04-12 09:54:03 +00002640# Predefined preprocessor variables.
2641
2642cat >>confdefs.h <<_ACEOF
2643#define PACKAGE_NAME "$PACKAGE_NAME"
2644_ACEOF
2645
Martin v. Löwis11437992002-04-12 09:54:03 +00002646cat >>confdefs.h <<_ACEOF
2647#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2648_ACEOF
2649
Martin v. Löwis11437992002-04-12 09:54:03 +00002650cat >>confdefs.h <<_ACEOF
2651#define PACKAGE_VERSION "$PACKAGE_VERSION"
2652_ACEOF
2653
Martin v. Löwis11437992002-04-12 09:54:03 +00002654cat >>confdefs.h <<_ACEOF
2655#define PACKAGE_STRING "$PACKAGE_STRING"
2656_ACEOF
2657
Martin v. Löwis11437992002-04-12 09:54:03 +00002658cat >>confdefs.h <<_ACEOF
2659#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2660_ACEOF
2661
Matthias Kloseb9621712010-04-24 17:59:49 +00002662cat >>confdefs.h <<_ACEOF
2663#define PACKAGE_URL "$PACKAGE_URL"
2664_ACEOF
2665
Martin v. Löwis11437992002-04-12 09:54:03 +00002666
2667# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002668# Prefer an explicitly selected file to automatically selected ones.
2669ac_site_file1=NONE
2670ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002671if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002672 # We do not want a PATH search for config.site.
2673 case $CONFIG_SITE in #((
2674 -*) ac_site_file1=./$CONFIG_SITE;;
2675 */*) ac_site_file1=$CONFIG_SITE;;
2676 *) ac_site_file1=./$CONFIG_SITE;;
2677 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002678elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002679 ac_site_file1=$prefix/share/config.site
2680 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002681else
Matthias Kloseb9621712010-04-24 17:59:49 +00002682 ac_site_file1=$ac_default_prefix/share/config.site
2683 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002685for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002686do
Matthias Kloseb9621712010-04-24 17:59:49 +00002687 test "x$ac_site_file" = xNONE && continue
2688 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2689 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2690$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002691 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002692 . "$ac_site_file" \
2693 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2694$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2695as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002696See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002697 fi
2698done
2699
2700if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002701 # Some versions of bash will fail to source /dev/null (special files
2702 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2703 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2704 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2705$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002707 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2708 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002709 esac
2710 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002711else
Matthias Kloseb9621712010-04-24 17:59:49 +00002712 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2713$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002714 >$cache_file
2715fi
2716
2717# Check that the precious variables saved in the cache have kept the same
2718# value.
2719ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002720for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002721 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2722 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002723 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2724 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002725 case $ac_old_set,$ac_new_set in
2726 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002727 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2728$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 +00002729 ac_cache_corrupted=: ;;
2730 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002731 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2732$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002733 ac_cache_corrupted=: ;;
2734 ,);;
2735 *)
2736 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002737 # differences in whitespace do not lead to failure.
2738 ac_old_val_w=`echo x $ac_old_val`
2739 ac_new_val_w=`echo x $ac_new_val`
2740 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2742$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2743 ac_cache_corrupted=:
2744 else
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2746$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2747 eval $ac_var=\$ac_old_val
2748 fi
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2750$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2752$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 fi;;
2754 esac
2755 # Pass precious variables to config.status.
2756 if test "$ac_new_set" = set; then
2757 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002758 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002759 *) ac_arg=$ac_var=$ac_new_val ;;
2760 esac
2761 case " $ac_configure_args " in
2762 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002763 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002764 esac
2765 fi
2766done
2767if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002768 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2769$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2770 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2771$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002772 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002774## -------------------- ##
2775## Main body of script. ##
2776## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002777
Guido van Rossum7f43da71994-08-01 12:15:30 +00002778ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002779ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002780ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2781ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2782ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002783
Guido van Rossum627b2d71993-12-24 10:39:16 +00002784
Michael W. Hudson54241132001-12-07 15:38:26 +00002785
Trent Nelson4d4ec652012-10-16 08:51:24 -04002786
Trent Nelson5595ab52012-10-17 04:47:31 -04002787if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002788 # If we're building out-of-tree, we need to make sure the following
2789 # resources get picked up before their $srcdir counterparts.
2790 # Objects/ -> typeslots.inc
2791 # Include/ -> Python-ast.h, graminit.h
2792 # Python/ -> importlib.h
2793 # (A side effect of this is that these resources will automatically be
2794 # regenerated when building out-of-tree, regardless of whether or not
2795 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2796 # off.)
2797 BASECPPFLAGS="-IObjects -IInclude -IPython"
2798else
2799 BASECPPFLAGS=""
2800fi
2801
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002802
2803
2804
2805
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002806if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002807then
2808# Extract the first word of "hg", so it can be a program name with args.
2809set dummy hg; ac_word=$2
2810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2811$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002812if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002813 $as_echo_n "(cached) " >&6
2814else
2815 if test -n "$HAS_HG"; then
2816 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2817else
2818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2819for as_dir in $PATH
2820do
2821 IFS=$as_save_IFS
2822 test -z "$as_dir" && as_dir=.
2823 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002824 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002825 ac_cv_prog_HAS_HG="found"
2826 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2827 break 2
2828 fi
2829done
2830 done
2831IFS=$as_save_IFS
2832
2833 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2834fi
2835fi
2836HAS_HG=$ac_cv_prog_HAS_HG
2837if test -n "$HAS_HG"; then
2838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2839$as_echo "$HAS_HG" >&6; }
2840else
2841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2842$as_echo "no" >&6; }
2843fi
2844
2845
2846else
2847HAS_HG=no-repository
2848fi
2849if test $HAS_HG = found
2850then
2851 HGVERSION="hg id -i \$(srcdir)"
2852 HGTAG="hg id -t \$(srcdir)"
2853 HGBRANCH="hg id -b \$(srcdir)"
2854else
2855 HGVERSION=""
2856 HGTAG=""
2857 HGBRANCH=""
2858fi
2859
2860
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002861ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002862
2863
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002864ac_aux_dir=
2865for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2866 if test -f "$ac_dir/install-sh"; then
2867 ac_aux_dir=$ac_dir
2868 ac_install_sh="$ac_aux_dir/install-sh -c"
2869 break
2870 elif test -f "$ac_dir/install.sh"; then
2871 ac_aux_dir=$ac_dir
2872 ac_install_sh="$ac_aux_dir/install.sh -c"
2873 break
2874 elif test -f "$ac_dir/shtool"; then
2875 ac_aux_dir=$ac_dir
2876 ac_install_sh="$ac_aux_dir/shtool install -c"
2877 break
2878 fi
2879done
2880if test -z "$ac_aux_dir"; then
2881 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2882fi
2883
2884# These three variables are undocumented and unsupported,
2885# and are intended to be withdrawn in a future Autoconf release.
2886# They can cause serious problems if a builder's source tree is in a directory
2887# whose full name contains unusual characters.
2888ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2889ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2890ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2891
2892
2893# Make sure we can run config.sub.
2894$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2895 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2896
2897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2898$as_echo_n "checking build system type... " >&6; }
2899if ${ac_cv_build+:} false; then :
2900 $as_echo_n "(cached) " >&6
2901else
2902 ac_build_alias=$build_alias
2903test "x$ac_build_alias" = x &&
2904 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2905test "x$ac_build_alias" = x &&
2906 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2907ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2908 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2909
2910fi
2911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2912$as_echo "$ac_cv_build" >&6; }
2913case $ac_cv_build in
2914*-*-*) ;;
2915*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2916esac
2917build=$ac_cv_build
2918ac_save_IFS=$IFS; IFS='-'
2919set x $ac_cv_build
2920shift
2921build_cpu=$1
2922build_vendor=$2
2923shift; shift
2924# Remember, the first character of IFS is used to create $*,
2925# except with old shells:
2926build_os=$*
2927IFS=$ac_save_IFS
2928case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2929
2930
2931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2932$as_echo_n "checking host system type... " >&6; }
2933if ${ac_cv_host+:} false; then :
2934 $as_echo_n "(cached) " >&6
2935else
2936 if test "x$host_alias" = x; then
2937 ac_cv_host=$ac_cv_build
2938else
2939 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2940 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2941fi
2942
2943fi
2944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2945$as_echo "$ac_cv_host" >&6; }
2946case $ac_cv_host in
2947*-*-*) ;;
2948*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2949esac
2950host=$ac_cv_host
2951ac_save_IFS=$IFS; IFS='-'
2952set x $ac_cv_host
2953shift
2954host_cpu=$1
2955host_vendor=$2
2956shift; shift
2957# Remember, the first character of IFS is used to create $*,
2958# except with old shells:
2959host_os=$*
2960IFS=$ac_save_IFS
2961case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2962
2963
2964
doko@python.orga10e4a92013-01-25 18:45:12 +01002965
2966
Ned Deilyfcbc2462014-08-22 13:32:49 -07002967# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2968rm -f pybuilddir.txt
2969
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002970if test "$cross_compiling" = yes; then
2971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2972$as_echo_n "checking for python interpreter for cross build... " >&6; }
2973 if test -z "$PYTHON_FOR_BUILD"; then
2974 for interp in python$PACKAGE_VERSION python3 python; do
2975 which $interp >/dev/null 2>&1 || continue
2976 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2977 break
2978 fi
2979 interp=
2980 done
2981 if test x$interp = x; then
2982 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2983 fi
2984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2985$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002986 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 +02002987 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002988elif test "$cross_compiling" = maybe; then
2989 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002990else
2991 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2992fi
2993
2994
Martin v. Löwis11437992002-04-12 09:54:03 +00002995
Benjamin Petersond23f8222009-04-05 19:13:16 +00002996if test "$prefix" != "/"; then
2997 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2998fi
2999
3000
Martin v. Löwis11437992002-04-12 09:54:03 +00003001
3002
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003003# We don't use PACKAGE_ variables, and they cause conflicts
3004# with other autoconf-based packages that include Python.h
3005grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3006rm confdefs.h
3007mv confdefs.h.new confdefs.h
3008
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003009
Larry Hastingsf5002bd2014-03-16 23:05:59 -07003010VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003011
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003012# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003013
3014SOVERSION=1.0
3015
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003016# The later defininition of _XOPEN_SOURCE disables certain features
3017# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3018
Matthias Kloseb9621712010-04-24 17:59:49 +00003019$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003020
3021
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003022# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3023# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3024# them.
3025
Matthias Kloseb9621712010-04-24 17:59:49 +00003026$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003027
3028
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003029# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3030# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3031# them.
3032
Matthias Kloseb9621712010-04-24 17:59:49 +00003033$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003034
3035
Martin v. Löwisd6320502004-08-12 13:45:08 +00003036# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3037# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3038
Matthias Kloseb9621712010-04-24 17:59:49 +00003039$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003040
3041
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003042# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3043# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3044# them.
3045
Matthias Kloseb9621712010-04-24 17:59:49 +00003046$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003047
3048
3049
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003050define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003051
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003052# Arguments passed to configure.
3053
3054CONFIG_ARGS="$ac_configure_args"
3055
Matthias Kloseb9621712010-04-24 17:59:49 +00003056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3057$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003058# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003059if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003060 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003061 case $enableval in
3062 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003063 # Locate the best usable SDK, see Mac/README.txt for more
3064 # information
3065 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003066 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003067 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003068 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3069 if test ! -d "${enableval}"
3070 then
3071 enableval=/
3072 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003073 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003074 ;;
3075 esac
3076 case $enableval in
3077 no)
3078 UNIVERSALSDK=
3079 enable_universalsdk=
3080 ;;
3081 *)
3082 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003083 if test ! -d "${UNIVERSALSDK}"
3084 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003085 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003086 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003087 ;;
3088 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003089
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003090
Thomas Wouters477c8d52006-05-27 19:21:47 +00003091else
3092
3093 UNIVERSALSDK=
3094 enable_universalsdk=
3095
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003096fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003097
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003098if test -n "${UNIVERSALSDK}"
3099then
Matthias Kloseb9621712010-04-24 17:59:49 +00003100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3101$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003102else
Matthias Kloseb9621712010-04-24 17:59:49 +00003103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3104$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003105fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003106
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003107
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003108
Ned Deily87adb6e2013-10-18 21:09:56 -07003109ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003110
Ned Deilycbfb9a52012-06-23 16:02:19 -07003111# For backward compatibility reasons we prefer to select '32-bit' if available,
3112# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003113UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003114if test "`uname -s`" = "Darwin"
3115then
3116 if test -n "${UNIVERSALSDK}"
3117 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003118 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003119 then
3120 UNIVERSAL_ARCHS="intel"
3121 fi
3122 fi
3123fi
3124
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003125
Matthias Kloseb9621712010-04-24 17:59:49 +00003126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3127$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003128
3129# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003130if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003131 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003132 UNIVERSAL_ARCHS="$withval"
3133
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003134fi
3135
Ned Deily87adb6e2013-10-18 21:09:56 -07003136if test -n "${UNIVERSALSDK}"
3137then
3138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3139$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3140else
3141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3142$as_echo "no" >&6; }
3143fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003144
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003145
3146# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003147if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003148 withval=$with_framework_name;
3149 PYTHONFRAMEWORK=${withval}
3150 PYTHONFRAMEWORKDIR=${withval}.framework
3151 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3152
3153else
3154
3155 PYTHONFRAMEWORK=Python
3156 PYTHONFRAMEWORKDIR=Python.framework
3157 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3158
3159fi
3160
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003161# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003162if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003163 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003164 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003165 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003166 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003167 esac
3168 case $enableval in
3169 no)
3170 PYTHONFRAMEWORK=
3171 PYTHONFRAMEWORKDIR=no-framework
3172 PYTHONFRAMEWORKPREFIX=
3173 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003174 FRAMEWORKINSTALLFIRST=
3175 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003176 FRAMEWORKALTINSTALLFIRST=
3177 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003178 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003179 if test "x${prefix}" = "xNONE"; then
3180 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3181 else
3182 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3183 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003184 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003185 ;;
3186 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003187 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003188 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003189 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003190 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003191 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3192 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003193 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003194 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003195
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003196 if test "x${prefix}" = "xNONE" ; then
3197 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003198
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003199 else
3200 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3201 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003202
3203 case "${enableval}" in
3204 /System*)
3205 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3206 if test "${prefix}" = "NONE" ; then
3207 # See below
3208 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3209 fi
3210 ;;
3211
3212 /Library*)
3213 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3214 ;;
3215
3216 */Library/Frameworks)
3217 MDIR="`dirname "${enableval}"`"
3218 MDIR="`dirname "${MDIR}"`"
3219 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3220
3221 if test "${prefix}" = "NONE"; then
3222 # User hasn't specified the
3223 # --prefix option, but wants to install
3224 # the framework in a non-default location,
3225 # ensure that the compatibility links get
3226 # installed relative to that prefix as well
3227 # instead of in /usr/local.
3228 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3229 fi
3230 ;;
3231
3232 *)
3233 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3234 ;;
3235 esac
3236
Jack Jansen127e56e2001-09-11 14:41:54 +00003237 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003238
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003239 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003240 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003241 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003242
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003243 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003244
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003245 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3246
3247 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3248
Jack Jansene578a632001-08-15 01:27:14 +00003249 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003250
Guido van Rossum563e7081996-09-10 18:20:48 +00003251else
Martin v. Löwis11437992002-04-12 09:54:03 +00003252
Jack Jansene578a632001-08-15 01:27:14 +00003253 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003254 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003255 PYTHONFRAMEWORKPREFIX=
3256 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003257 FRAMEWORKINSTALLFIRST=
3258 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003259 FRAMEWORKALTINSTALLFIRST=
3260 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003261 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003262 if test "x${prefix}" = "xNONE" ; then
3263 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3264 else
3265 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3266 fi
Jack Jansene578a632001-08-15 01:27:14 +00003267 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003268
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003269
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003270fi
3271
Thomas Wouters477c8d52006-05-27 19:21:47 +00003272
3273
Michael W. Hudson54241132001-12-07 15:38:26 +00003274
3275
3276
3277
Jack Jansene578a632001-08-15 01:27:14 +00003278
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003279
3280
3281
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003282
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003283
Ned Deilyb8f944f2013-11-21 22:42:25 -08003284
Jack Jansene578a632001-08-15 01:27:14 +00003285##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003286## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003287## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003288##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003289# Set name for machine-dependent library files
3290
Matthias Kloseb9621712010-04-24 17:59:49 +00003291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3292$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003293if test -z "$MACHDEP"
3294then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003295 # avoid using uname for cross builds
3296 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003297 # ac_sys_system and ac_sys_release are used for setting
3298 # a lot of different things including 'define_xopen_source'
3299 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003300 case "$host" in
3301 *-*-linux*)
3302 ac_sys_system=Linux
3303 ;;
3304 *-*-cygwin*)
3305 ac_sys_system=Cygwin
3306 ;;
3307 *)
3308 # for now, limit cross builds to known configurations
3309 MACHDEP="unknown"
3310 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3311 esac
3312 ac_sys_release=
3313 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003314 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003315 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003316 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003317 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003318 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003319 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003320 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003321 fi
3322 ac_md_system=`echo $ac_sys_system |
3323 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3324 ac_md_release=`echo $ac_sys_release |
3325 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3326 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003327
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003328 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003329 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003330 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003331 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003332 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003333 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003334 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003335fi
Guido van Rossum91922671997-10-09 20:24:13 +00003336
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003337
3338if test "$cross_compiling" = yes; then
3339 case "$host" in
3340 *-*-linux*)
3341 case "$host_cpu" in
3342 arm*)
3343 _host_cpu=arm
3344 ;;
3345 *)
3346 _host_cpu=$host_cpu
3347 esac
3348 ;;
3349 *-*-cygwin*)
3350 _host_cpu=
3351 ;;
3352 *)
3353 # for now, limit cross builds to known configurations
3354 MACHDEP="unknown"
3355 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3356 esac
3357 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3358fi
3359
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003360# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3361# disable features if it is defined, without any means to access these
3362# features as extensions. For these systems, we skip the definition of
3363# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3364# some feature, make sure there is no alternative way to access this
3365# feature. Also, when using wildcards, make sure you have verified the
3366# need for not defining _XOPEN_SOURCE on all systems matching the
3367# wildcard, and that the wildcard does not include future systems
3368# (which may remove their limitations).
3369case $ac_sys_system/$ac_sys_release in
3370 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3371 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003372 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003373 # In addition, Stefan Krah confirms that issue #1244610 exists through
3374 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003375 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003376 define_xopen_source=no
3377 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3378 # also defined. This can be overridden by defining _BSD_SOURCE
3379 # As this has a different meaning on Linux, only define it on OpenBSD
3380
Matthias Kloseb9621712010-04-24 17:59:49 +00003381$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003382
3383 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003384 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003385 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3386 # also defined. This can be overridden by defining _BSD_SOURCE
3387 # As this has a different meaning on Linux, only define it on OpenBSD
3388
Matthias Kloseb9621712010-04-24 17:59:49 +00003389$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003390
3391 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003392 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3393 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3394 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003395 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 +00003396 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003397 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3398 # request to enable features supported by the standard as a request
3399 # to disable features not supported by the standard. The best way
3400 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3401 # entirely and define __EXTENSIONS__ instead.
3402 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003403 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003404 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3405 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003406 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003407 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003408 define_xopen_source=no;;
3409 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003410 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003411 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003412 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003413 # On FreeBSD 4, the math functions C89 does not cover are never defined
3414 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3415 FreeBSD/4.*)
3416 define_xopen_source=no;;
3417 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3418 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3419 # identifies itself as Darwin/7.*
3420 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3421 # disables platform specific features beyond repair.
3422 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3423 # has no effect, don't bother defining them
3424 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003425 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003426 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003427 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003428 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3429 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3430 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003431 AIX/4)
3432 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003433 AIX/5)
3434 if test `uname -r` -eq 1; then
3435 define_xopen_source=no
3436 fi
3437 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003438 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3439 # defining NI_NUMERICHOST.
3440 QNX/6.3.2)
3441 define_xopen_source=no
3442 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003443
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003444esac
3445
3446if test $define_xopen_source = yes
3447then
Victor Stinner14d098d2011-09-07 22:29:43 +02003448 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003449
Victor Stinner14d098d2011-09-07 22:29:43 +02003450$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003451
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003452
3453 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3454 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3455 # several APIs are not declared. Since this is also needed in some
3456 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003457
Matthias Kloseb9621712010-04-24 17:59:49 +00003458$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003459
3460
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003461
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003462$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003463
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003464fi
3465
Christian Heimes647cd872013-12-07 23:39:33 +01003466# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3467case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003468 hp*|HP*)
3469 define_stdc_a1=yes;;
3470 *)
3471 define_stdc_a1=no;;
3472esac
3473
3474if test $define_stdc_a1 = yes
3475then
Christian Heimes647cd872013-12-07 23:39:33 +01003476
3477$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3478
Christian Heimesb02bcae2013-12-08 15:21:08 +01003479fi
Christian Heimes647cd872013-12-07 23:39:33 +01003480
Guido van Rossum91922671997-10-09 20:24:13 +00003481#
3482# SGI compilers allow the specification of the both the ABI and the
3483# ISA on the command line. Depending on the values of these switches,
3484# different and often incompatable code will be generated.
3485#
3486# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3487# thus supply support for various ABI/ISA combinations. The MACHDEP
3488# variable is also adjusted.
3489#
3490
3491if test ! -z "$SGI_ABI"
3492then
3493 CC="cc $SGI_ABI"
3494 LDFLAGS="$SGI_ABI $LDFLAGS"
3495 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3498$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003499
Jack Jansen6b08a402004-06-03 12:41:45 +00003500# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3501# it may influence the way we can build extensions, so distutils
3502# needs to check it
3503
Thomas Wouters477c8d52006-05-27 19:21:47 +00003504
Jack Jansen6b08a402004-06-03 12:41:45 +00003505CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003506EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003507
Guido van Rossum627b2d71993-12-24 10:39:16 +00003508# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003509
3510# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3511# for debug/optimization stuff. BASECFLAGS is for flags that are required
3512# just to get things to compile and link. Users are free to override OPT
3513# when running configure or make. The build should not break if they do.
3514# BASECFLAGS should generally not be messed with, however.
3515
3516# XXX shouldn't some/most/all of this code be merged with the stuff later
3517# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3519$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003521# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003522if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003523 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003524 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003525 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003526 without_gcc=yes;;
3527 yes) CC=gcc
3528 without_gcc=no;;
3529 *) CC=$withval
3530 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003531 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003532else
Martin v. Löwis11437992002-04-12 09:54:03 +00003533
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003534 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003535 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003536 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003537 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003538 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003539fi
3540
Matthias Kloseb9621712010-04-24 17:59:49 +00003541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3542$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003543
Guido van Rossum8b131c51995-03-09 14:10:13 +00003544# If the user switches compilers, we can't believe the cache
3545if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3546then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003547 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003548(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003549fi
3550
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003551# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3552# when the compiler supports them, but we don't always want -O2, and
3553# we set -g later.
3554if test -z "$CFLAGS"; then
3555 CFLAGS=
3556fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003557
3558if test "$ac_sys_system" = "Darwin"
3559then
3560 # Compiler selection on MacOSX is more complicated than
3561 # AC_PROG_CC can handle, see Mac/README.txt for more
3562 # information
3563 if test -z "${CC}"
3564 then
3565 found_gcc=
3566 found_clang=
3567 as_save_IFS=$IFS; IFS=:
3568 for as_dir in $PATH
3569 do
3570 IFS=$as_save_IFS
3571 if test -x $as_dir/gcc; then
3572 if test -z "${found_gcc}"; then
3573 found_gcc=$as_dir/gcc
3574 fi
3575 fi
3576 if test -x $as_dir/clang; then
3577 if test -z "${found_clang}"; then
3578 found_clang=$as_dir/clang
3579 fi
3580 fi
3581 done
3582 IFS=$as_save_IFS
3583
3584 if test -n "$found_gcc" -a -n "$found_clang"
3585 then
3586 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3587 then
3588 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3589$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3590 CC="$found_clang"
3591 CXX="$found_clang++"
3592 fi
3593
3594
3595 elif test -z "$found_gcc" -a -n "$found_clang"
3596 then
3597 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3598$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3599 CC="$found_clang"
3600 CXX="$found_clang++"
3601
3602 elif test -z "$found_gcc" -a -z "$found_clang"
3603 then
3604 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3605 if test -n "${found_clang}"
3606 then
3607 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3608$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3609 CC="${found_clang}"
3610 CXX="`/usr/bin/xcrun -find clang++`"
3611
3612 # else: use default behaviour
3613 fi
3614 fi
3615 fi
3616fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003617ac_ext=c
3618ac_cpp='$CPP $CPPFLAGS'
3619ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3620ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3621ac_compiler_gnu=$ac_cv_c_compiler_gnu
3622if test -n "$ac_tool_prefix"; then
3623 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3624set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3626$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003627if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003629else
3630 if test -n "$CC"; then
3631 ac_cv_prog_CC="$CC" # Let the user override the test.
3632else
Martin v. Löwis11437992002-04-12 09:54:03 +00003633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3634for as_dir in $PATH
3635do
3636 IFS=$as_save_IFS
3637 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003639 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003640 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 $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 +00003642 break 2
3643 fi
3644done
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003646IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003647
Jack Jansendd19cf82001-12-06 22:36:17 +00003648fi
3649fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003650CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003651if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3653$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003654else
Matthias Kloseb9621712010-04-24 17:59:49 +00003655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3656$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003657fi
3658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659
Martin v. Löwis11437992002-04-12 09:54:03 +00003660fi
3661if test -z "$ac_cv_prog_CC"; then
3662 ac_ct_CC=$CC
3663 # Extract the first word of "gcc", so it can be a program name with args.
3664set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3666$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003667if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003669else
3670 if test -n "$ac_ct_CC"; then
3671 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3672else
3673as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3674for as_dir in $PATH
3675do
3676 IFS=$as_save_IFS
3677 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003679 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003680 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003681 $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 +00003682 break 2
3683 fi
3684done
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003686IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003687
3688fi
3689fi
3690ac_ct_CC=$ac_cv_prog_ac_ct_CC
3691if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3693$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003694else
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3696$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003697fi
3698
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003699 if test "x$ac_ct_CC" = x; then
3700 CC=""
3701 else
3702 case $cross_compiling:$ac_tool_warned in
3703yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003704{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3705$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003706ac_tool_warned=yes ;;
3707esac
3708 CC=$ac_ct_CC
3709 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003710else
3711 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003712fi
3713
Jack Jansendd19cf82001-12-06 22:36:17 +00003714if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003715 if test -n "$ac_tool_prefix"; then
3716 # 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 +00003717set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3719$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003720if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003722else
3723 if test -n "$CC"; then
3724 ac_cv_prog_CC="$CC" # Let the user override the test.
3725else
Martin v. Löwis11437992002-04-12 09:54:03 +00003726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3727for as_dir in $PATH
3728do
3729 IFS=$as_save_IFS
3730 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003733 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 break 2
3736 fi
3737done
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003740
3741fi
3742fi
3743CC=$ac_cv_prog_CC
3744if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3746$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003747else
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3749$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003750fi
3751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003752
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003754fi
3755if test -z "$CC"; then
3756 # Extract the first word of "cc", so it can be a program name with args.
3757set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3759$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003760if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003762else
3763 if test -n "$CC"; then
3764 ac_cv_prog_CC="$CC" # Let the user override the test.
3765else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003766 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3768for as_dir in $PATH
3769do
3770 IFS=$as_save_IFS
3771 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003773 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003774 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3775 ac_prog_rejected=yes
3776 continue
3777 fi
3778 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003779 $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 +00003780 break 2
3781 fi
3782done
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003784IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003785
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003786if test $ac_prog_rejected = yes; then
3787 # We found a bogon in the path, so make sure we never use it.
3788 set dummy $ac_cv_prog_CC
3789 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003790 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003791 # We chose a different compiler from the bogus one.
3792 # However, it has the same basename, so the bogon will be chosen
3793 # first if we set CC to just the basename; use the full file name.
3794 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003795 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003796 fi
3797fi
3798fi
3799fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003800CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003801if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3803$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003804else
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3806$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003807fi
3808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809
Martin v. Löwis11437992002-04-12 09:54:03 +00003810fi
3811if test -z "$CC"; then
3812 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003814 do
3815 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3816set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3818$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003819if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003821else
3822 if test -n "$CC"; then
3823 ac_cv_prog_CC="$CC" # Let the user override the test.
3824else
Martin v. Löwis11437992002-04-12 09:54:03 +00003825as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3826for as_dir in $PATH
3827do
3828 IFS=$as_save_IFS
3829 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003831 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003832 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 $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 +00003834 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003835 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003836done
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003839
3840fi
3841fi
3842CC=$ac_cv_prog_CC
3843if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3845$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003846else
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3848$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003849fi
3850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851
Martin v. Löwis11437992002-04-12 09:54:03 +00003852 test -n "$CC" && break
3853 done
3854fi
3855if test -z "$CC"; then
3856 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003857 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003858do
3859 # Extract the first word of "$ac_prog", so it can be a program name with args.
3860set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3862$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003863if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003865else
3866 if test -n "$ac_ct_CC"; then
3867 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3868else
3869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3870for as_dir in $PATH
3871do
3872 IFS=$as_save_IFS
3873 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003875 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003876 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003877 $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 +00003878 break 2
3879 fi
3880done
Matthias Kloseb9621712010-04-24 17:59:49 +00003881 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003883
Martin v. Löwis11437992002-04-12 09:54:03 +00003884fi
3885fi
3886ac_ct_CC=$ac_cv_prog_ac_ct_CC
3887if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3889$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003890else
Matthias Kloseb9621712010-04-24 17:59:49 +00003891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3892$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003893fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895
Martin v. Löwis11437992002-04-12 09:54:03 +00003896 test -n "$ac_ct_CC" && break
3897done
Michael W. Hudson54241132001-12-07 15:38:26 +00003898
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899 if test "x$ac_ct_CC" = x; then
3900 CC=""
3901 else
3902 case $cross_compiling:$ac_tool_warned in
3903yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003904{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3905$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003906ac_tool_warned=yes ;;
3907esac
3908 CC=$ac_ct_CC
3909 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003910fi
3911
3912fi
3913
3914
Matthias Kloseb9621712010-04-24 17:59:49 +00003915test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3916$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003917as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003918See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003919
3920# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003921$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3922set X $ac_compile
3923ac_compiler=$2
3924for ac_option in --version -v -V -qversion; do
3925 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003926case "(($ac_try" in
3927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3928 *) ac_try_echo=$ac_try;;
3929esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003930eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3931$as_echo "$ac_try_echo"; } >&5
3932 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003933 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003934 if test -s conftest.err; then
3935 sed '10a\
3936... rest of stderr output deleted ...
3937 10q' conftest.err >conftest.er1
3938 cat conftest.er1 >&5
3939 fi
3940 rm -f conftest.er1 conftest.err
3941 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3942 test $ac_status = 0; }
3943done
Martin v. Löwis11437992002-04-12 09:54:03 +00003944
Matthias Kloseb9621712010-04-24 17:59:49 +00003945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003946/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003947
Martin v. Löwis11437992002-04-12 09:54:03 +00003948int
3949main ()
3950{
3951
3952 ;
3953 return 0;
3954}
3955_ACEOF
3956ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003957ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003958# Try to create an executable without -o first, disregard a.out.
3959# It will help us diagnose broken compilers, and finding out an intuition
3960# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3962$as_echo_n "checking whether the C compiler works... " >&6; }
3963ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3964
3965# The possible output files:
3966ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3967
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968ac_rmfiles=
3969for ac_file in $ac_files
3970do
3971 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003972 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3974 esac
3975done
3976rm -f $ac_rmfiles
3977
Matthias Kloseb9621712010-04-24 17:59:49 +00003978if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979case "(($ac_try" in
3980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3981 *) ac_try_echo=$ac_try;;
3982esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003983eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3984$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003986 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003987 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3988 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3990# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3991# in a Makefile. We should not override ac_cv_exeext if it was cached,
3992# so that the user can short-circuit this test for compilers unknown to
3993# Autoconf.
3994for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003995do
3996 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003997 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003998 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003999 ;;
4000 [ab].out )
4001 # We found the default executable, but exeext='' is most
4002 # certainly right.
4003 break;;
4004 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004005 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004006 then :; else
4007 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4008 fi
4009 # We set ac_cv_exeext here because the later test for it is not
4010 # safe: cross compilers may not add the suffix if given an `-o'
4011 # argument, so we may need to know it at that point already.
4012 # Even if this section looks crufty: it has the advantage of
4013 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004014 break;;
4015 * )
4016 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004017 esac
4018done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004019test "$ac_cv_exeext" = no && ac_cv_exeext=
4020
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004021else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004022 ac_file=''
4023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004024if test -z "$ac_file"; then :
4025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4026$as_echo "no" >&6; }
4027$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004028sed 's/^/| /' conftest.$ac_ext >&5
4029
Matthias Kloseb9621712010-04-24 17:59:49 +00004030{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4031$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004032as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004033See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004034else
4035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4036$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4039$as_echo_n "checking for C compiler default output file name... " >&6; }
4040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4041$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004042ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004043
Matthias Kloseb9621712010-04-24 17:59:49 +00004044rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4047$as_echo_n "checking for suffix of executables... " >&6; }
4048if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004049case "(($ac_try" in
4050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4051 *) ac_try_echo=$ac_try;;
4052esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004053eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4054$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004055 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004056 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004057 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4058 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004059 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4060# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4061# work properly (i.e., refer to `conftest.exe'), while it won't with
4062# `rm'.
4063for ac_file in conftest.exe conftest conftest.*; do
4064 test -f "$ac_file" || continue
4065 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004066 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004067 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4068 break;;
4069 * ) break;;
4070 esac
4071done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004072else
Matthias Kloseb9621712010-04-24 17:59:49 +00004073 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4074$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004075as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004076See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004078rm -f conftest conftest$ac_cv_exeext
4079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4080$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004081
4082rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004083EXEEXT=$ac_cv_exeext
4084ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4086/* end confdefs.h. */
4087#include <stdio.h>
4088int
4089main ()
4090{
4091FILE *f = fopen ("conftest.out", "w");
4092 return ferror (f) || fclose (f) != 0;
4093
4094 ;
4095 return 0;
4096}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004098ac_clean_files="$ac_clean_files conftest.out"
4099# Check that the compiler produces executables we can run. If not, either
4100# the compiler is broken, or we cross compile.
4101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4102$as_echo_n "checking whether we are cross compiling... " >&6; }
4103if test "$cross_compiling" != yes; then
4104 { { ac_try="$ac_link"
4105case "(($ac_try" in
4106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4107 *) ac_try_echo=$ac_try;;
4108esac
4109eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4110$as_echo "$ac_try_echo"; } >&5
4111 (eval "$ac_link") 2>&5
4112 ac_status=$?
4113 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4114 test $ac_status = 0; }
4115 if { ac_try='./conftest$ac_cv_exeext'
4116 { { case "(($ac_try" in
4117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4118 *) ac_try_echo=$ac_try;;
4119esac
4120eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4121$as_echo "$ac_try_echo"; } >&5
4122 (eval "$ac_try") 2>&5
4123 ac_status=$?
4124 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4125 test $ac_status = 0; }; }; then
4126 cross_compiling=no
4127 else
4128 if test "$cross_compiling" = maybe; then
4129 cross_compiling=yes
4130 else
4131 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4132$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004133as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004134If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004135See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 fi
4137 fi
4138fi
4139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4140$as_echo "$cross_compiling" >&6; }
4141
4142rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4143ac_clean_files=$ac_clean_files_save
4144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4145$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004146if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004147 $as_echo_n "(cached) " >&6
4148else
4149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004150/* end confdefs.h. */
4151
4152int
4153main ()
4154{
4155
4156 ;
4157 return 0;
4158}
4159_ACEOF
4160rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004161if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004162case "(($ac_try" in
4163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4164 *) ac_try_echo=$ac_try;;
4165esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004166eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4167$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004168 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004169 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4171 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004172 for ac_file in conftest.o conftest.obj conftest.*; do
4173 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004174 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004175 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004176 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4177 break;;
4178 esac
4179done
4180else
Matthias Kloseb9621712010-04-24 17:59:49 +00004181 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004182sed 's/^/| /' conftest.$ac_ext >&5
4183
Matthias Kloseb9621712010-04-24 17:59:49 +00004184{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4185$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004186as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004187See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004188fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004189rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004190fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4192$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004193OBJEXT=$ac_cv_objext
4194ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4196$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004197if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004198 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004199else
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004202
Martin v. Löwis11437992002-04-12 09:54:03 +00004203int
4204main ()
4205{
4206#ifndef __GNUC__
4207 choke me
4208#endif
4209
4210 ;
4211 return 0;
4212}
4213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004214if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004215 ac_compiler_gnu=yes
4216else
Matthias Kloseb9621712010-04-24 17:59:49 +00004217 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004220ac_cv_c_compiler_gnu=$ac_compiler_gnu
4221
4222fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4224$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4225if test $ac_compiler_gnu = yes; then
4226 GCC=yes
4227else
4228 GCC=
4229fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004230ac_test_CFLAGS=${CFLAGS+set}
4231ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4233$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004234if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004235 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004236else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237 ac_save_c_werror_flag=$ac_c_werror_flag
4238 ac_c_werror_flag=yes
4239 ac_cv_prog_cc_g=no
4240 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004242/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004243
Martin v. Löwis11437992002-04-12 09:54:03 +00004244int
4245main ()
4246{
4247
4248 ;
4249 return 0;
4250}
4251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004252if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004253 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004254else
Matthias Kloseb9621712010-04-24 17:59:49 +00004255 CFLAGS=""
4256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257/* end confdefs.h. */
4258
4259int
4260main ()
4261{
4262
4263 ;
4264 return 0;
4265}
4266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004267if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004268
Matthias Kloseb9621712010-04-24 17:59:49 +00004269else
4270 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273/* end confdefs.h. */
4274
4275int
4276main ()
4277{
4278
4279 ;
4280 return 0;
4281}
4282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004283if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004284 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4291 ac_c_werror_flag=$ac_save_c_werror_flag
4292fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4294$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004295if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004296 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004297elif test $ac_cv_prog_cc_g = yes; then
4298 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004299 CFLAGS="-g -O2"
4300 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004301 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004302 fi
4303else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004304 if test "$GCC" = yes; then
4305 CFLAGS="-O2"
4306 else
4307 CFLAGS=
4308 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4311$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004312if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004313 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004314else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004315 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004316ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004318/* end confdefs.h. */
4319#include <stdarg.h>
4320#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004321struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004322/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4323struct buf { int x; };
4324FILE * (*rcsopen) (struct buf *, struct stat *, int);
4325static char *e (p, i)
4326 char **p;
4327 int i;
4328{
4329 return p[i];
4330}
4331static char *f (char * (*g) (char **, int), char **p, ...)
4332{
4333 char *s;
4334 va_list v;
4335 va_start (v,p);
4336 s = g (p, va_arg (v,int));
4337 va_end (v);
4338 return s;
4339}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004340
4341/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4342 function prototypes and stuff, but not '\xHH' hex character constants.
4343 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004345 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4346 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004348int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4349
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004350/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4351 inside strings and character constants. */
4352#define FOO(x) 'x'
4353int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4354
Skip Montanaro6dead952003-09-25 14:50:04 +00004355int test (int i, double x);
4356struct s1 {int (*f) (int a);};
4357struct s2 {int (*f) (double a);};
4358int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4359int argc;
4360char **argv;
4361int
4362main ()
4363{
4364return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4365 ;
4366 return 0;
4367}
4368_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4370 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004371do
4372 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004373 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004374 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376rm -f core conftest.err conftest.$ac_objext
4377 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004378done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004380CC=$ac_save_CC
4381
4382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004383# AC_CACHE_VAL
4384case "x$ac_cv_prog_cc_c89" in
4385 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4387$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004388 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4390$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004391 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004392 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4394$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004395esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004396if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004397
Matthias Kloseb9621712010-04-24 17:59:49 +00004398fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004399
Martin v. Löwis11437992002-04-12 09:54:03 +00004400ac_ext=c
4401ac_cpp='$CPP $CPPFLAGS'
4402ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4403ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4404ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004405
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004406
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004407
4408
Matthias Kloseb9621712010-04-24 17:59:49 +00004409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4410$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004411
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004412# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004413if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004414 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004415
4416 case $withval in
4417 no) with_cxx_main=no
4418 MAINCC='$(CC)';;
4419 yes) with_cxx_main=yes
4420 MAINCC='$(CXX)';;
4421 *) with_cxx_main=yes
4422 MAINCC=$withval
4423 if test -z "$CXX"
4424 then
4425 CXX=$withval
4426 fi;;
4427 esac
4428else
4429
4430 with_cxx_main=no
4431 MAINCC='$(CC)'
4432
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004433fi
4434
Matthias Kloseb9621712010-04-24 17:59:49 +00004435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4436$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004437
4438preset_cxx="$CXX"
4439if test -z "$CXX"
4440then
4441 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004442 gcc) if test -n "$ac_tool_prefix"; then
4443 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4444set dummy ${ac_tool_prefix}g++; ac_word=$2
4445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4446$as_echo_n "checking for $ac_word... " >&6; }
4447if ${ac_cv_path_CXX+:} false; then :
4448 $as_echo_n "(cached) " >&6
4449else
4450 case $CXX in
4451 [\\/]* | ?:[\\/]*)
4452 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4453 ;;
4454 *)
4455 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4456for as_dir in notfound
4457do
4458 IFS=$as_save_IFS
4459 test -z "$as_dir" && as_dir=.
4460 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004461 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004462 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4463 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4464 break 2
4465 fi
4466done
4467 done
4468IFS=$as_save_IFS
4469
4470 ;;
4471esac
4472fi
4473CXX=$ac_cv_path_CXX
4474if test -n "$CXX"; then
4475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4476$as_echo "$CXX" >&6; }
4477else
4478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4479$as_echo "no" >&6; }
4480fi
4481
4482
4483fi
4484if test -z "$ac_cv_path_CXX"; then
4485 ac_pt_CXX=$CXX
4486 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004487set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4489$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004490if ${ac_cv_path_ac_pt_CXX+:} false; then :
4491 $as_echo_n "(cached) " >&6
4492else
4493 case $ac_pt_CXX in
4494 [\\/]* | ?:[\\/]*)
4495 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4496 ;;
4497 *)
4498 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4499for as_dir in notfound
4500do
4501 IFS=$as_save_IFS
4502 test -z "$as_dir" && as_dir=.
4503 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004504 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004505 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4506 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4507 break 2
4508 fi
4509done
4510 done
4511IFS=$as_save_IFS
4512
4513 ;;
4514esac
4515fi
4516ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4517if test -n "$ac_pt_CXX"; then
4518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4519$as_echo "$ac_pt_CXX" >&6; }
4520else
4521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4522$as_echo "no" >&6; }
4523fi
4524
4525 if test "x$ac_pt_CXX" = x; then
4526 CXX="g++"
4527 else
4528 case $cross_compiling:$ac_tool_warned in
4529yes:)
4530{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4531$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4532ac_tool_warned=yes ;;
4533esac
4534 CXX=$ac_pt_CXX
4535 fi
4536else
4537 CXX="$ac_cv_path_CXX"
4538fi
4539 ;;
4540 cc) if test -n "$ac_tool_prefix"; then
4541 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4542set dummy ${ac_tool_prefix}c++; ac_word=$2
4543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4544$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004545if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004546 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004547else
4548 case $CXX in
4549 [\\/]* | ?:[\\/]*)
4550 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4551 ;;
4552 *)
4553 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4554for as_dir in notfound
4555do
4556 IFS=$as_save_IFS
4557 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004558 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004559 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004560 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004561 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004562 break 2
4563 fi
4564done
Matthias Kloseb9621712010-04-24 17:59:49 +00004565 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004566IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004567
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004568 ;;
4569esac
4570fi
4571CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004572if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4574$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004575else
Matthias Kloseb9621712010-04-24 17:59:49 +00004576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4577$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004579
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004580
4581fi
4582if test -z "$ac_cv_path_CXX"; then
4583 ac_pt_CXX=$CXX
4584 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004585set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4587$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004588if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004589 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004590else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004591 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004592 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004593 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 +00004594 ;;
4595 *)
4596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4597for as_dir in notfound
4598do
4599 IFS=$as_save_IFS
4600 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004601 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004602 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004603 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004604 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004605 break 2
4606 fi
4607done
Matthias Kloseb9621712010-04-24 17:59:49 +00004608 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004609IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004610
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004611 ;;
4612esac
4613fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004614ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4615if test -n "$ac_pt_CXX"; then
4616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4617$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004618else
Matthias Kloseb9621712010-04-24 17:59:49 +00004619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4620$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004622
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004623 if test "x$ac_pt_CXX" = x; then
4624 CXX="c++"
4625 else
4626 case $cross_compiling:$ac_tool_warned in
4627yes:)
4628{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4629$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4630ac_tool_warned=yes ;;
4631esac
4632 CXX=$ac_pt_CXX
4633 fi
4634else
4635 CXX="$ac_cv_path_CXX"
4636fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004637 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004638 clang|*/clang) if test -n "$ac_tool_prefix"; then
4639 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4640set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4642$as_echo_n "checking for $ac_word... " >&6; }
4643if ${ac_cv_path_CXX+:} false; then :
4644 $as_echo_n "(cached) " >&6
4645else
4646 case $CXX in
4647 [\\/]* | ?:[\\/]*)
4648 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4649 ;;
4650 *)
4651 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4652for as_dir in notfound
4653do
4654 IFS=$as_save_IFS
4655 test -z "$as_dir" && as_dir=.
4656 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004657 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004658 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4659 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4660 break 2
4661 fi
4662done
4663 done
4664IFS=$as_save_IFS
4665
Ned Deilycbfb9a52012-06-23 16:02:19 -07004666 ;;
4667esac
4668fi
4669CXX=$ac_cv_path_CXX
4670if test -n "$CXX"; then
4671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4672$as_echo "$CXX" >&6; }
4673else
4674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4675$as_echo "no" >&6; }
4676fi
4677
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004678
4679fi
4680if test -z "$ac_cv_path_CXX"; then
4681 ac_pt_CXX=$CXX
4682 # Extract the first word of "clang++", so it can be a program name with args.
4683set dummy clang++; ac_word=$2
4684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4685$as_echo_n "checking for $ac_word... " >&6; }
4686if ${ac_cv_path_ac_pt_CXX+:} false; then :
4687 $as_echo_n "(cached) " >&6
4688else
4689 case $ac_pt_CXX in
4690 [\\/]* | ?:[\\/]*)
4691 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4692 ;;
4693 *)
4694 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4695for as_dir in notfound
4696do
4697 IFS=$as_save_IFS
4698 test -z "$as_dir" && as_dir=.
4699 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004700 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004701 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4702 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4703 break 2
4704 fi
4705done
4706 done
4707IFS=$as_save_IFS
4708
4709 ;;
4710esac
4711fi
4712ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4713if test -n "$ac_pt_CXX"; then
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4715$as_echo "$ac_pt_CXX" >&6; }
4716else
4717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4718$as_echo "no" >&6; }
4719fi
4720
4721 if test "x$ac_pt_CXX" = x; then
4722 CXX="clang++"
4723 else
4724 case $cross_compiling:$ac_tool_warned in
4725yes:)
4726{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4727$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4728ac_tool_warned=yes ;;
4729esac
4730 CXX=$ac_pt_CXX
4731 fi
4732else
4733 CXX="$ac_cv_path_CXX"
4734fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004735 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004736 esac
4737 if test "$CXX" = "notfound"
4738 then
4739 CXX=""
4740 fi
4741fi
4742if test -z "$CXX"
4743then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004744 if test -n "$ac_tool_prefix"; then
4745 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4746 do
4747 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4748set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4750$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004751if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004752 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004753else
4754 if test -n "$CXX"; then
4755 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4756else
4757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4758for as_dir in $PATH
4759do
4760 IFS=$as_save_IFS
4761 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004762 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004763 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004764 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004766 break 2
4767 fi
4768done
Matthias Kloseb9621712010-04-24 17:59:49 +00004769 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004770IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004771
4772fi
4773fi
4774CXX=$ac_cv_prog_CXX
4775if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4777$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004778else
Matthias Kloseb9621712010-04-24 17:59:49 +00004779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4780$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004781fi
4782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004783
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004784 test -n "$CXX" && break
4785 done
4786fi
4787if test -z "$CXX"; then
4788 ac_ct_CXX=$CXX
4789 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4790do
4791 # Extract the first word of "$ac_prog", so it can be a program name with args.
4792set dummy $ac_prog; ac_word=$2
4793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4794$as_echo_n "checking for $ac_word... " >&6; }
4795if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4796 $as_echo_n "(cached) " >&6
4797else
4798 if test -n "$ac_ct_CXX"; then
4799 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4800else
4801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4802for as_dir in $PATH
4803do
4804 IFS=$as_save_IFS
4805 test -z "$as_dir" && as_dir=.
4806 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004807 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004808 ac_cv_prog_ac_ct_CXX="$ac_prog"
4809 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4810 break 2
4811 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004813 done
4814IFS=$as_save_IFS
4815
4816fi
4817fi
4818ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4819if test -n "$ac_ct_CXX"; then
4820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4821$as_echo "$ac_ct_CXX" >&6; }
4822else
4823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4824$as_echo "no" >&6; }
4825fi
4826
4827
4828 test -n "$ac_ct_CXX" && break
4829done
4830
4831 if test "x$ac_ct_CXX" = x; then
4832 CXX="notfound"
4833 else
4834 case $cross_compiling:$ac_tool_warned in
4835yes:)
4836{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4837$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4838ac_tool_warned=yes ;;
4839esac
4840 CXX=$ac_ct_CXX
4841 fi
4842fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004843
4844 if test "$CXX" = "notfound"
4845 then
4846 CXX=""
4847 fi
4848fi
4849if test "$preset_cxx" != "$CXX"
4850then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004851 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004852
4853 By default, distutils will build C++ extension modules with \"$CXX\".
4854 If this is not intended, then set CXX on the configure command line.
4855 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004856$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004857
4858 By default, distutils will build C++ extension modules with \"$CXX\".
4859 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004860 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004861fi
4862
4863
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4865$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4866save_LDFLAGS="$LDFLAGS"
4867LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004868
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4870/* end confdefs.h. */
4871
4872int
4873main ()
4874{
4875
4876 ;
4877 return 0;
4878}
4879_ACEOF
4880if ac_fn_c_try_link "$LINENO"; then :
4881 NO_AS_NEEDED="-Wl,--no-as-needed"
4882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4883$as_echo "yes" >&6; }
4884else
4885 NO_AS_NEEDED=""
4886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4887$as_echo "no" >&6; }
4888fi
4889rm -f core conftest.err conftest.$ac_objext \
4890 conftest$ac_exeext conftest.$ac_ext
4891LDFLAGS="$save_LDFLAGS"
4892
4893
4894
4895# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004896ac_ext=c
4897ac_cpp='$CPP $CPPFLAGS'
4898ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4899ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4900ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4902$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004903# On Suns, sometimes $CPP names a directory.
4904if test -n "$CPP" && test -d "$CPP"; then
4905 CPP=
4906fi
4907if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004908 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004909 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004910else
Martin v. Löwis11437992002-04-12 09:54:03 +00004911 # Double quotes because CPP needs to be expanded
4912 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4913 do
4914 ac_preproc_ok=false
4915for ac_c_preproc_warn_flag in '' yes
4916do
4917 # Use a header file that comes with gcc, so configuring glibc
4918 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004919 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4920 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004921 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004922 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004924/* end confdefs.h. */
4925#ifdef __STDC__
4926# include <limits.h>
4927#else
4928# include <assert.h>
4929#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004930 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004932if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004933
Matthias Kloseb9621712010-04-24 17:59:49 +00004934else
Martin v. Löwis11437992002-04-12 09:54:03 +00004935 # Broken: fails on valid input.
4936continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004937fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004938rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004939
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004940 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004941 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004943/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004944#include <ac_nonexistent.h>
4945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004946if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004947 # Broken: success on invalid input.
4948continue
4949else
Martin v. Löwis11437992002-04-12 09:54:03 +00004950 # Passes both tests.
4951ac_preproc_ok=:
4952break
4953fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004954rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004955
4956done
4957# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004958rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004959if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004960 break
4961fi
4962
4963 done
4964 ac_cv_prog_CPP=$CPP
4965
4966fi
4967 CPP=$ac_cv_prog_CPP
4968else
4969 ac_cv_prog_CPP=$CPP
4970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4972$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004973ac_preproc_ok=false
4974for ac_c_preproc_warn_flag in '' yes
4975do
4976 # Use a header file that comes with gcc, so configuring glibc
4977 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004978 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4979 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004980 # On the NeXT, cc -E runs the code through the compiler's parser,
4981 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004983/* end confdefs.h. */
4984#ifdef __STDC__
4985# include <limits.h>
4986#else
4987# include <assert.h>
4988#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004989 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004991if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004992
Matthias Kloseb9621712010-04-24 17:59:49 +00004993else
Martin v. Löwis11437992002-04-12 09:54:03 +00004994 # Broken: fails on valid input.
4995continue
4996fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004997rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004999 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00005000 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00005001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00005002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005003#include <ac_nonexistent.h>
5004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005005if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00005006 # Broken: success on invalid input.
5007continue
5008else
Martin v. Löwis11437992002-04-12 09:54:03 +00005009 # Passes both tests.
5010ac_preproc_ok=:
5011break
5012fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005013rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005014
5015done
5016# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005017rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005018if $ac_preproc_ok; then :
5019
Martin v. Löwis11437992002-04-12 09:54:03 +00005020else
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5022$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005023as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02005024See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005025fi
5026
5027ac_ext=c
5028ac_cpp='$CPP $CPPFLAGS'
5029ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5030ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5031ac_compiler_gnu=$ac_cv_c_compiler_gnu
5032
5033
Matthias Kloseb9621712010-04-24 17:59:49 +00005034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5035$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005036if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00005038else
Matthias Kloseb9621712010-04-24 17:59:49 +00005039 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005040 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 # Loop through the user's path and test for each of PROGNAME-LIST
5042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005043for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5044do
5045 IFS=$as_save_IFS
5046 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 for ac_prog in grep ggrep; do
5048 for ac_exec_ext in '' $ac_executable_extensions; do
5049 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005050 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005051# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005052 # Check for GNU $ac_path_GREP
5053case `"$ac_path_GREP" --version 2>&1` in
5054*GNU*)
5055 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5056*)
5057 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005059 while :
5060 do
5061 cat "conftest.in" "conftest.in" >"conftest.tmp"
5062 mv "conftest.tmp" "conftest.in"
5063 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005064 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005065 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5066 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005067 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005068 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5069 # Best one so far, save it but keep looking for a better one
5070 ac_cv_path_GREP="$ac_path_GREP"
5071 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005072 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005073 # 10*(2^10) chars as input seems more than enough
5074 test $ac_count -gt 10 && break
5075 done
5076 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5077esac
5078
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 $ac_path_GREP_found && break 3
5080 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005081 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005083IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005084 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005085 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005087else
5088 ac_cv_path_GREP=$GREP
5089fi
5090
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005091fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5093$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005094 GREP="$ac_cv_path_GREP"
5095
5096
Matthias Kloseb9621712010-04-24 17:59:49 +00005097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5098$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005099if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005101else
5102 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5103 then ac_cv_path_EGREP="$GREP -E"
5104 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005105 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005106 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 # Loop through the user's path and test for each of PROGNAME-LIST
5108 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005109for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5110do
5111 IFS=$as_save_IFS
5112 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 for ac_prog in egrep; do
5114 for ac_exec_ext in '' $ac_executable_extensions; do
5115 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005116 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005117# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005118 # Check for GNU $ac_path_EGREP
5119case `"$ac_path_EGREP" --version 2>&1` in
5120*GNU*)
5121 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5122*)
5123 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005124 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005125 while :
5126 do
5127 cat "conftest.in" "conftest.in" >"conftest.tmp"
5128 mv "conftest.tmp" "conftest.in"
5129 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005131 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5132 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005134 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5135 # Best one so far, save it but keep looking for a better one
5136 ac_cv_path_EGREP="$ac_path_EGREP"
5137 ac_path_EGREP_max=$ac_count
5138 fi
5139 # 10*(2^10) chars as input seems more than enough
5140 test $ac_count -gt 10 && break
5141 done
5142 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5143esac
5144
Matthias Kloseb9621712010-04-24 17:59:49 +00005145 $ac_path_EGREP_found && break 3
5146 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005147 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005148 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005149IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005150 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005151 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 +00005152 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005153else
5154 ac_cv_path_EGREP=$EGREP
5155fi
5156
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005157 fi
5158fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5160$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005161 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005162
5163
Matthias Kloseb9621712010-04-24 17:59:49 +00005164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5165$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005166if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005167 $as_echo_n "(cached) " >&6
5168else
5169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005170/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005171#include <stdlib.h>
5172#include <stdarg.h>
5173#include <string.h>
5174#include <float.h>
5175
5176int
5177main ()
5178{
5179
5180 ;
5181 return 0;
5182}
5183_ACEOF
5184if ac_fn_c_try_compile "$LINENO"; then :
5185 ac_cv_header_stdc=yes
5186else
5187 ac_cv_header_stdc=no
5188fi
5189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5190
5191if test $ac_cv_header_stdc = yes; then
5192 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5194/* end confdefs.h. */
5195#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005196
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005197_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005198if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005199 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005200
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005201else
Matthias Kloseb9621712010-04-24 17:59:49 +00005202 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005203fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005204rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005205
Matthias Kloseb9621712010-04-24 17:59:49 +00005206fi
5207
5208if test $ac_cv_header_stdc = yes; then
5209 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5211/* end confdefs.h. */
5212#include <stdlib.h>
5213
5214_ACEOF
5215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5216 $EGREP "free" >/dev/null 2>&1; then :
5217
5218else
5219 ac_cv_header_stdc=no
5220fi
5221rm -f conftest*
5222
5223fi
5224
5225if test $ac_cv_header_stdc = yes; then
5226 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5227 if test "$cross_compiling" = yes; then :
5228 :
5229else
5230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5231/* end confdefs.h. */
5232#include <ctype.h>
5233#include <stdlib.h>
5234#if ((' ' & 0x0FF) == 0x020)
5235# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5236# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5237#else
5238# define ISLOWER(c) \
5239 (('a' <= (c) && (c) <= 'i') \
5240 || ('j' <= (c) && (c) <= 'r') \
5241 || ('s' <= (c) && (c) <= 'z'))
5242# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5243#endif
5244
5245#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5246int
5247main ()
5248{
5249 int i;
5250 for (i = 0; i < 256; i++)
5251 if (XOR (islower (i), ISLOWER (i))
5252 || toupper (i) != TOUPPER (i))
5253 return 2;
5254 return 0;
5255}
5256_ACEOF
5257if ac_fn_c_try_run "$LINENO"; then :
5258
5259else
5260 ac_cv_header_stdc=no
5261fi
5262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5263 conftest.$ac_objext conftest.beam conftest.$ac_ext
5264fi
5265
5266fi
5267fi
5268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5269$as_echo "$ac_cv_header_stdc" >&6; }
5270if test $ac_cv_header_stdc = yes; then
5271
5272$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5273
5274fi
5275
5276# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5277for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5278 inttypes.h stdint.h unistd.h
5279do :
5280 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5281ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5282"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005283if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005284 cat >>confdefs.h <<_ACEOF
5285#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5286_ACEOF
5287
5288fi
5289
5290done
5291
5292
5293
5294 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 +02005295if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005296 MINIX=yes
5297else
5298 MINIX=
5299fi
5300
5301
5302 if test "$MINIX" = yes; then
5303
5304$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5305
5306
5307$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5308
5309
5310$as_echo "#define _MINIX 1" >>confdefs.h
5311
5312 fi
5313
5314
5315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5316$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005317if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005318 $as_echo_n "(cached) " >&6
5319else
5320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5321/* end confdefs.h. */
5322
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005323# define __EXTENSIONS__ 1
5324 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005325int
5326main ()
5327{
5328
5329 ;
5330 return 0;
5331}
5332_ACEOF
5333if ac_fn_c_try_compile "$LINENO"; then :
5334 ac_cv_safe_to_define___extensions__=yes
5335else
5336 ac_cv_safe_to_define___extensions__=no
5337fi
5338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5339fi
5340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5341$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5342 test $ac_cv_safe_to_define___extensions__ = yes &&
5343 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5344
5345 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5346
5347 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5348
5349 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5350
5351 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5352
5353
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005354
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005355# Check for unsupported systems
5356case $ac_sys_system/$ac_sys_release in
5357atheos*|Linux*/1*)
5358 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5359 echo See README for details.
5360 exit 1;;
5361esac
5362
5363
Matthias Kloseb9621712010-04-24 17:59:49 +00005364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5365$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005366
5367# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005368if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369 withval=$with_suffix;
5370 case $withval in
5371 no) EXEEXT=;;
5372 yes) EXEEXT=.exe;;
5373 *) EXEEXT=$withval;;
5374 esac
5375fi
5376
Matthias Kloseb9621712010-04-24 17:59:49 +00005377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5378$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005379
5380# Test whether we're running on a non-case-sensitive system, in which
5381# case we give a warning if no ext is given
5382
Matthias Kloseb9621712010-04-24 17:59:49 +00005383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5384$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005385if test ! -d CaseSensitiveTestDir; then
5386mkdir CaseSensitiveTestDir
5387fi
5388
5389if test -d casesensitivetestdir
5390then
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5392$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005393 BUILDEXEEXT=.exe
5394else
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5396$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005397 BUILDEXEEXT=$EXEEXT
5398fi
5399rmdir CaseSensitiveTestDir
5400
5401case $MACHDEP in
5402bsdos*)
5403 case $CC in
5404 gcc) CC="$CC -D_HAVE_BSDI";;
5405 esac;;
5406esac
5407
5408case $ac_sys_system in
5409hp*|HP*)
5410 case $CC in
5411 cc|*/cc) CC="$CC -Ae";;
5412 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005413esac
5414
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005415MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5416
5417
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418
5419
Matthias Kloseb9621712010-04-24 17:59:49 +00005420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5421$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422if test -z "$LIBRARY"
5423then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005424 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5427$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005428
5429# LDLIBRARY is the name of the library to link against (as opposed to the
5430# name of the library into which to insert object files). BLDLIBRARY is also
5431# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5432# is blank as the main program is not linked directly against LDLIBRARY.
5433# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5434# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5435# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5436# DLLLIBRARY is the shared (i.e., DLL) library.
5437#
5438# RUNSHARED is used to run shared python without installed libraries
5439#
5440# INSTSONAME is the name of the shared library that will be use to install
5441# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005442#
5443# LDVERSION is the shared library version number, normally the Python version
5444# with the ABI build flags appended.
5445
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005446
5447
5448
5449
5450
5451
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005452
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453LDLIBRARY="$LIBRARY"
5454BLDLIBRARY='$(LDLIBRARY)'
5455INSTSONAME='$(LDLIBRARY)'
5456DLLLIBRARY=''
5457LDLIBRARYDIR=''
5458RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005459LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005460
5461# LINKCC is the command that links the python executable -- default is $(CC).
5462# If CXX is set, and if it is needed to link a main function that was
5463# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5464# python might then depend on the C++ runtime
5465# This is altered for AIX in order to build the export list before
5466# linking.
5467
Matthias Kloseb9621712010-04-24 17:59:49 +00005468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5469$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005470if test -z "$LINKCC"
5471then
5472 LINKCC='$(PURIFY) $(MAINCC)'
5473 case $ac_sys_system in
5474 AIX*)
5475 exp_extra="\"\""
5476 if test $ac_sys_release -ge 5 -o \
5477 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5478 exp_extra="."
5479 fi
5480 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005481 QNX*)
5482 # qcc must be used because the other compilers do not
5483 # support -N.
5484 LINKCC=qcc;;
5485 esac
5486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5488$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005489
5490# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5491# make sure we default having it set to "no": this is used by
5492# distutils.unixccompiler to know if it should add --enable-new-dtags
5493# to linker command lines, and failing to detect GNU ld simply results
5494# in the same bahaviour as before.
5495
Matthias Kloseb9621712010-04-24 17:59:49 +00005496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5497$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005498ac_prog=ld
5499if test "$GCC" = yes; then
5500 ac_prog=`$CC -print-prog-name=ld`
5501fi
5502case `"$ac_prog" -V 2>&1 < /dev/null` in
5503 *GNU*)
5504 GNULD=yes;;
5505 *)
5506 GNULD=no;;
5507esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5509$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005510
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5512$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005513if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005514 $as_echo_n "(cached) " >&6
5515else
5516 ac_cv_c_inline=no
5517for ac_kw in inline __inline__ __inline; do
5518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5519/* end confdefs.h. */
5520#ifndef __cplusplus
5521typedef int foo_t;
5522static $ac_kw foo_t static_foo () {return 0; }
5523$ac_kw foo_t foo () {return 0; }
5524#endif
5525
5526_ACEOF
5527if ac_fn_c_try_compile "$LINENO"; then :
5528 ac_cv_c_inline=$ac_kw
5529fi
5530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5531 test "$ac_cv_c_inline" != no && break
5532done
5533
5534fi
5535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5536$as_echo "$ac_cv_c_inline" >&6; }
5537
5538case $ac_cv_c_inline in
5539 inline | yes) ;;
5540 *)
5541 case $ac_cv_c_inline in
5542 no) ac_val=;;
5543 *) ac_val=$ac_cv_c_inline;;
5544 esac
5545 cat >>confdefs.h <<_ACEOF
5546#ifndef __cplusplus
5547#define inline $ac_val
5548#endif
5549_ACEOF
5550 ;;
5551esac
5552
5553if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005554
5555$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005556
5557
5558fi
5559
5560
Matthias Kloseb9621712010-04-24 17:59:49 +00005561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5562$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005563# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005564if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005565 enableval=$enable_shared;
5566fi
5567
5568
5569if test -z "$enable_shared"
5570then
5571 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005572 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005573 enable_shared="yes";;
5574 *)
5575 enable_shared="no";;
5576 esac
5577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5579$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005580
Matthias Kloseb9621712010-04-24 17:59:49 +00005581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5582$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005583# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005584if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005585 enableval=$enable_profiling;
5586fi
5587
5588if test "x$enable_profiling" = xyes; then
5589 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005590 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005592/* end confdefs.h. */
5593int main() { return 0; }
5594_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005595if ac_fn_c_try_link "$LINENO"; then :
5596
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005598 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005600rm -f core conftest.err conftest.$ac_objext \
5601 conftest$ac_exeext conftest.$ac_ext
5602 CC="$ac_save_cc"
5603else
5604 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005605fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5607$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608
doko@ubuntu.comba015832012-06-30 16:52:05 +02005609if test "x$enable_profiling" = xyes; then
5610 BASECFLAGS="-pg $BASECFLAGS"
5611 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005612fi
5613
Matthias Kloseb9621712010-04-24 17:59:49 +00005614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5615$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616
5617# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5618# library that we build, but we do not want to link against it (we
5619# will find it with a -framework option). For this reason there is an
5620# extra variable BLDLIBRARY against which Python and the extension
5621# modules are linked, BLDLIBRARY. This is normally the same as
5622# LDLIBRARY, but empty for MacOSX framework builds.
5623if test "$enable_framework"
5624then
5625 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005626 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627 BLDLIBRARY=''
5628else
5629 BLDLIBRARY='$(LDLIBRARY)'
5630fi
5631
5632# Other platforms follow
5633if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005634 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635
Matthias Kloseb9621712010-04-24 17:59:49 +00005636$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005637
5638 case $ac_sys_system in
5639 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005640 LDLIBRARY='libpython$(LDVERSION).dll.a'
5641 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005642 ;;
5643 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005644 LDLIBRARY='libpython$(LDVERSION).so'
5645 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005646 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005648 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005649 then
5650 PY3LIBRARY=libpython3.so
5651 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005653 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005654 LDLIBRARY='libpython$(LDVERSION).so'
5655 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005656 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657 case $ac_sys_system in
5658 FreeBSD*)
5659 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5660 ;;
5661 esac
5662 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005663 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005664 then
5665 PY3LIBRARY=libpython3.so
5666 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667 ;;
5668 hp*|HP*)
5669 case `uname -m` in
5670 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005671 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672 ;;
5673 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005674 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675 ;;
5676 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005677 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005678 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005681 LDLIBRARY='libpython$(LDVERSION).dylib'
5682 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005683 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005685 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005686 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005687 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005688 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
5690 esac
5691else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005692 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693 case $ac_sys_system in
5694 CYGWIN*)
5695 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005696 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697 ;;
5698 esac
5699fi
5700
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005701if test "$cross_compiling" = yes; then
5702 RUNSHARED=
5703fi
5704
Matthias Kloseb9621712010-04-24 17:59:49 +00005705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5706$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707
5708if test -n "$ac_tool_prefix"; then
5709 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5710set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5712$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005713if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005714 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715else
5716 if test -n "$RANLIB"; then
5717 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5718else
5719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5720for as_dir in $PATH
5721do
5722 IFS=$as_save_IFS
5723 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005724 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005727 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728 break 2
5729 fi
5730done
Matthias Kloseb9621712010-04-24 17:59:49 +00005731 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732IFS=$as_save_IFS
5733
5734fi
5735fi
5736RANLIB=$ac_cv_prog_RANLIB
5737if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5739$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740else
Matthias Kloseb9621712010-04-24 17:59:49 +00005741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5742$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743fi
5744
5745
5746fi
5747if test -z "$ac_cv_prog_RANLIB"; then
5748 ac_ct_RANLIB=$RANLIB
5749 # Extract the first word of "ranlib", so it can be a program name with args.
5750set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5752$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005753if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005754 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755else
5756 if test -n "$ac_ct_RANLIB"; then
5757 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5758else
5759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5760for as_dir in $PATH
5761do
5762 IFS=$as_save_IFS
5763 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005765 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005767 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768 break 2
5769 fi
5770done
Matthias Kloseb9621712010-04-24 17:59:49 +00005771 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772IFS=$as_save_IFS
5773
5774fi
5775fi
5776ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5777if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5779$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780else
Matthias Kloseb9621712010-04-24 17:59:49 +00005781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5782$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783fi
5784
5785 if test "x$ac_ct_RANLIB" = x; then
5786 RANLIB=":"
5787 else
5788 case $cross_compiling:$ac_tool_warned in
5789yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005790{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5791$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792ac_tool_warned=yes ;;
5793esac
5794 RANLIB=$ac_ct_RANLIB
5795 fi
5796else
5797 RANLIB="$ac_cv_prog_RANLIB"
5798fi
5799
5800
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005801if test -n "$ac_tool_prefix"; then
5802 for ac_prog in ar aal
5803 do
5804 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5805set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5807$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005808if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005809 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810else
5811 if test -n "$AR"; then
5812 ac_cv_prog_AR="$AR" # Let the user override the test.
5813else
5814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5815for as_dir in $PATH
5816do
5817 IFS=$as_save_IFS
5818 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005819 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005820 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005821 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005822 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823 break 2
5824 fi
5825done
Matthias Kloseb9621712010-04-24 17:59:49 +00005826 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827IFS=$as_save_IFS
5828
5829fi
5830fi
5831AR=$ac_cv_prog_AR
5832if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5834$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835else
Matthias Kloseb9621712010-04-24 17:59:49 +00005836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5837$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838fi
5839
5840
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005841 test -n "$AR" && break
5842 done
5843fi
5844if test -z "$AR"; then
5845 ac_ct_AR=$AR
5846 for ac_prog in ar aal
5847do
5848 # Extract the first word of "$ac_prog", so it can be a program name with args.
5849set dummy $ac_prog; ac_word=$2
5850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5851$as_echo_n "checking for $ac_word... " >&6; }
5852if ${ac_cv_prog_ac_ct_AR+:} false; then :
5853 $as_echo_n "(cached) " >&6
5854else
5855 if test -n "$ac_ct_AR"; then
5856 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5857else
5858as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5859for as_dir in $PATH
5860do
5861 IFS=$as_save_IFS
5862 test -z "$as_dir" && as_dir=.
5863 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005864 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005865 ac_cv_prog_ac_ct_AR="$ac_prog"
5866 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5867 break 2
5868 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005870 done
5871IFS=$as_save_IFS
5872
5873fi
5874fi
5875ac_ct_AR=$ac_cv_prog_ac_ct_AR
5876if test -n "$ac_ct_AR"; then
5877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5878$as_echo "$ac_ct_AR" >&6; }
5879else
5880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5881$as_echo "no" >&6; }
5882fi
5883
5884
5885 test -n "$ac_ct_AR" && break
5886done
5887
5888 if test "x$ac_ct_AR" = x; then
5889 AR="ar"
5890 else
5891 case $cross_compiling:$ac_tool_warned in
5892yes:)
5893{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5894$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5895ac_tool_warned=yes ;;
5896esac
5897 AR=$ac_ct_AR
5898 fi
5899fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900
5901
5902# tweak ARFLAGS only if the user didn't set it on the command line
5903
5904if test -z "$ARFLAGS"
5905then
5906 ARFLAGS="rc"
5907fi
5908
doko@ubuntu.com58844492012-06-30 18:25:32 +02005909if test -n "$ac_tool_prefix"; then
5910 for ac_prog in readelf
5911 do
5912 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5913set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5915$as_echo_n "checking for $ac_word... " >&6; }
5916if ${ac_cv_prog_READELF+:} false; then :
5917 $as_echo_n "(cached) " >&6
5918else
5919 if test -n "$READELF"; then
5920 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5921else
5922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5923for as_dir in $PATH
5924do
5925 IFS=$as_save_IFS
5926 test -z "$as_dir" && as_dir=.
5927 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005928 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005929 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5931 break 2
5932 fi
5933done
5934 done
5935IFS=$as_save_IFS
5936
5937fi
5938fi
5939READELF=$ac_cv_prog_READELF
5940if test -n "$READELF"; then
5941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5942$as_echo "$READELF" >&6; }
5943else
5944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5945$as_echo "no" >&6; }
5946fi
5947
5948
5949 test -n "$READELF" && break
5950 done
5951fi
5952if test -z "$READELF"; then
5953 ac_ct_READELF=$READELF
5954 for ac_prog in readelf
5955do
5956 # Extract the first word of "$ac_prog", so it can be a program name with args.
5957set dummy $ac_prog; ac_word=$2
5958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5959$as_echo_n "checking for $ac_word... " >&6; }
5960if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5961 $as_echo_n "(cached) " >&6
5962else
5963 if test -n "$ac_ct_READELF"; then
5964 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5965else
5966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5967for as_dir in $PATH
5968do
5969 IFS=$as_save_IFS
5970 test -z "$as_dir" && as_dir=.
5971 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005972 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005973 ac_cv_prog_ac_ct_READELF="$ac_prog"
5974 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5975 break 2
5976 fi
5977done
5978 done
5979IFS=$as_save_IFS
5980
5981fi
5982fi
5983ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5984if test -n "$ac_ct_READELF"; then
5985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5986$as_echo "$ac_ct_READELF" >&6; }
5987else
5988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5989$as_echo "no" >&6; }
5990fi
5991
5992
5993 test -n "$ac_ct_READELF" && break
5994done
5995
5996 if test "x$ac_ct_READELF" = x; then
5997 READELF=":"
5998 else
5999 case $cross_compiling:$ac_tool_warned in
6000yes:)
6001{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6002$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6003ac_tool_warned=yes ;;
6004esac
6005 READELF=$ac_ct_READELF
6006 fi
6007fi
6008
6009if test "$cross_compiling" = yes; then
6010 case "$READELF" in
6011 readelf|:)
6012 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6013 ;;
6014 esac
6015fi
6016
6017
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006018
Matthias Klosec4c48422012-10-21 23:05:35 +02006019for ac_prog in python$PACKAGE_VERSION python3 python
6020do
6021 # Extract the first word of "$ac_prog", so it can be a program name with args.
6022set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6024$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006025if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006026 $as_echo_n "(cached) " >&6
6027else
Matthias Klosec4c48422012-10-21 23:05:35 +02006028 if test -n "$PYTHON"; then
6029 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006030else
6031as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6032for as_dir in $PATH
6033do
6034 IFS=$as_save_IFS
6035 test -z "$as_dir" && as_dir=.
6036 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006037 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006038 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006039 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6040 break 2
6041 fi
6042done
6043 done
6044IFS=$as_save_IFS
6045
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006046fi
6047fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006048PYTHON=$ac_cv_prog_PYTHON
6049if test -n "$PYTHON"; then
6050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6051$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006052else
6053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6054$as_echo "no" >&6; }
6055fi
6056
6057
Matthias Klosec4c48422012-10-21 23:05:35 +02006058 test -n "$PYTHON" && break
6059done
6060test -n "$PYTHON" || PYTHON="not-found"
6061
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006062if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006063 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6064else
6065 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006066fi
6067
6068
Kushal Das02d23a22014-04-15 23:50:06 +05306069for ac_prog in python$PACKAGE_VERSION python3 python
6070do
6071 # Extract the first word of "$ac_prog", so it can be a program name with args.
6072set dummy $ac_prog; ac_word=$2
6073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6074$as_echo_n "checking for $ac_word... " >&6; }
6075if ${ac_cv_prog_PYTHON+:} false; then :
6076 $as_echo_n "(cached) " >&6
6077else
6078 if test -n "$PYTHON"; then
6079 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6080else
6081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6082for as_dir in $PATH
6083do
6084 IFS=$as_save_IFS
6085 test -z "$as_dir" && as_dir=.
6086 for ac_exec_ext in '' $ac_executable_extensions; do
6087 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6088 ac_cv_prog_PYTHON="$ac_prog"
6089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6090 break 2
6091 fi
6092done
6093 done
6094IFS=$as_save_IFS
6095
6096fi
6097fi
6098PYTHON=$ac_cv_prog_PYTHON
6099if test -n "$PYTHON"; then
6100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6101$as_echo "$PYTHON" >&6; }
6102else
6103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6104$as_echo "no" >&6; }
6105fi
6106
6107
6108 test -n "$PYTHON" && break
6109done
6110test -n "$PYTHON" || PYTHON="not-found"
6111
6112if test "$PYTHON" = not-found; then
6113 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6114else
6115 OPCODEHGEN="$PYTHON"
6116fi
6117
6118
6119
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006120case $MACHDEP in
6121bsdos*|hp*|HP*)
6122 # install -d does not work on BSDI or HP-UX
6123 if test -z "$INSTALL"
6124 then
6125 INSTALL="${srcdir}/install-sh -c"
6126 fi
6127esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006128# Find a good install program. We prefer a C program (faster),
6129# so one script is as good as another. But avoid the broken or
6130# incompatible versions:
6131# SysV /etc/install, /usr/sbin/install
6132# SunOS /usr/etc/install
6133# IRIX /sbin/install
6134# AIX /bin/install
6135# AmigaOS /C/install, which installs bootblocks on floppy discs
6136# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6137# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6138# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6139# OS/2's system install, which has a completely different semantic
6140# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006141# Reject install programs that cannot install multiple files.
6142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6143$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006144if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006145if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006146 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006147else
6148 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6149for as_dir in $PATH
6150do
6151 IFS=$as_save_IFS
6152 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006153 # Account for people who put trailing slashes in PATH elements.
6154case $as_dir/ in #((
6155 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006157 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006158 /usr/ucb/* ) ;;
6159 *)
6160 # OSF1 and SCO ODT 3.0 have their own names for install.
6161 # Don't use installbsd from OSF since it installs stuff as root
6162 # by default.
6163 for ac_prog in ginstall scoinst install; do
6164 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006165 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006166 if test $ac_prog = install &&
6167 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6168 # AIX install. It has an incompatible calling convention.
6169 :
6170 elif test $ac_prog = install &&
6171 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6172 # program-specific install script used by HP pwplus--don't use.
6173 :
6174 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006175 rm -rf conftest.one conftest.two conftest.dir
6176 echo one > conftest.one
6177 echo two > conftest.two
6178 mkdir conftest.dir
6179 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6180 test -s conftest.one && test -s conftest.two &&
6181 test -s conftest.dir/conftest.one &&
6182 test -s conftest.dir/conftest.two
6183 then
6184 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6185 break 3
6186 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006187 fi
6188 fi
6189 done
6190 done
6191 ;;
6192esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006193
6194 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195IFS=$as_save_IFS
6196
Matthias Kloseb9621712010-04-24 17:59:49 +00006197rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198
6199fi
6200 if test "${ac_cv_path_install+set}" = set; then
6201 INSTALL=$ac_cv_path_install
6202 else
6203 # As a last resort, use the slow shell script. Don't cache a
6204 # value for INSTALL within a source directory, because that will
6205 # break other packages using the cache if that directory is
6206 # removed, or if the value is a relative name.
6207 INSTALL=$ac_install_sh
6208 fi
6209fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6211$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006212
6213# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6214# It thinks the first close brace ends the variable substitution.
6215test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6216
6217test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6218
6219test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6220
Matthias Klose93a0ef12012-03-15 18:08:34 +01006221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6222$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6223if test -z "$MKDIR_P"; then
6224 if ${ac_cv_path_mkdir+:} false; then :
6225 $as_echo_n "(cached) " >&6
6226else
6227 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6228for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6229do
6230 IFS=$as_save_IFS
6231 test -z "$as_dir" && as_dir=.
6232 for ac_prog in mkdir gmkdir; do
6233 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006234 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006235 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6236 'mkdir (GNU coreutils) '* | \
6237 'mkdir (coreutils) '* | \
6238 'mkdir (fileutils) '4.1*)
6239 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6240 break 3;;
6241 esac
6242 done
6243 done
6244 done
6245IFS=$as_save_IFS
6246
6247fi
6248
6249 test -d ./--version && rmdir ./--version
6250 if test "${ac_cv_path_mkdir+set}" = set; then
6251 MKDIR_P="$ac_cv_path_mkdir -p"
6252 else
6253 # As a last resort, use the slow shell script. Don't cache a
6254 # value for MKDIR_P within a source directory, because that will
6255 # break other packages using the cache if that directory is
6256 # removed, or if the value is a relative name.
6257 MKDIR_P="$ac_install_sh -d"
6258 fi
6259fi
6260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6261$as_echo "$MKDIR_P" >&6; }
6262
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006263
6264# Not every filesystem supports hard links
6265
6266if test -z "$LN" ; then
6267 case $ac_sys_system in
6268 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006269 *) LN=ln;;
6270 esac
6271fi
6272
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006273# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006274
6275ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006276
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006277# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6279$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006280
6281# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006282if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006283 withval=$with_pydebug;
6284if test "$withval" != no
6285then
6286
Matthias Kloseb9621712010-04-24 17:59:49 +00006287$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006288
Matthias Kloseb9621712010-04-24 17:59:49 +00006289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6290$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006291 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006292 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006293else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6294$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006295fi
6296else
Matthias Kloseb9621712010-04-24 17:59:49 +00006297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6298$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006299fi
6300
6301
6302# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6303# merged with this chunk of code?
6304
6305# Optimizer/debugger flags
6306# ------------------------
6307# (The following bit of code is complicated enough - please keep things
6308# indented properly. Just pretend you're editing Python code. ;-)
6309
6310# There are two parallel sets of case statements below, one that checks to
6311# see if OPT was set and one that does BASECFLAGS setting based upon
6312# compiler and platform. BASECFLAGS tweaks need to be made even if the
6313# user set OPT.
6314
6315# tweak OPT based on compiler and platform, only if the user didn't set
6316# it on the command line
6317
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006318if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006319then
6320 case $GCC in
6321 yes)
6322 if test "$CC" != 'g++' ; then
6323 STRICT_PROTO="-Wstrict-prototypes"
6324 fi
6325 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6326 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6327 WRAP="-fwrapv"
6328 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006329
6330 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006331 case $CC in
6332 *clang*) WRAP="-fwrapv"
6333 ;;
6334 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006335
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006336 case $ac_cv_prog_cc_g in
6337 yes)
6338 if test "$Py_DEBUG" = 'true' ; then
6339 # Optimization messes up debuggers, so turn it off for
6340 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006341 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006342 else
6343 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6344 fi
6345 ;;
6346 *)
6347 OPT="-O3 -Wall $STRICT_PROTO"
6348 ;;
6349 esac
6350 case $ac_sys_system in
6351 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6352 ;;
6353 esac
6354 ;;
6355
6356 *)
6357 OPT="-O"
6358 ;;
6359 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006360fi
6361
6362
6363
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006364
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006365# The -arch flags for universal builds on OSX
6366UNIVERSAL_ARCH_FLAGS=
6367
6368
6369# tweak BASECFLAGS based on compiler and platform
6370case $GCC in
6371yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006372 # Python doesn't violate C99 aliasing rules, but older versions of
6373 # GCC produce warnings for legal Python code. Enable
6374 # -fno-strict-aliasing on versions of GCC that support but produce
6375 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6377$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006378 ac_save_cc="$CC"
6379 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006380 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006381 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006382 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006383else
Matthias Kloseb9621712010-04-24 17:59:49 +00006384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006385/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006386
Matthias Kloseb159a552010-04-25 21:00:44 +00006387
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006388int
6389main ()
6390{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006391
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006392 ;
6393 return 0;
6394}
Matthias Kloseb159a552010-04-25 21:00:44 +00006395
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006397if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006398
6399 CC="$ac_save_cc -fstrict-aliasing"
6400 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006402/* end confdefs.h. */
6403
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006404 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006405int
6406main ()
6407{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006408double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006409 ;
6410 return 0;
6411}
Matthias Kloseb159a552010-04-25 21:00:44 +00006412
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006414if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006415
6416 ac_cv_no_strict_aliasing=no
6417
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006418else
Matthias Kloseb159a552010-04-25 21:00:44 +00006419
6420 ac_cv_no_strict_aliasing=yes
6421
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006422fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006424
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006425else
Matthias Kloseb159a552010-04-25 21:00:44 +00006426
6427 ac_cv_no_strict_aliasing=no
6428
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006429fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006431fi
6432
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006433 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006434 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6436$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006437 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006438 then
6439 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6440 fi
6441
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6443$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6444 ac_save_cc="$CC"
6445 CC="$CC -Wunused-result -Werror"
6446 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006447 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006448 $as_echo_n "(cached) " >&6
6449else
6450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6451/* end confdefs.h. */
6452
6453
6454int
6455main ()
6456{
6457
6458 ;
6459 return 0;
6460}
6461
6462_ACEOF
6463if ac_fn_c_try_compile "$LINENO"; then :
6464
6465 ac_cv_disable_unused_result_warning=yes
6466
6467else
6468
6469 ac_cv_disable_unused_result_warning=no
6470
6471fi
6472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6473fi
6474
6475 CFLAGS="$save_CFLAGS"
6476 CC="$ac_save_cc"
6477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6478$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6479
6480 if test $ac_cv_disable_unused_result_warning = yes
6481 then
6482 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6483 fi
6484
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6486$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6487 ac_save_cc="$CC"
6488 CC="$CC -Werror=declaration-after-statement"
6489 save_CFLAGS="$CFLAGS"
6490 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6491 $as_echo_n "(cached) " >&6
6492else
6493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6494/* end confdefs.h. */
6495
6496
6497int
6498main ()
6499{
6500
6501 ;
6502 return 0;
6503}
6504
6505_ACEOF
6506if ac_fn_c_try_compile "$LINENO"; then :
6507
6508 ac_cv_declaration_after_statement_warning=yes
6509
6510else
6511
6512 ac_cv_declaration_after_statement_warning=no
6513
6514fi
6515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6516fi
6517
6518 CFLAGS="$save_CFLAGS"
6519 CC="$ac_save_cc"
6520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6521$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6522
6523 if test $ac_cv_declaration_after_statement_warning = yes
6524 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006525 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006526 fi
6527
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6529$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6530 ac_save_cc="$CC"
6531 CC="$CC -Wsign-compare"
6532 save_CFLAGS="$CFLAGS"
6533 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6534 $as_echo_n "(cached) " >&6
6535else
6536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6537/* end confdefs.h. */
6538
6539
6540int
6541main ()
6542{
6543
6544 ;
6545 return 0;
6546}
6547
6548_ACEOF
6549if ac_fn_c_try_compile "$LINENO"; then :
6550
6551 ac_cv_enable_sign_compare_warning=yes
6552
6553else
6554
6555 ac_cv_enable_sign_compare_warning=no
6556
6557fi
6558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6559fi
6560
6561 CFLAGS="$save_CFLAGS"
6562 CC="$ac_save_cc"
6563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6564$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6565
6566 if test $ac_cv_enable_sign_compare_warning = yes
6567 then
6568 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6569 fi
6570
6571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6572$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6573 ac_save_cc="$CC"
6574 CC="$CC -Wunreachable-code"
6575 save_CFLAGS="$CFLAGS"
6576 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6577 $as_echo_n "(cached) " >&6
6578else
6579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6580/* end confdefs.h. */
6581
6582
6583int
6584main ()
6585{
6586
6587 ;
6588 return 0;
6589}
6590
6591_ACEOF
6592if ac_fn_c_try_compile "$LINENO"; then :
6593
6594 ac_cv_enable_unreachable_code_warning=yes
6595
6596else
6597
6598 ac_cv_enable_unreachable_code_warning=no
6599
6600fi
6601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6602fi
6603
6604 CFLAGS="$save_CFLAGS"
6605 CC="$ac_save_cc"
6606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6607$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
6608
6609 # Don't enable unreachable code warning in debug mode, since it usually
6610 # results in non-standard code paths.
6611 if test $ac_cv_enable_unreachable_code_warning = yes && test "$Py_DEBUG" != "true"
6612 then
6613 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
6614 fi
6615
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006616 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6617 # support. Without this, treatment of subnormals doesn't follow
6618 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006619 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006620 alpha*)
6621 BASECFLAGS="$BASECFLAGS -mieee"
6622 ;;
6623 esac
6624
6625 case $ac_sys_system in
6626 SCO_SV*)
6627 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6628 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006629
6630 # is there any other compiler on Darwin besides gcc?
6631 Darwin*)
6632 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6633 # used to be here, but non-Apple gcc doesn't accept them.
6634 if test "${CC}" = gcc
6635 then
6636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006637$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006638 case "${UNIVERSALSDK}" in
6639 */MacOSX10.4u.sdk)
6640 # Build using 10.4 SDK, force usage of gcc when the
6641 # compiler is gcc, otherwise the user will get very
6642 # confusing error messages when building on OSX 10.6
6643 CC=gcc-4.0
6644 CPP=cpp-4.0
6645 ;;
6646 esac
6647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006648$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006649 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006650
Ned Deily87adb6e2013-10-18 21:09:56 -07006651 if test "${enable_universalsdk}"
6652 then
6653 case "$UNIVERSAL_ARCHS" in
6654 32-bit)
6655 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6656 LIPO_32BIT_FLAGS=""
6657 ARCH_RUN_32BIT=""
6658 ;;
6659 64-bit)
6660 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6661 LIPO_32BIT_FLAGS=""
6662 ARCH_RUN_32BIT="true"
6663 ;;
6664 all)
6665 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6666 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6667 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6668 ;;
6669 intel)
6670 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6671 LIPO_32BIT_FLAGS="-extract i386"
6672 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6673 ;;
6674 intel-32)
6675 UNIVERSAL_ARCH_FLAGS="-arch i386"
6676 LIPO_32BIT_FLAGS=""
6677 ARCH_RUN_32BIT=""
6678 ;;
6679 3-way)
6680 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6681 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6682 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6683 ;;
6684 *)
6685 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6686 ;;
6687 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006688
Ned Deily87adb6e2013-10-18 21:09:56 -07006689 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6690 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6691 if test "${UNIVERSALSDK}" != "/"
6692 then
6693 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6694 fi
6695 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006696
Ned Deily87adb6e2013-10-18 21:09:56 -07006697 # Calculate an appropriate deployment target for this build:
6698 # The deployment target value is used explicitly to enable certain
6699 # features are enabled (such as builtin libedit support for readline)
6700 # through the use of Apple's Availabiliy Macros and is used as a
6701 # component of the string returned by distutils.get_platform().
6702 #
6703 # Use the value from:
6704 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6705 # 2. the operating system version of the build machine if >= 10.6
6706 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6707 # below to pick either 10.3, 10.4, or 10.5 as the target.
6708 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006709
Ned Deily87adb6e2013-10-18 21:09:56 -07006710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6711$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006712 cur_target_major=`sw_vers -productVersion | \
6713 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6714 cur_target_minor=`sw_vers -productVersion | \
6715 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6716 cur_target="${cur_target_major}.${cur_target_minor}"
6717 if test ${cur_target_major} -eq 10 && \
6718 test ${cur_target_minor} -ge 3 && \
6719 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006720 then
Ned Deily36820b62014-06-25 13:44:22 -07006721 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006722 cur_target=10.3
6723 if test ${enable_universalsdk}
6724 then
6725 case "$UNIVERSAL_ARCHS" in
6726 all|3-way|intel|64-bit)
6727 # These configurations were first supported in 10.5
6728 cur_target='10.5'
6729 ;;
6730 esac
6731 else
6732 if test `/usr/bin/arch` = "i386"
6733 then
6734 # 10.4 was the first release to support Intel archs
6735 cur_target="10.4"
6736 fi
6737 fi
6738 fi
6739 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006740
Ned Deily87adb6e2013-10-18 21:09:56 -07006741 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6742 # environment with a value that is the same as what we'll use
6743 # in the Makefile to ensure that we'll get the same compiler
6744 # environment during configure and build time.
6745 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6746 export MACOSX_DEPLOYMENT_TARGET
6747 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6749$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006750
Ned Deily87adb6e2013-10-18 21:09:56 -07006751 # end of Darwin* tests
6752 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006753 esac
6754 ;;
6755
6756*)
6757 case $ac_sys_system in
6758 OpenUNIX*|UnixWare*)
6759 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6760 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006761 SCO_SV*)
6762 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6763 ;;
6764 esac
6765 ;;
6766esac
6767
6768if test "$Py_DEBUG" = 'true'; then
6769 :
6770else
6771 OPT="-DNDEBUG $OPT"
6772fi
6773
6774if test "$ac_arch_flags"
6775then
6776 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6777fi
6778
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006779# On some compilers, pthreads are available without further options
6780# (e.g. MacOS X). On some of these systems, the compiler will not
6781# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6782# So we have to see first whether pthreads are available without
6783# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6785$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006786if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006787 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006788else
Matthias Kloseb9621712010-04-24 17:59:49 +00006789 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006790 ac_cv_pthread_is_default=no
6791else
Matthias Kloseb9621712010-04-24 17:59:49 +00006792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006793/* end confdefs.h. */
6794
Stefan Krah7dba5942012-11-22 22:49:11 +01006795#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006796#include <pthread.h>
6797
6798void* routine(void* p){return NULL;}
6799
6800int main(){
6801 pthread_t p;
6802 if(pthread_create(&p,NULL,routine,NULL)!=0)
6803 return 1;
6804 (void)pthread_detach(p);
6805 return 0;
6806}
6807
6808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006809if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006810
6811 ac_cv_pthread_is_default=yes
6812 ac_cv_kthread=no
6813 ac_cv_pthread=no
6814
6815else
Matthias Kloseb9621712010-04-24 17:59:49 +00006816 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6819 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006820fi
6821
6822
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006823fi
6824
Matthias Kloseb9621712010-04-24 17:59:49 +00006825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6826$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006827
6828
6829if test $ac_cv_pthread_is_default = yes
6830then
6831 ac_cv_kpthread=no
6832else
6833# -Kpthread, if available, provides the right #defines
6834# and linker options to make pthread_create available
6835# Some compilers won't report that they do not support -Kpthread,
6836# so we need to run a program to see whether it really made the
6837# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6839$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006840if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006841 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006842else
6843 ac_save_cc="$CC"
6844CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006845if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006846 ac_cv_kpthread=no
6847else
Matthias Kloseb9621712010-04-24 17:59:49 +00006848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849/* end confdefs.h. */
6850
Stefan Krah7dba5942012-11-22 22:49:11 +01006851#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006852#include <pthread.h>
6853
6854void* routine(void* p){return NULL;}
6855
6856int main(){
6857 pthread_t p;
6858 if(pthread_create(&p,NULL,routine,NULL)!=0)
6859 return 1;
6860 (void)pthread_detach(p);
6861 return 0;
6862}
6863
6864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006865if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006866 ac_cv_kpthread=yes
6867else
Matthias Kloseb9621712010-04-24 17:59:49 +00006868 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006870rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6871 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872fi
6873
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006874CC="$ac_save_cc"
6875fi
6876
Matthias Kloseb9621712010-04-24 17:59:49 +00006877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6878$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006879fi
6880
6881if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6882then
6883# -Kthread, if available, provides the right #defines
6884# and linker options to make pthread_create available
6885# Some compilers won't report that they do not support -Kthread,
6886# so we need to run a program to see whether it really made the
6887# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6889$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006890if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006891 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006892else
6893 ac_save_cc="$CC"
6894CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006895if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006896 ac_cv_kthread=no
6897else
Matthias Kloseb9621712010-04-24 17:59:49 +00006898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006899/* end confdefs.h. */
6900
Stefan Krah7dba5942012-11-22 22:49:11 +01006901#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006902#include <pthread.h>
6903
6904void* routine(void* p){return NULL;}
6905
6906int main(){
6907 pthread_t p;
6908 if(pthread_create(&p,NULL,routine,NULL)!=0)
6909 return 1;
6910 (void)pthread_detach(p);
6911 return 0;
6912}
6913
6914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006915if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006916 ac_cv_kthread=yes
6917else
Matthias Kloseb9621712010-04-24 17:59:49 +00006918 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6921 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922fi
6923
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006924CC="$ac_save_cc"
6925fi
6926
Matthias Kloseb9621712010-04-24 17:59:49 +00006927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6928$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006929fi
6930
6931if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6932then
6933# -pthread, if available, provides the right #defines
6934# and linker options to make pthread_create available
6935# Some compilers won't report that they do not support -pthread,
6936# so we need to run a program to see whether it really made the
6937# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6939$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006940if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006941 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006942else
6943 ac_save_cc="$CC"
6944CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006945if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006946 ac_cv_pthread=no
6947else
Matthias Kloseb9621712010-04-24 17:59:49 +00006948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006949/* end confdefs.h. */
6950
Stefan Krah7dba5942012-11-22 22:49:11 +01006951#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006952#include <pthread.h>
6953
6954void* routine(void* p){return NULL;}
6955
6956int main(){
6957 pthread_t p;
6958 if(pthread_create(&p,NULL,routine,NULL)!=0)
6959 return 1;
6960 (void)pthread_detach(p);
6961 return 0;
6962}
6963
6964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006965if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006966 ac_cv_pthread=yes
6967else
Matthias Kloseb9621712010-04-24 17:59:49 +00006968 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006970rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6971 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006972fi
6973
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006974CC="$ac_save_cc"
6975fi
6976
Matthias Kloseb9621712010-04-24 17:59:49 +00006977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6978$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006979fi
6980
6981# If we have set a CC compiler flag for thread support then
6982# check if it works for CXX, too.
6983ac_cv_cxx_thread=no
6984if test ! -z "$CXX"
6985then
Matthias Kloseb9621712010-04-24 17:59:49 +00006986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6987$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006988ac_save_cxx="$CXX"
6989
6990if test "$ac_cv_kpthread" = "yes"
6991then
6992 CXX="$CXX -Kpthread"
6993 ac_cv_cxx_thread=yes
6994elif test "$ac_cv_kthread" = "yes"
6995then
6996 CXX="$CXX -Kthread"
6997 ac_cv_cxx_thread=yes
6998elif test "$ac_cv_pthread" = "yes"
6999then
7000 CXX="$CXX -pthread"
7001 ac_cv_cxx_thread=yes
7002fi
7003
7004if test $ac_cv_cxx_thread = yes
7005then
7006 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7007 $CXX -c conftest.$ac_ext 2>&5
7008 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7009 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7010 then
7011 ac_cv_cxx_thread=yes
7012 else
7013 ac_cv_cxx_thread=no
7014 fi
7015 rm -fr conftest*
7016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7018$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007019fi
7020CXX="$ac_save_cxx"
7021
7022
7023# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7025$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007026if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007027 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007028else
Matthias Kloseb9621712010-04-24 17:59:49 +00007029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007030/* end confdefs.h. */
7031#include <stdlib.h>
7032#include <stdarg.h>
7033#include <string.h>
7034#include <float.h>
7035
7036int
7037main ()
7038{
7039
7040 ;
7041 return 0;
7042}
7043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007044if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007045 ac_cv_header_stdc=yes
7046else
Matthias Kloseb9621712010-04-24 17:59:49 +00007047 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007048fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7050
7051if test $ac_cv_header_stdc = yes; then
7052 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007054/* end confdefs.h. */
7055#include <string.h>
7056
7057_ACEOF
7058if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007059 $EGREP "memchr" >/dev/null 2>&1; then :
7060
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007061else
7062 ac_cv_header_stdc=no
7063fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007064rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007065
7066fi
7067
7068if test $ac_cv_header_stdc = yes; then
7069 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007071/* end confdefs.h. */
7072#include <stdlib.h>
7073
7074_ACEOF
7075if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007076 $EGREP "free" >/dev/null 2>&1; then :
7077
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007078else
7079 ac_cv_header_stdc=no
7080fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007081rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007082
7083fi
7084
7085if test $ac_cv_header_stdc = yes; then
7086 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007087 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007088 :
7089else
Matthias Kloseb9621712010-04-24 17:59:49 +00007090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007091/* end confdefs.h. */
7092#include <ctype.h>
7093#include <stdlib.h>
7094#if ((' ' & 0x0FF) == 0x020)
7095# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7096# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7097#else
7098# define ISLOWER(c) \
7099 (('a' <= (c) && (c) <= 'i') \
7100 || ('j' <= (c) && (c) <= 'r') \
7101 || ('s' <= (c) && (c) <= 'z'))
7102# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7103#endif
7104
7105#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7106int
7107main ()
7108{
7109 int i;
7110 for (i = 0; i < 256; i++)
7111 if (XOR (islower (i), ISLOWER (i))
7112 || toupper (i) != TOUPPER (i))
7113 return 2;
7114 return 0;
7115}
7116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007117if ac_fn_c_try_run "$LINENO"; then :
7118
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007119else
Matthias Kloseb9621712010-04-24 17:59:49 +00007120 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007121fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007122rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7123 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007124fi
7125
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007126fi
7127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7129$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007130if test $ac_cv_header_stdc = yes; then
7131
Matthias Kloseb9621712010-04-24 17:59:49 +00007132$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007133
7134fi
7135
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007136for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007137fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007138ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007139sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007140unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007141poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007142sys/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 +01007143sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007144sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007145sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007146sys/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 -07007147libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007148bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7149sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007150do :
7151 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7152ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007153if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007154 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007155#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007156_ACEOF
7157
7158fi
7159
Guido van Rossum627b2d71993-12-24 10:39:16 +00007160done
7161
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007162ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007163for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007164 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7166$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007167if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007168 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007169else
Matthias Kloseb9621712010-04-24 17:59:49 +00007170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007171/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007172#include <sys/types.h>
7173#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007174
Martin v. Löwis11437992002-04-12 09:54:03 +00007175int
7176main ()
7177{
7178if ((DIR *) 0)
7179return 0;
7180 ;
7181 return 0;
7182}
7183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007184if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007185 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007186else
Matthias Kloseb9621712010-04-24 17:59:49 +00007187 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007190fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007191eval ac_res=\$$as_ac_Header
7192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7193$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007194if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007195 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007196#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007197_ACEOF
7198
7199ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007200fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007201
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007202done
7203# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7204if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7206$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007207if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007208 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007209else
Martin v. Löwis11437992002-04-12 09:54:03 +00007210 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007214/* Override any GCC internal prototype to avoid an error.
7215 Use char because int might match the return type of a GCC
7216 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007217#ifdef __cplusplus
7218extern "C"
7219#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007220char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007221int
7222main ()
7223{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007224return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007225 ;
7226 return 0;
7227}
7228_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007229for ac_lib in '' dir; do
7230 if test -z "$ac_lib"; then
7231 ac_res="none required"
7232 else
7233 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007234 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007235 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007236 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007237 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007239rm -f core conftest.err conftest.$ac_objext \
7240 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007241 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007242 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007244done
Victor Stinnere0be4232011-10-25 13:06:09 +02007245if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007246
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007247else
7248 ac_cv_search_opendir=no
7249fi
7250rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007251LIBS=$ac_func_search_save_LIBS
7252fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7254$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007255ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007256if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007257 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007258
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007259fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007260
Michael W. Hudson54241132001-12-07 15:38:26 +00007261else
Matthias Kloseb9621712010-04-24 17:59:49 +00007262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7263$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007264if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007265 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007266else
7267 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007269/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007270
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007271/* Override any GCC internal prototype to avoid an error.
7272 Use char because int might match the return type of a GCC
7273 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007274#ifdef __cplusplus
7275extern "C"
7276#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007277char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007278int
7279main ()
7280{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007281return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007282 ;
7283 return 0;
7284}
7285_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007286for ac_lib in '' x; do
7287 if test -z "$ac_lib"; then
7288 ac_res="none required"
7289 else
7290 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007291 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007292 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007293 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007294 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007296rm -f core conftest.err conftest.$ac_objext \
7297 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007298 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007299 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007301done
Victor Stinnere0be4232011-10-25 13:06:09 +02007302if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007303
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007304else
7305 ac_cv_search_opendir=no
7306fi
7307rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007308LIBS=$ac_func_search_save_LIBS
7309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7311$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007312ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007313if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007314 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007315
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007316fi
7317
7318fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007319
Matthias Kloseb9621712010-04-24 17:59:49 +00007320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7321$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007322if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007323 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007324else
Matthias Kloseb9621712010-04-24 17:59:49 +00007325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007326/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007327#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007328int
7329main ()
7330{
7331return makedev(0, 0);
7332 ;
7333 return 0;
7334}
7335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007336if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007337 ac_cv_header_sys_types_h_makedev=yes
7338else
Matthias Kloseb9621712010-04-24 17:59:49 +00007339 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007340fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007341rm -f core conftest.err conftest.$ac_objext \
7342 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007343
7344fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7346$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007347
7348if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007349ac_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 +02007350if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007351
Matthias Kloseb9621712010-04-24 17:59:49 +00007352$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007353
7354fi
7355
7356
7357
7358 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007359 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 +02007360if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007361
Matthias Kloseb9621712010-04-24 17:59:49 +00007362$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007363
7364fi
7365
7366
7367 fi
7368fi
7369
Michael W. Hudson54241132001-12-07 15:38:26 +00007370
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007371# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7372for ac_header in net/if.h
7373do :
7374 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7375#ifdef STDC_HEADERS
7376# include <stdlib.h>
7377# include <stddef.h>
7378#else
7379# ifdef HAVE_STDLIB_H
7380# include <stdlib.h>
7381# endif
7382#endif
7383#ifdef HAVE_SYS_SOCKET_H
7384# include <sys/socket.h>
7385#endif
7386
7387"
Victor Stinnere0be4232011-10-25 13:06:09 +02007388if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007389 cat >>confdefs.h <<_ACEOF
7390#define HAVE_NET_IF_H 1
7391_ACEOF
7392
7393fi
7394
7395done
7396
7397
Martin v. Löwis11017b12006-01-14 18:12:57 +00007398# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007399for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007400do :
7401 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 +00007402#ifdef HAVE_ASM_TYPES_H
7403#include <asm/types.h>
7404#endif
7405#ifdef HAVE_SYS_SOCKET_H
7406#include <sys/socket.h>
7407#endif
7408
Matthias Kloseb9621712010-04-24 17:59:49 +00007409"
Victor Stinnere0be4232011-10-25 13:06:09 +02007410if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007411 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007412#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007413_ACEOF
7414
7415fi
7416
7417done
7418
7419
Charles-François Natali47413c12011-10-06 19:47:44 +02007420# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007421for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007422do :
7423 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7424ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7425#ifdef HAVE_SYS_SOCKET_H
7426#include <sys/socket.h>
7427#endif
7428
7429"
7430if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7431 cat >>confdefs.h <<_ACEOF
7432#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7433_ACEOF
7434
7435fi
7436
7437done
7438
7439
Guido van Rossum627b2d71993-12-24 10:39:16 +00007440# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007441was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7443$as_echo_n "checking for clock_t in time.h... " >&6; }
7444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007445/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007446#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007447
7448_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007450 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007451 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007452else
Martin v. Löwis11437992002-04-12 09:54:03 +00007453
7454
Matthias Kloseb9621712010-04-24 17:59:49 +00007455$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007456
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007457
Guido van Rossum627b2d71993-12-24 10:39:16 +00007458fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007459rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007460
Matthias Kloseb9621712010-04-24 17:59:49 +00007461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7462$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007463
Matthias Kloseb9621712010-04-24 17:59:49 +00007464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7465$as_echo_n "checking for makedev... " >&6; }
7466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007467/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007468
Jesus Cea740f53a2010-04-28 11:35:30 +00007469#if defined(MAJOR_IN_MKDEV)
7470#include <sys/mkdev.h>
7471#elif defined(MAJOR_IN_SYSMACROS)
7472#include <sys/sysmacros.h>
7473#else
7474#include <sys/types.h>
7475#endif
7476
Neal Norwitz11690112002-07-30 01:08:28 +00007477int
7478main ()
7479{
Jesus Cea740f53a2010-04-28 11:35:30 +00007480
7481 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007482 ;
7483 return 0;
7484}
Matthias Kloseb159a552010-04-25 21:00:44 +00007485
Neal Norwitz11690112002-07-30 01:08:28 +00007486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007487if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007488 ac_cv_has_makedev=yes
7489else
Matthias Kloseb9621712010-04-24 17:59:49 +00007490 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007491fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007492rm -f core conftest.err conftest.$ac_objext \
7493 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7495$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007496if test "$ac_cv_has_makedev" = "yes"; then
7497
Matthias Kloseb9621712010-04-24 17:59:49 +00007498$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007499
7500fi
7501
Christian Heimes985ecdc2013-11-20 11:46:18 +01007502# byte swapping
7503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7504$as_echo_n "checking for le64toh... " >&6; }
7505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7506/* end confdefs.h. */
7507
7508#ifdef HAVE_ENDIAN_H
7509#include <endian.h>
7510#elif defined(HAVE_SYS_ENDIAN_H)
7511#include <sys/endian.h>
7512#endif
7513
7514int
7515main ()
7516{
7517
7518 le64toh(1)
7519 ;
7520 return 0;
7521}
7522
7523_ACEOF
7524if ac_fn_c_try_link "$LINENO"; then :
7525 ac_cv_has_le64toh=yes
7526else
7527 ac_cv_has_le64toh=no
7528fi
7529rm -f core conftest.err conftest.$ac_objext \
7530 conftest$ac_exeext conftest.$ac_ext
7531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7532$as_echo "$ac_cv_has_le64toh" >&6; }
7533if test "$ac_cv_has_le64toh" = "yes"; then
7534
7535$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7536
7537fi
7538
Martin v. Löwis399a6892002-10-04 10:22:02 +00007539# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7540# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7541# defined, but the compiler does not support pragma redefine_extname,
7542# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7543# structures (such as rlimit64) without declaring them. As a
7544# work-around, disable LFS on such configurations
7545
7546use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7548$as_echo_n "checking Solaris LFS bug... " >&6; }
7549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007550/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007551
7552#define _LARGEFILE_SOURCE 1
7553#define _FILE_OFFSET_BITS 64
7554#include <sys/resource.h>
7555
Martin v. Löwis399a6892002-10-04 10:22:02 +00007556int
7557main ()
7558{
7559struct rlimit foo;
7560 ;
7561 return 0;
7562}
7563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007564if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007565 sol_lfs_bug=no
7566else
Matthias Kloseb9621712010-04-24 17:59:49 +00007567 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7571$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007572if test "$sol_lfs_bug" = "yes"; then
7573 use_lfs=no
7574fi
7575
7576if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007577# Two defines needed to enable largefile support on various platforms
7578# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007579case $ac_sys_system/$ac_sys_release in
7580AIX*)
7581
7582$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7583
7584 ;;
7585esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007586
Matthias Kloseb9621712010-04-24 17:59:49 +00007587$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007588
7589
Matthias Kloseb9621712010-04-24 17:59:49 +00007590$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007591
Martin v. Löwis399a6892002-10-04 10:22:02 +00007592fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007593
Guido van Rossum84e7b241996-08-19 21:59:00 +00007594# Add some code to confdefs.h so that the test for off_t works on SCO
7595cat >> confdefs.h <<\EOF
7596#if defined(SCO_DS)
7597#undef _OFF_T
7598#endif
7599EOF
7600
Guido van Rossumef2255b2000-03-10 22:30:29 +00007601# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007602ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007603if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007604
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007605else
Martin v. Löwis11437992002-04-12 09:54:03 +00007606
7607cat >>confdefs.h <<_ACEOF
7608#define mode_t int
7609_ACEOF
7610
7611fi
7612
Matthias Kloseb9621712010-04-24 17:59:49 +00007613ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007614if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007615
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007616else
Martin v. Löwis11437992002-04-12 09:54:03 +00007617
7618cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007619#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007620_ACEOF
7621
7622fi
7623
Matthias Kloseb9621712010-04-24 17:59:49 +00007624ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007625if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007626
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007627else
Martin v. Löwis11437992002-04-12 09:54:03 +00007628
7629cat >>confdefs.h <<_ACEOF
7630#define pid_t int
7631_ACEOF
7632
7633fi
7634
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007635
Martin v. Löwis11437992002-04-12 09:54:03 +00007636cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007637#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007638_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007639
Matthias Kloseb9621712010-04-24 17:59:49 +00007640ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007641if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007642
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007643else
Martin v. Löwis11437992002-04-12 09:54:03 +00007644
7645cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007646#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007647_ACEOF
7648
7649fi
7650
Matthias Kloseb9621712010-04-24 17:59:49 +00007651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7652$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007653if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007654 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007655else
Matthias Kloseb9621712010-04-24 17:59:49 +00007656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007657/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007658#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007659
7660_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007661if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007662 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007663 ac_cv_type_uid_t=yes
7664else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007665 ac_cv_type_uid_t=no
7666fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007667rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007668
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7671$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007672if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007673
Matthias Kloseb9621712010-04-24 17:59:49 +00007674$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007675
7676
Matthias Kloseb9621712010-04-24 17:59:49 +00007677$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007678
7679fi
7680
Mark Dickinson983bc162012-12-02 12:11:38 +00007681
7682# There are two separate checks for each of the exact-width integer types we
7683# need. First we check whether the type is available using the usual
7684# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7685# and <stdint.h> where available). We then also use the special type checks of
7686# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7687# directly, #define's uint32_t to be a suitable type.
7688
7689ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7690if test "x$ac_cv_type_uint32_t" = xyes; then :
7691
7692$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7693
7694fi
7695
Matthias Kloseb9621712010-04-24 17:59:49 +00007696ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7697case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007698 no|yes) ;; #(
7699 *)
7700
Matthias Kloseb9621712010-04-24 17:59:49 +00007701$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007702
7703
7704cat >>confdefs.h <<_ACEOF
7705#define uint32_t $ac_cv_c_uint32_t
7706_ACEOF
7707;;
7708 esac
7709
Mark Dickinson983bc162012-12-02 12:11:38 +00007710
7711ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7712if test "x$ac_cv_type_uint64_t" = xyes; then :
7713
7714$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7715
7716fi
7717
Matthias Kloseb9621712010-04-24 17:59:49 +00007718ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7719case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007720 no|yes) ;; #(
7721 *)
7722
Matthias Kloseb9621712010-04-24 17:59:49 +00007723$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007724
7725
7726cat >>confdefs.h <<_ACEOF
7727#define uint64_t $ac_cv_c_uint64_t
7728_ACEOF
7729;;
7730 esac
7731
Mark Dickinson983bc162012-12-02 12:11:38 +00007732
7733ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7734if test "x$ac_cv_type_int32_t" = xyes; then :
7735
7736$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7737
7738fi
7739
Matthias Kloseb9621712010-04-24 17:59:49 +00007740ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7741case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007742 no|yes) ;; #(
7743 *)
7744
7745cat >>confdefs.h <<_ACEOF
7746#define int32_t $ac_cv_c_int32_t
7747_ACEOF
7748;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007749esac
7750
Mark Dickinson983bc162012-12-02 12:11:38 +00007751
7752ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7753if test "x$ac_cv_type_int64_t" = xyes; then :
7754
7755$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7756
7757fi
7758
Matthias Kloseb9621712010-04-24 17:59:49 +00007759ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7760case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007761 no|yes) ;; #(
7762 *)
7763
7764cat >>confdefs.h <<_ACEOF
7765#define int64_t $ac_cv_c_int64_t
7766_ACEOF
7767;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007768esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007769
Mark Dickinson983bc162012-12-02 12:11:38 +00007770
Matthias Kloseb9621712010-04-24 17:59:49 +00007771ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007772if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007773
Matthias Kloseb9621712010-04-24 17:59:49 +00007774$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007775
7776fi
7777
Stefan Krah1919b7e2012-03-21 18:25:23 +01007778ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7779if test "x$ac_cv_type___uint128_t" = xyes; then :
7780
7781$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7782
7783fi
7784
Jack Jansendd19cf82001-12-06 22:36:17 +00007785
Michael W. Hudson54241132001-12-07 15:38:26 +00007786# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007787# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007788# The cast to long int works around a bug in the HP C Compiler
7789# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7790# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7791# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7793$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007794if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007795 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007796else
Matthias Kloseb9621712010-04-24 17:59:49 +00007797 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 +00007798
Martin v. Löwis11437992002-04-12 09:54:03 +00007799else
Matthias Kloseb9621712010-04-24 17:59:49 +00007800 if test "$ac_cv_type_int" = yes; then
7801 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7802$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007803as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007804See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007805 else
7806 ac_cv_sizeof_int=0
7807 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007809
Martin v. Löwis11437992002-04-12 09:54:03 +00007810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7812$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007813
7814
7815
Martin v. Löwis11437992002-04-12 09:54:03 +00007816cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007817#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007818_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007819
7820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821# The cast to long int works around a bug in the HP C Compiler
7822# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7823# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7824# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7826$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007827if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007828 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007829else
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 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 +00007831
Martin v. Löwis11437992002-04-12 09:54:03 +00007832else
Matthias Kloseb9621712010-04-24 17:59:49 +00007833 if test "$ac_cv_type_long" = yes; then
7834 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7835$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007836as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007837See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007838 else
7839 ac_cv_sizeof_long=0
7840 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007842
Martin v. Löwis11437992002-04-12 09:54:03 +00007843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7845$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007846
7847
7848
Martin v. Löwis11437992002-04-12 09:54:03 +00007849cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007850#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007851_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007852
7853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007854# The cast to long int works around a bug in the HP C Compiler
7855# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7856# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7857# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7859$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007860if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007861 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007862else
Matthias Kloseb9621712010-04-24 17:59:49 +00007863 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 +00007864
Martin v. Löwis11437992002-04-12 09:54:03 +00007865else
Matthias Kloseb9621712010-04-24 17:59:49 +00007866 if test "$ac_cv_type_void_p" = yes; then
7867 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7868$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007869as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007870See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007871 else
7872 ac_cv_sizeof_void_p=0
7873 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007875
Martin v. Löwis11437992002-04-12 09:54:03 +00007876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7878$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007879
7880
7881
Martin v. Löwis11437992002-04-12 09:54:03 +00007882cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007883#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007884_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007885
7886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007887# The cast to long int works around a bug in the HP C Compiler
7888# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7889# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7890# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7892$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007893if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007894 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007895else
Matthias Kloseb9621712010-04-24 17:59:49 +00007896 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 +00007897
Martin v. Löwis11437992002-04-12 09:54:03 +00007898else
Matthias Kloseb9621712010-04-24 17:59:49 +00007899 if test "$ac_cv_type_short" = yes; then
7900 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7901$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007902as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007903See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007904 else
7905 ac_cv_sizeof_short=0
7906 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007908
Martin v. Löwis11437992002-04-12 09:54:03 +00007909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7911$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007912
7913
7914
Martin v. Löwis11437992002-04-12 09:54:03 +00007915cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007916#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007917_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007918
7919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007920# The cast to long int works around a bug in the HP C Compiler
7921# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7922# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7923# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7925$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007926if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007927 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007928else
Matthias Kloseb9621712010-04-24 17:59:49 +00007929 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 +00007930
Martin v. Löwis11437992002-04-12 09:54:03 +00007931else
Matthias Kloseb9621712010-04-24 17:59:49 +00007932 if test "$ac_cv_type_float" = yes; then
7933 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7934$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007935as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007936See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007937 else
7938 ac_cv_sizeof_float=0
7939 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007941
Martin v. Löwis11437992002-04-12 09:54:03 +00007942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7944$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007945
7946
7947
Martin v. Löwis11437992002-04-12 09:54:03 +00007948cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007949#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007950_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007951
7952
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953# The cast to long int works around a bug in the HP C Compiler
7954# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7955# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7956# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7958$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007959if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007960 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007961else
Matthias Kloseb9621712010-04-24 17:59:49 +00007962 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 +00007963
Martin v. Löwis11437992002-04-12 09:54:03 +00007964else
Matthias Kloseb9621712010-04-24 17:59:49 +00007965 if test "$ac_cv_type_double" = yes; then
7966 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007968as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007969See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007970 else
7971 ac_cv_sizeof_double=0
7972 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007974
Martin v. Löwis11437992002-04-12 09:54:03 +00007975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7977$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007978
7979
7980
Martin v. Löwis11437992002-04-12 09:54:03 +00007981cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007982#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007983_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007984
7985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986# The cast to long int works around a bug in the HP C Compiler
7987# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7988# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7989# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7991$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007992if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007993 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007994else
Matthias Kloseb9621712010-04-24 17:59:49 +00007995 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 +00007996
Martin v. Löwis11437992002-04-12 09:54:03 +00007997else
Matthias Kloseb9621712010-04-24 17:59:49 +00007998 if test "$ac_cv_type_fpos_t" = yes; then
7999 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8000$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008001as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008002See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008003 else
8004 ac_cv_sizeof_fpos_t=0
8005 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008007
Martin v. Löwis11437992002-04-12 09:54:03 +00008008fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8010$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008011
8012
8013
Martin v. Löwis11437992002-04-12 09:54:03 +00008014cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008015#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008016_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008017
Michael W. Hudson54241132001-12-07 15:38:26 +00008018
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008019# The cast to long int works around a bug in the HP C Compiler
8020# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8021# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8022# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8024$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008025if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008026 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008027else
Matthias Kloseb9621712010-04-24 17:59:49 +00008028 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 +00008029
Martin v. Löwis18e16552006-02-15 17:27:45 +00008030else
Matthias Kloseb9621712010-04-24 17:59:49 +00008031 if test "$ac_cv_type_size_t" = yes; then
8032 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8033$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008034as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008035See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008036 else
8037 ac_cv_sizeof_size_t=0
8038 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008040
Martin v. Löwis18e16552006-02-15 17:27:45 +00008041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8043$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044
8045
8046
Martin v. Löwis18e16552006-02-15 17:27:45 +00008047cat >>confdefs.h <<_ACEOF
8048#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8049_ACEOF
8050
8051
Christian Heimes400adb02008-02-01 08:12:03 +00008052# The cast to long int works around a bug in the HP C Compiler
8053# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8054# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8055# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8057$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008058if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008059 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008060else
Matthias Kloseb9621712010-04-24 17:59:49 +00008061 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 +00008062
Christian Heimes400adb02008-02-01 08:12:03 +00008063else
Matthias Kloseb9621712010-04-24 17:59:49 +00008064 if test "$ac_cv_type_pid_t" = yes; then
8065 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8066$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008067as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008068See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008069 else
8070 ac_cv_sizeof_pid_t=0
8071 fi
8072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008073
Christian Heimes400adb02008-02-01 08:12:03 +00008074fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8076$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008077
8078
8079
8080cat >>confdefs.h <<_ACEOF
8081#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8082_ACEOF
8083
8084
Michael W. Hudson54241132001-12-07 15:38:26 +00008085
Matthias Kloseb9621712010-04-24 17:59:49 +00008086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8087$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008088have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008090/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008091
Martin v. Löwis11437992002-04-12 09:54:03 +00008092int
8093main ()
8094{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008095long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008096 ;
8097 return 0;
8098}
8099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008100if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008101
8102
Matthias Kloseb9621712010-04-24 17:59:49 +00008103$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008104
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008105 have_long_long=yes
8106
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8110$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008111if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008112# The cast to long int works around a bug in the HP C Compiler
8113# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8114# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8115# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8117$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008118if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008119 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008120else
Matthias Kloseb9621712010-04-24 17:59:49 +00008121 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 +00008122
Martin v. Löwis11437992002-04-12 09:54:03 +00008123else
Matthias Kloseb9621712010-04-24 17:59:49 +00008124 if test "$ac_cv_type_long_long" = yes; then
8125 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8126$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008127as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008128See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008129 else
8130 ac_cv_sizeof_long_long=0
8131 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008132fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008133
Martin v. Löwis11437992002-04-12 09:54:03 +00008134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8136$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008137
8138
8139
Martin v. Löwis11437992002-04-12 09:54:03 +00008140cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008141#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008142_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008143
Michael W. Hudson54241132001-12-07 15:38:26 +00008144
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008145fi
8146
Matthias Kloseb9621712010-04-24 17:59:49 +00008147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8148$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008149have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008151/* end confdefs.h. */
8152
8153int
8154main ()
8155{
8156long double x; x = (long double)0;
8157 ;
8158 return 0;
8159}
8160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008161if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008162
8163
Matthias Kloseb9621712010-04-24 17:59:49 +00008164$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008165
8166 have_long_double=yes
8167
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008168fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8171$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008172if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008173# The cast to long int works around a bug in the HP C Compiler
8174# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8175# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8176# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8178$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008179if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008180 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008181else
Matthias Kloseb9621712010-04-24 17:59:49 +00008182 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 +00008183
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008184else
Matthias Kloseb9621712010-04-24 17:59:49 +00008185 if test "$ac_cv_type_long_double" = yes; then
8186 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8187$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008188as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008189See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008190 else
8191 ac_cv_sizeof_long_double=0
8192 fi
8193fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008194
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8197$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008198
8199
8200
8201cat >>confdefs.h <<_ACEOF
8202#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8203_ACEOF
8204
8205
8206fi
8207
8208
Matthias Kloseb9621712010-04-24 17:59:49 +00008209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8210$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008211have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008213/* end confdefs.h. */
8214
8215int
8216main ()
8217{
8218_Bool x; x = (_Bool)0;
8219 ;
8220 return 0;
8221}
8222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008223if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008224
8225
Matthias Kloseb9621712010-04-24 17:59:49 +00008226$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008227
8228 have_c99_bool=yes
8229
Thomas Woutersb2137042007-02-01 18:02:27 +00008230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8233$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008234if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235# The cast to long int works around a bug in the HP C Compiler
8236# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8237# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8238# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8240$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008241if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008242 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008243else
Matthias Kloseb9621712010-04-24 17:59:49 +00008244 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 +00008245
Thomas Woutersb2137042007-02-01 18:02:27 +00008246else
Matthias Kloseb9621712010-04-24 17:59:49 +00008247 if test "$ac_cv_type__Bool" = yes; then
8248 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8249$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008250as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008251See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252 else
8253 ac_cv_sizeof__Bool=0
8254 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008256
Thomas Woutersb2137042007-02-01 18:02:27 +00008257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8259$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008260
8261
8262
Thomas Woutersb2137042007-02-01 18:02:27 +00008263cat >>confdefs.h <<_ACEOF
8264#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8265_ACEOF
8266
8267
8268fi
8269
Matthias Kloseb9621712010-04-24 17:59:49 +00008270ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008271 #include <stdint.h>
8272 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008273 #ifdef HAVE_INTTYPES_H
8274 #include <inttypes.h>
8275 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008276"
Victor Stinnere0be4232011-10-25 13:06:09 +02008277if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008278
8279cat >>confdefs.h <<_ACEOF
8280#define HAVE_UINTPTR_T 1
8281_ACEOF
8282
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008283# The cast to long int works around a bug in the HP C Compiler
8284# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8285# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8286# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8288$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008289if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008290 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008291else
Matthias Kloseb9621712010-04-24 17:59:49 +00008292 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 +00008293
Martin v. Löwis11437992002-04-12 09:54:03 +00008294else
Matthias Kloseb9621712010-04-24 17:59:49 +00008295 if test "$ac_cv_type_uintptr_t" = yes; then
8296 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8297$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008298as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008299See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008300 else
8301 ac_cv_sizeof_uintptr_t=0
8302 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008304
Martin v. Löwis11437992002-04-12 09:54:03 +00008305fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8307$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008308
8309
8310
Martin v. Löwis11437992002-04-12 09:54:03 +00008311cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008312#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008313_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008314
Michael W. Hudson54241132001-12-07 15:38:26 +00008315
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008316fi
8317
Thomas Wouters89f507f2006-12-13 04:49:30 +00008318
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008319# The cast to long int works around a bug in the HP C Compiler
8320# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8321# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8322# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8324$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008325if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008326 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008327else
Matthias Kloseb9621712010-04-24 17:59:49 +00008328 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008329#ifdef HAVE_SYS_TYPES_H
8330#include <sys/types.h>
8331#endif
8332
Matthias Kloseb9621712010-04-24 17:59:49 +00008333"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008334
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008335else
Matthias Kloseb9621712010-04-24 17:59:49 +00008336 if test "$ac_cv_type_off_t" = yes; then
8337 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8338$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008339as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008340See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008341 else
8342 ac_cv_sizeof_off_t=0
8343 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008344fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008345
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8348$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008349
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008350
8351
Martin v. Löwis11437992002-04-12 09:54:03 +00008352cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008353#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008354_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008355
Michael W. Hudson54241132001-12-07 15:38:26 +00008356
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008357
Matthias Kloseb9621712010-04-24 17:59:49 +00008358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8359$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008360if test "$have_long_long" = yes
8361then
8362if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008363 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008364
Matthias Kloseb9621712010-04-24 17:59:49 +00008365$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008366
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8368$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008369else
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8371$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008372fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008373else
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8375$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008376fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008377
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008378# The cast to long int works around a bug in the HP C Compiler
8379# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8380# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8381# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8383$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008384if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008385 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008386else
Matthias Kloseb9621712010-04-24 17:59:49 +00008387 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008388#ifdef HAVE_SYS_TYPES_H
8389#include <sys/types.h>
8390#endif
8391#ifdef HAVE_TIME_H
8392#include <time.h>
8393#endif
8394
Matthias Kloseb9621712010-04-24 17:59:49 +00008395"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008396
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008397else
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 if test "$ac_cv_type_time_t" = yes; then
8399 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8400$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008401as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008402See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008403 else
8404 ac_cv_sizeof_time_t=0
8405 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008406fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008407
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008408fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8410$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008411
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008412
8413
Martin v. Löwis11437992002-04-12 09:54:03 +00008414cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008415#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008416_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008417
Michael W. Hudson54241132001-12-07 15:38:26 +00008418
8419
Trent Mick635f6fb2000-08-23 21:33:05 +00008420# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008421ac_save_cc="$CC"
8422if test "$ac_cv_kpthread" = "yes"
8423then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008424elif test "$ac_cv_kthread" = "yes"
8425then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008426elif test "$ac_cv_pthread" = "yes"
8427then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008428fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008429
Matthias Kloseb9621712010-04-24 17:59:49 +00008430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8431$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008432have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008434/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008435
8436 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008437int
8438main ()
8439{
Guido van Rossum12580492000-09-24 16:47:19 +00008440pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008441 ;
8442 return 0;
8443}
Matthias Kloseb159a552010-04-25 21:00:44 +00008444
Martin v. Löwis11437992002-04-12 09:54:03 +00008445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008446if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008447 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8451$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008452if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008453 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008454# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8455# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8456# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8458$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008459if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008460 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008461else
Matthias Kloseb9621712010-04-24 17:59:49 +00008462 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008463#ifdef HAVE_PTHREAD_H
8464#include <pthread.h>
8465#endif
8466
Matthias Kloseb9621712010-04-24 17:59:49 +00008467"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008468
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008469else
Matthias Kloseb9621712010-04-24 17:59:49 +00008470 if test "$ac_cv_type_pthread_t" = yes; then
8471 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8472$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008473as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008474See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008475 else
8476 ac_cv_sizeof_pthread_t=0
8477 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008479
Trent Mick635f6fb2000-08-23 21:33:05 +00008480fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8482$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008483
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008484
8485
Martin v. Löwis11437992002-04-12 09:54:03 +00008486cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008487#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008488_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008489
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008490
Trent Mick635f6fb2000-08-23 21:33:05 +00008491fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008492CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008493
Michael W. Hudson54241132001-12-07 15:38:26 +00008494
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008495case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008496 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008497 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8498 ;;
8499 Darwin/*)
8500 OTHER_LIBTOOL_OPT=""
8501 ;;
8502esac
8503
8504
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008505
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008506case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008507 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008508 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8509 if test "${enable_universalsdk}"; then
8510 :
8511 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008512 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008513 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008514 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008515 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008516 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008517 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008518 if test ${gcc_version} '<' 4.0
8519 then
8520 LIBTOOL_CRUFT="-lcc_dynamic"
8521 else
8522 LIBTOOL_CRUFT=""
8523 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008524 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008525 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008526else
Matthias Kloseb9621712010-04-24 17:59:49 +00008527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008528/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008529
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008530 #include <unistd.h>
8531 int main(int argc, char*argv[])
8532 {
8533 if (sizeof(long) == 4) {
8534 return 0;
8535 } else {
8536 return 1;
8537 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008538 }
8539
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008541if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008542 ac_osx_32bit=yes
8543else
Matthias Kloseb9621712010-04-24 17:59:49 +00008544 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008546rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8547 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008548fi
8549
8550
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008551 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008552 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008553 i386)
8554 MACOSX_DEFAULT_ARCH="i386"
8555 ;;
8556 ppc)
8557 MACOSX_DEFAULT_ARCH="ppc"
8558 ;;
8559 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008560 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008561 ;;
8562 esac
8563 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008564 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008565 i386)
8566 MACOSX_DEFAULT_ARCH="x86_64"
8567 ;;
8568 ppc)
8569 MACOSX_DEFAULT_ARCH="ppc64"
8570 ;;
8571 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008572 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008573 ;;
8574 esac
8575
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008576 fi
8577
8578 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008579 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008580 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008581esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8583$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008584if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008585then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008586 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008587 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008588 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008589
Matthias Kloseb9621712010-04-24 17:59:49 +00008590$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008591
Matthias Kloseb9621712010-04-24 17:59:49 +00008592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8593$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008594 if test $enable_shared = "yes"
8595 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008596 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 +00008597 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008598else
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8600$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008601fi
8602
Matthias Kloseb9621712010-04-24 17:59:49 +00008603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8604$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008605case $ac_sys_system/$ac_sys_release in
8606 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008607
Matthias Kloseb9621712010-04-24 17:59:49 +00008608$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008609
Matthias Kloseb9621712010-04-24 17:59:49 +00008610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8611$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008612 ;;
8613 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8615$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008616 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008617esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008618
Guido van Rossum0a516c91994-09-12 10:58:40 +00008619# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008620
Michael W. Hudson54241132001-12-07 15:38:26 +00008621
8622
8623
8624
Benjamin Peterson99f03762010-04-11 22:15:28 +00008625
Thomas Wouters477c8d52006-05-27 19:21:47 +00008626
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008627# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8628# -- usually .so, .sl on HP-UX, .dll on Cygwin
8629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8630$as_echo_n "checking the extension of shared libraries... " >&6; }
8631if test -z "$SHLIB_SUFFIX"; then
8632 case $ac_sys_system in
8633 hp*|HP*)
8634 case `uname -m` in
8635 ia64) SHLIB_SUFFIX=.so;;
8636 *) SHLIB_SUFFIX=.sl;;
8637 esac
8638 ;;
8639 CYGWIN*) SHLIB_SUFFIX=.dll;;
8640 *) SHLIB_SUFFIX=.so;;
8641 esac
8642fi
8643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8644$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008645
Guido van Rossum0a516c91994-09-12 10:58:40 +00008646# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008647# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008648# (Shared libraries in this instance are shared modules to be loaded into
8649# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8651$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008652if test -z "$LDSHARED"
8653then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008654 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008655 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008656 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008657 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008658 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008659 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008660 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008661 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008662 if test "$GCC" = "yes" ; then
8663 LDSHARED='$(CC) -shared'
8664 LDCXXSHARED='$(CXX) -shared'
8665 else
8666 LDSHARED='$(CC) -G'
8667 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008668 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008669 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008670 if test "$GCC" = "yes" ; then
8671 LDSHARED='$(CC) -shared'
8672 LDCXXSHARED='$(CXX) -shared'
8673 else
8674 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008675 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008676 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008677 LDSHARED='$(CC) -bundle'
8678 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008679 if test "$enable_framework" ; then
8680 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008681 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8682 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008683 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008684 else
8685 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008686 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008687 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008688 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008689 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008690 LDSHARED='$(CC) -bundle'
8691 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008692 if test "$enable_framework" ; then
8693 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008694 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8695 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008696 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008697 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008698 # No framework, use the Python app as bundle-loader
8699 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008700 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008701 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008702 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008703 Darwin/*)
8704 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8705 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008706
Ned Deily36820b62014-06-25 13:44:22 -07008707 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8708 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8709 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8710 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8711 if test ${dep_target_major} -eq 10 && \
8712 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008713 then
Ned Deily36820b62014-06-25 13:44:22 -07008714 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008715 LDSHARED='$(CC) -bundle'
8716 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008717 if test "$enable_framework" ; then
8718 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008719 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8720 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008721 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008722 else
8723 # No framework, use the Python app as bundle-loader
8724 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8725 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008726 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008727 fi
Ned Deily36820b62014-06-25 13:44:22 -07008728 else
8729 # building for OS X 10.3 and later
8730 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8731 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8732 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008733 fi
8734 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008735 Linux*|GNU*|QNX*)
8736 LDSHARED='$(CC) -shared'
8737 LDCXXSHARED='$(CXX) -shared';;
8738 BSD/OS*/4*)
8739 LDSHARED="gcc -shared"
8740 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008741 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008742 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008743 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008744 LDSHARED='$(CC) -shared'
8745 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008746 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008747 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008748 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008749 OpenBSD*)
8750 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8751 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008752 LDSHARED='$(CC) -shared $(CCSHARED)'
8753 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008754 else
8755 case `uname -r` in
8756 [01].* | 2.[0-7] | 2.[0-7].*)
8757 LDSHARED="ld -Bshareable ${LDFLAGS}"
8758 ;;
8759 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008760 LDSHARED='$(CC) -shared $(CCSHARED)'
8761 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008762 ;;
8763 esac
8764 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008765 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008766 LDSHARED='$(CC) -shared'
8767 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008768 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008769 if test "$GCC" = "yes" ; then
8770 LDSHARED='$(CC) -shared'
8771 LDCXXSHARED='$(CXX) -shared'
8772 else
8773 LDSHARED='$(CC) -G'
8774 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008775 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008776 SCO_SV*)
8777 LDSHARED='$(CC) -Wl,-G,-Bexport'
8778 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8779 CYGWIN*)
8780 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8781 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008782 *) LDSHARED="ld";;
8783 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8786$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008787LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008788BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008789# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008790# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8792$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008793if test -z "$CCSHARED"
8794then
Guido van Rossum07397971997-04-29 21:49:50 +00008795 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008796 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008797 then CCSHARED="-fPIC";
8798 elif test `uname -p` = sparc;
8799 then CCSHARED="-xcode=pic32";
8800 else CCSHARED="-Kpic";
8801 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008802 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008803 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008804 else CCSHARED="+z";
8805 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008806 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008807 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008808 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008809 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008810 if test "$GCC" = "yes"
8811 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008812 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008813 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008814 SCO_SV*)
8815 if test "$GCC" = "yes"
8816 then CCSHARED="-fPIC"
8817 else CCSHARED="-Kpic -belf"
8818 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008819 IRIX*/6*) case $CC in
8820 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008821 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008822 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008823 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8826$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008827# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008828# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8830$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008831if test -z "$LINKFORSHARED"
8832then
Guido van Rossum07397971997-04-29 21:49:50 +00008833 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008834 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008835 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008836 LINKFORSHARED="-Wl,-E -Wl,+s";;
8837# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008838 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008839 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008840 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008841 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008842 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008843
8844 # Issue #18075: the default maximum stack size (8MBytes) is too
8845 # small for the default recursion limit. Increase the stack size
8846 # to ensure that tests don't crash
8847 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8848
Jack Jansene578a632001-08-15 01:27:14 +00008849 if test "$enable_framework"
8850 then
Jack Jansenda49e192005-01-07 13:08:22 +00008851 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008852 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008853 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008854 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008855 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008856 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008857 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008858 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8859 then
8860 LINKFORSHARED="-Wl,--export-dynamic"
8861 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008862 SunOS/5*) case $CC in
8863 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008864 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008865 then
8866 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008867 fi;;
8868 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008869 CYGWIN*)
8870 if test $enable_shared = "no"
8871 then
8872 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8873 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008874 QNX*)
8875 # -Wl,-E causes the symbols to be added to the dynamic
8876 # symbol table so that they can be found when a module
8877 # is loaded. -N 2048K causes the stack size to be set
8878 # to 2048 kilobytes so that the stack doesn't overflow
8879 # when running test_compile.py.
8880 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008881 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8884$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008885
Michael W. Hudson54241132001-12-07 15:38:26 +00008886
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008887
Matthias Kloseb9621712010-04-24 17:59:49 +00008888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8889$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008890if test ! "$LIBRARY" = "$LDLIBRARY"
8891then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008892 case $ac_sys_system in
8893 CYGWIN*)
8894 # Cygwin needs CCSHARED when building extension DLLs
8895 # but not when building the interpreter DLL.
8896 CFLAGSFORSHARED='';;
8897 *)
8898 CFLAGSFORSHARED='$(CCSHARED)'
8899 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8902$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008903
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008904# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8905# library (with --enable-shared).
8906# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008907# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8908# if it is not required, since it creates a dependency of the shared library
8909# to LIBS. This, in turn, means that applications linking the shared libpython
8910# don't need to link LIBS explicitly. The default should be only changed
8911# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008912
Matthias Kloseb9621712010-04-24 17:59:49 +00008913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8914$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008915case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008916 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008917 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008918esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8920$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008921
8922
Guido van Rossum627b2d71993-12-24 10:39:16 +00008923# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8925$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008926if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008927 $as_echo_n "(cached) " >&6
8928else
8929 ac_check_lib_save_LIBS=$LIBS
8930LIBS="-lsendfile $LIBS"
8931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8932/* end confdefs.h. */
8933
8934/* Override any GCC internal prototype to avoid an error.
8935 Use char because int might match the return type of a GCC
8936 builtin and then its argument prototype would still apply. */
8937#ifdef __cplusplus
8938extern "C"
8939#endif
8940char sendfile ();
8941int
8942main ()
8943{
8944return sendfile ();
8945 ;
8946 return 0;
8947}
8948_ACEOF
8949if ac_fn_c_try_link "$LINENO"; then :
8950 ac_cv_lib_sendfile_sendfile=yes
8951else
8952 ac_cv_lib_sendfile_sendfile=no
8953fi
8954rm -f core conftest.err conftest.$ac_objext \
8955 conftest$ac_exeext conftest.$ac_ext
8956LIBS=$ac_check_lib_save_LIBS
8957fi
8958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8959$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008960if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008961 cat >>confdefs.h <<_ACEOF
8962#define HAVE_LIBSENDFILE 1
8963_ACEOF
8964
8965 LIBS="-lsendfile $LIBS"
8966
8967fi
8968
Matthias Kloseb9621712010-04-24 17:59:49 +00008969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8970$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008971if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008972 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008973else
Martin v. Löwis11437992002-04-12 09:54:03 +00008974 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008975LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008977/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008978
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008979/* Override any GCC internal prototype to avoid an error.
8980 Use char because int might match the return type of a GCC
8981 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008982#ifdef __cplusplus
8983extern "C"
8984#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008985char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008986int
8987main ()
8988{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008989return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008990 ;
8991 return 0;
8992}
8993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008994if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008995 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008996else
Matthias Kloseb9621712010-04-24 17:59:49 +00008997 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008999rm -f core conftest.err conftest.$ac_objext \
9000 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009001LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9004$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009005if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009006 cat >>confdefs.h <<_ACEOF
9007#define HAVE_LIBDL 1
9008_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009009
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009010 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009011
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009012fi
9013 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9015$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009016if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009017 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009018else
Martin v. Löwis11437992002-04-12 09:54:03 +00009019 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009020LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009022/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009023
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009024/* Override any GCC internal prototype to avoid an error.
9025 Use char because int might match the return type of a GCC
9026 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009027#ifdef __cplusplus
9028extern "C"
9029#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009030char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009031int
9032main ()
9033{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009034return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009035 ;
9036 return 0;
9037}
9038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009039if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009040 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009041else
Matthias Kloseb9621712010-04-24 17:59:49 +00009042 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009044rm -f core conftest.err conftest.$ac_objext \
9045 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009046LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9049$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009050if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009051 cat >>confdefs.h <<_ACEOF
9052#define HAVE_LIBDLD 1
9053_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009054
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009055 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009056
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009057fi
9058 # Dynamic linking for HP-UX
Victor Stinnerbeeb5122014-11-28 13:28:25 +01009059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
9060$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
9061if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
9062 $as_echo_n "(cached) " >&6
9063else
9064 ac_check_lib_save_LIBS=$LIBS
9065LIBS="-lcrypto $LIBS"
9066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9067/* end confdefs.h. */
9068
9069/* Override any GCC internal prototype to avoid an error.
9070 Use char because int might match the return type of a GCC
9071 builtin and then its argument prototype would still apply. */
9072#ifdef __cplusplus
9073extern "C"
9074#endif
9075char RAND_egd ();
9076int
9077main ()
9078{
9079return RAND_egd ();
9080 ;
9081 return 0;
9082}
9083_ACEOF
9084if ac_fn_c_try_link "$LINENO"; then :
9085 ac_cv_lib_crypto_RAND_egd=yes
9086else
9087 ac_cv_lib_crypto_RAND_egd=no
9088fi
9089rm -f core conftest.err conftest.$ac_objext \
9090 conftest$ac_exeext conftest.$ac_ext
9091LIBS=$ac_check_lib_save_LIBS
9092fi
9093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
9094$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
9095if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
9096
9097$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
9098
9099fi
9100
Martin v. Löwis519adae2003-09-20 10:47:47 +00009101
Georg Brandlb1441c72009-01-03 22:33:39 +00009102# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009103if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9105$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009106if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009107 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009108else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009109 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009112
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009113/* Override any GCC internal prototype to avoid an error.
9114 Use char because int might match the return type of a GCC
9115 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009116#ifdef __cplusplus
9117extern "C"
9118#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009119char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009120int
9121main ()
9122{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009123return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009124 ;
9125 return 0;
9126}
9127_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009128for ac_lib in '' pthread rt posix4; do
9129 if test -z "$ac_lib"; then
9130 ac_res="none required"
9131 else
9132 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009133 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009134 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009135 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009136 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009138rm -f core conftest.err conftest.$ac_objext \
9139 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009140 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009141 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009143done
Victor Stinnere0be4232011-10-25 13:06:09 +02009144if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009145
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009146else
9147 ac_cv_search_sem_init=no
9148fi
9149rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009150LIBS=$ac_func_search_save_LIBS
9151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9153$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009154ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009155if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009156 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009157
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009158fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009159 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009160 # posix4 on Solaris 2.6
9161 # pthread (first!) on Linux
9162fi
9163
Martin v. Löwis19d17342003-06-14 21:03:05 +00009164# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9166$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009167if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009168 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009169else
9170 ac_check_lib_save_LIBS=$LIBS
9171LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009173/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009174
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009175/* Override any GCC internal prototype to avoid an error.
9176 Use char because int might match the return type of a GCC
9177 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009178#ifdef __cplusplus
9179extern "C"
9180#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009181char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009182int
9183main ()
9184{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009185return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009186 ;
9187 return 0;
9188}
9189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009190if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009191 ac_cv_lib_intl_textdomain=yes
9192else
Matthias Kloseb9621712010-04-24 17:59:49 +00009193 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009194fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009195rm -f core conftest.err conftest.$ac_objext \
9196 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009197LIBS=$ac_check_lib_save_LIBS
9198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9200$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009201if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009202
Matthias Kloseb9621712010-04-24 17:59:49 +00009203$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009204
Brett Cannonc6d936e2009-06-07 20:09:53 +00009205 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009206fi
9207
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009208
9209# checks for system dependent C++ extensions support
9210case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009211 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9212$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009214/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009215
Georg Brandl59e87bd2011-02-15 19:48:59 +00009216 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009217int
9218main ()
9219{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009220loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009221 ;
9222 return 0;
9223}
Matthias Kloseb159a552010-04-25 21:00:44 +00009224
Martin v. Löwis11437992002-04-12 09:54:03 +00009225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009226if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009227
Matthias Kloseb159a552010-04-25 21:00:44 +00009228
Matthias Kloseb9621712010-04-24 17:59:49 +00009229$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009230
Matthias Kloseb159a552010-04-25 21:00:44 +00009231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009232$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009233
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009234else
Matthias Kloseb159a552010-04-25 21:00:44 +00009235
9236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009237$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009238
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009239fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009240rm -f core conftest.err conftest.$ac_objext \
9241 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009242 *) ;;
9243esac
9244
Christian Heimes985ecdc2013-11-20 11:46:18 +01009245# check for systems that require aligned memory access
9246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9247$as_echo_n "checking aligned memory access is required... " >&6; }
9248if test "$cross_compiling" = yes; then :
9249 aligned_required=yes
9250else
9251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9252/* end confdefs.h. */
9253
9254int main()
9255{
9256 char s[16];
9257 int i, *p1, *p2;
9258 for (i=0; i < 16; i++)
9259 s[i] = i;
9260 p1 = (int*)(s+1);
9261 p2 = (int*)(s+2);
9262 if (*p1 == *p2)
9263 return 1;
9264 return 0;
9265}
9266
9267_ACEOF
9268if ac_fn_c_try_run "$LINENO"; then :
9269 aligned_required=no
9270else
9271 aligned_required=yes
9272fi
9273rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9274 conftest.$ac_objext conftest.beam conftest.$ac_ext
9275fi
9276
9277
9278if test "$aligned_required" = yes ; then
9279
9280$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9281
9282fi
9283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9284$as_echo "$aligned_required" >&6; }
9285
9286
9287# str, bytes and memoryview hash algorithm
9288
9289
9290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9291$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9292
9293# Check whether --with-hash_algorithm was given.
9294if test "${with_hash_algorithm+set}" = set; then :
9295 withval=$with_hash_algorithm;
9296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9297$as_echo "$withval" >&6; }
9298case "$withval" in
9299 siphash24)
9300 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9301
9302 ;;
9303 fnv)
9304 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9305
9306 ;;
9307 *)
9308 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9309 ;;
9310esac
9311
9312else
9313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9314$as_echo "default" >&6; }
9315fi
9316
9317
Charles-François Natalid30b0222014-05-08 23:08:51 +01009318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9319$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9320
9321# Check whether --with-address_sanitizer was given.
9322if test "${with_address_sanitizer+set}" = set; then :
9323 withval=$with_address_sanitizer;
9324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9325$as_echo "$withval" >&6; }
9326BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9327LDFLAGS="-fsanitize=address $LDFLAGS"
9328
9329else
9330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9331$as_echo "no" >&6; }
9332fi
9333
9334
Guido van Rossum70c7f481998-03-26 18:44:10 +00009335# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9337$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009338if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009339 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009340else
Martin v. Löwis11437992002-04-12 09:54:03 +00009341 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009342LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009345
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009346/* Override any GCC internal prototype to avoid an error.
9347 Use char because int might match the return type of a GCC
9348 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009349#ifdef __cplusplus
9350extern "C"
9351#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009352char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009353int
9354main ()
9355{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009356return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009357 ;
9358 return 0;
9359}
9360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009361if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009362 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009363else
Matthias Kloseb9621712010-04-24 17:59:49 +00009364 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009365fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009366rm -f core conftest.err conftest.$ac_objext \
9367 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009368LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009369fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9371$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009372if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009373 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009374fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009375 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9377$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009378if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009379 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009380else
Martin v. Löwis11437992002-04-12 09:54:03 +00009381 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009382LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009385
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009386/* Override any GCC internal prototype to avoid an error.
9387 Use char because int might match the return type of a GCC
9388 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009389#ifdef __cplusplus
9390extern "C"
9391#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009392char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009393int
9394main ()
9395{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009396return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009397 ;
9398 return 0;
9399}
9400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009401if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009402 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009403else
Matthias Kloseb9621712010-04-24 17:59:49 +00009404 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009405fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009406rm -f core conftest.err conftest.$ac_objext \
9407 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009408LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009409fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9411$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009412if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009413 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009414fi
9415 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009416
Matthias Kloseb9621712010-04-24 17:59:49 +00009417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9418$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009419
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009420# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009421if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009422 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9424$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009425LIBS="$withval $LIBS"
9426
9427else
Matthias Kloseb9621712010-04-24 17:59:49 +00009428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9429$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009430fi
9431
Guido van Rossum7f43da71994-08-01 12:15:30 +00009432
Benjamin Peterson0f3cde12014-12-15 00:00:23 -05009433
9434
9435
9436
9437
9438
9439
9440if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9441 if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009442 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9443set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9445$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009446if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009447 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009448else
9449 case $PKG_CONFIG in
9450 [\\/]* | ?:[\\/]*)
9451 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9452 ;;
9453 *)
9454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9455for as_dir in $PATH
9456do
9457 IFS=$as_save_IFS
9458 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009459 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009460 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009461 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009462 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009463 break 2
9464 fi
9465done
Matthias Kloseb9621712010-04-24 17:59:49 +00009466 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009467IFS=$as_save_IFS
9468
9469 ;;
9470esac
9471fi
9472PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9473if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9475$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009476else
Matthias Kloseb9621712010-04-24 17:59:49 +00009477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9478$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009479fi
9480
9481
9482fi
9483if test -z "$ac_cv_path_PKG_CONFIG"; then
9484 ac_pt_PKG_CONFIG=$PKG_CONFIG
9485 # Extract the first word of "pkg-config", so it can be a program name with args.
9486set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9488$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009489if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009490 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009491else
9492 case $ac_pt_PKG_CONFIG in
9493 [\\/]* | ?:[\\/]*)
9494 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9495 ;;
9496 *)
9497 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9498for as_dir in $PATH
9499do
9500 IFS=$as_save_IFS
9501 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009502 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009503 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009504 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009505 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009506 break 2
9507 fi
9508done
Matthias Kloseb9621712010-04-24 17:59:49 +00009509 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009510IFS=$as_save_IFS
9511
9512 ;;
9513esac
9514fi
9515ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9516if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9518$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009519else
Matthias Kloseb9621712010-04-24 17:59:49 +00009520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9521$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009522fi
9523
9524 if test "x$ac_pt_PKG_CONFIG" = x; then
9525 PKG_CONFIG=""
9526 else
9527 case $cross_compiling:$ac_tool_warned in
9528yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009529{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9530$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009531ac_tool_warned=yes ;;
9532esac
9533 PKG_CONFIG=$ac_pt_PKG_CONFIG
9534 fi
9535else
9536 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9537fi
9538
Benjamin Peterson0f3cde12014-12-15 00:00:23 -05009539fi
9540if test -n "$PKG_CONFIG"; then
9541 _pkg_min_version=0.9.0
9542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9543$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9544 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9546$as_echo "yes" >&6; }
9547 else
9548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9549$as_echo "no" >&6; }
9550 PKG_CONFIG=""
9551 fi
9552fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009553
9554# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9556$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009557
9558# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009559if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009560 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009561else
9562 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009563fi
9564
9565
Matthias Kloseb9621712010-04-24 17:59:49 +00009566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9567$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009568
9569# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9571$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009572
9573# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009574if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009575 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009576else
9577 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009578fi
9579
9580
9581if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009582 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9583else
9584 LIBFFI_INCLUDEDIR=""
9585fi
9586
9587
Matthias Kloseb9621712010-04-24 17:59:49 +00009588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9589$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009590
Stefan Krah60187b52012-03-23 19:06:27 +01009591# Check for use of the system libmpdec library
9592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9593$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9594
9595# Check whether --with-system_libmpdec was given.
9596if test "${with_system_libmpdec+set}" = set; then :
9597 withval=$with_system_libmpdec;
9598else
9599 with_system_libmpdec="no"
9600fi
9601
9602
9603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9604$as_echo "$with_system_libmpdec" >&6; }
9605
Benjamin Peterson076ed002010-10-31 17:11:02 +00009606# Check for support for loadable sqlite extensions
9607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9608$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9609# Check whether --enable-loadable-sqlite-extensions was given.
9610if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9611 enableval=$enable_loadable_sqlite_extensions;
9612else
9613 enable_loadable_sqlite_extensions="no"
9614fi
9615
9616
9617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9618$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9619
Ned Deilyd819b932013-09-06 01:07:05 -07009620# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9621
9622
9623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9624$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9625
9626# Check whether --with-tcltk-includes was given.
9627if test "${with_tcltk_includes+set}" = set; then :
9628 withval=$with_tcltk_includes;
9629else
9630 with_tcltk_includes="default"
9631fi
9632
9633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9634$as_echo "$with_tcltk_includes" >&6; }
9635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9636$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9637
9638# Check whether --with-tcltk-libs was given.
9639if test "${with_tcltk_libs+set}" = set; then :
9640 withval=$with_tcltk_libs;
9641else
9642 with_tcltk_libs="default"
9643fi
9644
9645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9646$as_echo "$with_tcltk_libs" >&6; }
9647if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9648then
9649 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9650 then
9651 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9652 fi
9653 TCLTK_INCLUDES=""
9654 TCLTK_LIBS=""
9655else
9656 TCLTK_INCLUDES="$with_tcltk_includes"
9657 TCLTK_LIBS="$with_tcltk_libs"
9658fi
9659
Matthias Klose55708cc2009-04-30 08:06:49 +00009660# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9662$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009663
9664# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009665if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009666 withval=$with_dbmliborder;
9667if test x$with_dbmliborder = xyes
9668then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009669as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009670else
9671 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9672 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9673 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009674 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009675 fi
9676 done
9677fi
9678fi
9679
Matthias Kloseb9621712010-04-24 17:59:49 +00009680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9681$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009682
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009683# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009684
9685
Matthias Kloseb9621712010-04-24 17:59:49 +00009686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9687$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009689# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009690if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009691 withval=$with_signal_module;
9692fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009693
9694
9695if test -z "$with_signal_module"
9696then with_signal_module="yes"
9697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9699$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009700
9701if test "${with_signal_module}" = "yes"; then
9702 USE_SIGNAL_MODULE=""
9703 SIGNAL_OBJS=""
9704else
9705 USE_SIGNAL_MODULE="#"
9706 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9707fi
9708
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009709# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009710
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009711USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009712
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009713
Martin v. Löwis11437992002-04-12 09:54:03 +00009714
9715# Templates for things AC_DEFINEd more than once.
9716# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009717
9718
Martin v. Löwis11437992002-04-12 09:54:03 +00009719
Matthias Kloseb9621712010-04-24 17:59:49 +00009720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9721$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009722
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009723# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009724if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009725 withval=$with_threads;
9726fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009727
9728
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009729# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009731# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009732if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009733 withval=$with_thread; with_threads=$with_thread
9734fi
9735
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009736
9737if test -z "$with_threads"
9738then with_threads="yes"
9739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9741$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009742
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009743
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009744if test "$with_threads" = "no"
9745then
9746 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009747elif test "$ac_cv_pthread_is_default" = yes
9748then
Matthias Kloseb9621712010-04-24 17:59:49 +00009749 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009750
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009751 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009752 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009753
9754 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009755 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009756elif test "$ac_cv_kpthread" = "yes"
9757then
9758 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009759 if test "$ac_cv_cxx_thread" = "yes"; then
9760 CXX="$CXX -Kpthread"
9761 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009762 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009763
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009764 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009765 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009766elif test "$ac_cv_kthread" = "yes"
9767then
9768 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009769 if test "$ac_cv_cxx_thread" = "yes"; then
9770 CXX="$CXX -Kthread"
9771 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009772 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009773
9774 posix_threads=yes
9775 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009776elif test "$ac_cv_pthread" = "yes"
9777then
9778 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009779 if test "$ac_cv_cxx_thread" = "yes"; then
9780 CXX="$CXX -pthread"
9781 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009782 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009783
9784 posix_threads=yes
9785 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009786else
9787 if test ! -z "$with_threads" -a -d "$with_threads"
9788 then LDFLAGS="$LDFLAGS -L$with_threads"
9789 fi
9790 if test ! -z "$withval" -a -d "$withval"
9791 then LDFLAGS="$LDFLAGS -L$withval"
9792 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009793
9794 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009795 # define _POSIX_THREADS in unistd.h. Some apparently don't
9796 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9798$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009800/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009801
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009802#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009803#ifdef _POSIX_THREADS
9804yes
9805#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009806
9807_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009808if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009809 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009810 unistd_defines_pthreads=yes
9811else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009812 unistd_defines_pthreads=no
9813fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009814rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009815
Matthias Kloseb9621712010-04-24 17:59:49 +00009816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9817$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009818
Matthias Kloseb9621712010-04-24 17:59:49 +00009819 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009820
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009821 # Just looking for pthread_create in libpthread is not enough:
9822 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9823 # So we really have to include pthread.h, and then link.
9824 _libs=$LIBS
9825 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9827$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009829/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009830
9831#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009832#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009833
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009834void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009835int
9836main ()
9837{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009838
9839pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 ;
9841 return 0;
9842}
9843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009844if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009845
Matthias Kloseb9621712010-04-24 17:59:49 +00009846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9847$as_echo "yes" >&6; }
9848 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009849
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009850 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009851 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009852else
Martin v. Löwis11437992002-04-12 09:54:03 +00009853
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009854 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009855 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009856if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009857 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009858
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009859 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009860 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009861else
Guido van Rossumad678af1998-10-02 14:42:15 +00009862
Matthias Kloseb9621712010-04-24 17:59:49 +00009863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9864$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009865if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009866 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009867else
Martin v. Löwis11437992002-04-12 09:54:03 +00009868 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009869LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009871/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009872
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009873/* Override any GCC internal prototype to avoid an error.
9874 Use char because int might match the return type of a GCC
9875 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009876#ifdef __cplusplus
9877extern "C"
9878#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009879char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009880int
9881main ()
9882{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009883return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009884 ;
9885 return 0;
9886}
9887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009888if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009889 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009890else
Matthias Kloseb9621712010-04-24 17:59:49 +00009891 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009893rm -f core conftest.err conftest.$ac_objext \
9894 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009895LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9898$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009899if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009900 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009901
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009902 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009903 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009904 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009905else
Greg Steinadf63d62000-07-05 10:38:09 +00009906
Matthias Kloseb9621712010-04-24 17:59:49 +00009907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9908$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009909if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009910 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009911else
Martin v. Löwis11437992002-04-12 09:54:03 +00009912 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009913LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009917/* Override any GCC internal prototype to avoid an error.
9918 Use char because int might match the return type of a GCC
9919 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009920#ifdef __cplusplus
9921extern "C"
9922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009923char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009924int
9925main ()
9926{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009927return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009928 ;
9929 return 0;
9930}
9931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009932if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009933 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009934else
Matthias Kloseb9621712010-04-24 17:59:49 +00009935 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009937rm -f core conftest.err conftest.$ac_objext \
9938 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009939LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9942$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009943if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009944 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009945
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009946 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009947 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009948 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009949else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009950
Matthias Kloseb9621712010-04-24 17:59:49 +00009951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9952$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009953if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009954 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009955else
Martin v. Löwis11437992002-04-12 09:54:03 +00009956 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009957LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009959/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009960
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009961/* Override any GCC internal prototype to avoid an error.
9962 Use char because int might match the return type of a GCC
9963 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009964#ifdef __cplusplus
9965extern "C"
9966#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009967char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009968int
9969main ()
9970{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009971return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009972 ;
9973 return 0;
9974}
9975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009976if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009977 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009978else
Matthias Kloseb9621712010-04-24 17:59:49 +00009979 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009981rm -f core conftest.err conftest.$ac_objext \
9982 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009983LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9986$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009987if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009988 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009989
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009990 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009991 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009992 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009993else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009994
Matthias Kloseb9621712010-04-24 17:59:49 +00009995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9996$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009997if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009998 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009999else
Martin v. Löwis11437992002-04-12 09:54:03 +000010000 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010001LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010003/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010005/* Override any GCC internal prototype to avoid an error.
10006 Use char because int might match the return type of a GCC
10007 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010008#ifdef __cplusplus
10009extern "C"
10010#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010011char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010012int
10013main ()
10014{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010015return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010016 ;
10017 return 0;
10018}
10019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010020if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010021 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010022else
Matthias Kloseb9621712010-04-24 17:59:49 +000010023 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010025rm -f core conftest.err conftest.$ac_objext \
10026 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010027LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10030$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010031if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010032 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010033
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010034 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010035 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010036 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010037else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010038
Martin v. Löwis130fb172001-07-19 11:00:41 +000010039 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010040fi
10041
Guido van Rossum627b2d71993-12-24 10:39:16 +000010042
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010043fi
10044
Guido van Rossum0be3e491997-05-22 20:33:33 +000010045fi
10046
Guido van Rossum49545951997-12-02 19:28:29 +000010047fi
10048
Guido van Rossumb93a8621998-05-07 13:27:32 +000010049fi
10050
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010051fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010052rm -f core conftest.err conftest.$ac_objext \
10053 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010054
Matthias Kloseb9621712010-04-24 17:59:49 +000010055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10056$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010057if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010058 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010059else
Martin v. Löwis11437992002-04-12 09:54:03 +000010060 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010061LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010063/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010065/* Override any GCC internal prototype to avoid an error.
10066 Use char because int might match the return type of a GCC
10067 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010068#ifdef __cplusplus
10069extern "C"
10070#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010071char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010072int
10073main ()
10074{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010075return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010076 ;
10077 return 0;
10078}
10079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010080if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010081 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010082else
Matthias Kloseb9621712010-04-24 17:59:49 +000010083 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010084fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010085rm -f core conftest.err conftest.$ac_objext \
10086 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010087LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10090$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010091if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010092 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010093
Martin v. Löwis130fb172001-07-19 11:00:41 +000010094 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010095 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010096 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010097fi
10098
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010099
Neal Norwitza978ab02002-11-02 16:58:05 +000010100 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10102$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010103if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010104 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010105else
Martin v. Löwis11437992002-04-12 09:54:03 +000010106 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010107LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010109/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010111/* Override any GCC internal prototype to avoid an error.
10112 Use char because int might match the return type of a GCC
10113 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010114#ifdef __cplusplus
10115extern "C"
10116#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010117char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010118int
10119main ()
10120{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010121return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010122 ;
10123 return 0;
10124}
10125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010126if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010127 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010128else
Matthias Kloseb9621712010-04-24 17:59:49 +000010129 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010131rm -f core conftest.err conftest.$ac_objext \
10132 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010133LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010134fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10136$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010137if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010138 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010139
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010140 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010141 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010142 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010143fi
10144
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010145 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010146fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010147
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010148if test "$posix_threads" = "yes"; then
10149 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010150
Matthias Kloseb9621712010-04-24 17:59:49 +000010151$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010152
10153 fi
10154
10155 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10156 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010157 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010158$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010159
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010160 ;;
10161 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010162$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010163
10164 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010165 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010166$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010167
10168 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010169 esac
10170
Matthias Kloseb9621712010-04-24 17:59:49 +000010171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10172$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010173 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010174 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010175else
Matthias Kloseb9621712010-04-24 17:59:49 +000010176 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010177 ac_cv_pthread_system_supported=no
10178else
Matthias Kloseb9621712010-04-24 17:59:49 +000010179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010180/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010181
10182 #include <stdio.h>
10183 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010184 void *foo(void *parm) {
10185 return NULL;
10186 }
10187 main() {
10188 pthread_attr_t attr;
10189 pthread_t id;
10190 if (pthread_attr_init(&attr)) exit(-1);
10191 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10192 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10193 exit(0);
10194 }
10195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010196if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010197 ac_cv_pthread_system_supported=yes
10198else
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10202 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010203fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010205
Guido van Rossum627b2d71993-12-24 10:39:16 +000010206fi
10207
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10209$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010210 if test "$ac_cv_pthread_system_supported" = "yes"; then
10211
Matthias Kloseb9621712010-04-24 17:59:49 +000010212$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010213
10214 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010215 for ac_func in pthread_sigmask
10216do :
10217 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010218if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010219 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010220#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010221_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010222 case $ac_sys_system in
10223 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010224
Matthias Kloseb9621712010-04-24 17:59:49 +000010225$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010226
10227 ;;
10228 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010229fi
10230done
10231
Christian Heimesf77b4b22013-08-21 13:26:05 +020010232 for ac_func in pthread_atfork
10233do :
10234 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10235if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10236 cat >>confdefs.h <<_ACEOF
10237#define HAVE_PTHREAD_ATFORK 1
10238_ACEOF
10239
10240fi
10241done
10242
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010243fi
10244
10245
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010246# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010247
Matthias Kloseb9621712010-04-24 17:59:49 +000010248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10249$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010250# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010251if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010252 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010253 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10255$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010256 ipv6=no
10257 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010258 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10259$as_echo "yes" >&6; }
10260 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010261
10262 ipv6=yes
10263 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010264 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010265else
Martin v. Löwis11437992002-04-12 09:54:03 +000010266
Matthias Kloseb9621712010-04-24 17:59:49 +000010267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010268/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010269 /* AF_INET6 available check */
10270#include <sys/types.h>
10271#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010272int
10273main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010274{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010275int domain = AF_INET6;
10276 ;
10277 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010278}
Martin v. Löwis11437992002-04-12 09:54:03 +000010279_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010280if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010281
Matthias Kloseb9621712010-04-24 17:59:49 +000010282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10283$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010284 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010285
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010286else
Matthias Kloseb159a552010-04-25 21:00:44 +000010287
Matthias Kloseb9621712010-04-24 17:59:49 +000010288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10289$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010290 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010291
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010292fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010294
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010295if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10297$as_echo_n "checking if RFC2553 API is available... " >&6; }
10298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010299/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010300
10301 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010302#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010303int
10304main ()
10305{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010306struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010307 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010308 ;
10309 return 0;
10310}
Matthias Kloseb159a552010-04-25 21:00:44 +000010311
Martin v. Löwis11437992002-04-12 09:54:03 +000010312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010313if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010314
10315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010316$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010317 ipv6=yes
10318
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010319else
Matthias Kloseb159a552010-04-25 21:00:44 +000010320
10321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010322$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010323 ipv6=no
10324
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010327fi
10328
10329if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010330 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010331
10332fi
10333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010334fi
10335
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010336
10337ipv6type=unknown
10338ipv6lib=none
10339ipv6trylibc=no
10340
10341if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10343$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010344 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10345 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010346 case $i in
10347 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010349/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010350
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010351#include <netinet/in.h>
10352#ifdef IPV6_INRIA_VERSION
10353yes
10354#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010355_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010356if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010357 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010358 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010359fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010360rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010361
10362 ;;
10363 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010365/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010366
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010367#include <netinet/in.h>
10368#ifdef __KAME__
10369yes
10370#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010371_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010372if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010373 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010374 ipv6type=$i;
10375 ipv6lib=inet6
10376 ipv6libdir=/usr/local/v6/lib
10377 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010378fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010379rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010380
10381 ;;
10382 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010384/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010385
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010386#include <features.h>
10387#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10388yes
10389#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010390_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010391if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010392 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010393 ipv6type=$i;
10394 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010395fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010396rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010397
10398 ;;
10399 linux-inet6)
10400 if test -d /usr/inet6; then
10401 ipv6type=$i
10402 ipv6lib=inet6
10403 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010404 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010405 fi
10406 ;;
10407 solaris)
10408 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010409 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010410 ipv6type=$i
10411 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010412 fi
10413 fi
10414 ;;
10415 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010417/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010418
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010419#include <sys/param.h>
10420#ifdef _TOSHIBA_INET6
10421yes
10422#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010423_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010424if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010425 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010426 ipv6type=$i;
10427 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010428 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010429fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010430rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010431
10432 ;;
10433 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010435/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010436
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010437#include </usr/local/v6/include/sys/v6config.h>
10438#ifdef __V6D__
10439yes
10440#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010441_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010442if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010443 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010444 ipv6type=$i;
10445 ipv6lib=v6;
10446 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010447 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010448fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010449rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010450
10451 ;;
10452 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010454/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010455
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010456#include <sys/param.h>
10457#ifdef _ZETA_MINAMI_INET6
10458yes
10459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010460_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010461if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010462 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010463 ipv6type=$i;
10464 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010465 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010466fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010467rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010468
10469 ;;
10470 esac
10471 if test "$ipv6type" != "unknown"; then
10472 break
10473 fi
10474 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10476$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010477fi
10478
10479if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10480 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10481 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10482 echo "using lib$ipv6lib"
10483 else
10484 if test $ipv6trylibc = "yes"; then
10485 echo "using libc"
10486 else
10487 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10488 echo "You need to fetch lib$ipv6lib.a from appropriate"
10489 echo 'ipv6 kit and compile beforehand.'
10490 exit 1
10491 fi
10492 fi
10493fi
10494
Matthias Kloseb9621712010-04-24 17:59:49 +000010495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10496$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010498/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010499
10500 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010501int
10502main ()
10503{
10504FSIORefNum fRef = 0
10505 ;
10506 return 0;
10507}
Matthias Kloseb159a552010-04-25 21:00:44 +000010508
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010510if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010511
Matthias Kloseb159a552010-04-25 21:00:44 +000010512
Matthias Kloseb9621712010-04-24 17:59:49 +000010513$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010514
Matthias Kloseb9621712010-04-24 17:59:49 +000010515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10516$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010517
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010518else
Matthias Kloseb159a552010-04-25 21:00:44 +000010519
Matthias Kloseb9621712010-04-24 17:59:49 +000010520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10521$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010522
10523fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10525
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010526# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10528$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010529
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010530# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010531if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010532 withval=$with_doc_strings;
10533fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010534
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010535
10536if test -z "$with_doc_strings"
10537then with_doc_strings="yes"
10538fi
10539if test "$with_doc_strings" != "no"
10540then
10541
Matthias Kloseb9621712010-04-24 17:59:49 +000010542$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010543
10544fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10546$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010547
Antoine Pitrou042b1282010-08-13 21:15:58 +000010548# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10550$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010552# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010553if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010554 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010555if test "$withval" != no
10556then
10557
Matthias Kloseb9621712010-04-24 17:59:49 +000010558$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010559
Matthias Kloseb9621712010-04-24 17:59:49 +000010560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10561$as_echo "yes" >&6; }
10562else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10563$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010564fi
10565else
Matthias Kloseb9621712010-04-24 17:59:49 +000010566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10567$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010568fi
10569
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010570
10571# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10573$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010574
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010575# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010576if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010577 withval=$with_pymalloc;
10578fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010579
Neil Schemenauera35c6882001-02-27 04:45:05 +000010580
Neil Schemenauer16c22972002-03-22 15:34:49 +000010581if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010582then
10583 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010584fi
10585if test "$with_pymalloc" != "no"
10586then
Martin v. Löwis11437992002-04-12 09:54:03 +000010587
Matthias Kloseb9621712010-04-24 17:59:49 +000010588$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010589
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010590 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010591fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10593$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010594
Benjamin Peterson05159c42009-12-03 03:01:27 +000010595# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10597$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010598
10599# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010600if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010601 withval=$with_valgrind;
10602else
10603 with_valgrind=no
10604fi
10605
Matthias Kloseb9621712010-04-24 17:59:49 +000010606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10607$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010608if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010609 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 +020010610if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010611
Matthias Kloseb9621712010-04-24 17:59:49 +000010612$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010613
10614else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010615 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010616
10617fi
10618
10619
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010620 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010621fi
10622
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010623# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010624
Guido van Rossum98935bf2001-09-05 19:13:16 +000010625DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010626
Guido van Rossume97ee181999-12-20 21:27:22 +000010627# the dlopen() function means we might want to use dynload_shlib.o. some
10628# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010629for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010630do :
10631 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010632if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010633 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010634#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010635_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010636
Guido van Rossume97ee181999-12-20 21:27:22 +000010637fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010638done
Guido van Rossume97ee181999-12-20 21:27:22 +000010639
Michael W. Hudson54241132001-12-07 15:38:26 +000010640
Guido van Rossume97ee181999-12-20 21:27:22 +000010641# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10642# loading of modules.
10643
Matthias Kloseb9621712010-04-24 17:59:49 +000010644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10645$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010646if test -z "$DYNLOADFILE"
10647then
10648 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010649 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10650 if test "$ac_cv_func_dlopen" = yes
10651 then DYNLOADFILE="dynload_shlib.o"
10652 else DYNLOADFILE="dynload_aix.o"
10653 fi
10654 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010655 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010656 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10657 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010658 *)
10659 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10660 # out any dynamic loading
10661 if test "$ac_cv_func_dlopen" = yes
10662 then DYNLOADFILE="dynload_shlib.o"
10663 else DYNLOADFILE="dynload_stub.o"
10664 fi
10665 ;;
10666 esac
10667fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10669$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010670if test "$DYNLOADFILE" != "dynload_stub.o"
10671then
Martin v. Löwis11437992002-04-12 09:54:03 +000010672
Matthias Kloseb9621712010-04-24 17:59:49 +000010673$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010674
10675fi
10676
Neil Schemenauer4e425612001-06-19 15:44:15 +000010677# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10678
Michael W. Hudson54241132001-12-07 15:38:26 +000010679
Matthias Kloseb9621712010-04-24 17:59:49 +000010680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10681$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010682if test -z "$MACHDEP_OBJS"
10683then
Jack Jansene578a632001-08-15 01:27:14 +000010684 MACHDEP_OBJS=$extra_machdep_objs
10685else
10686 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010687fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010688if test -z "$MACHDEP_OBJS"; then
10689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10690$as_echo "none" >&6; }
10691else
10692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10693$as_echo "$MACHDEP_OBJS" >&6; }
10694fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010695
Guido van Rossum627b2d71993-12-24 10:39:16 +000010696# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010697for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010698 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010699 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010010700 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010701 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010702 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010703 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010704 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10705 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010706 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010707 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010708 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010709 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010710 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010711 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010712 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10713 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010714 sigaction sigaltstack siginterrupt sigpending sigrelse \
10715 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010716 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010717 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010718 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010719do :
10720 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10721ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010722if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010723 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010724#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010725_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010726
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010727fi
10728done
10729
Michael W. Hudson54241132001-12-07 15:38:26 +000010730
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010731ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10732 #include <dirent.h>
10733"
10734if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10735
10736$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10737
10738fi
10739
10740
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010741# For some functions, having a definition is not sufficient, since
10742# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10744$as_echo_n "checking for chroot... " >&6; }
10745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010746/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010747#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010748int
10749main ()
10750{
10751void *x=chroot
10752 ;
10753 return 0;
10754}
10755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010756if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010757
Matthias Kloseb9621712010-04-24 17:59:49 +000010758$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010759
Matthias Kloseb159a552010-04-25 21:00:44 +000010760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010761$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010762else
Matthias Kloseb9621712010-04-24 17:59:49 +000010763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10764$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010765
10766fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10769$as_echo_n "checking for link... " >&6; }
10770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010771/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010772#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010773int
10774main ()
10775{
10776void *x=link
10777 ;
10778 return 0;
10779}
10780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010781if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010782
Matthias Kloseb9621712010-04-24 17:59:49 +000010783$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010784
Matthias Kloseb159a552010-04-25 21:00:44 +000010785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010786$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010787else
Matthias Kloseb9621712010-04-24 17:59:49 +000010788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10789$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010790
10791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10794$as_echo_n "checking for symlink... " >&6; }
10795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010796/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010797#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010798int
10799main ()
10800{
10801void *x=symlink
10802 ;
10803 return 0;
10804}
10805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010806if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010807
Matthias Kloseb9621712010-04-24 17:59:49 +000010808$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010809
Matthias Kloseb159a552010-04-25 21:00:44 +000010810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010811$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010812else
Matthias Kloseb9621712010-04-24 17:59:49 +000010813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10814$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010815
10816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10819$as_echo_n "checking for fchdir... " >&6; }
10820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010821/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010822#include <unistd.h>
10823int
10824main ()
10825{
10826void *x=fchdir
10827 ;
10828 return 0;
10829}
10830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010831if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010832
Matthias Kloseb9621712010-04-24 17:59:49 +000010833$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010834
Matthias Kloseb159a552010-04-25 21:00:44 +000010835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010836$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010837else
Matthias Kloseb9621712010-04-24 17:59:49 +000010838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10839$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010840
10841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10844$as_echo_n "checking for fsync... " >&6; }
10845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010846/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010847#include <unistd.h>
10848int
10849main ()
10850{
10851void *x=fsync
10852 ;
10853 return 0;
10854}
10855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010856if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010857
Matthias Kloseb9621712010-04-24 17:59:49 +000010858$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010859
Matthias Kloseb159a552010-04-25 21:00:44 +000010860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010861$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010862else
Matthias Kloseb9621712010-04-24 17:59:49 +000010863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10864$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010865
10866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10869$as_echo_n "checking for fdatasync... " >&6; }
10870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010871/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010872#include <unistd.h>
10873int
10874main ()
10875{
10876void *x=fdatasync
10877 ;
10878 return 0;
10879}
10880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010881if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010882
Matthias Kloseb9621712010-04-24 17:59:49 +000010883$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010884
Matthias Kloseb159a552010-04-25 21:00:44 +000010885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010886$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010887else
Matthias Kloseb9621712010-04-24 17:59:49 +000010888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10889$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010890
10891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10894$as_echo_n "checking for epoll... " >&6; }
10895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010896/* end confdefs.h. */
10897#include <sys/epoll.h>
10898int
10899main ()
10900{
10901void *x=epoll_create
10902 ;
10903 return 0;
10904}
10905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010906if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010907
Matthias Kloseb9621712010-04-24 17:59:49 +000010908$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010909
Matthias Kloseb159a552010-04-25 21:00:44 +000010910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010911$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010912else
Matthias Kloseb9621712010-04-24 17:59:49 +000010913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10914$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010915
10916fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10919$as_echo_n "checking for epoll_create1... " >&6; }
10920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10921/* end confdefs.h. */
10922#include <sys/epoll.h>
10923int
10924main ()
10925{
10926void *x=epoll_create1
10927 ;
10928 return 0;
10929}
10930_ACEOF
10931if ac_fn_c_try_compile "$LINENO"; then :
10932
10933$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10934
10935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10936$as_echo "yes" >&6; }
10937else
10938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10939$as_echo "no" >&6; }
10940
10941fi
10942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10944$as_echo_n "checking for kqueue... " >&6; }
10945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010946/* end confdefs.h. */
10947
10948#include <sys/types.h>
10949#include <sys/event.h>
10950
10951int
10952main ()
10953{
10954int x=kqueue()
10955 ;
10956 return 0;
10957}
10958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010959if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010960
Matthias Kloseb9621712010-04-24 17:59:49 +000010961$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010962
Matthias Kloseb159a552010-04-25 21:00:44 +000010963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010964$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010965else
Matthias Kloseb9621712010-04-24 17:59:49 +000010966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10967$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010968
10969fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10972$as_echo_n "checking for prlimit... " >&6; }
10973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10974/* end confdefs.h. */
10975
10976#include <sys/time.h>
10977#include <sys/resource.h>
10978
10979int
10980main ()
10981{
10982void *x=prlimit
10983 ;
10984 return 0;
10985}
10986_ACEOF
10987if ac_fn_c_try_compile "$LINENO"; then :
10988
10989$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10990
10991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10992$as_echo "yes" >&6; }
10993else
10994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10995$as_echo "no" >&6; }
10996
10997fi
10998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10999
Martin v. Löwisd5843682002-11-21 20:41:28 +000011000# On some systems (eg. FreeBSD 5), we would find a definition of the
11001# functions ctermid_r, setgroups in the library, but no prototype
11002# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11003# address to avoid compiler warnings and potential miscompilations
11004# because of the missing prototypes.
11005
Matthias Kloseb9621712010-04-24 17:59:49 +000011006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11007$as_echo_n "checking for ctermid_r... " >&6; }
11008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011009/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011010
Martin v. Löwisd5843682002-11-21 20:41:28 +000011011#include <stdio.h>
11012
Martin v. Löwisd5843682002-11-21 20:41:28 +000011013int
11014main ()
11015{
11016void* p = ctermid_r
11017 ;
11018 return 0;
11019}
11020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011021if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011022
Matthias Kloseb9621712010-04-24 17:59:49 +000011023$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011024
Matthias Kloseb159a552010-04-25 21:00:44 +000011025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011026$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011027else
Matthias Kloseb9621712010-04-24 17:59:49 +000011028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11029$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011030
11031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11033
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11035$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011036if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011037 $as_echo_n "(cached) " >&6
11038else
11039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011040/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011041#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011042int
11043main ()
11044{
11045void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011046
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011047 ;
11048 return 0;
11049}
11050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011051if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011052 ac_cv_flock_decl=yes
11053else
11054 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011055
11056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011058
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011059fi
11060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11061$as_echo "$ac_cv_flock_decl" >&6; }
11062if test "x${ac_cv_flock_decl}" = xyes; then
11063 for ac_func in flock
11064do :
11065 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011066if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011067 cat >>confdefs.h <<_ACEOF
11068#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011069_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011070
Antoine Pitroua3000072010-09-07 14:52:42 +000011071else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011073$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011074if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011075 $as_echo_n "(cached) " >&6
11076else
11077 ac_check_lib_save_LIBS=$LIBS
11078LIBS="-lbsd $LIBS"
11079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11080/* end confdefs.h. */
11081
11082/* Override any GCC internal prototype to avoid an error.
11083 Use char because int might match the return type of a GCC
11084 builtin and then its argument prototype would still apply. */
11085#ifdef __cplusplus
11086extern "C"
11087#endif
11088char flock ();
11089int
11090main ()
11091{
11092return flock ();
11093 ;
11094 return 0;
11095}
11096_ACEOF
11097if ac_fn_c_try_link "$LINENO"; then :
11098 ac_cv_lib_bsd_flock=yes
11099else
11100 ac_cv_lib_bsd_flock=no
11101fi
11102rm -f core conftest.err conftest.$ac_objext \
11103 conftest$ac_exeext conftest.$ac_ext
11104LIBS=$ac_check_lib_save_LIBS
11105fi
11106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11107$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011108if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011109 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011110
11111
11112$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11113
11114
11115fi
11116
11117
11118fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011119done
11120
Antoine Pitroua3000072010-09-07 14:52:42 +000011121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011122
Matthias Kloseb9621712010-04-24 17:59:49 +000011123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11124$as_echo_n "checking for getpagesize... " >&6; }
11125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011126/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011127
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011128#include <unistd.h>
11129
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011130int
11131main ()
11132{
11133void* p = getpagesize
11134 ;
11135 return 0;
11136}
11137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011138if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011139
Matthias Kloseb9621712010-04-24 17:59:49 +000011140$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011141
Matthias Kloseb159a552010-04-25 21:00:44 +000011142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011143$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011144else
Matthias Kloseb9621712010-04-24 17:59:49 +000011145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11146$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011147
11148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011150
Victor Stinner984890f2011-11-24 13:53:38 +010011151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11152$as_echo_n "checking for broken unsetenv... " >&6; }
11153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11154/* end confdefs.h. */
11155
11156#include <stdlib.h>
11157
11158int
11159main ()
11160{
11161int res = unsetenv("DUMMY")
11162 ;
11163 return 0;
11164}
11165_ACEOF
11166if ac_fn_c_try_compile "$LINENO"; then :
11167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11168$as_echo "no" >&6; }
11169else
11170
11171$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11172
11173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11174$as_echo "yes" >&6; }
11175
11176fi
11177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11178
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011179for ac_prog in true
11180do
11181 # Extract the first word of "$ac_prog", so it can be a program name with args.
11182set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11184$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011185if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011186 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011187else
11188 if test -n "$TRUE"; then
11189 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11190else
11191as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11192for as_dir in $PATH
11193do
11194 IFS=$as_save_IFS
11195 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011196 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011197 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011198 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011199 $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 +000011200 break 2
11201 fi
11202done
Matthias Kloseb9621712010-04-24 17:59:49 +000011203 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011204IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011205
11206fi
11207fi
11208TRUE=$ac_cv_prog_TRUE
11209if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11211$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011212else
Matthias Kloseb9621712010-04-24 17:59:49 +000011213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11214$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011215fi
11216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011217
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011218 test -n "$TRUE" && break
11219done
11220test -n "$TRUE" || TRUE="/bin/true"
11221
11222
Matthias Kloseb9621712010-04-24 17:59:49 +000011223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11224$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011225if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011226 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011227else
11228 ac_check_lib_save_LIBS=$LIBS
11229LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011231/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011233/* Override any GCC internal prototype to avoid an error.
11234 Use char because int might match the return type of a GCC
11235 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011236#ifdef __cplusplus
11237extern "C"
11238#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011239char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011240int
11241main ()
11242{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011243return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011244 ;
11245 return 0;
11246}
11247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011248if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011249 ac_cv_lib_c_inet_aton=yes
11250else
Matthias Kloseb9621712010-04-24 17:59:49 +000011251 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011252fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011253rm -f core conftest.err conftest.$ac_objext \
11254 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011255LIBS=$ac_check_lib_save_LIBS
11256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11258$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011259if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011260 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011261else
Matthias Kloseb9621712010-04-24 17:59:49 +000011262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11263$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011264if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011265 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011266else
11267 ac_check_lib_save_LIBS=$LIBS
11268LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011270/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011271
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011272/* Override any GCC internal prototype to avoid an error.
11273 Use char because int might match the return type of a GCC
11274 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011275#ifdef __cplusplus
11276extern "C"
11277#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011278char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011279int
11280main ()
11281{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011282return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011283 ;
11284 return 0;
11285}
11286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011287if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011288 ac_cv_lib_resolv_inet_aton=yes
11289else
Matthias Kloseb9621712010-04-24 17:59:49 +000011290 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011292rm -f core conftest.err conftest.$ac_objext \
11293 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011294LIBS=$ac_check_lib_save_LIBS
11295fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11297$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011298if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011299 cat >>confdefs.h <<_ACEOF
11300#define HAVE_LIBRESOLV 1
11301_ACEOF
11302
11303 LIBS="-lresolv $LIBS"
11304
11305fi
11306
11307
11308fi
11309
11310
Christian Heimesd0764e22007-12-04 15:00:33 +000011311# On Tru64, chflags seems to be present, but calling it will
11312# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11314$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011315if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011316 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011317else
Matthias Kloseb9621712010-04-24 17:59:49 +000011318 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011319 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011320else
Matthias Kloseb9621712010-04-24 17:59:49 +000011321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011322/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011323
Christian Heimesd0764e22007-12-04 15:00:33 +000011324#include <sys/stat.h>
11325#include <unistd.h>
11326int main(int argc, char*argv[])
11327{
11328 if(chflags(argv[0], 0) != 0)
11329 return 1;
11330 return 0;
11331}
Ned Deily3eb67d52011-06-28 00:00:28 -070011332
Christian Heimesd0764e22007-12-04 15:00:33 +000011333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011334if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011335 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011336else
Matthias Kloseb9621712010-04-24 17:59:49 +000011337 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11340 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011341fi
11342
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011343
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011344fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11346$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011347if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011348 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011349if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011350 ac_cv_have_chflags="yes"
11351else
11352 ac_cv_have_chflags="no"
11353fi
11354
11355fi
11356if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011357
Matthias Kloseb9621712010-04-24 17:59:49 +000011358$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011359
11360fi
11361
Matthias Kloseb9621712010-04-24 17:59:49 +000011362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11363$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011364if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011365 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011366else
Matthias Kloseb9621712010-04-24 17:59:49 +000011367 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011368 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011369else
Matthias Kloseb9621712010-04-24 17:59:49 +000011370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011371/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011372
Christian Heimesd0764e22007-12-04 15:00:33 +000011373#include <sys/stat.h>
11374#include <unistd.h>
11375int main(int argc, char*argv[])
11376{
11377 if(lchflags(argv[0], 0) != 0)
11378 return 1;
11379 return 0;
11380}
Ned Deily3eb67d52011-06-28 00:00:28 -070011381
Christian Heimesd0764e22007-12-04 15:00:33 +000011382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011383if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011384 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011385else
Matthias Kloseb9621712010-04-24 17:59:49 +000011386 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011387fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011388rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11389 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011390fi
11391
11392
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011393fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11395$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011396if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011397 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011398if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011399 ac_cv_have_lchflags="yes"
11400else
11401 ac_cv_have_lchflags="no"
11402fi
11403
11404fi
11405if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011406
Matthias Kloseb9621712010-04-24 17:59:49 +000011407$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011408
11409fi
11410
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011411case $ac_sys_system/$ac_sys_release in
11412Darwin/*)
11413 _CUR_CFLAGS="${CFLAGS}"
11414 _CUR_LDFLAGS="${LDFLAGS}"
11415 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11416 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11417 ;;
11418esac
11419
Matthias Kloseb9621712010-04-24 17:59:49 +000011420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11421$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011422if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011423 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011424else
11425 ac_check_lib_save_LIBS=$LIBS
11426LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011428/* end confdefs.h. */
11429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011430/* Override any GCC internal prototype to avoid an error.
11431 Use char because int might match the return type of a GCC
11432 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011433#ifdef __cplusplus
11434extern "C"
11435#endif
11436char inflateCopy ();
11437int
11438main ()
11439{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011440return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011441 ;
11442 return 0;
11443}
11444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011445if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011446 ac_cv_lib_z_inflateCopy=yes
11447else
Matthias Kloseb9621712010-04-24 17:59:49 +000011448 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011449fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011450rm -f core conftest.err conftest.$ac_objext \
11451 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011452LIBS=$ac_check_lib_save_LIBS
11453fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11455$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011456if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011457
Matthias Kloseb9621712010-04-24 17:59:49 +000011458$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011459
11460fi
11461
11462
11463case $ac_sys_system/$ac_sys_release in
11464Darwin/*)
11465 CFLAGS="${_CUR_CFLAGS}"
11466 LDFLAGS="${_CUR_LDFLAGS}"
11467 ;;
11468esac
11469
Matthias Kloseb9621712010-04-24 17:59:49 +000011470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11471$as_echo_n "checking for hstrerror... " >&6; }
11472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011473/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011474
Martin v. Löwise9416172003-05-03 10:12:45 +000011475#include <netdb.h>
11476
Martin v. Löwise9416172003-05-03 10:12:45 +000011477int
11478main ()
11479{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011480void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011481 ;
11482 return 0;
11483}
11484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011485if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011486
Matthias Kloseb9621712010-04-24 17:59:49 +000011487$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011488
Matthias Kloseb159a552010-04-25 21:00:44 +000011489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011490$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011491else
Matthias Kloseb9621712010-04-24 17:59:49 +000011492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11493$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011494
11495fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011496rm -f core conftest.err conftest.$ac_objext \
11497 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011498
Matthias Kloseb9621712010-04-24 17:59:49 +000011499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11500$as_echo_n "checking for inet_aton... " >&6; }
11501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011502/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011503
Martin v. Löwis86d66262006-02-17 08:40:11 +000011504#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011505#include <sys/socket.h>
11506#include <netinet/in.h>
11507#include <arpa/inet.h>
11508
Martin v. Löwise9416172003-05-03 10:12:45 +000011509int
11510main ()
11511{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011512void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011513 ;
11514 return 0;
11515}
11516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011517if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011518
Matthias Kloseb9621712010-04-24 17:59:49 +000011519$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011520
Matthias Kloseb159a552010-04-25 21:00:44 +000011521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011522$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011523else
Matthias Kloseb9621712010-04-24 17:59:49 +000011524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11525$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011526
11527fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011528rm -f core conftest.err conftest.$ac_objext \
11529 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011530
Matthias Kloseb9621712010-04-24 17:59:49 +000011531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11532$as_echo_n "checking for inet_pton... " >&6; }
11533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011534/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011535
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011536#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011537#include <sys/socket.h>
11538#include <netinet/in.h>
11539#include <arpa/inet.h>
11540
Martin v. Löwise9416172003-05-03 10:12:45 +000011541int
11542main ()
11543{
11544void* p = inet_pton
11545 ;
11546 return 0;
11547}
11548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011549if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011550
Matthias Kloseb9621712010-04-24 17:59:49 +000011551$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011552
Matthias Kloseb159a552010-04-25 21:00:44 +000011553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011554$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011555else
Matthias Kloseb9621712010-04-24 17:59:49 +000011556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11557$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011558
11559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011561
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011562# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11564$as_echo_n "checking for setgroups... " >&6; }
11565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011566/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011567
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011568#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011569#ifdef HAVE_GRP_H
11570#include <grp.h>
11571#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011572
Martin v. Löwisd5843682002-11-21 20:41:28 +000011573int
11574main ()
11575{
11576void* p = setgroups
11577 ;
11578 return 0;
11579}
11580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011581if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011582
Matthias Kloseb9621712010-04-24 17:59:49 +000011583$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011584
Matthias Kloseb159a552010-04-25 21:00:44 +000011585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011586$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011587else
Matthias Kloseb9621712010-04-24 17:59:49 +000011588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11589$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011590
11591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011593
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011594# check for openpty and forkpty
11595
11596for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011597do :
11598 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011599if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011600 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011601#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011602_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011603
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011604else
Matthias Kloseb9621712010-04-24 17:59:49 +000011605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11606$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011607if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011608 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011609else
Martin v. Löwis11437992002-04-12 09:54:03 +000011610 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011611LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011615/* Override any GCC internal prototype to avoid an error.
11616 Use char because int might match the return type of a GCC
11617 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011618#ifdef __cplusplus
11619extern "C"
11620#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011621char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011622int
11623main ()
11624{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011625return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011626 ;
11627 return 0;
11628}
11629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011630if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011631 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011632else
Matthias Kloseb9621712010-04-24 17:59:49 +000011633 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011634fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011635rm -f core conftest.err conftest.$ac_objext \
11636 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011637LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011638fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11640$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011641if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011642 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011643 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011644else
Matthias Kloseb9621712010-04-24 17:59:49 +000011645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11646$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011647if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011648 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011649else
11650 ac_check_lib_save_LIBS=$LIBS
11651LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011653/* end confdefs.h. */
11654
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011655/* Override any GCC internal prototype to avoid an error.
11656 Use char because int might match the return type of a GCC
11657 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011658#ifdef __cplusplus
11659extern "C"
11660#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011661char openpty ();
11662int
11663main ()
11664{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011665return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011666 ;
11667 return 0;
11668}
11669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011670if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011671 ac_cv_lib_bsd_openpty=yes
11672else
Matthias Kloseb9621712010-04-24 17:59:49 +000011673 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011674fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011675rm -f core conftest.err conftest.$ac_objext \
11676 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011677LIBS=$ac_check_lib_save_LIBS
11678fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11680$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011681if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011682 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011683 LIBS="$LIBS -lbsd"
11684fi
11685
11686
11687fi
11688
Fred Drake8cef4cf2000-06-28 16:40:38 +000011689
11690fi
11691done
11692
11693for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011694do :
11695 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011696if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011697 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011698#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011699_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011700
Fred Drake8cef4cf2000-06-28 16:40:38 +000011701else
Matthias Kloseb9621712010-04-24 17:59:49 +000011702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11703$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011704if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011705 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011706else
Martin v. Löwis11437992002-04-12 09:54:03 +000011707 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011708LIBS="-lutil $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öwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +000011715#ifdef __cplusplus
11716extern "C"
11717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011718char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011719int
11720main ()
11721{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011722return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +000011728 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011729else
Matthias Kloseb9621712010-04-24 17:59:49 +000011730 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +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öwis11437992002-04-12 09:54:03 +000011734LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011735fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11737$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011738if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011739 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011740 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011741else
Matthias Kloseb9621712010-04-24 17:59:49 +000011742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11743$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011744if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011745 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011746else
11747 ac_check_lib_save_LIBS=$LIBS
11748LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011750/* end confdefs.h. */
11751
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011752/* Override any GCC internal prototype to avoid an error.
11753 Use char because int might match the return type of a GCC
11754 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011755#ifdef __cplusplus
11756extern "C"
11757#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011758char forkpty ();
11759int
11760main ()
11761{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011762return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011763 ;
11764 return 0;
11765}
11766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011767if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011768 ac_cv_lib_bsd_forkpty=yes
11769else
Matthias Kloseb9621712010-04-24 17:59:49 +000011770 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011772rm -f core conftest.err conftest.$ac_objext \
11773 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011774LIBS=$ac_check_lib_save_LIBS
11775fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11777$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011778if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011779 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011780 LIBS="$LIBS -lbsd"
11781fi
11782
11783
11784fi
11785
Fred Drake8cef4cf2000-06-28 16:40:38 +000011786
11787fi
11788done
11789
Jack Jansendd19cf82001-12-06 22:36:17 +000011790
Christian Heimesb186d002008-03-18 15:15:01 +000011791# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011792for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011793do :
11794 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011795if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011796 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011797#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011798_ACEOF
11799
11800fi
11801done
11802
11803
Michael W. Hudson54241132001-12-07 15:38:26 +000011804# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011805for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011806do :
11807 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11808ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011809if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011810 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011811#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011812_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011813
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011814fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011815done
11816
Michael W. Hudson54241132001-12-07 15:38:26 +000011817
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011818ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011819if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011820 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011821
Martin v. Löwis1142de32002-03-29 16:28:31 +000011822else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011823 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011824 *" dup2.$ac_objext "* ) ;;
11825 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011826 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011827esac
11828
Martin v. Löwis1142de32002-03-29 16:28:31 +000011829fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011830
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011831ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011832if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011833 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11834
11835else
11836 case " $LIBOBJS " in
11837 *" strdup.$ac_objext "* ) ;;
11838 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11839 ;;
11840esac
11841
11842fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011843
11844
11845for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011846do :
11847 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011848if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011849 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011850#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011853/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011854#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011855int
11856main ()
11857{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011858getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011859 ;
11860 return 0;
11861}
11862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011863if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011864
Matthias Kloseb9621712010-04-24 17:59:49 +000011865$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011866
Guido van Rossum627b2d71993-12-24 10:39:16 +000011867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011869
Guido van Rossum627b2d71993-12-24 10:39:16 +000011870fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011871done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011872
Jack Jansen150753c2003-03-29 22:07:47 +000011873for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011874do :
11875 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011876if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011877 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011878#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011881/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011882#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011883int
11884main ()
11885{
11886setpgrp(0,0);
11887 ;
11888 return 0;
11889}
11890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011891if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011892
Matthias Kloseb9621712010-04-24 17:59:49 +000011893$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011894
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011897
11898fi
11899done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011900
Thomas Wouters3a584202000-08-05 23:28:51 +000011901for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011902do :
11903 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011904if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011905 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011906#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011909/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011910#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011911int
11912main ()
11913{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011914gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011915 ;
11916 return 0;
11917}
11918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011919if ac_fn_c_try_compile "$LINENO"; then :
11920
Guido van Rossum627b2d71993-12-24 10:39:16 +000011921else
Skip Montanaro6dead952003-09-25 14:50:04 +000011922
Matthias Kloseb9621712010-04-24 17:59:49 +000011923$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011924
Martin v. Löwis11437992002-04-12 09:54:03 +000011925
Guido van Rossum627b2d71993-12-24 10:39:16 +000011926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011928
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011929fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011930done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011931
Michael W. Hudson54241132001-12-07 15:38:26 +000011932
Victor Stinnere0be4232011-10-25 13:06:09 +020011933for ac_func in clock_gettime
11934do :
11935 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11936if test "x$ac_cv_func_clock_gettime" = xyes; then :
11937 cat >>confdefs.h <<_ACEOF
11938#define HAVE_CLOCK_GETTIME 1
11939_ACEOF
11940
11941else
11942
11943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11944$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11945if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11946 $as_echo_n "(cached) " >&6
11947else
11948 ac_check_lib_save_LIBS=$LIBS
11949LIBS="-lrt $LIBS"
11950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11951/* end confdefs.h. */
11952
11953/* Override any GCC internal prototype to avoid an error.
11954 Use char because int might match the return type of a GCC
11955 builtin and then its argument prototype would still apply. */
11956#ifdef __cplusplus
11957extern "C"
11958#endif
11959char clock_gettime ();
11960int
11961main ()
11962{
11963return clock_gettime ();
11964 ;
11965 return 0;
11966}
11967_ACEOF
11968if ac_fn_c_try_link "$LINENO"; then :
11969 ac_cv_lib_rt_clock_gettime=yes
11970else
11971 ac_cv_lib_rt_clock_gettime=no
11972fi
11973rm -f core conftest.err conftest.$ac_objext \
11974 conftest$ac_exeext conftest.$ac_ext
11975LIBS=$ac_check_lib_save_LIBS
11976fi
11977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11978$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11979if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11980
Victor Stinner7efb8332014-08-29 15:41:08 +020011981 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020011982 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11983
11984
11985$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11986
11987
11988fi
11989
11990
11991fi
11992done
11993
11994
11995for ac_func in clock_getres
11996do :
11997 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11998if test "x$ac_cv_func_clock_getres" = xyes; then :
11999 cat >>confdefs.h <<_ACEOF
12000#define HAVE_CLOCK_GETRES 1
12001_ACEOF
12002
12003else
12004
12005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12006$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12007if ${ac_cv_lib_rt_clock_getres+:} false; then :
12008 $as_echo_n "(cached) " >&6
12009else
12010 ac_check_lib_save_LIBS=$LIBS
12011LIBS="-lrt $LIBS"
12012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12013/* end confdefs.h. */
12014
12015/* Override any GCC internal prototype to avoid an error.
12016 Use char because int might match the return type of a GCC
12017 builtin and then its argument prototype would still apply. */
12018#ifdef __cplusplus
12019extern "C"
12020#endif
12021char clock_getres ();
12022int
12023main ()
12024{
12025return clock_getres ();
12026 ;
12027 return 0;
12028}
12029_ACEOF
12030if ac_fn_c_try_link "$LINENO"; then :
12031 ac_cv_lib_rt_clock_getres=yes
12032else
12033 ac_cv_lib_rt_clock_getres=no
12034fi
12035rm -f core conftest.err conftest.$ac_objext \
12036 conftest$ac_exeext conftest.$ac_ext
12037LIBS=$ac_check_lib_save_LIBS
12038fi
12039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12040$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12041if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12042
12043 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12044
12045
12046fi
12047
12048
12049fi
12050done
12051
12052
Matthias Kloseb9621712010-04-24 17:59:49 +000012053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12054$as_echo_n "checking for major... " >&6; }
12055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012056/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012057
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012058#if defined(MAJOR_IN_MKDEV)
12059#include <sys/mkdev.h>
12060#elif defined(MAJOR_IN_SYSMACROS)
12061#include <sys/sysmacros.h>
12062#else
12063#include <sys/types.h>
12064#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012065
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012066int
12067main ()
12068{
12069
12070 makedev(major(0),minor(0));
12071
12072 ;
12073 return 0;
12074}
12075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012076if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012077
12078
Matthias Kloseb9621712010-04-24 17:59:49 +000012079$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012080
Matthias Kloseb9621712010-04-24 17:59:49 +000012081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12082$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012083
12084else
Skip Montanaro6dead952003-09-25 14:50:04 +000012085
Matthias Kloseb9621712010-04-24 17:59:49 +000012086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12087$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012088
12089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012090rm -f core conftest.err conftest.$ac_objext \
12091 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012092
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012093# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012094# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12096$as_echo_n "checking for getaddrinfo... " >&6; }
12097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012098/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012099
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012100#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012101#include <sys/socket.h>
12102#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012103#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012104
Martin v. Löwis11437992002-04-12 09:54:03 +000012105int
12106main ()
12107{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012108getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012109 ;
12110 return 0;
12111}
12112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012113if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012114 have_getaddrinfo=yes
12115else
Matthias Kloseb9621712010-04-24 17:59:49 +000012116 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012117fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012118rm -f core conftest.err conftest.$ac_objext \
12119 conftest$ac_exeext conftest.$ac_ext
12120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12121$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012122if test $have_getaddrinfo = yes
12123then
Matthias Kloseb9621712010-04-24 17:59:49 +000012124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12125$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012126 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012127 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012128else
Matthias Kloseb9621712010-04-24 17:59:49 +000012129 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012130
12131if test "${enable_ipv6+set}" = set; then
12132 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12133else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012134 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012135fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012136else
Matthias Kloseb9621712010-04-24 17:59:49 +000012137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012138/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012139
Stefan Krah19c21392012-11-22 23:47:32 +010012140#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012141#include <sys/types.h>
12142#include <netdb.h>
12143#include <string.h>
12144#include <sys/socket.h>
12145#include <netinet/in.h>
12146
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012147int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012148{
12149 int passive, gaierr, inet4 = 0, inet6 = 0;
12150 struct addrinfo hints, *ai, *aitop;
12151 char straddr[INET6_ADDRSTRLEN], strport[16];
12152
12153 for (passive = 0; passive <= 1; passive++) {
12154 memset(&hints, 0, sizeof(hints));
12155 hints.ai_family = AF_UNSPEC;
12156 hints.ai_flags = passive ? AI_PASSIVE : 0;
12157 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012158 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012159 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12160 (void)gai_strerror(gaierr);
12161 goto bad;
12162 }
12163 for (ai = aitop; ai; ai = ai->ai_next) {
12164 if (ai->ai_addr == NULL ||
12165 ai->ai_addrlen == 0 ||
12166 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12167 straddr, sizeof(straddr), strport, sizeof(strport),
12168 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12169 goto bad;
12170 }
12171 switch (ai->ai_family) {
12172 case AF_INET:
12173 if (strcmp(strport, "54321") != 0) {
12174 goto bad;
12175 }
12176 if (passive) {
12177 if (strcmp(straddr, "0.0.0.0") != 0) {
12178 goto bad;
12179 }
12180 } else {
12181 if (strcmp(straddr, "127.0.0.1") != 0) {
12182 goto bad;
12183 }
12184 }
12185 inet4++;
12186 break;
12187 case AF_INET6:
12188 if (strcmp(strport, "54321") != 0) {
12189 goto bad;
12190 }
12191 if (passive) {
12192 if (strcmp(straddr, "::") != 0) {
12193 goto bad;
12194 }
12195 } else {
12196 if (strcmp(straddr, "::1") != 0) {
12197 goto bad;
12198 }
12199 }
12200 inet6++;
12201 break;
12202 case AF_UNSPEC:
12203 goto bad;
12204 break;
12205 default:
12206 /* another family support? */
12207 break;
12208 }
12209 }
12210 }
12211
12212 if (!(inet4 == 0 || inet4 == 2))
12213 goto bad;
12214 if (!(inet6 == 0 || inet6 == 2))
12215 goto bad;
12216
12217 if (aitop)
12218 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012219 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012220
12221 bad:
12222 if (aitop)
12223 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012224 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012225}
12226
Martin v. Löwis11437992002-04-12 09:54:03 +000012227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012228if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012229 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012230else
Matthias Kloseb9621712010-04-24 17:59:49 +000012231 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012233rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12234 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012236
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012237fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012238
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012240
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12242$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12243
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012244if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012245then
12246 if test $ipv6 = yes
12247 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012248 echo 'Fatal: You must get working getaddrinfo() function.'
12249 echo ' or you can specify "--disable-ipv6"'.
12250 exit 1
12251 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012252else
Martin v. Löwis11437992002-04-12 09:54:03 +000012253
Matthias Kloseb9621712010-04-24 17:59:49 +000012254$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012255
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012256fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012257
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012258for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012259do :
12260 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012261if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012262 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012263#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012264_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012265
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012266fi
12267done
12268
Michael W. Hudson54241132001-12-07 15:38:26 +000012269
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012270# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12272$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012273if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012274 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012275else
Matthias Kloseb9621712010-04-24 17:59:49 +000012276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012277/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012278#include <sys/types.h>
12279#include <sys/time.h>
12280#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012281
Martin v. Löwis11437992002-04-12 09:54:03 +000012282int
12283main ()
12284{
12285if ((struct tm *) 0)
12286return 0;
12287 ;
12288 return 0;
12289}
12290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012291if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012292 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012293else
Matthias Kloseb9621712010-04-24 17:59:49 +000012294 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12299$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012300if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012301
Matthias Kloseb9621712010-04-24 17:59:49 +000012302$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012303
12304fi
12305
Matthias Kloseb9621712010-04-24 17:59:49 +000012306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12307$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012308if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012309 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012310else
Matthias Kloseb9621712010-04-24 17:59:49 +000012311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012312/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012313#include <sys/types.h>
12314#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012315
Martin v. Löwis11437992002-04-12 09:54:03 +000012316int
12317main ()
12318{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012319struct tm tm;
12320 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012321 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012322 ;
12323 return 0;
12324}
12325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012326if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012327 ac_cv_struct_tm=time.h
12328else
Matthias Kloseb9621712010-04-24 17:59:49 +000012329 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012332fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12334$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012335if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012336
Matthias Kloseb9621712010-04-24 17:59:49 +000012337$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012338
12339fi
12340
Matthias Kloseb9621712010-04-24 17:59:49 +000012341ac_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 +000012342#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012343
Matthias Kloseb9621712010-04-24 17:59:49 +000012344"
Victor Stinnere0be4232011-10-25 13:06:09 +020012345if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012346
12347cat >>confdefs.h <<_ACEOF
12348#define HAVE_STRUCT_TM_TM_ZONE 1
12349_ACEOF
12350
12351
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012352fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012353
Martin v. Löwis11437992002-04-12 09:54:03 +000012354if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12355
Matthias Kloseb9621712010-04-24 17:59:49 +000012356$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012357
12358else
Matthias Kloseb9621712010-04-24 17:59:49 +000012359 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12360"
Victor Stinnere0be4232011-10-25 13:06:09 +020012361if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012362 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012363else
Matthias Kloseb9621712010-04-24 17:59:49 +000012364 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012365fi
12366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012367cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012368#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369_ACEOF
12370
Matthias Kloseb9621712010-04-24 17:59:49 +000012371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12372$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012373if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012374 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012375else
Matthias Kloseb9621712010-04-24 17:59:49 +000012376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012377/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012378#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012379#if !HAVE_DECL_TZNAME
12380extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012381#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012382
Martin v. Löwis11437992002-04-12 09:54:03 +000012383int
12384main ()
12385{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012386return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012387 ;
12388 return 0;
12389}
12390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012391if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012392 ac_cv_var_tzname=yes
12393else
Matthias Kloseb9621712010-04-24 17:59:49 +000012394 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012395fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012396rm -f core conftest.err conftest.$ac_objext \
12397 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012398fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12400$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012401 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012402
Matthias Kloseb9621712010-04-24 17:59:49 +000012403$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012404
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012405 fi
12406fi
12407
Matthias Kloseb9621712010-04-24 17:59:49 +000012408ac_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 +020012409if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012410
12411cat >>confdefs.h <<_ACEOF
12412#define HAVE_STRUCT_STAT_ST_RDEV 1
12413_ACEOF
12414
12415
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012416fi
12417
Matthias Kloseb9621712010-04-24 17:59:49 +000012418ac_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 +020012419if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012420
Martin v. Löwis11437992002-04-12 09:54:03 +000012421cat >>confdefs.h <<_ACEOF
12422#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12423_ACEOF
12424
12425
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012426fi
12427
Matthias Kloseb9621712010-04-24 17:59:49 +000012428ac_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 +020012429if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012430
12431cat >>confdefs.h <<_ACEOF
12432#define HAVE_STRUCT_STAT_ST_FLAGS 1
12433_ACEOF
12434
12435
12436fi
12437
Matthias Kloseb9621712010-04-24 17:59:49 +000012438ac_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 +020012439if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012440
12441cat >>confdefs.h <<_ACEOF
12442#define HAVE_STRUCT_STAT_ST_GEN 1
12443_ACEOF
12444
12445
12446fi
12447
Matthias Kloseb9621712010-04-24 17:59:49 +000012448ac_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 +020012449if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012450
12451cat >>confdefs.h <<_ACEOF
12452#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12453_ACEOF
12454
12455
12456fi
12457
Matthias Kloseb9621712010-04-24 17:59:49 +000012458ac_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 +020012459if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012460
Martin v. Löwis11437992002-04-12 09:54:03 +000012461cat >>confdefs.h <<_ACEOF
12462#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12463_ACEOF
12464
12465
Matthias Kloseb9621712010-04-24 17:59:49 +000012466$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012467
12468else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012469 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012470 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012471 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12472 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012473esac
12474
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012475fi
12476
Michael W. Hudson54241132001-12-07 15:38:26 +000012477
Martin v. Löwis11437992002-04-12 09:54:03 +000012478
Matthias Kloseb9621712010-04-24 17:59:49 +000012479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12480$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012481if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012482 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012483else
Matthias Kloseb159a552010-04-25 21:00:44 +000012484
Matthias Kloseb9621712010-04-24 17:59:49 +000012485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012486/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012487#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012488int
12489main ()
12490{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012491return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012492 ;
12493 return 0;
12494}
12495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012496if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012497 ac_cv_header_time_altzone=yes
12498else
Matthias Kloseb9621712010-04-24 17:59:49 +000012499 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012502
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012503fi
12504
Matthias Kloseb9621712010-04-24 17:59:49 +000012505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12506$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012507if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012508
Matthias Kloseb9621712010-04-24 17:59:49 +000012509$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012510
12511fi
12512
Guido van Rossumda88dad1995-01-26 00:46:29 +000012513was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12515$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012517/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012518
12519#include <sys/types.h>
12520#include <sys/select.h>
12521#include <sys/time.h>
12522
Martin v. Löwis11437992002-04-12 09:54:03 +000012523int
12524main ()
12525{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012526;
Martin v. Löwis11437992002-04-12 09:54:03 +000012527 ;
12528 return 0;
12529}
12530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012531if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012532
12533
Matthias Kloseb9621712010-04-24 17:59:49 +000012534$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012535
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012536 was_it_defined=yes
12537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12541$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012542
Matthias Kloseb9621712010-04-24 17:59:49 +000012543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12544$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012545if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012546 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012547else
Matthias Kloseb9621712010-04-24 17:59:49 +000012548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012549/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012550#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012551int
12552main ()
12553{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012554struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012555 ;
12556 return 0;
12557}
12558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012559if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012560 ac_cv_struct_addrinfo=yes
12561else
Matthias Kloseb9621712010-04-24 17:59:49 +000012562 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12565fi
12566
Matthias Kloseb9621712010-04-24 17:59:49 +000012567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12568$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012569if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012570
Matthias Kloseb9621712010-04-24 17:59:49 +000012571$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012572
12573fi
12574
Matthias Kloseb9621712010-04-24 17:59:49 +000012575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12576$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012577if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012578 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012579else
Matthias Kloseb9621712010-04-24 17:59:49 +000012580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012581/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012582
12583# include <sys/types.h>
12584# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012585int
12586main ()
12587{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012588struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012589 ;
12590 return 0;
12591}
12592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012593if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012594 ac_cv_struct_sockaddr_storage=yes
12595else
Matthias Kloseb9621712010-04-24 17:59:49 +000012596 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12599fi
12600
Matthias Kloseb9621712010-04-24 17:59:49 +000012601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12602$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012603if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012604
Matthias Kloseb9621712010-04-24 17:59:49 +000012605$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012606
12607fi
12608
Guido van Rossum627b2d71993-12-24 10:39:16 +000012609# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012610
Matthias Kloseb9621712010-04-24 17:59:49 +000012611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12612$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012613if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012614 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +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öwis11437992002-04-12 09:54:03 +000012618$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012619int
12620main ()
12621{
12622static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012623test_array [0] = 0;
12624return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012625
12626 ;
12627 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012628}
Martin v. Löwis11437992002-04-12 09:54:03 +000012629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012630if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012631 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012632else
Matthias Kloseb9621712010-04-24 17:59:49 +000012633 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012636fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12638$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012639if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012640 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012641
12642fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012643
Matthias Kloseb9621712010-04-24 17:59:49 +000012644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12645$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012646if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012647 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012648else
Matthias Kloseb9621712010-04-24 17:59:49 +000012649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012650/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012651
Martin v. Löwis11437992002-04-12 09:54:03 +000012652int
12653main ()
12654{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012655
Martin v. Löwis11437992002-04-12 09:54:03 +000012656#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012657 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012658 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012659 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012660 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012661 char const *const *pcpcc;
12662 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012663 /* NEC SVR4.0.2 mips cc rejects this. */
12664 struct point {int x, y;};
12665 static struct point const zero = {0,0};
12666 /* AIX XL C 1.02.0.0 rejects this.
12667 It does not let you subtract one const X* pointer from another in
12668 an arm of an if-expression whose if-part is not a constant
12669 expression */
12670 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012671 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012672 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012673 ++pcpcc;
12674 ppc = (char**) pcpcc;
12675 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012676 { /* SCO 3.2v4 cc rejects this sort of thing. */
12677 char tx;
12678 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012679 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012680
Martin v. Löwis11437992002-04-12 09:54:03 +000012681 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012682 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012683 }
12684 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12685 int x[] = {25, 17};
12686 const int *foo = &x[0];
12687 ++foo;
12688 }
12689 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12690 typedef const int *iptr;
12691 iptr p = 0;
12692 ++p;
12693 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012694 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012695 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012696 struct s { int j; const int *ap[3]; } bx;
12697 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012698 }
12699 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12700 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012701 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012702 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012703 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012704#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012705
Martin v. Löwis11437992002-04-12 09:54:03 +000012706 ;
12707 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012708}
Martin v. Löwis11437992002-04-12 09:54:03 +000012709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012710if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012711 ac_cv_c_const=yes
12712else
Matthias Kloseb9621712010-04-24 17:59:49 +000012713 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012716fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12718$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012719if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012720
Matthias Kloseb9621712010-04-24 17:59:49 +000012721$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012722
12723fi
12724
Michael W. Hudson54241132001-12-07 15:38:26 +000012725
Guido van Rossumda88dad1995-01-26 00:46:29 +000012726works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12728$as_echo_n "checking for working volatile... " >&6; }
12729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012730/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012731
Martin v. Löwis11437992002-04-12 09:54:03 +000012732int
12733main ()
12734{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012735volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012736 ;
12737 return 0;
12738}
12739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012740if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012741 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012742else
Skip Montanaro6dead952003-09-25 14:50:04 +000012743
Matthias Kloseb9621712010-04-24 17:59:49 +000012744$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012745
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012746
Guido van Rossum627b2d71993-12-24 10:39:16 +000012747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12750$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012751
Guido van Rossumda88dad1995-01-26 00:46:29 +000012752works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12754$as_echo_n "checking for working signed char... " >&6; }
12755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012756/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012757
Martin v. Löwis11437992002-04-12 09:54:03 +000012758int
12759main ()
12760{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012761signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012762 ;
12763 return 0;
12764}
12765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012766if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012767 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012768else
Skip Montanaro6dead952003-09-25 14:50:04 +000012769
Matthias Kloseb9621712010-04-24 17:59:49 +000012770$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012771
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012772
Guido van Rossum7f43da71994-08-01 12:15:30 +000012773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12776$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012777
Guido van Rossumda88dad1995-01-26 00:46:29 +000012778have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12780$as_echo_n "checking for prototypes... " >&6; }
12781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012782/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012783int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012784int
12785main ()
12786{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012787return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012788 ;
12789 return 0;
12790}
12791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012792if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012793
Matthias Kloseb9621712010-04-24 17:59:49 +000012794$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012795
Matthias Kloseb159a552010-04-25 21:00:44 +000012796 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12800$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012801
Guido van Rossumda88dad1995-01-26 00:46:29 +000012802works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12804$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012806/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012807
12808#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012809int foo(int x, ...) {
12810 va_list va;
12811 va_start(va, x);
12812 va_arg(va, int);
12813 va_arg(va, char *);
12814 va_arg(va, double);
12815 return 0;
12816}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012817
Martin v. Löwis11437992002-04-12 09:54:03 +000012818int
12819main ()
12820{
Guido van Rossum90eea071996-08-30 20:58:57 +000012821return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012822 ;
12823 return 0;
12824}
12825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012826if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012827
12828
Matthias Kloseb9621712010-04-24 17:59:49 +000012829$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012830
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012831 works=yes
12832
Guido van Rossum627b2d71993-12-24 10:39:16 +000012833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12836$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012837
Martin v. Löwisd6320502004-08-12 13:45:08 +000012838# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12840$as_echo_n "checking for socketpair... " >&6; }
12841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012842/* end confdefs.h. */
12843
12844#include <sys/types.h>
12845#include <sys/socket.h>
12846
12847int
12848main ()
12849{
12850void *x=socketpair
12851 ;
12852 return 0;
12853}
12854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012855if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012856
Matthias Kloseb9621712010-04-24 17:59:49 +000012857$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012858
Matthias Kloseb159a552010-04-25 21:00:44 +000012859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012860$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012861else
Matthias Kloseb9621712010-04-24 17:59:49 +000012862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12863$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012864
12865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012867
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012868# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12870$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012872/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012873#include <sys/types.h>
12874#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012875int
12876main ()
12877{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012878struct sockaddr x;
12879x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012880 ;
12881 return 0;
12882}
12883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012884if ac_fn_c_try_compile "$LINENO"; then :
12885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12886$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012887
Matthias Kloseb9621712010-04-24 17:59:49 +000012888$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012889
12890else
Matthias Kloseb9621712010-04-24 17:59:49 +000012891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12892$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012893
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012896
Guido van Rossumda88dad1995-01-26 00:46:29 +000012897va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12899$as_echo_n "checking whether va_list is an array... " >&6; }
12900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012901/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012902
12903#ifdef HAVE_STDARG_PROTOTYPES
12904#include <stdarg.h>
12905#else
12906#include <varargs.h>
12907#endif
12908
Martin v. Löwis11437992002-04-12 09:54:03 +000012909int
12910main ()
12911{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012912va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012913 ;
12914 return 0;
12915}
12916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012917if ac_fn_c_try_compile "$LINENO"; then :
12918
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012919else
Skip Montanaro6dead952003-09-25 14:50:04 +000012920
Martin v. Löwis11437992002-04-12 09:54:03 +000012921
Matthias Kloseb9621712010-04-24 17:59:49 +000012922$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012923
Guido van Rossumda88dad1995-01-26 00:46:29 +000012924 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012925
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12929$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012930
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012931# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012932
12933
Matthias Kloseb9621712010-04-24 17:59:49 +000012934ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012935if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012936
Matthias Kloseb9621712010-04-24 17:59:49 +000012937 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012938
Matthias Kloseb9621712010-04-24 17:59:49 +000012939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12940$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012941 OLD_CFLAGS=$CFLAGS
12942 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012944/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012945
12946# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012947
Martin v. Löwis11437992002-04-12 09:54:03 +000012948int
12949main ()
12950{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012951
12952 char *name;
12953 struct hostent *he, *res;
12954 char buffer[2048];
12955 int buflen = 2048;
12956 int h_errnop;
12957
12958 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012959
12960 ;
12961 return 0;
12962}
12963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012964if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012965
Matthias Kloseb9621712010-04-24 17:59:49 +000012966 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012967
Martin v. Löwis11437992002-04-12 09:54:03 +000012968
Matthias Kloseb9621712010-04-24 17:59:49 +000012969$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012970
Matthias Kloseb9621712010-04-24 17:59:49 +000012971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12972$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012973
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012974else
Skip Montanaro6dead952003-09-25 14:50:04 +000012975
Matthias Kloseb9621712010-04-24 17:59:49 +000012976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12977$as_echo "no" >&6; }
12978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12979$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012981/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012982
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012983# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012984
Martin v. Löwis11437992002-04-12 09:54:03 +000012985int
12986main ()
12987{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012988
12989 char *name;
12990 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012991 char buffer[2048];
12992 int buflen = 2048;
12993 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012994
Matthias Kloseb159a552010-04-25 21:00:44 +000012995 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012996
12997 ;
12998 return 0;
12999}
13000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013001if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013002
Matthias Kloseb9621712010-04-24 17:59:49 +000013003 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013004
Martin v. Löwis11437992002-04-12 09:54:03 +000013005
Matthias Kloseb159a552010-04-25 21:00:44 +000013006$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013007
Matthias Kloseb9621712010-04-24 17:59:49 +000013008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13009$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013010
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013011else
Skip Montanaro6dead952003-09-25 14:50:04 +000013012
Matthias Kloseb9621712010-04-24 17:59:49 +000013013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13014$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13016$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13018/* end confdefs.h. */
13019
13020# include <netdb.h>
13021
13022int
13023main ()
13024{
13025
13026 char *name;
13027 struct hostent *he;
13028 struct hostent_data data;
13029
13030 (void) gethostbyname_r(name, he, &data);
13031
13032 ;
13033 return 0;
13034}
13035_ACEOF
13036if ac_fn_c_try_compile "$LINENO"; then :
13037
13038 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13039
13040
13041$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13042
13043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13044$as_echo "yes" >&6; }
13045
13046else
13047
13048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13049$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013050
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013053
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013056
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013059 CFLAGS=$OLD_CFLAGS
13060
13061else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013062
Matthias Kloseb9621712010-04-24 17:59:49 +000013063 for ac_func in gethostbyname
13064do :
13065 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013066if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013067 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013068#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013069_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013070
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013071fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013072done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013073
Michael W. Hudson54241132001-12-07 15:38:26 +000013074
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013075fi
13076
Michael W. Hudson54241132001-12-07 15:38:26 +000013077
13078
13079
13080
13081
13082
Guido van Rossum627b2d71993-12-24 10:39:16 +000013083# checks for system services
13084# (none yet)
13085
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013086# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013087ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013088if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013089
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013090else
Matthias Kloseb9621712010-04-24 17:59:49 +000013091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13092$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013093if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013094 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013095else
Martin v. Löwis11437992002-04-12 09:54:03 +000013096 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013097LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013099/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013101/* Override any GCC internal prototype to avoid an error.
13102 Use char because int might match the return type of a GCC
13103 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013104#ifdef __cplusplus
13105extern "C"
13106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013107char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013108int
13109main ()
13110{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013111return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013112 ;
13113 return 0;
13114}
13115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013116if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013117 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013118else
Matthias Kloseb9621712010-04-24 17:59:49 +000013119 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013121rm -f core conftest.err conftest.$ac_objext \
13122 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013123LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013124fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13126$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013127if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013128 cat >>confdefs.h <<_ACEOF
13129#define HAVE_LIBIEEE 1
13130_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013131
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013132 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013133
Guido van Rossum627b2d71993-12-24 10:39:16 +000013134fi
13135
Michael W. Hudson54241132001-12-07 15:38:26 +000013136
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013137fi
13138
Michael W. Hudson54241132001-12-07 15:38:26 +000013139
Guido van Rossum7f253911997-05-09 02:42:48 +000013140# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13142$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013143
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013144# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013145if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013146 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013147if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013148then
13149
Matthias Kloseb9621712010-04-24 17:59:49 +000013150$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013151
Matthias Kloseb9621712010-04-24 17:59:49 +000013152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13153$as_echo "yes" >&6; }
13154else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13155$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013156fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013157else
Matthias Kloseb9621712010-04-24 17:59:49 +000013158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13159$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013160fi
13161
Guido van Rossum7f253911997-05-09 02:42:48 +000013162
Guido van Rossum7f43da71994-08-01 12:15:30 +000013163# check for --with-libm=...
13164
Guido van Rossum563e7081996-09-10 18:20:48 +000013165case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013166Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013167*) LIBM=-lm
13168esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13170$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013172# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013173if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013174 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013175if test "$withval" = no
13176then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13178$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013179elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013180then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13182$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013183else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013184fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013185else
Matthias Kloseb9621712010-04-24 17:59:49 +000013186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13187$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013188fi
13189
Guido van Rossum7f43da71994-08-01 12:15:30 +000013190
13191# check for --with-libc=...
13192
Matthias Kloseb9621712010-04-24 17:59:49 +000013193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13194$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013196# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013197if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013198 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013199if test "$withval" = no
13200then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13202$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013203elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013204then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13206$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013207else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013208fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013209else
Matthias Kloseb9621712010-04-24 17:59:49 +000013210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13211$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013212fi
13213
Guido van Rossum7f43da71994-08-01 12:15:30 +000013214
Stefan Krah1919b7e2012-03-21 18:25:23 +010013215# **************************************
13216# * Check for gcc x64 inline assembler *
13217# **************************************
13218
13219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13220$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13222/* end confdefs.h. */
13223
13224int
13225main ()
13226{
13227
13228 __asm__ __volatile__ ("movq %rcx, %rax");
13229
13230 ;
13231 return 0;
13232}
13233_ACEOF
13234if ac_fn_c_try_compile "$LINENO"; then :
13235 have_gcc_asm_for_x64=yes
13236else
13237 have_gcc_asm_for_x64=no
13238fi
13239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13241$as_echo "$have_gcc_asm_for_x64" >&6; }
13242if test "$have_gcc_asm_for_x64" = yes
13243then
13244
13245$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13246
13247fi
13248
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013249# **************************************************
13250# * Check for various properties of floating point *
13251# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13254$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013255if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013256 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013257else
13258
Matthias Kloseb9621712010-04-24 17:59:49 +000013259if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013260 ac_cv_little_endian_double=no
13261else
Matthias Kloseb9621712010-04-24 17:59:49 +000013262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013263/* end confdefs.h. */
13264
13265#include <string.h>
13266int main() {
13267 double x = 9006104071832581.0;
13268 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13269 return 0;
13270 else
13271 return 1;
13272}
13273
13274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013275if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013276 ac_cv_little_endian_double=yes
13277else
Matthias Kloseb9621712010-04-24 17:59:49 +000013278 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013279fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013280rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13281 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013282fi
13283
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013284fi
13285
Matthias Kloseb9621712010-04-24 17:59:49 +000013286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13287$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013288if test "$ac_cv_little_endian_double" = yes
13289then
13290
Matthias Kloseb9621712010-04-24 17:59:49 +000013291$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013292
13293fi
13294
Matthias Kloseb9621712010-04-24 17:59:49 +000013295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13296$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013297if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013298 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013299else
13300
Matthias Kloseb9621712010-04-24 17:59:49 +000013301if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013302 ac_cv_big_endian_double=no
13303else
Matthias Kloseb9621712010-04-24 17:59:49 +000013304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013305/* end confdefs.h. */
13306
13307#include <string.h>
13308int main() {
13309 double x = 9006104071832581.0;
13310 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13311 return 0;
13312 else
13313 return 1;
13314}
13315
13316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013317if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013318 ac_cv_big_endian_double=yes
13319else
Matthias Kloseb9621712010-04-24 17:59:49 +000013320 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013321fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013322rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13323 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013324fi
13325
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013326fi
13327
Matthias Kloseb9621712010-04-24 17:59:49 +000013328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13329$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013330if test "$ac_cv_big_endian_double" = yes
13331then
13332
Matthias Kloseb9621712010-04-24 17:59:49 +000013333$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013334
13335fi
13336
13337# Some ARM platforms use a mixed-endian representation for doubles.
13338# While Python doesn't currently have full support for these platforms
13339# (see e.g., issue 1762561), we can at least make sure that float <-> string
13340# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13342$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013343if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013344 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013345else
13346
Matthias Kloseb9621712010-04-24 17:59:49 +000013347if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013348 ac_cv_mixed_endian_double=no
13349else
Matthias Kloseb9621712010-04-24 17:59:49 +000013350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013351/* end confdefs.h. */
13352
13353#include <string.h>
13354int main() {
13355 double x = 9006104071832581.0;
13356 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13357 return 0;
13358 else
13359 return 1;
13360}
13361
13362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013363if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013364 ac_cv_mixed_endian_double=yes
13365else
Matthias Kloseb9621712010-04-24 17:59:49 +000013366 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013367fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013368rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13369 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013370fi
13371
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013372fi
13373
Matthias Kloseb9621712010-04-24 17:59:49 +000013374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13375$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013376if test "$ac_cv_mixed_endian_double" = yes
13377then
13378
Matthias Kloseb9621712010-04-24 17:59:49 +000013379$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013380
13381fi
13382
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013383# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013384# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013385# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013386# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013387# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013388# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013389
13390# This inline assembler syntax may also work for suncc and icc,
13391# so we try it on all platforms.
13392
Matthias Kloseb9621712010-04-24 17:59:49 +000013393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13394$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013396/* end confdefs.h. */
13397
13398int
13399main ()
13400{
13401
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013402 unsigned short cw;
13403 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13404 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013405
13406 ;
13407 return 0;
13408}
13409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013410if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013411 have_gcc_asm_for_x87=yes
13412else
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013414fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13417$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013418if test "$have_gcc_asm_for_x87" = yes
13419then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013420
Matthias Kloseb9621712010-04-24 17:59:49 +000013421$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013422
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013423fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013424
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13426$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13428/* end confdefs.h. */
13429
13430int
13431main ()
13432{
13433
13434 unsigned int fpcr;
13435 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13436 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13437
13438 ;
13439 return 0;
13440}
13441_ACEOF
13442if ac_fn_c_try_compile "$LINENO"; then :
13443 have_gcc_asm_for_mc68881=yes
13444else
13445 have_gcc_asm_for_mc68881=no
13446fi
13447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13449$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13450if test "$have_gcc_asm_for_mc68881" = yes
13451then
13452
13453$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13454
13455fi
13456
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013457# Detect whether system arithmetic is subject to x87-style double
13458# rounding issues. The result of this test has little meaning on non
13459# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13460# mode is round-to-nearest and double rounding issues are present, and
13461# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13463$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013464# $BASECFLAGS may affect the result
13465ac_save_cc="$CC"
13466CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013467if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013468 ac_cv_x87_double_rounding=no
13469else
Matthias Kloseb9621712010-04-24 17:59:49 +000013470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013471/* end confdefs.h. */
13472
13473#include <stdlib.h>
13474#include <math.h>
13475int main() {
13476 volatile double x, y, z;
13477 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13478 x = 0.99999999999999989; /* 1-2**-53 */
13479 y = 1./x;
13480 if (y != 1.)
13481 exit(0);
13482 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13483 x = 1e16;
13484 y = 2.99999;
13485 z = x + y;
13486 if (z != 1e16+4.)
13487 exit(0);
13488 /* both tests show evidence of double rounding */
13489 exit(1);
13490}
13491
13492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013493if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013494 ac_cv_x87_double_rounding=no
13495else
Matthias Kloseb9621712010-04-24 17:59:49 +000013496 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013497fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013498rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13499 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013500fi
13501
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013502CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13504$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013505if test "$ac_cv_x87_double_rounding" = yes
13506then
13507
Matthias Kloseb9621712010-04-24 17:59:49 +000013508$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013509
13510fi
13511
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013512# ************************************
13513# * Check for mathematical functions *
13514# ************************************
13515
13516LIBS_SAVE=$LIBS
13517LIBS="$LIBS $LIBM"
13518
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013519for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13520do :
13521 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13522ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013523if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013524 cat >>confdefs.h <<_ACEOF
13525#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13526_ACEOF
13527
13528fi
13529done
13530
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013531for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013532do :
13533 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13534ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013535if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013536 cat >>confdefs.h <<_ACEOF
13537#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13538_ACEOF
13539
13540fi
13541done
13542
13543ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13544"
Victor Stinnere0be4232011-10-25 13:06:09 +020013545if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013546 ac_have_decl=1
13547else
13548 ac_have_decl=0
13549fi
13550
13551cat >>confdefs.h <<_ACEOF
13552#define HAVE_DECL_ISINF $ac_have_decl
13553_ACEOF
13554ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13555"
Victor Stinnere0be4232011-10-25 13:06:09 +020013556if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013557 ac_have_decl=1
13558else
13559 ac_have_decl=0
13560fi
13561
13562cat >>confdefs.h <<_ACEOF
13563#define HAVE_DECL_ISNAN $ac_have_decl
13564_ACEOF
13565ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13566"
Victor Stinnere0be4232011-10-25 13:06:09 +020013567if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013568 ac_have_decl=1
13569else
13570 ac_have_decl=0
13571fi
13572
13573cat >>confdefs.h <<_ACEOF
13574#define HAVE_DECL_ISFINITE $ac_have_decl
13575_ACEOF
13576
13577
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013578# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13579# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13581$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013582if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013583 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013584else
13585
Matthias Kloseb9621712010-04-24 17:59:49 +000013586if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013587 ac_cv_tanh_preserves_zero_sign=no
13588else
Matthias Kloseb9621712010-04-24 17:59:49 +000013589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013590/* end confdefs.h. */
13591
13592#include <math.h>
13593#include <stdlib.h>
13594int main() {
13595 /* return 0 if either negative zeros don't exist
13596 on this platform or if negative zeros exist
13597 and tanh(-0.) == -0. */
13598 if (atan2(0., -1.) == atan2(-0., -1.) ||
13599 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13600 else exit(1);
13601}
13602
13603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013604if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013605 ac_cv_tanh_preserves_zero_sign=yes
13606else
Matthias Kloseb9621712010-04-24 17:59:49 +000013607 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013608fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013609rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13610 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013611fi
13612
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013613fi
13614
Matthias Kloseb9621712010-04-24 17:59:49 +000013615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13616$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013617if test "$ac_cv_tanh_preserves_zero_sign" = yes
13618then
13619
Matthias Kloseb9621712010-04-24 17:59:49 +000013620$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013621
13622fi
13623
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013624if test "$ac_cv_func_log1p" = yes
13625then
13626 # On some versions of AIX, log1p(-0.) returns 0. instead of
13627 # -0. See issue #9920.
13628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13629$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013630 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013631 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013632else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013633
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013634 if test "$cross_compiling" = yes; then :
13635 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013636else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13638/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013639
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013640 #include <math.h>
13641 #include <stdlib.h>
13642 int main() {
13643 /* Fail if the signs of log1p(-0.) and -0. can be
13644 distinguished. */
13645 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13646 return 0;
13647 else
13648 return 1;
13649 }
13650
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013651_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013652if ac_fn_c_try_run "$LINENO"; then :
13653 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013654else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013655 ac_cv_log1p_drops_zero_sign=yes
13656fi
13657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13658 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013659fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013660
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013661fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013662
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13664$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13665fi
13666if test "$ac_cv_log1p_drops_zero_sign" = yes
13667then
13668
13669$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13670
13671fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013672
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013673LIBS=$LIBS_SAVE
13674
Mark Dickinsona614f042009-11-28 12:48:43 +000013675# For multiprocessing module, check that sem_open
13676# actually works. For FreeBSD versions <= 7.2,
13677# the kernel module that provides POSIX semaphores
13678# isn't loaded by default, so an attempt to call
13679# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13681$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013682if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013683 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013684else
Matthias Kloseb9621712010-04-24 17:59:49 +000013685 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013686 ac_cv_posix_semaphores_enabled=yes
13687else
Matthias Kloseb9621712010-04-24 17:59:49 +000013688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013689/* end confdefs.h. */
13690
13691#include <unistd.h>
13692#include <fcntl.h>
13693#include <stdio.h>
13694#include <semaphore.h>
13695#include <sys/stat.h>
13696
13697int main(void) {
13698 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13699 if (a == SEM_FAILED) {
13700 perror("sem_open");
13701 return 1;
13702 }
13703 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013704 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013705 return 0;
13706}
13707
13708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013709if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013710 ac_cv_posix_semaphores_enabled=yes
13711else
Matthias Kloseb9621712010-04-24 17:59:49 +000013712 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013713fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13715 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013716fi
13717
13718
Mark Dickinsona614f042009-11-28 12:48:43 +000013719fi
13720
Matthias Kloseb9621712010-04-24 17:59:49 +000013721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13722$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013723if test $ac_cv_posix_semaphores_enabled = no
13724then
13725
Matthias Kloseb9621712010-04-24 17:59:49 +000013726$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013727
13728fi
13729
Mark Dickinson10683072009-04-18 21:18:19 +000013730# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13732$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013733if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013734 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013735else
Matthias Kloseb9621712010-04-24 17:59:49 +000013736 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013737 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013738else
Matthias Kloseb9621712010-04-24 17:59:49 +000013739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013740/* end confdefs.h. */
13741
13742#include <unistd.h>
13743#include <fcntl.h>
13744#include <stdio.h>
13745#include <semaphore.h>
13746#include <sys/stat.h>
13747
13748int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013749 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013750 int count;
13751 int res;
13752 if(a==SEM_FAILED){
13753 perror("sem_open");
13754 return 1;
13755
13756 }
13757 res = sem_getvalue(a, &count);
13758 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013759 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013760 return res==-1 ? 1 : 0;
13761}
13762
Mark Dickinson10683072009-04-18 21:18:19 +000013763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013764if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013765 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013766else
Matthias Kloseb9621712010-04-24 17:59:49 +000013767 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013768fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13770 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013771fi
13772
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013773
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013774fi
13775
Matthias Kloseb9621712010-04-24 17:59:49 +000013776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13777$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013778if test $ac_cv_broken_sem_getvalue = yes
13779then
13780
Matthias Kloseb9621712010-04-24 17:59:49 +000013781$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013782
13783fi
13784
Mark Dickinsonbd792642009-03-18 20:06:12 +000013785# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13787$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013788# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013789if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013790 enableval=$enable_big_digits; case $enable_big_digits in
13791yes)
13792 enable_big_digits=30 ;;
13793no)
13794 enable_big_digits=15 ;;
1379515|30)
13796 ;;
13797*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013798 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 +000013799esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13801$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013802
13803cat >>confdefs.h <<_ACEOF
13804#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13805_ACEOF
13806
13807
13808else
Matthias Kloseb9621712010-04-24 17:59:49 +000013809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13810$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013811fi
13812
13813
Guido van Rossumef2255b2000-03-10 22:30:29 +000013814# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013815ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013816if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013817
13818
Matthias Kloseb9621712010-04-24 17:59:49 +000013819$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013820
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013821 wchar_h="yes"
13822
Guido van Rossumef2255b2000-03-10 22:30:29 +000013823else
Martin v. Löwis11437992002-04-12 09:54:03 +000013824 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013825
13826fi
13827
Michael W. Hudson54241132001-12-07 15:38:26 +000013828
Martin v. Löwis11437992002-04-12 09:54:03 +000013829
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013830# determine wchar_t size
13831if test "$wchar_h" = yes
13832then
Matthias Kloseb9621712010-04-24 17:59:49 +000013833 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013834# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13835# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13836# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13838$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013839if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013840 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013841else
Matthias Kloseb9621712010-04-24 17:59:49 +000013842 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13843"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013844
Martin v. Löwis11437992002-04-12 09:54:03 +000013845else
Matthias Kloseb9621712010-04-24 17:59:49 +000013846 if test "$ac_cv_type_wchar_t" = yes; then
13847 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13848$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013849as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013850See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013851 else
13852 ac_cv_sizeof_wchar_t=0
13853 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013854fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013855
Martin v. Löwis11437992002-04-12 09:54:03 +000013856fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13858$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013859
13860
13861
Martin v. Löwis11437992002-04-12 09:54:03 +000013862cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013863#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013864_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013865
Michael W. Hudson54241132001-12-07 15:38:26 +000013866
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013867fi
13868
Matthias Kloseb9621712010-04-24 17:59:49 +000013869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13870$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013871have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013873/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013874
13875#include <tcl.h>
13876#if TCL_UTF_MAX != 6
13877# error "NOT UCS4_TCL"
13878#endif
13879int
13880main ()
13881{
13882
13883 ;
13884 return 0;
13885}
13886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013887if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013888
13889
Matthias Kloseb9621712010-04-24 17:59:49 +000013890$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013891
13892 have_ucs4_tcl=yes
13893
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13897$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013898
Skip Montanaro6dead952003-09-25 14:50:04 +000013899# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013900if test "$wchar_h" = yes
13901then
13902 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13904$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013905 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013906 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013907else
13908
Matthias Kloseb9621712010-04-24 17:59:49 +000013909 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013910 ac_cv_wchar_t_signed=yes
13911else
Matthias Kloseb9621712010-04-24 17:59:49 +000013912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013913/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013914
13915 #include <wchar.h>
13916 int main()
13917 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013918 /* Success: exit code 0 */
13919 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013920 }
13921
13922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013923if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013924 ac_cv_wchar_t_signed=yes
13925else
Matthias Kloseb9621712010-04-24 17:59:49 +000013926 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013927fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013928rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13929 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013930fi
13931
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013932fi
13933
Matthias Kloseb9621712010-04-24 17:59:49 +000013934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13935$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013936fi
13937
Georg Brandl52d168a2008-01-07 18:10:24 +000013938# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013939if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013940 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013941then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013942 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013943
Matthias Kloseb9621712010-04-24 17:59:49 +000013944$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013945
Georg Brandl52d168a2008-01-07 18:10:24 +000013946else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013947 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013948fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13950$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013951
13952# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13954$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013955if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013956 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013957else
Matthias Kloseb9621712010-04-24 17:59:49 +000013958 ac_cv_c_bigendian=unknown
13959 # See if we're dealing with a universal compiler.
13960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13961/* end confdefs.h. */
13962#ifndef __APPLE_CC__
13963 not a universal capable compiler
13964 #endif
13965 typedef int dummy;
13966
Skip Montanaro6dead952003-09-25 14:50:04 +000013967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013968if ac_fn_c_try_compile "$LINENO"; then :
13969
13970 # Check for potential -arch flags. It is not universal unless
13971 # there are at least two -arch flags with different values.
13972 ac_arch=
13973 ac_prev=
13974 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13975 if test -n "$ac_prev"; then
13976 case $ac_word in
13977 i?86 | x86_64 | ppc | ppc64)
13978 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13979 ac_arch=$ac_word
13980 else
13981 ac_cv_c_bigendian=universal
13982 break
13983 fi
13984 ;;
13985 esac
13986 ac_prev=
13987 elif test "x$ac_word" = "x-arch"; then
13988 ac_prev=arch
13989 fi
13990 done
13991fi
13992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13993 if test $ac_cv_c_bigendian = unknown; then
13994 # See if sys/param.h defines the BYTE_ORDER macro.
13995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013996/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013997#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013998 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013999
Martin v. Löwis11437992002-04-12 09:54:03 +000014000int
14001main ()
14002{
Matthias Kloseb9621712010-04-24 17:59:49 +000014003#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14004 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14005 && LITTLE_ENDIAN)
14006 bogus endian macros
14007 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014008
14009 ;
14010 return 0;
14011}
14012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014013if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014014 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014016/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014017#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014018 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014019
Martin v. Löwis11437992002-04-12 09:54:03 +000014020int
14021main ()
14022{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014023#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014024 not big endian
14025 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014026
14027 ;
14028 return 0;
14029}
14030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014031if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014032 ac_cv_c_bigendian=yes
14033else
Matthias Kloseb9621712010-04-24 17:59:49 +000014034 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014037fi
14038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14039 fi
14040 if test $ac_cv_c_bigendian = unknown; then
14041 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014043/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014044#include <limits.h>
14045
Martin v. Löwis11437992002-04-12 09:54:03 +000014046int
14047main ()
14048{
Matthias Kloseb9621712010-04-24 17:59:49 +000014049#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14050 bogus endian macros
14051 #endif
14052
Martin v. Löwis11437992002-04-12 09:54:03 +000014053 ;
14054 return 0;
14055}
14056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014057if ac_fn_c_try_compile "$LINENO"; then :
14058 # It does; now see whether it defined to _BIG_ENDIAN or not.
14059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14060/* end confdefs.h. */
14061#include <limits.h>
14062
14063int
14064main ()
14065{
14066#ifndef _BIG_ENDIAN
14067 not big endian
14068 #endif
14069
14070 ;
14071 return 0;
14072}
14073_ACEOF
14074if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014075 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014076else
Matthias Kloseb9621712010-04-24 17:59:49 +000014077 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14080fi
14081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14082 fi
14083 if test $ac_cv_c_bigendian = unknown; then
14084 # Compile a test program.
14085 if test "$cross_compiling" = yes; then :
14086 # Try to guess by grepping values from an object file.
14087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14088/* end confdefs.h. */
14089short int ascii_mm[] =
14090 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14091 short int ascii_ii[] =
14092 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14093 int use_ascii (int i) {
14094 return ascii_mm[i] + ascii_ii[i];
14095 }
14096 short int ebcdic_ii[] =
14097 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14098 short int ebcdic_mm[] =
14099 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14100 int use_ebcdic (int i) {
14101 return ebcdic_mm[i] + ebcdic_ii[i];
14102 }
14103 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014104
Matthias Kloseb9621712010-04-24 17:59:49 +000014105int
14106main ()
14107{
14108return use_ascii (foo) == use_ebcdic (foo);
14109 ;
14110 return 0;
14111}
14112_ACEOF
14113if ac_fn_c_try_compile "$LINENO"; then :
14114 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14115 ac_cv_c_bigendian=yes
14116 fi
14117 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14118 if test "$ac_cv_c_bigendian" = unknown; then
14119 ac_cv_c_bigendian=no
14120 else
14121 # finding both strings is unlikely to happen, but who knows?
14122 ac_cv_c_bigendian=unknown
14123 fi
14124 fi
14125fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014127else
Matthias Kloseb9621712010-04-24 17:59:49 +000014128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014129/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014130$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014131int
14132main ()
14133{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014134
Matthias Kloseb9621712010-04-24 17:59:49 +000014135 /* Are we little or big endian? From Harbison&Steele. */
14136 union
14137 {
14138 long int l;
14139 char c[sizeof (long int)];
14140 } u;
14141 u.l = 1;
14142 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014143
14144 ;
14145 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014146}
Martin v. Löwis11437992002-04-12 09:54:03 +000014147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014148if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014149 ac_cv_c_bigendian=no
14150else
Matthias Kloseb9621712010-04-24 17:59:49 +000014151 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014152fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14154 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014156
Matthias Kloseb9621712010-04-24 17:59:49 +000014157 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14160$as_echo "$ac_cv_c_bigendian" >&6; }
14161 case $ac_cv_c_bigendian in #(
14162 yes)
14163 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14164;; #(
14165 no)
14166 ;; #(
14167 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014168
Matthias Kloseb9621712010-04-24 17:59:49 +000014169$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014170
Matthias Kloseb9621712010-04-24 17:59:49 +000014171 ;; #(
14172 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014173 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014174 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014175 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014176
Michael W. Hudson54241132001-12-07 15:38:26 +000014177
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014178# ABI version string for Python extension modules. This appears between the
14179# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14180# from the following attributes which affect the ABI of this Python build (in
14181# this order):
14182#
14183# * The Python implementation (always 'cpython-' for us)
14184# * The major and minor version numbers
14185# * --with-pydebug (adds a 'd')
14186# * --with-pymalloc (adds a 'm')
14187# * --with-wide-unicode (adds a 'u')
14188#
14189# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014190# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14191# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014192
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14194$as_echo_n "checking ABIFLAGS... " >&6; }
14195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14196$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14198$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014199SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14201$as_echo "$SOABI" >&6; }
14202
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014203
14204case $ac_sys_system in
14205 Linux*|GNU*)
14206 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14207 *)
14208 EXT_SUFFIX=${SHLIB_SUFFIX};;
14209esac
14210
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14212$as_echo_n "checking LDVERSION... " >&6; }
14213LDVERSION='$(VERSION)$(ABIFLAGS)'
14214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14215$as_echo "$LDVERSION" >&6; }
14216
doko@python.org87421192013-01-26 11:39:31 +010014217
14218LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
14219
14220
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014221# Check whether right shifting a negative integer extends the sign bit
14222# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14224$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014225if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014226 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014227else
Martin v. Löwis11437992002-04-12 09:54:03 +000014228
Matthias Kloseb9621712010-04-24 17:59:49 +000014229if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014230 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014231else
Matthias Kloseb9621712010-04-24 17:59:49 +000014232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014233/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014234
14235int main()
14236{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014237 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014238}
14239
Martin v. Löwis11437992002-04-12 09:54:03 +000014240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014241if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014242 ac_cv_rshift_extends_sign=yes
14243else
Matthias Kloseb9621712010-04-24 17:59:49 +000014244 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014245fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014246rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14247 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014248fi
14249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014250fi
14251
Matthias Kloseb9621712010-04-24 17:59:49 +000014252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14253$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014254if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014255then
Martin v. Löwis11437992002-04-12 09:54:03 +000014256
Matthias Kloseb9621712010-04-24 17:59:49 +000014257$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014258
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014259fi
14260
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014261# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14263$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014264if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014265 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014266else
Martin v. Löwis11437992002-04-12 09:54:03 +000014267
Matthias Kloseb9621712010-04-24 17:59:49 +000014268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014269/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014270#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014271int
14272main ()
14273{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014274
14275 FILE *f = fopen("/dev/null", "r");
14276 flockfile(f);
14277 getc_unlocked(f);
14278 funlockfile(f);
14279
Martin v. Löwis11437992002-04-12 09:54:03 +000014280 ;
14281 return 0;
14282}
14283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014284if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014285 ac_cv_have_getc_unlocked=yes
14286else
Matthias Kloseb9621712010-04-24 17:59:49 +000014287 ac_cv_have_getc_unlocked=no
14288fi
14289rm -f core conftest.err conftest.$ac_objext \
14290 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014292
Matthias Kloseb9621712010-04-24 17:59:49 +000014293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14294$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014295if test "$ac_cv_have_getc_unlocked" = yes
14296then
Martin v. Löwis11437992002-04-12 09:54:03 +000014297
Matthias Kloseb9621712010-04-24 17:59:49 +000014298$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014299
14300fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014301
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014302# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014303# save the value of LIBS so we don't actually link Python with readline
14304LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014305
Gregory P. Smith18820942008-09-07 06:24:49 +000014306# On some systems we need to link readline to a termcap compatible
14307# library. NOTE: Keep the precedence of listed libraries synchronised
14308# with setup.py.
14309py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14311$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014312for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014313 if test -z "$py_libtermcap"; then
14314 READLINE_LIBS="-lreadline"
14315 else
14316 READLINE_LIBS="-lreadline -l$py_libtermcap"
14317 fi
14318 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014320/* end confdefs.h. */
14321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014322/* Override any GCC internal prototype to avoid an error.
14323 Use char because int might match the return type of a GCC
14324 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014325#ifdef __cplusplus
14326extern "C"
14327#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014328char readline ();
14329int
14330main ()
14331{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014332return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014333 ;
14334 return 0;
14335}
14336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014337if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014338 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014339fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014340rm -f core conftest.err conftest.$ac_objext \
14341 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014342 if test $py_cv_lib_readline = yes; then
14343 break
14344 fi
14345done
14346# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14347#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014348if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14350$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014351else
Matthias Kloseb9621712010-04-24 17:59:49 +000014352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14353$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014354
Matthias Kloseb9621712010-04-24 17:59:49 +000014355$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014356
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014357fi
14358
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014359# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14361$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014362if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014363 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014364else
14365 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014366LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014368/* end confdefs.h. */
14369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014370/* Override any GCC internal prototype to avoid an error.
14371 Use char because int might match the return type of a GCC
14372 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014373#ifdef __cplusplus
14374extern "C"
14375#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014376char rl_callback_handler_install ();
14377int
14378main ()
14379{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014380return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014381 ;
14382 return 0;
14383}
14384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014385if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014386 ac_cv_lib_readline_rl_callback_handler_install=yes
14387else
Matthias Kloseb9621712010-04-24 17:59:49 +000014388 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014390rm -f core conftest.err conftest.$ac_objext \
14391 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014392LIBS=$ac_check_lib_save_LIBS
14393fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14395$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014396if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014397
Matthias Kloseb9621712010-04-24 17:59:49 +000014398$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014399
14400fi
14401
14402
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014403# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014405/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014406#include <readline/readline.h>
14407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014408if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014409 have_readline=yes
14410else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014411 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014412
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014413fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014414rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014415if test $have_readline = yes
14416then
Matthias Kloseb9621712010-04-24 17:59:49 +000014417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014418/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014419#include <readline/readline.h>
14420
14421_ACEOF
14422if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014424
Matthias Kloseb9621712010-04-24 17:59:49 +000014425$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014426
14427fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014428rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014429
Matthias Kloseb9621712010-04-24 17:59:49 +000014430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014431/* end confdefs.h. */
14432#include <readline/readline.h>
14433
14434_ACEOF
14435if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014436 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014437
Matthias Kloseb9621712010-04-24 17:59:49 +000014438$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014439
14440fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014441rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014442
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014443fi
14444
Martin v. Löwis0daad592001-09-30 21:09:59 +000014445# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14447$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014448if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014449 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014450else
Martin v. Löwis11437992002-04-12 09:54:03 +000014451 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014452LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014455
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014456/* Override any GCC internal prototype to avoid an error.
14457 Use char because int might match the return type of a GCC
14458 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014459#ifdef __cplusplus
14460extern "C"
14461#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014462char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014463int
14464main ()
14465{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014466return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014467 ;
14468 return 0;
14469}
14470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014471if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014472 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014473else
Matthias Kloseb9621712010-04-24 17:59:49 +000014474 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014475fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014476rm -f core conftest.err conftest.$ac_objext \
14477 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014478LIBS=$ac_check_lib_save_LIBS
14479fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14481$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014482if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014483
Matthias Kloseb9621712010-04-24 17:59:49 +000014484$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014485
Martin v. Löwis0daad592001-09-30 21:09:59 +000014486fi
14487
Michael W. Hudson54241132001-12-07 15:38:26 +000014488
Thomas Wouters89d996e2007-09-08 17:39:28 +000014489# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14491$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014492if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014493 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014494else
14495 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014496LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014498/* end confdefs.h. */
14499
14500/* Override any GCC internal prototype to avoid an error.
14501 Use char because int might match the return type of a GCC
14502 builtin and then its argument prototype would still apply. */
14503#ifdef __cplusplus
14504extern "C"
14505#endif
14506char rl_completion_display_matches_hook ();
14507int
14508main ()
14509{
14510return rl_completion_display_matches_hook ();
14511 ;
14512 return 0;
14513}
14514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014515if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014516 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14517else
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014519fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014520rm -f core conftest.err conftest.$ac_objext \
14521 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014522LIBS=$ac_check_lib_save_LIBS
14523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14525$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014526if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014527
Matthias Kloseb9621712010-04-24 17:59:49 +000014528$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014529
14530fi
14531
14532
Martin v. Löwis0daad592001-09-30 21:09:59 +000014533# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14535$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014536if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014537 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014538else
Martin v. Löwis11437992002-04-12 09:54:03 +000014539 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014540LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014544/* Override any GCC internal prototype to avoid an error.
14545 Use char because int might match the return type of a GCC
14546 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014547#ifdef __cplusplus
14548extern "C"
14549#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014550char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014551int
14552main ()
14553{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014554return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014555 ;
14556 return 0;
14557}
14558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014559if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014560 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014561else
Matthias Kloseb9621712010-04-24 17:59:49 +000014562 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014563fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014564rm -f core conftest.err conftest.$ac_objext \
14565 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014566LIBS=$ac_check_lib_save_LIBS
14567fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14569$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014570if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014571
Matthias Kloseb9621712010-04-24 17:59:49 +000014572$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014573
Guido van Rossum353ae582001-07-10 16:45:32 +000014574fi
14575
Jack Jansendd19cf82001-12-06 22:36:17 +000014576
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014577# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014579/* end confdefs.h. */
14580#include <readline/readline.h>
14581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014582if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014583 have_readline=yes
14584else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014585 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014586
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014587fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014588rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014589if test $have_readline = yes
14590then
Matthias Kloseb9621712010-04-24 17:59:49 +000014591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014592/* end confdefs.h. */
14593#include <readline/readline.h>
14594
14595_ACEOF
14596if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014597 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014598
Matthias Kloseb9621712010-04-24 17:59:49 +000014599$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014600
14601fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014602rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014603
14604fi
14605
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060014606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
14607$as_echo_n "checking for append_history in -lreadline... " >&6; }
14608if ${ac_cv_lib_readline_append_history+:} false; then :
14609 $as_echo_n "(cached) " >&6
14610else
14611 ac_check_lib_save_LIBS=$LIBS
14612LIBS="-lreadline $READLINE_LIBS $LIBS"
14613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14614/* end confdefs.h. */
14615
14616/* Override any GCC internal prototype to avoid an error.
14617 Use char because int might match the return type of a GCC
14618 builtin and then its argument prototype would still apply. */
14619#ifdef __cplusplus
14620extern "C"
14621#endif
14622char append_history ();
14623int
14624main ()
14625{
14626return append_history ();
14627 ;
14628 return 0;
14629}
14630_ACEOF
14631if ac_fn_c_try_link "$LINENO"; then :
14632 ac_cv_lib_readline_append_history=yes
14633else
14634 ac_cv_lib_readline_append_history=no
14635fi
14636rm -f core conftest.err conftest.$ac_objext \
14637 conftest$ac_exeext conftest.$ac_ext
14638LIBS=$ac_check_lib_save_LIBS
14639fi
14640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
14641$as_echo "$ac_cv_lib_readline_append_history" >&6; }
14642if test "x$ac_cv_lib_readline_append_history" = xyes; then :
14643
14644$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
14645
14646fi
14647
14648
Martin v. Löwis82bca632006-02-10 20:49:30 +000014649# End of readline checks: restore LIBS
14650LIBS=$LIBS_no_readline
14651
Matthias Kloseb9621712010-04-24 17:59:49 +000014652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14653$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014654if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014655 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014656else
Martin v. Löwis11437992002-04-12 09:54:03 +000014657
Matthias Kloseb9621712010-04-24 17:59:49 +000014658if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014659 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014660else
Matthias Kloseb9621712010-04-24 17:59:49 +000014661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014662/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014663
14664int main()
14665{
14666 int val1 = nice(1);
14667 if (val1 != -1 && val1 == nice(2))
14668 exit(0);
14669 exit(1);
14670}
14671
Martin v. Löwis11437992002-04-12 09:54:03 +000014672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014673if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014674 ac_cv_broken_nice=yes
14675else
Matthias Kloseb9621712010-04-24 17:59:49 +000014676 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014677fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014678rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14679 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014680fi
14681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682fi
14683
Matthias Kloseb9621712010-04-24 17:59:49 +000014684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14685$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014686if test "$ac_cv_broken_nice" = yes
14687then
Martin v. Löwis11437992002-04-12 09:54:03 +000014688
Matthias Kloseb9621712010-04-24 17:59:49 +000014689$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014690
14691fi
14692
Matthias Kloseb9621712010-04-24 17:59:49 +000014693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14694$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014695if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014696 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014697else
Matthias Kloseb9621712010-04-24 17:59:49 +000014698 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014699 ac_cv_broken_poll=no
14700else
Matthias Kloseb9621712010-04-24 17:59:49 +000014701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014702/* end confdefs.h. */
14703
14704#include <poll.h>
14705
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014706int main()
14707{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014708 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014709 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014710
14711 close (42);
14712
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014713 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014714 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014715 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014716 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014717 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014718 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014719 return 1;
14720}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014721
14722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014723if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014724 ac_cv_broken_poll=yes
14725else
Matthias Kloseb9621712010-04-24 17:59:49 +000014726 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014727fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014728rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14729 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014731
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014732fi
14733
Matthias Kloseb9621712010-04-24 17:59:49 +000014734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14735$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014736if test "$ac_cv_broken_poll" = yes
14737then
14738
Matthias Kloseb9621712010-04-24 17:59:49 +000014739$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014740
14741fi
14742
Brett Cannon43802422005-02-10 20:48:03 +000014743# 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 +000014744# (which is not required by ISO C or UNIX spec) and/or if we support
14745# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014746ac_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 +000014747#include <$ac_cv_struct_tm>
14748
Matthias Kloseb9621712010-04-24 17:59:49 +000014749"
Victor Stinnere0be4232011-10-25 13:06:09 +020014750if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014751
14752cat >>confdefs.h <<_ACEOF
14753#define HAVE_STRUCT_TM_TM_ZONE 1
14754_ACEOF
14755
14756
14757fi
14758
14759if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14760
Matthias Kloseb9621712010-04-24 17:59:49 +000014761$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014762
14763else
Matthias Kloseb9621712010-04-24 17:59:49 +000014764 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14765"
Victor Stinnere0be4232011-10-25 13:06:09 +020014766if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014767 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014768else
Matthias Kloseb9621712010-04-24 17:59:49 +000014769 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014770fi
14771
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014772cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014773#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014774_ACEOF
14775
Matthias Kloseb9621712010-04-24 17:59:49 +000014776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14777$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014778if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014779 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014780else
Matthias Kloseb9621712010-04-24 17:59:49 +000014781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014782/* end confdefs.h. */
14783#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014784#if !HAVE_DECL_TZNAME
14785extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014786#endif
14787
14788int
14789main ()
14790{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014791return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014792 ;
14793 return 0;
14794}
14795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014796if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014797 ac_cv_var_tzname=yes
14798else
Matthias Kloseb9621712010-04-24 17:59:49 +000014799 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014801rm -f core conftest.err conftest.$ac_objext \
14802 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014803fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14805$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014806 if test $ac_cv_var_tzname = yes; then
14807
Matthias Kloseb9621712010-04-24 17:59:49 +000014808$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014809
14810 fi
14811fi
14812
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014813
Martin v. Löwis1d459062005-03-14 21:23:33 +000014814# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14816$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014817if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014818 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014819else
14820
Matthias Kloseb9621712010-04-24 17:59:49 +000014821if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014822 ac_cv_working_tzset=no
14823else
Matthias Kloseb9621712010-04-24 17:59:49 +000014824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014825/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014826
14827#include <stdlib.h>
14828#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014829#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014830
14831#if HAVE_TZNAME
14832extern char *tzname[];
14833#endif
14834
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014835int main()
14836{
Brett Cannon18367812003-09-19 00:59:16 +000014837 /* Note that we need to ensure that not only does tzset(3)
14838 do 'something' with localtime, but it works as documented
14839 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014840 This includes making sure that tzname is set properly if
14841 tm->tm_zone does not exist since it is the alternative way
14842 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014843
14844 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014845 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014846 */
14847
Martin v. Löwis1d459062005-03-14 21:23:33 +000014848 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014849 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14850
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014851 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014852 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014853 if (localtime(&groundhogday)->tm_hour != 0)
14854 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014855#if HAVE_TZNAME
14856 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14857 if (strcmp(tzname[0], "UTC") ||
14858 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14859 exit(1);
14860#endif
Brett Cannon18367812003-09-19 00:59:16 +000014861
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014862 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014863 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014864 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014865 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014866#if HAVE_TZNAME
14867 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14868 exit(1);
14869#endif
Brett Cannon18367812003-09-19 00:59:16 +000014870
14871 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14872 tzset();
14873 if (localtime(&groundhogday)->tm_hour != 11)
14874 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014875#if HAVE_TZNAME
14876 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14877 exit(1);
14878#endif
14879
14880#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014881 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14882 exit(1);
14883 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14884 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014885#endif
Brett Cannon18367812003-09-19 00:59:16 +000014886
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014887 exit(0);
14888}
14889
14890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014891if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014892 ac_cv_working_tzset=yes
14893else
Matthias Kloseb9621712010-04-24 17:59:49 +000014894 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014895fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14897 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014898fi
14899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014900fi
14901
Matthias Kloseb9621712010-04-24 17:59:49 +000014902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14903$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014904if test "$ac_cv_working_tzset" = yes
14905then
14906
Matthias Kloseb9621712010-04-24 17:59:49 +000014907$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014908
14909fi
14910
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014911# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14913$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014914if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014915 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014916else
Matthias Kloseb9621712010-04-24 17:59:49 +000014917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014918/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014919#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014920int
14921main ()
14922{
14923
14924struct stat st;
14925st.st_mtim.tv_nsec = 1;
14926
14927 ;
14928 return 0;
14929}
14930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014931if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014932 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014933else
Matthias Kloseb9621712010-04-24 17:59:49 +000014934 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14937fi
14938
Matthias Kloseb9621712010-04-24 17:59:49 +000014939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14940$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014941if test "$ac_cv_stat_tv_nsec" = yes
14942then
14943
Matthias Kloseb9621712010-04-24 17:59:49 +000014944$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014945
14946fi
14947
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014948# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14950$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014951if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014952 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014953else
Matthias Kloseb9621712010-04-24 17:59:49 +000014954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014955/* end confdefs.h. */
14956#include <sys/stat.h>
14957int
14958main ()
14959{
14960
14961struct stat st;
14962st.st_mtimespec.tv_nsec = 1;
14963
14964 ;
14965 return 0;
14966}
14967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014968if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014969 ac_cv_stat_tv_nsec2=yes
14970else
Matthias Kloseb9621712010-04-24 17:59:49 +000014971 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14974fi
14975
Matthias Kloseb9621712010-04-24 17:59:49 +000014976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14977$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014978if test "$ac_cv_stat_tv_nsec2" = yes
14979then
14980
Matthias Kloseb9621712010-04-24 17:59:49 +000014981$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014982
14983fi
14984
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014985# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014986ac_save_cppflags="$CPPFLAGS"
14987CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014988
14989for ac_header in curses.h ncurses.h
14990do :
14991 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14992ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14993if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14994 cat >>confdefs.h <<_ACEOF
14995#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14996_ACEOF
14997
14998fi
14999
15000done
15001
15002
15003# On Solaris, term.h requires curses.h
15004for ac_header in term.h
15005do :
15006 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15007#ifdef HAVE_CURSES_H
15008#include <curses.h>
15009#endif
15010
15011"
15012if test "x$ac_cv_header_term_h" = xyes; then :
15013 cat >>confdefs.h <<_ACEOF
15014#define HAVE_TERM_H 1
15015_ACEOF
15016
15017fi
15018
15019done
15020
15021
Jack Jansen666b1e72001-10-31 12:11:48 +000015022# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15024$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015025if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015026 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015027else
Matthias Kloseb9621712010-04-24 17:59:49 +000015028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015029/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015030#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015031int
15032main ()
15033{
Jack Jansen666b1e72001-10-31 12:11:48 +000015034
15035 int rtn;
15036 rtn = mvwdelch(0,0,0);
15037
Martin v. Löwis11437992002-04-12 09:54:03 +000015038 ;
15039 return 0;
15040}
15041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015042if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015043 ac_cv_mvwdelch_is_expression=yes
15044else
Matthias Kloseb9621712010-04-24 17:59:49 +000015045 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15048fi
15049
Matthias Kloseb9621712010-04-24 17:59:49 +000015050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15051$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015052
15053if test "$ac_cv_mvwdelch_is_expression" = yes
15054then
Martin v. Löwis11437992002-04-12 09:54:03 +000015055
Matthias Kloseb9621712010-04-24 17:59:49 +000015056$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015057
15058fi
15059
Matthias Kloseb9621712010-04-24 17:59:49 +000015060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15061$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015062if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015063 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015064else
Matthias Kloseb9621712010-04-24 17:59:49 +000015065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015066/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015067#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015068int
15069main ()
15070{
Jack Jansen666b1e72001-10-31 12:11:48 +000015071
15072 WINDOW *w;
15073 w->_flags = 0;
15074
Martin v. Löwis11437992002-04-12 09:54:03 +000015075 ;
15076 return 0;
15077}
15078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015079if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015080 ac_cv_window_has_flags=yes
15081else
Matthias Kloseb9621712010-04-24 17:59:49 +000015082 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15085fi
15086
Matthias Kloseb9621712010-04-24 17:59:49 +000015087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15088$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015089
Jack Jansen666b1e72001-10-31 12:11:48 +000015090
15091if test "$ac_cv_window_has_flags" = yes
15092then
Martin v. Löwis11437992002-04-12 09:54:03 +000015093
Matthias Kloseb9621712010-04-24 17:59:49 +000015094$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015095
15096fi
15097
Matthias Kloseb9621712010-04-24 17:59:49 +000015098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15099$as_echo_n "checking for is_term_resized... " >&6; }
15100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015101/* end confdefs.h. */
15102#include <curses.h>
15103int
15104main ()
15105{
15106void *x=is_term_resized
15107 ;
15108 return 0;
15109}
15110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015111if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015112
Matthias Kloseb9621712010-04-24 17:59:49 +000015113$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015114
Matthias Kloseb159a552010-04-25 21:00:44 +000015115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015116$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015117else
Matthias Kloseb9621712010-04-24 17:59:49 +000015118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15119$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015120
15121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15123
Matthias Kloseb9621712010-04-24 17:59:49 +000015124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15125$as_echo_n "checking for resize_term... " >&6; }
15126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015127/* end confdefs.h. */
15128#include <curses.h>
15129int
15130main ()
15131{
15132void *x=resize_term
15133 ;
15134 return 0;
15135}
15136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015137if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015138
Matthias Kloseb9621712010-04-24 17:59:49 +000015139$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015140
Matthias Kloseb159a552010-04-25 21:00:44 +000015141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015142$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015143else
Matthias Kloseb9621712010-04-24 17:59:49 +000015144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15145$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015146
15147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15149
Matthias Kloseb9621712010-04-24 17:59:49 +000015150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15151$as_echo_n "checking for resizeterm... " >&6; }
15152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015153/* end confdefs.h. */
15154#include <curses.h>
15155int
15156main ()
15157{
15158void *x=resizeterm
15159 ;
15160 return 0;
15161}
15162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015163if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015164
Matthias Kloseb9621712010-04-24 17:59:49 +000015165$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015166
Matthias Kloseb159a552010-04-25 21:00:44 +000015167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015168$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015169else
Matthias Kloseb9621712010-04-24 17:59:49 +000015170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15171$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015172
15173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015175# last curses configure check
15176CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015177
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15179$as_echo "$as_me: checking for device files" >&6;}
15180
15181if test "x$cross_compiling" = xyes; then
15182 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15184$as_echo_n "checking for /dev/ptmx... " >&6; }
15185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15186$as_echo "not set" >&6; }
15187 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15188 fi
15189 if test "${ac_cv_file__dev_ptc+set}" != set; then
15190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15191$as_echo_n "checking for /dev/ptc... " >&6; }
15192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15193$as_echo "not set" >&6; }
15194 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15195 fi
15196fi
15197
Matthias Kloseb9621712010-04-24 17:59:49 +000015198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15199$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015200if ${ac_cv_file__dev_ptmx+:} false; then :
15201 $as_echo_n "(cached) " >&6
15202else
15203 test "$cross_compiling" = yes &&
15204 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15205if test -r "/dev/ptmx"; then
15206 ac_cv_file__dev_ptmx=yes
15207else
15208 ac_cv_file__dev_ptmx=no
15209fi
15210fi
15211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15212$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15213if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015214
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015215fi
15216
15217if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015218
Matthias Kloseb9621712010-04-24 17:59:49 +000015219$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015220
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15223$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015224if ${ac_cv_file__dev_ptc+:} false; then :
15225 $as_echo_n "(cached) " >&6
15226else
15227 test "$cross_compiling" = yes &&
15228 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15229if test -r "/dev/ptc"; then
15230 ac_cv_file__dev_ptc=yes
15231else
15232 ac_cv_file__dev_ptc=no
15233fi
15234fi
15235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15236$as_echo "$ac_cv_file__dev_ptc" >&6; }
15237if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015238
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015239fi
15240
15241if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015242
Matthias Kloseb9621712010-04-24 17:59:49 +000015243$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015244
Neal Norwitz865400f2003-03-21 01:42:58 +000015245fi
15246
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015247if test "$have_long_long" = yes
15248then
Matthias Kloseb9621712010-04-24 17:59:49 +000015249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15250$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015251 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015252 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015253else
Matthias Kloseb9621712010-04-24 17:59:49 +000015254 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015255 ac_cv_have_long_long_format="cross -- assuming no"
15256 if test x$GCC = xyes; then
15257 save_CFLAGS=$CFLAGS
15258 CFLAGS="$CFLAGS -Werror -Wformat"
15259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15260/* end confdefs.h. */
15261
15262 #include <stdio.h>
15263 #include <stddef.h>
15264
15265int
15266main ()
15267{
15268
15269 char *buffer;
15270 sprintf(buffer, "%lld", (long long)123);
15271 sprintf(buffer, "%lld", (long long)-123);
15272 sprintf(buffer, "%llu", (unsigned long long)123);
15273
15274 ;
15275 return 0;
15276}
15277_ACEOF
15278if ac_fn_c_try_compile "$LINENO"; then :
15279 ac_cv_have_long_long_format=yes
15280
15281fi
15282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15283 CFLAGS=$save_CFLAGS
15284 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015285else
Matthias Kloseb9621712010-04-24 17:59:49 +000015286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015287/* end confdefs.h. */
15288
15289 #include <stdio.h>
15290 #include <stddef.h>
15291 #include <string.h>
15292
15293 #ifdef HAVE_SYS_TYPES_H
15294 #include <sys/types.h>
15295 #endif
15296
15297 int main()
15298 {
15299 char buffer[256];
15300
15301 if (sprintf(buffer, "%lld", (long long)123) < 0)
15302 return 1;
15303 if (strcmp(buffer, "123"))
15304 return 1;
15305
15306 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15307 return 1;
15308 if (strcmp(buffer, "-123"))
15309 return 1;
15310
15311 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15312 return 1;
15313 if (strcmp(buffer, "123"))
15314 return 1;
15315
15316 return 0;
15317 }
15318
15319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015320if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015321 ac_cv_have_long_long_format=yes
15322else
Matthias Kloseb9621712010-04-24 17:59:49 +000015323 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015324fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015325rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15326 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015327fi
15328
15329
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015330fi
15331
Matthias Kloseb9621712010-04-24 17:59:49 +000015332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15333$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015334fi
15335
Mark Dickinson89d7d412009-12-31 20:50:59 +000015336if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015337then
15338
Matthias Kloseb9621712010-04-24 17:59:49 +000015339$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015340
15341fi
15342
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015343if test $ac_sys_system = Darwin
15344then
15345 LIBS="$LIBS -framework CoreFoundation"
15346fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015347
Matthias Kloseb9621712010-04-24 17:59:49 +000015348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15349$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015350if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015351 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015352else
Matthias Kloseb9621712010-04-24 17:59:49 +000015353 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015354 ac_cv_have_size_t_format="cross -- assuming yes"
15355
Thomas Wouters477c8d52006-05-27 19:21:47 +000015356else
Matthias Kloseb9621712010-04-24 17:59:49 +000015357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015358/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015359
Thomas Wouters477c8d52006-05-27 19:21:47 +000015360#include <stdio.h>
15361#include <stddef.h>
15362#include <string.h>
15363
Christian Heimes2c181612007-12-17 20:04:13 +000015364#ifdef HAVE_SYS_TYPES_H
15365#include <sys/types.h>
15366#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015367
15368#ifdef HAVE_SSIZE_T
15369typedef ssize_t Py_ssize_t;
15370#elif SIZEOF_VOID_P == SIZEOF_LONG
15371typedef long Py_ssize_t;
15372#else
15373typedef int Py_ssize_t;
15374#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015375
Christian Heimes2c181612007-12-17 20:04:13 +000015376int main()
15377{
15378 char buffer[256];
15379
Thomas Wouters477c8d52006-05-27 19:21:47 +000015380 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15381 return 1;
15382
Thomas Wouters89f507f2006-12-13 04:49:30 +000015383 if (strcmp(buffer, "123"))
15384 return 1;
15385
15386 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15387 return 1;
15388
15389 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015390 return 1;
15391
15392 return 0;
15393}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015394
Thomas Wouters477c8d52006-05-27 19:21:47 +000015395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015396if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015397 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015398else
Matthias Kloseb9621712010-04-24 17:59:49 +000015399 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015401rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15402 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015403fi
15404
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015405fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15407$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015408if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015409
Matthias Kloseb9621712010-04-24 17:59:49 +000015410$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015411
15412fi
15413
Matthias Kloseb9621712010-04-24 17:59:49 +000015414ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015415#ifdef HAVE_SYS_TYPES_H
15416#include <sys/types.h>
15417#endif
15418#ifdef HAVE_SYS_SOCKET_H
15419#include <sys/socket.h>
15420#endif
15421
Matthias Kloseb9621712010-04-24 17:59:49 +000015422"
Victor Stinnere0be4232011-10-25 13:06:09 +020015423if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015424
Martin v. Löwis11437992002-04-12 09:54:03 +000015425else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015426
Matthias Kloseb9621712010-04-24 17:59:49 +000015427$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015428
15429fi
15430
Michael W. Hudson54241132001-12-07 15:38:26 +000015431
Matthias Kloseb9621712010-04-24 17:59:49 +000015432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15433$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015434if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015435 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015436else
Matthias Kloseb9621712010-04-24 17:59:49 +000015437 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015438 ac_cv_broken_mbstowcs=no
15439else
Matthias Kloseb9621712010-04-24 17:59:49 +000015440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015441/* end confdefs.h. */
15442
Stefan Krah19c21392012-11-22 23:47:32 +010015443#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015444#include<stdlib.h>
15445int main() {
15446 size_t len = -1;
15447 const char *str = "text";
15448 len = mbstowcs(NULL, str, 0);
15449 return (len != 4);
15450}
15451
15452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015453if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015454 ac_cv_broken_mbstowcs=no
15455else
Matthias Kloseb9621712010-04-24 17:59:49 +000015456 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015457fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015458rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15459 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015460fi
15461
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015462fi
15463
Matthias Kloseb9621712010-04-24 17:59:49 +000015464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15465$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015466if test "$ac_cv_broken_mbstowcs" = yes
15467then
15468
Matthias Kloseb9621712010-04-24 17:59:49 +000015469$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015470
15471fi
15472
Antoine Pitroub52ec782009-01-25 16:34:23 +000015473# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15475$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015476
15477# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015478if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015479 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015480if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015481then
15482
Matthias Kloseb9621712010-04-24 17:59:49 +000015483$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015484
Matthias Kloseb9621712010-04-24 17:59:49 +000015485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15486$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015487fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015488if test "$withval" = no
15489then
15490
15491$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15492
Matthias Kloseb9621712010-04-24 17:59:49 +000015493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15494$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015495fi
15496
Antoine Pitrou042b1282010-08-13 21:15:58 +000015497else
15498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15499$as_echo "no value specified" >&6; }
15500fi
15501
Antoine Pitroub52ec782009-01-25 16:34:23 +000015502
Matthias Kloseb17289e2012-03-15 19:51:34 +010015503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15504$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15505if ${ac_cv_computed_gotos+:} false; then :
15506 $as_echo_n "(cached) " >&6
15507else
15508 if test "$cross_compiling" = yes; then :
15509 if test "${with_computed_gotos+set}" = set; then
15510 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15511 else
15512 ac_cv_computed_gotos=no
15513 fi
15514else
15515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15516/* end confdefs.h. */
15517
15518int main(int argc, char **argv)
15519{
15520 static void *targets[1] = { &&LABEL1 };
15521 goto LABEL2;
15522LABEL1:
15523 return 0;
15524LABEL2:
15525 goto *targets[0];
15526 return 1;
15527}
15528
15529_ACEOF
15530if ac_fn_c_try_run "$LINENO"; then :
15531 ac_cv_computed_gotos=yes
15532else
15533 ac_cv_computed_gotos=no
15534fi
15535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15536 conftest.$ac_objext conftest.beam conftest.$ac_ext
15537fi
15538
15539fi
15540
15541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15542$as_echo "$ac_cv_computed_gotos" >&6; }
15543case "$ac_cv_computed_gotos" in yes*)
15544
15545$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15546
15547esac
15548
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015549case $ac_sys_system in
15550AIX*)
15551
15552$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15553 ;;
15554esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015555
Michael W. Hudson54241132001-12-07 15:38:26 +000015556
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015557
15558
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015559for h in `(cd $srcdir;echo Python/thread_*.h)`
15560do
15561 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15562done
15563
Michael W. Hudson54241132001-12-07 15:38:26 +000015564
Ned Deily0db50cf2014-07-25 12:41:31 -070015565SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15567$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015568for dir in $SRCDIRS; do
15569 if test ! -d $dir; then
15570 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015571 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015572done
Matthias Kloseb9621712010-04-24 17:59:49 +000015573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15574$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015575
Stefan Krah1919b7e2012-03-21 18:25:23 +010015576# Availability of -O2:
15577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15578$as_echo_n "checking for -O2... " >&6; }
15579saved_cflags="$CFLAGS"
15580CFLAGS="-O2"
15581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15582/* end confdefs.h. */
15583
15584int
15585main ()
15586{
15587
15588
15589 ;
15590 return 0;
15591}
15592_ACEOF
15593if ac_fn_c_try_compile "$LINENO"; then :
15594 have_O2=yes
15595else
15596 have_O2=no
15597fi
15598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15600$as_echo "$have_O2" >&6; }
15601CFLAGS="$saved_cflags"
15602
15603# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15604# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15606$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15607saved_cflags="$CFLAGS"
15608CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15609if test "$have_O2" = no; then
15610 CFLAGS=""
15611fi
15612if test "$cross_compiling" = yes; then :
15613 have_glibc_memmove_bug=undefined
15614else
15615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15616/* end confdefs.h. */
15617
15618#include <stdio.h>
15619#include <stdlib.h>
15620#include <string.h>
15621void foo(void *p, void *q) { memmove(p, q, 19); }
15622int main() {
15623 char a[32] = "123456789000000000";
15624 foo(&a[9], a);
15625 if (strcmp(a, "123456789123456789000000000") != 0)
15626 return 1;
15627 foo(a, &a[9]);
15628 if (strcmp(a, "123456789000000000") != 0)
15629 return 1;
15630 return 0;
15631}
15632
15633_ACEOF
15634if ac_fn_c_try_run "$LINENO"; then :
15635 have_glibc_memmove_bug=no
15636else
15637 have_glibc_memmove_bug=yes
15638fi
15639rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15640 conftest.$ac_objext conftest.beam conftest.$ac_ext
15641fi
15642
15643CFLAGS="$saved_cflags"
15644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15645$as_echo "$have_glibc_memmove_bug" >&6; }
15646if test "$have_glibc_memmove_bug" = yes; then
15647
15648$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15649
15650fi
15651
15652if test "$have_gcc_asm_for_x87" = yes; then
15653 # Some versions of gcc miscompile inline asm:
15654 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15655 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15656 case $CC in
15657 *gcc*)
15658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15659$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15660 saved_cflags="$CFLAGS"
15661 CFLAGS="-O2"
15662 if test "$cross_compiling" = yes; then :
15663 have_ipa_pure_const_bug=undefined
15664else
15665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15666/* end confdefs.h. */
15667
15668 __attribute__((noinline)) int
15669 foo(int *p) {
15670 int r;
15671 asm ( "movl \$6, (%1)\n\t"
15672 "xorl %0, %0\n\t"
15673 : "=r" (r) : "r" (p) : "memory"
15674 );
15675 return r;
15676 }
15677 int main() {
15678 int p = 8;
15679 if ((foo(&p) ? : p) != 6)
15680 return 1;
15681 return 0;
15682 }
15683
15684_ACEOF
15685if ac_fn_c_try_run "$LINENO"; then :
15686 have_ipa_pure_const_bug=no
15687else
15688 have_ipa_pure_const_bug=yes
15689fi
15690rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15691 conftest.$ac_objext conftest.beam conftest.$ac_ext
15692fi
15693
15694 CFLAGS="$saved_cflags"
15695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15696$as_echo "$have_ipa_pure_const_bug" >&6; }
15697 if test "$have_ipa_pure_const_bug" = yes; then
15698
15699$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15700
15701 fi
15702 ;;
15703 esac
15704fi
15705
Victor Stinner4f5366e2015-01-09 02:13:19 +010015706# Check for stdatomic.h
15707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
15708$as_echo_n "checking for stdatomic.h... " >&6; }
15709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15710/* end confdefs.h. */
15711
15712
15713 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010015714 atomic_int value = ATOMIC_VAR_INIT(1);
15715 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010015716 int main() {
15717 int loaded_value = atomic_load(&value);
15718 return 0;
15719 }
15720
15721
15722_ACEOF
15723if ac_fn_c_try_link "$LINENO"; then :
15724 have_stdatomic_h=yes
15725else
15726 have_stdatomic_h=no
15727fi
15728rm -f core conftest.err conftest.$ac_objext \
15729 conftest$ac_exeext conftest.$ac_ext
15730
15731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
15732$as_echo "$have_stdatomic_h" >&6; }
15733
15734if test "$have_stdatomic_h" = yes; then
15735
15736$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
15737
15738fi
15739
15740# Check for GCC >= 4.7 __atomic builtins
15741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
15742$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
15743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15744/* end confdefs.h. */
15745
15746
15747 volatile int val = 1;
15748 int main() {
15749 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
15750 return 0;
15751 }
15752
15753
15754_ACEOF
15755if ac_fn_c_try_link "$LINENO"; then :
15756 have_builtin_atomic=yes
15757else
15758 have_builtin_atomic=no
15759fi
15760rm -f core conftest.err conftest.$ac_objext \
15761 conftest$ac_exeext conftest.$ac_ext
15762
15763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
15764$as_echo "$have_builtin_atomic" >&6; }
15765
15766if test "$have_builtin_atomic" = yes; then
15767
15768$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
15769
15770fi
15771
Ned Deily322f5ba2013-11-21 23:01:59 -080015772# ensurepip option
15773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15774$as_echo_n "checking for ensurepip... " >&6; }
15775
15776# Check whether --with-ensurepip was given.
15777if test "${with_ensurepip+set}" = set; then :
15778 withval=$with_ensurepip;
15779else
15780 with_ensurepip=upgrade
15781fi
15782
15783case $with_ensurepip in #(
15784 yes|upgrade) :
15785 ENSUREPIP=upgrade ;; #(
15786 install) :
15787 ENSUREPIP=install ;; #(
15788 no) :
15789 ENSUREPIP=no ;; #(
15790 *) :
15791 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15792esac
15793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15794$as_echo "$ENSUREPIP" >&6; }
15795
15796
Guido van Rossum627b2d71993-12-24 10:39:16 +000015797# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015798ac_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 +000015799
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015800ac_config_files="$ac_config_files Modules/ld_so_aix"
15801
Martin v. Löwis11437992002-04-12 09:54:03 +000015802cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015803# This file is a shell script that caches the results of configure
15804# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015805# scripts and configure runs, see configure's option --config-cache.
15806# It is not useful on other systems. If it contains results you don't
15807# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015808#
Martin v. Löwis11437992002-04-12 09:54:03 +000015809# config.status only pays attention to the cache file if you give it
15810# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015811#
Skip Montanaro6dead952003-09-25 14:50:04 +000015812# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015813# loading this file, other *unset* `ac_cv_foo' will be assigned the
15814# following values.
15815
15816_ACEOF
15817
Guido van Rossumf78abae1997-01-21 22:02:36 +000015818# The following way of writing the cache mishandles newlines in values,
15819# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015820# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015821# Ultrix sh set writes to stderr and can't be redirected directly,
15822# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015823(
15824 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15825 eval ac_val=\$$ac_var
15826 case $ac_val in #(
15827 *${as_nl}*)
15828 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015829 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15830$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015831 esac
15832 case $ac_var in #(
15833 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015834 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15835 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015836 esac ;;
15837 esac
15838 done
15839
Martin v. Löwis11437992002-04-12 09:54:03 +000015840 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015841 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15842 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015843 # `set' does not quote correctly, so add quotes: double-quote
15844 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015845 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015846 "s/'/'\\\\''/g;
15847 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015848 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015849 *)
15850 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015851 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015852 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015853 esac |
15854 sort
15855) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015856 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015857 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015858 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015859 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015860 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15861 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015862 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15863 :end' >>confcache
15864if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15865 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015866 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015867 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15868$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015869 if test ! -f "$cache_file" || test -h "$cache_file"; then
15870 cat confcache >"$cache_file"
15871 else
15872 case $cache_file in #(
15873 */* | ?:*)
15874 mv -f confcache "$cache_file"$$ &&
15875 mv -f "$cache_file"$$ "$cache_file" ;; #(
15876 *)
15877 mv -f confcache "$cache_file" ;;
15878 esac
15879 fi
15880 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015881 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015882 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15883$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015884 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015885fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015886rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015887
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015888test "x$prefix" = xNONE && prefix=$ac_default_prefix
15889# Let make expand exec_prefix.
15890test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015891
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015892DEFS=-DHAVE_CONFIG_H
15893
Skip Montanaro6dead952003-09-25 14:50:04 +000015894ac_libobjs=
15895ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015896U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015897for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15898 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015899 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015900 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015901 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15902 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015903 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15904 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015905done
15906LIBOBJS=$ac_libobjs
15907
15908LTLIBOBJS=$ac_ltlibobjs
15909
15910
Martin v. Löwis11437992002-04-12 09:54:03 +000015911
Matthias Kloseb9621712010-04-24 17:59:49 +000015912
Victor Stinnere0be4232011-10-25 13:06:09 +020015913: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015914ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015915ac_clean_files_save=$ac_clean_files
15916ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015917{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15918$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15919as_write_fail=0
15920cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015921#! $SHELL
15922# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015923# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015924# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015925# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015926
Martin v. Löwis11437992002-04-12 09:54:03 +000015927debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015928ac_cs_recheck=false
15929ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015930
Matthias Kloseb9621712010-04-24 17:59:49 +000015931SHELL=\${CONFIG_SHELL-$SHELL}
15932export SHELL
15933_ASEOF
15934cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15935## -------------------- ##
15936## M4sh Initialization. ##
15937## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015938
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015939# Be more Bourne compatible
15940DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015941if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015942 emulate sh
15943 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015944 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015945 # is contrary to our usage. Disable this feature.
15946 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015947 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015948else
Matthias Kloseb9621712010-04-24 17:59:49 +000015949 case `(set -o) 2>/dev/null` in #(
15950 *posix*) :
15951 set -o posix ;; #(
15952 *) :
15953 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015954esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015955fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015956
15957
Matthias Kloseb9621712010-04-24 17:59:49 +000015958as_nl='
15959'
15960export as_nl
15961# Printing a long string crashes Solaris 7 /usr/bin/printf.
15962as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15963as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15964as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15965# Prefer a ksh shell builtin over an external printf program on Solaris,
15966# but without wasting forks for bash or zsh.
15967if test -z "$BASH_VERSION$ZSH_VERSION" \
15968 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15969 as_echo='print -r --'
15970 as_echo_n='print -rn --'
15971elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15972 as_echo='printf %s\n'
15973 as_echo_n='printf %s'
15974else
15975 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15976 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15977 as_echo_n='/usr/ucb/echo -n'
15978 else
15979 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15980 as_echo_n_body='eval
15981 arg=$1;
15982 case $arg in #(
15983 *"$as_nl"*)
15984 expr "X$arg" : "X\\(.*\\)$as_nl";
15985 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15986 esac;
15987 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15988 '
15989 export as_echo_n_body
15990 as_echo_n='sh -c $as_echo_n_body as_echo'
15991 fi
15992 export as_echo_body
15993 as_echo='sh -c $as_echo_body as_echo'
15994fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015995
15996# The user is always right.
15997if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015998 PATH_SEPARATOR=:
15999 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16000 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16001 PATH_SEPARATOR=';'
16002 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016003fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016005
16006# IFS
16007# We need space, tab and new line, in precisely that order. Quoting is
16008# there to prevent editors from complaining about space-tab.
16009# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16010# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016011IFS=" "" $as_nl"
16012
16013# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016014as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016015case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016016 *[\\/]* ) as_myself=$0 ;;
16017 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016018for as_dir in $PATH
16019do
16020 IFS=$as_save_IFS
16021 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016022 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16023 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016024IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016026 ;;
16027esac
16028# We did not find ourselves, most probably we were run as `sh COMMAND'
16029# in which case we are not to be found in the path.
16030if test "x$as_myself" = x; then
16031 as_myself=$0
16032fi
16033if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016034 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16035 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016036fi
16037
Matthias Kloseb9621712010-04-24 17:59:49 +000016038# Unset variables that we do not need and which cause bugs (e.g. in
16039# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16040# suppresses any "Segmentation fault" message there. '((' could
16041# trigger a bug in pdksh 5.2.14.
16042for as_var in BASH_ENV ENV MAIL MAILPATH
16043do eval test x\${$as_var+set} = xset \
16044 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016045done
16046PS1='$ '
16047PS2='> '
16048PS4='+ '
16049
16050# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016051LC_ALL=C
16052export LC_ALL
16053LANGUAGE=C
16054export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016055
Matthias Kloseb9621712010-04-24 17:59:49 +000016056# CDPATH.
16057(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16058
16059
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016060# as_fn_error STATUS ERROR [LINENO LOG_FD]
16061# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016062# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16063# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016064# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016065as_fn_error ()
16066{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016067 as_status=$1; test $as_status -eq 0 && as_status=1
16068 if test "$4"; then
16069 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16070 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016071 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016072 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016073 as_fn_exit $as_status
16074} # as_fn_error
16075
16076
16077# as_fn_set_status STATUS
16078# -----------------------
16079# Set $? to STATUS, without forking.
16080as_fn_set_status ()
16081{
16082 return $1
16083} # as_fn_set_status
16084
16085# as_fn_exit STATUS
16086# -----------------
16087# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16088as_fn_exit ()
16089{
16090 set +e
16091 as_fn_set_status $1
16092 exit $1
16093} # as_fn_exit
16094
16095# as_fn_unset VAR
16096# ---------------
16097# Portably unset VAR.
16098as_fn_unset ()
16099{
16100 { eval $1=; unset $1;}
16101}
16102as_unset=as_fn_unset
16103# as_fn_append VAR VALUE
16104# ----------------------
16105# Append the text in VALUE to the end of the definition contained in VAR. Take
16106# advantage of any shell optimizations that allow amortized linear growth over
16107# repeated appends, instead of the typical quadratic growth present in naive
16108# implementations.
16109if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16110 eval 'as_fn_append ()
16111 {
16112 eval $1+=\$2
16113 }'
16114else
16115 as_fn_append ()
16116 {
16117 eval $1=\$$1\$2
16118 }
16119fi # as_fn_append
16120
16121# as_fn_arith ARG...
16122# ------------------
16123# Perform arithmetic evaluation on the ARGs, and store the result in the
16124# global $as_val. Take advantage of shells that can avoid forks. The arguments
16125# must be portable across $(()) and expr.
16126if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16127 eval 'as_fn_arith ()
16128 {
16129 as_val=$(( $* ))
16130 }'
16131else
16132 as_fn_arith ()
16133 {
16134 as_val=`expr "$@" || test $? -eq 1`
16135 }
16136fi # as_fn_arith
16137
16138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016139if expr a : '\(a\)' >/dev/null 2>&1 &&
16140 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16141 as_expr=expr
16142else
16143 as_expr=false
16144fi
16145
16146if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16147 as_basename=basename
16148else
16149 as_basename=false
16150fi
16151
Matthias Kloseb9621712010-04-24 17:59:49 +000016152if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16153 as_dirname=dirname
16154else
16155 as_dirname=false
16156fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016158as_me=`$as_basename -- "$0" ||
16159$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16160 X"$0" : 'X\(//\)$' \| \
16161 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016162$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016163 sed '/^.*\/\([^/][^/]*\)\/*$/{
16164 s//\1/
16165 q
16166 }
16167 /^X\/\(\/\/\)$/{
16168 s//\1/
16169 q
16170 }
16171 /^X\/\(\/\).*/{
16172 s//\1/
16173 q
16174 }
16175 s/.*/./; q'`
16176
Matthias Kloseb9621712010-04-24 17:59:49 +000016177# Avoid depending upon Character Ranges.
16178as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16179as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16180as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16181as_cr_digits='0123456789'
16182as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016183
16184ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016185case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016186-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016187 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016188 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016189 xy) ECHO_C='\c';;
16190 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16191 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016192 esac;;
16193*)
16194 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016195esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016196
Martin v. Löwis11437992002-04-12 09:54:03 +000016197rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016198if test -d conf$$.dir; then
16199 rm -f conf$$.dir/conf$$.file
16200else
16201 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016202 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016204if (echo >conf$$.file) 2>/dev/null; then
16205 if ln -s conf$$.file conf$$ 2>/dev/null; then
16206 as_ln_s='ln -s'
16207 # ... but there are two gotchas:
16208 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16209 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016210 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016211 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016212 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016213 elif ln conf$$.file conf$$ 2>/dev/null; then
16214 as_ln_s=ln
16215 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016216 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016217 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016218else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016219 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016221rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16222rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016223
Matthias Kloseb9621712010-04-24 17:59:49 +000016224
16225# as_fn_mkdir_p
16226# -------------
16227# Create "$as_dir" as a directory, including parents if necessary.
16228as_fn_mkdir_p ()
16229{
16230
16231 case $as_dir in #(
16232 -*) as_dir=./$as_dir;;
16233 esac
16234 test -d "$as_dir" || eval $as_mkdir_p || {
16235 as_dirs=
16236 while :; do
16237 case $as_dir in #(
16238 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16239 *) as_qdir=$as_dir;;
16240 esac
16241 as_dirs="'$as_qdir' $as_dirs"
16242 as_dir=`$as_dirname -- "$as_dir" ||
16243$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16244 X"$as_dir" : 'X\(//\)[^/]' \| \
16245 X"$as_dir" : 'X\(//\)$' \| \
16246 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16247$as_echo X"$as_dir" |
16248 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16249 s//\1/
16250 q
16251 }
16252 /^X\(\/\/\)[^/].*/{
16253 s//\1/
16254 q
16255 }
16256 /^X\(\/\/\)$/{
16257 s//\1/
16258 q
16259 }
16260 /^X\(\/\).*/{
16261 s//\1/
16262 q
16263 }
16264 s/.*/./; q'`
16265 test -d "$as_dir" && break
16266 done
16267 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016268 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016269
16270
16271} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016272if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016273 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016274else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016275 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016276 as_mkdir_p=false
16277fi
16278
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016279
16280# as_fn_executable_p FILE
16281# -----------------------
16282# Test if FILE is an executable regular file.
16283as_fn_executable_p ()
16284{
16285 test -f "$1" && test -x "$1"
16286} # as_fn_executable_p
16287as_test_x='test -x'
16288as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016289
16290# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016291as_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 +000016292
16293# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016294as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016295
16296
Martin v. Löwis11437992002-04-12 09:54:03 +000016297exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016298## ----------------------------------- ##
16299## Main body of $CONFIG_STATUS script. ##
16300## ----------------------------------- ##
16301_ASEOF
16302test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016303
Matthias Kloseb9621712010-04-24 17:59:49 +000016304cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16305# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016306# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016307# values after options handling.
16308ac_log="
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016309This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016310generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016311
16312 CONFIG_FILES = $CONFIG_FILES
16313 CONFIG_HEADERS = $CONFIG_HEADERS
16314 CONFIG_LINKS = $CONFIG_LINKS
16315 CONFIG_COMMANDS = $CONFIG_COMMANDS
16316 $ $0 $@
16317
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016318on `(hostname || uname -n) 2>/dev/null | sed 1q`
16319"
16320
Martin v. Löwis11437992002-04-12 09:54:03 +000016321_ACEOF
16322
Matthias Kloseb9621712010-04-24 17:59:49 +000016323case $ac_config_files in *"
16324"*) set x $ac_config_files; shift; ac_config_files=$*;;
16325esac
16326
16327case $ac_config_headers in *"
16328"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16329esac
16330
16331
16332cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016333# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016334config_files="$ac_config_files"
16335config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016337_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016338
Matthias Kloseb9621712010-04-24 17:59:49 +000016339cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016340ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016341\`$as_me' instantiates files and other configuration actions
16342from templates according to the current configuration. Unless the files
16343and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016344
Matthias Kloseb9621712010-04-24 17:59:49 +000016345Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016346
16347 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016348 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016349 --config print configuration, then exit
16350 -q, --quiet, --silent
16351 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016352 -d, --debug don't remove temporary files
16353 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016354 --file=FILE[:TEMPLATE]
16355 instantiate the configuration file FILE
16356 --header=FILE[:TEMPLATE]
16357 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016358
16359Configuration files:
16360$config_files
16361
16362Configuration headers:
16363$config_headers
16364
Matthias Kloseb9621712010-04-24 17:59:49 +000016365Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016368cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16369ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016370ac_cs_version="\\
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016371python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016372configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016373 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016374
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016375Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016376This config.status script is free software; the Free Software Foundation
16377gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016378
16379ac_pwd='$ac_pwd'
16380srcdir='$srcdir'
16381INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016382MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016383test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016384_ACEOF
16385
Matthias Kloseb9621712010-04-24 17:59:49 +000016386cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16387# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016388ac_need_defaults=:
16389while test $# != 0
16390do
16391 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016392 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016393 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16394 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016395 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016396 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016397 --*=)
16398 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16399 ac_optarg=
16400 ac_shift=:
16401 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016402 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016403 ac_option=$1
16404 ac_optarg=$2
16405 ac_shift=shift
16406 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016407 esac
16408
Skip Montanaro6dead952003-09-25 14:50:04 +000016409 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016410 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016411 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16412 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016413 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016414 $as_echo "$ac_cs_version"; exit ;;
16415 --config | --confi | --conf | --con | --co | --c )
16416 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016417 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016418 debug=: ;;
16419 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016420 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016421 case $ac_optarg in
16422 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016423 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016424 esac
16425 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016426 ac_need_defaults=false;;
16427 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016428 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016429 case $ac_optarg in
16430 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16431 esac
16432 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016433 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016434 --he | --h)
16435 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016436 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016437Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016438 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016439 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016440 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16441 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16442 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016443
16444 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016445 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016446Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016447
Matthias Kloseb9621712010-04-24 17:59:49 +000016448 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016449 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016450
16451 esac
16452 shift
16453done
16454
Skip Montanaro6dead952003-09-25 14:50:04 +000016455ac_configure_extra_args=
16456
16457if $ac_cs_silent; then
16458 exec 6>/dev/null
16459 ac_configure_extra_args="$ac_configure_extra_args --silent"
16460fi
16461
16462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016463cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016464if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016465 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016466 shift
16467 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16468 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016469 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016470 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016471fi
16472
Martin v. Löwis11437992002-04-12 09:54:03 +000016473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016474cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016475exec 5>>config.log
16476{
16477 echo
16478 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16479## Running $as_me. ##
16480_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016481 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016482} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016485cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016486_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016487
Matthias Kloseb9621712010-04-24 17:59:49 +000016488cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016489
16490# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016491for ac_config_target in $ac_config_targets
16492do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016493 case $ac_config_target in
16494 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16495 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16496 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016497 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16498 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016499 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16500 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016501 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016502 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016503 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016504
Victor Stinnere0be4232011-10-25 13:06:09 +020016505 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016506 esac
16507done
16508
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016509
Martin v. Löwis11437992002-04-12 09:54:03 +000016510# If the user did not use the arguments to specify the items to instantiate,
16511# then the envvar interface is used. Set only those that are not.
16512# We use the long form for the default assignment because of an extremely
16513# bizarre bug on SunOS 4.1.3.
16514if $ac_need_defaults; then
16515 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16516 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16517fi
16518
Skip Montanaro6dead952003-09-25 14:50:04 +000016519# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016520# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016521# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522# Hook for its removal unless debugging.
16523# Note that there is a small window in which the directory will not be cleaned:
16524# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016525$debug ||
16526{
Victor Stinnere0be4232011-10-25 13:06:09 +020016527 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016528 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016529 : "${ac_tmp:=$tmp}"
16530 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016531' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016532 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016533}
Martin v. Löwis11437992002-04-12 09:54:03 +000016534# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016535
Martin v. Löwis11437992002-04-12 09:54:03 +000016536{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016537 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016538 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016539} ||
16540{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016541 tmp=./conf$$-$RANDOM
16542 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016543} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016544ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016545
Matthias Kloseb9621712010-04-24 17:59:49 +000016546# Set up the scripts for CONFIG_FILES section.
16547# No need to generate them if there are no CONFIG_FILES.
16548# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016549if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016550
Matthias Kloseb9621712010-04-24 17:59:49 +000016551
16552ac_cr=`echo X | tr X '\015'`
16553# On cygwin, bash can eat \r inside `` if the user requested igncr.
16554# But we know of no other shell where ac_cr would be empty at this
16555# point, so we can use a bashism as a fallback.
16556if test "x$ac_cr" = x; then
16557 eval ac_cr=\$\'\\r\'
16558fi
16559ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16560if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016561 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016562else
16563 ac_cs_awk_cr=$ac_cr
16564fi
16565
Victor Stinnere0be4232011-10-25 13:06:09 +020016566echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016567_ACEOF
16568
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016569
Matthias Kloseb9621712010-04-24 17:59:49 +000016570{
16571 echo "cat >conf$$subs.awk <<_ACEOF" &&
16572 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16573 echo "_ACEOF"
16574} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016575 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16576ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016577ac_delim='%!_!# '
16578for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016579 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016580 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016581
Matthias Kloseb9621712010-04-24 17:59:49 +000016582 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16583 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016584 break
16585 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016586 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016587 else
16588 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016589 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016590done
Matthias Kloseb9621712010-04-24 17:59:49 +000016591rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016592
Matthias Kloseb9621712010-04-24 17:59:49 +000016593cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016594cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016596sed -n '
16597h
16598s/^/S["/; s/!.*/"]=/
16599p
16600g
16601s/^[^!]*!//
16602:repl
16603t repl
16604s/'"$ac_delim"'$//
16605t delim
16606:nl
16607h
16608s/\(.\{148\}\)..*/\1/
16609t more1
16610s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16611p
16612n
16613b repl
16614:more1
16615s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16616p
16617g
16618s/.\{148\}//
16619t nl
16620:delim
16621h
16622s/\(.\{148\}\)..*/\1/
16623t more2
16624s/["\\]/\\&/g; s/^/"/; s/$/"/
16625p
16626b
16627:more2
16628s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16629p
16630g
16631s/.\{148\}//
16632t delim
16633' <conf$$subs.awk | sed '
16634/^[^""]/{
16635 N
16636 s/\n//
16637}
16638' >>$CONFIG_STATUS || ac_write_fail=1
16639rm -f conf$$subs.awk
16640cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16641_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016642cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016643 for (key in S) S_is_set[key] = 1
16644 FS = ""
16645
16646}
16647{
16648 line = $ 0
16649 nfields = split(line, field, "@")
16650 substed = 0
16651 len = length(field[1])
16652 for (i = 2; i < nfields; i++) {
16653 key = field[i]
16654 keylen = length(key)
16655 if (S_is_set[key]) {
16656 value = S[key]
16657 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16658 len += length(value) + length(field[++i])
16659 substed = 1
16660 } else
16661 len += 1 + keylen
16662 }
16663
16664 print line
16665}
16666
16667_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016669cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16670if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16671 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16672else
16673 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016674fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016675 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016676_ACEOF
16677
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016678# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16679# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016680# trailing colons and then remove the whole line if VPATH becomes empty
16681# (actually we leave an empty line to preserve line numbers).
16682if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016683 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16684h
16685s///
16686s/^/:/
16687s/[ ]*$/:/
16688s/:\$(srcdir):/:/g
16689s/:\${srcdir}:/:/g
16690s/:@srcdir@:/:/g
16691s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016692s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016693x
16694s/\(=[ ]*\).*/\1/
16695G
16696s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016697s/^[^=]*=[ ]*$//
16698}'
16699fi
16700
Matthias Kloseb9621712010-04-24 17:59:49 +000016701cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016702fi # test -n "$CONFIG_FILES"
16703
Matthias Kloseb9621712010-04-24 17:59:49 +000016704# Set up the scripts for CONFIG_HEADERS section.
16705# No need to generate them if there are no CONFIG_HEADERS.
16706# This happens for instance with `./config.status Makefile'.
16707if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016708cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016709BEGIN {
16710_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016711
Matthias Kloseb9621712010-04-24 17:59:49 +000016712# Transform confdefs.h into an awk script `defines.awk', embedded as
16713# here-document in config.status, that substitutes the proper values into
16714# config.h.in to produce config.h.
16715
16716# Create a delimiter string that does not exist in confdefs.h, to ease
16717# handling of long lines.
16718ac_delim='%!_!# '
16719for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016720 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16721 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016722 break
16723 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016724 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016725 else
16726 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16727 fi
16728done
16729
16730# For the awk script, D is an array of macro values keyed by name,
16731# likewise P contains macro parameters if any. Preserve backslash
16732# newline sequences.
16733
16734ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16735sed -n '
16736s/.\{148\}/&'"$ac_delim"'/g
16737t rset
16738:rset
16739s/^[ ]*#[ ]*define[ ][ ]*/ /
16740t def
16741d
16742:def
16743s/\\$//
16744t bsnl
16745s/["\\]/\\&/g
16746s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16747D["\1"]=" \3"/p
16748s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16749d
16750:bsnl
16751s/["\\]/\\&/g
16752s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16753D["\1"]=" \3\\\\\\n"\\/p
16754t cont
16755s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16756t cont
16757d
16758:cont
16759n
16760s/.\{148\}/&'"$ac_delim"'/g
16761t clear
16762:clear
16763s/\\$//
16764t bsnlc
16765s/["\\]/\\&/g; s/^/"/; s/$/"/p
16766d
16767:bsnlc
16768s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16769b cont
16770' <confdefs.h | sed '
16771s/'"$ac_delim"'/"\\\
16772"/g' >>$CONFIG_STATUS || ac_write_fail=1
16773
16774cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16775 for (key in D) D_is_set[key] = 1
16776 FS = ""
16777}
16778/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16779 line = \$ 0
16780 split(line, arg, " ")
16781 if (arg[1] == "#") {
16782 defundef = arg[2]
16783 mac1 = arg[3]
16784 } else {
16785 defundef = substr(arg[1], 2)
16786 mac1 = arg[2]
16787 }
16788 split(mac1, mac2, "(") #)
16789 macro = mac2[1]
16790 prefix = substr(line, 1, index(line, defundef) - 1)
16791 if (D_is_set[macro]) {
16792 # Preserve the white space surrounding the "#".
16793 print prefix "define", macro P[macro] D[macro]
16794 next
16795 } else {
16796 # Replace #undef with comments. This is necessary, for example,
16797 # in the case of _POSIX_SOURCE, which is predefined and required
16798 # on some systems where configure will not decide to define it.
16799 if (defundef == "undef") {
16800 print "/*", prefix defundef, macro, "*/"
16801 next
16802 }
16803 }
16804}
16805{ print }
16806_ACAWK
16807_ACEOF
16808cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016809 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016810fi # test -n "$CONFIG_HEADERS"
16811
16812
16813eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16814shift
16815for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016816do
16817 case $ac_tag in
16818 :[FHLC]) ac_mode=$ac_tag; continue;;
16819 esac
16820 case $ac_mode$ac_tag in
16821 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016822 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016823 :[FH]-) ac_tag=-:-;;
16824 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16825 esac
16826 ac_save_IFS=$IFS
16827 IFS=:
16828 set x $ac_tag
16829 IFS=$ac_save_IFS
16830 shift
16831 ac_file=$1
16832 shift
16833
16834 case $ac_mode in
16835 :L) ac_source=$1;;
16836 :[FH])
16837 ac_file_inputs=
16838 for ac_f
16839 do
16840 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016841 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016842 *) # Look for the file first in the build tree, then in the source tree
16843 # (if the path is not absolute). The absolute path cannot be DOS-style,
16844 # because $ac_f cannot contain `:'.
16845 test -f "$ac_f" ||
16846 case $ac_f in
16847 [\\/$]*) false;;
16848 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16849 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016850 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016851 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016852 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16853 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016854 done
16855
16856 # Let's still pretend it is `configure' which instantiates (i.e., don't
16857 # use $as_me), people would be surprised to read:
16858 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016859 configure_input='Generated from '`
16860 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16861 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016862 if test x"$ac_file" != x-; then
16863 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016864 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16865$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016866 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016867 # Neutralize special characters interpreted by sed in replacement strings.
16868 case $configure_input in #(
16869 *\&* | *\|* | *\\* )
16870 ac_sed_conf_input=`$as_echo "$configure_input" |
16871 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16872 *) ac_sed_conf_input=$configure_input;;
16873 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016874
16875 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016876 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16877 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016878 esac
16879 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016880 esac
16881
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016882 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016883$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016884 X"$ac_file" : 'X\(//\)[^/]' \| \
16885 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016886 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016887$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016888 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16889 s//\1/
16890 q
16891 }
16892 /^X\(\/\/\)[^/].*/{
16893 s//\1/
16894 q
16895 }
16896 /^X\(\/\/\)$/{
16897 s//\1/
16898 q
16899 }
16900 /^X\(\/\).*/{
16901 s//\1/
16902 q
16903 }
16904 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016905 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016906 ac_builddir=.
16907
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016908case "$ac_dir" in
16909.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16910*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016911 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016912 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016913 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016914 case $ac_top_builddir_sub in
16915 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16916 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16917 esac ;;
16918esac
16919ac_abs_top_builddir=$ac_pwd
16920ac_abs_builddir=$ac_pwd$ac_dir_suffix
16921# for backward compatibility:
16922ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016923
16924case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016925 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016926 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016927 ac_top_srcdir=$ac_top_builddir_sub
16928 ac_abs_top_srcdir=$ac_pwd ;;
16929 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016930 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016931 ac_top_srcdir=$srcdir
16932 ac_abs_top_srcdir=$srcdir ;;
16933 *) # Relative name.
16934 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16935 ac_top_srcdir=$ac_top_build_prefix$srcdir
16936 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016937esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016938ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016939
Martin v. Löwis11437992002-04-12 09:54:03 +000016940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016941 case $ac_mode in
16942 :F)
16943 #
16944 # CONFIG_FILE
16945 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016946
16947 case $INSTALL in
16948 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016949 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016950 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016951 ac_MKDIR_P=$MKDIR_P
16952 case $MKDIR_P in
16953 [\\/$]* | ?:[\\/]* ) ;;
16954 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16955 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016956_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016957
Matthias Kloseb9621712010-04-24 17:59:49 +000016958cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016959# If the template does not know about datarootdir, expand it.
16960# FIXME: This hack should be removed a few years after 2.60.
16961ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016962ac_sed_dataroot='
16963/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016964 p
16965 q
16966}
16967/@datadir@/p
16968/@docdir@/p
16969/@infodir@/p
16970/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016971/@mandir@/p'
16972case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016973*datarootdir*) ac_datarootdir_seen=yes;;
16974*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016975 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16976$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016978cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016979 ac_datarootdir_hack='
16980 s&@datadir@&$datadir&g
16981 s&@docdir@&$docdir&g
16982 s&@infodir@&$infodir&g
16983 s&@localedir@&$localedir&g
16984 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016985 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016986esac
16987_ACEOF
16988
16989# Neutralize VPATH when `$srcdir' = `.'.
16990# Shell code in configure.ac might set extrasub.
16991# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016992cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16993ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016994$extrasub
16995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016996cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016997:t
16998/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016999s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017000s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017001s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017002s&@srcdir@&$ac_srcdir&;t t
17003s&@abs_srcdir@&$ac_abs_srcdir&;t t
17004s&@top_srcdir@&$ac_top_srcdir&;t t
17005s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17006s&@builddir@&$ac_builddir&;t t
17007s&@abs_builddir@&$ac_abs_builddir&;t t
17008s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17009s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017010s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017011$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017012"
Victor Stinnere0be4232011-10-25 13:06:09 +020017013eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17014 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017016test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017017 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17018 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17019 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017020 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017021which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017022$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017023which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017024
Victor Stinnere0be4232011-10-25 13:06:09 +020017025 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017026 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017027 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17028 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017029 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017030 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017031 ;;
17032 :H)
17033 #
17034 # CONFIG_HEADER
17035 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017036 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017037 {
17038 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017039 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17040 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017041 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017042 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017043 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17044$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017045 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017046 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017047 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017048 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017049 fi
17050 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017051 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017052 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017053 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017054 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017055 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017057
17058 esac
17059
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017060
17061 case $ac_file$ac_mode in
17062 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17063
17064 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017065done # for ac_tag
17066
Guido van Rossum627b2d71993-12-24 10:39:16 +000017067
Matthias Kloseb9621712010-04-24 17:59:49 +000017068as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017069_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017070ac_clean_files=$ac_clean_files_save
17071
Matthias Kloseb9621712010-04-24 17:59:49 +000017072test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017073 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017074
Martin v. Löwis11437992002-04-12 09:54:03 +000017075
17076# configure is writing to config.log, and then calls config.status.
17077# config.status does its own redirection, appending to config.log.
17078# Unfortunately, on DOS this fails, as config.log is still kept open
17079# by configure, so config.status won't be able to write to it; its
17080# output is simply discarded. So we exec the FD to /dev/null,
17081# effectively closing config.log, so it can be properly (re)opened and
17082# appended to by config.status. When coming back to configure, we
17083# need to make the FD available again.
17084if test "$no_create" != yes; then
17085 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017086 ac_config_status_args=
17087 test "$silent" = yes &&
17088 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017089 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017090 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017091 exec 5>>config.log
17092 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17093 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017094 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017095fi
17096if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17097 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17098$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017099fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017100
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017101
Christian Heimes75ed8902013-11-20 01:11:18 +010017102echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017103if test ! -f Modules/Setup
17104then
17105 cp $srcdir/Modules/Setup.dist Modules/Setup
17106fi
17107
Christian Heimes75ed8902013-11-20 01:11:18 +010017108echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017109if test ! -f Modules/Setup.local
17110then
17111 echo "# Edit this file for local setup changes" >Modules/Setup.local
17112fi
17113
Christian Heimes75ed8902013-11-20 01:11:18 +010017114echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017115$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17116 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017117 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017118mv config.c Modules