blob: 44a74778d10353c744027fdf2c3ffe0ea4edfd01 [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
653PKG_CONFIG
654SHLIBS
655CFLAGSFORSHARED
656LINKFORSHARED
657CCSHARED
658BLDSHARED
659LDCXXSHARED
660LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700661SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000662LIBTOOL_CRUFT
663OTHER_LIBTOOL_OPT
664UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700665CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000666BASECFLAGS
667OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000668ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000669LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100670MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000671INSTALL_DATA
672INSTALL_SCRIPT
673INSTALL_PROGRAM
Kushal Das02d23a22014-04-15 23:50:06 +0530674OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200675PYTHON
676ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200677ac_ct_READELF
678READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000679ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200680ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000681AR
682RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000683USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000684GNULD
685LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000686LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000687RUNSHARED
688INSTSONAME
689LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000690PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000691BLDLIBRARY
692DLLLIBRARY
693LDLIBRARY
694LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100695MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000696BUILDEXEEXT
697EGREP
698GREP
699CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200700NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200701ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000702MAINCC
703CXX
704OBJEXT
705EXEEXT
706ac_ct_CC
707CPPFLAGS
708LDFLAGS
709CFLAGS
710CC
711EXPORT_MACOSX_DEPLOYMENT_TARGET
712CONFIGURE_MACOSX_DEPLOYMENT_TARGET
713SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200714_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000715MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000716FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800718FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000719FRAMEWORKALTINSTALLLAST
720FRAMEWORKALTINSTALLFIRST
721FRAMEWORKINSTALLLAST
722FRAMEWORKINSTALLFIRST
723PYTHONFRAMEWORKINSTALLDIR
724PYTHONFRAMEWORKPREFIX
725PYTHONFRAMEWORKDIR
726PYTHONFRAMEWORKIDENTIFIER
727PYTHONFRAMEWORK
728LIPO_32BIT_FLAGS
729ARCH_RUN_32BIT
730UNIVERSALSDK
731CONFIG_ARGS
732SOVERSION
733VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200734PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100735host_os
736host_vendor
737host_cpu
738host
739build_os
740build_vendor
741build_cpu
742build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500743HAS_HG
744HGBRANCH
745HGTAG
746HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400747BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000748target_alias
749host_alias
750build_alias
751LIBS
752ECHO_T
753ECHO_N
754ECHO_C
755DEFS
756mandir
757localedir
758libdir
759psdir
760pdfdir
761dvidir
762htmldir
763infodir
764docdir
765oldincludedir
766includedir
767localstatedir
768sharedstatedir
769sysconfdir
770datadir
771datarootdir
772libexecdir
773sbindir
774bindir
775program_transform_name
776prefix
777exec_prefix
778PACKAGE_URL
779PACKAGE_BUGREPORT
780PACKAGE_STRING
781PACKAGE_VERSION
782PACKAGE_TARNAME
783PACKAGE_NAME
784PATH_SEPARATOR
785SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000786ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000787ac_user_opts='
788enable_option_checking
789enable_universalsdk
790with_universal_archs
791with_framework_name
792enable_framework
793with_gcc
794with_cxx_main
795with_suffix
796enable_shared
797enable_profiling
798with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100799with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100800with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000801with_libs
802with_system_expat
803with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100804with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000805enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700806with_tcltk_includes
807with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000808with_dbmliborder
809with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000810with_threads
811with_thread
812enable_ipv6
813with_doc_strings
814with_tsc
815with_pymalloc
816with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000817with_fpectl
818with_libm
819with_libc
820enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800822with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000823'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000824 ac_precious_vars='build_alias
825host_alias
826target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100827MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000828CC
829CFLAGS
830LDFLAGS
831LIBS
832CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200833CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834
Guido van Rossum627b2d71993-12-24 10:39:16 +0000835
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000837ac_init_help=
838ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000839ac_unrecognized_opts=
840ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841# The variables have the same names as the options, with
842# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000843cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000844exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000846no_recursion=
847prefix=NONE
848program_prefix=NONE
849program_suffix=NONE
850program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855x_includes=NONE
856x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000857
858# Installation directory options.
859# These are left unexpanded so users can "make install exec_prefix=/foo"
860# and all the variables that are supposed to be based on exec_prefix
861# by default will actually change.
862# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000863# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000864bindir='${exec_prefix}/bin'
865sbindir='${exec_prefix}/sbin'
866libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867datarootdir='${prefix}/share'
868datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000869sysconfdir='${prefix}/etc'
870sharedstatedir='${prefix}/com'
871localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000872includedir='${prefix}/include'
873oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000874docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
875infodir='${datarootdir}/info'
876htmldir='${docdir}'
877dvidir='${docdir}'
878pdfdir='${docdir}'
879psdir='${docdir}'
880libdir='${exec_prefix}/lib'
881localedir='${datarootdir}/locale'
882mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000883
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000885ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000887do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888 # If the previous option needs an argument, assign it.
889 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891 ac_prev=
892 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000893 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200896 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
897 *=) ac_optarg= ;;
898 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000899 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901 # Accept the important Cygnus configure options, so we can diagnose typos.
902
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903 case $ac_dashdash$ac_option in
904 --)
905 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000907 -bindir | --bindir | --bindi | --bind | --bin | --bi)
908 ac_prev=bindir ;;
909 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000910 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911
912 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000915 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000917 -cache-file | --cache-file | --cache-fil | --cache-fi \
918 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
919 ac_prev=cache_file ;;
920 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
921 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 cache_file=$ac_optarg ;;
923
924 --config-cache | -C)
925 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
933 | --dataroo | --dataro | --datar)
934 ac_prev=datarootdir ;;
935 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
936 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
937 datarootdir=$ac_optarg ;;
938
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000940 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000941 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000942 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200943 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000944 ac_useropt_orig=$ac_useropt
945 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
946 case $ac_user_opts in
947 *"
948"enable_$ac_useropt"
949"*) ;;
950 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
951 ac_unrecognized_sep=', ';;
952 esac
953 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954
955 -docdir | --docdir | --docdi | --doc | --do)
956 ac_prev=docdir ;;
957 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
958 docdir=$ac_optarg ;;
959
960 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
961 ac_prev=dvidir ;;
962 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
963 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964
965 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200969 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 ac_useropt_orig=$ac_useropt
971 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972 case $ac_user_opts in
973 *"
974"enable_$ac_useropt"
975"*) ;;
976 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
977 ac_unrecognized_sep=', ';;
978 esac
979 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
982 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
983 | --exec | --exe | --ex)
984 ac_prev=exec_prefix ;;
985 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
986 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
987 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000991 # Obsolete; use --with-gas.
992 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 -help | --help | --hel | --he | -h)
995 ac_init_help=long ;;
996 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
997 ac_init_help=recursive ;;
998 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
999 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
1001 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001006 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1007 ac_prev=htmldir ;;
1008 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1009 | --ht=*)
1010 htmldir=$ac_optarg ;;
1011
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012 -includedir | --includedir | --includedi | --included | --include \
1013 | --includ | --inclu | --incl | --inc)
1014 ac_prev=includedir ;;
1015 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1016 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001018
1019 -infodir | --infodir | --infodi | --infod | --info | --inf)
1020 ac_prev=infodir ;;
1021 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023
1024 -libdir | --libdir | --libdi | --libd)
1025 ac_prev=libdir ;;
1026 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1030 | --libexe | --libex | --libe)
1031 ac_prev=libexecdir ;;
1032 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1033 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001036 -localedir | --localedir | --localedi | --localed | --locale)
1037 ac_prev=localedir ;;
1038 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1039 localedir=$ac_optarg ;;
1040
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001042 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043 ac_prev=localstatedir ;;
1044 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001045 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
1048 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1049 ac_prev=mandir ;;
1050 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001054 # Obsolete; use --without-fp.
1055 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056
1057 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 no_create=yes ;;
1060
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001061 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1062 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1063 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1066 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1067 | --oldin | --oldi | --old | --ol | --o)
1068 ac_prev=oldincludedir ;;
1069 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1070 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1071 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1075 ac_prev=prefix ;;
1076 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
1079 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1080 | --program-pre | --program-pr | --program-p)
1081 ac_prev=program_prefix ;;
1082 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1083 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1087 | --program-suf | --program-su | --program-s)
1088 ac_prev=program_suffix ;;
1089 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1090 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -program-transform-name | --program-transform-name \
1094 | --program-transform-nam | --program-transform-na \
1095 | --program-transform-n | --program-transform- \
1096 | --program-transform | --program-transfor \
1097 | --program-transfo | --program-transf \
1098 | --program-trans | --program-tran \
1099 | --progr-tra | --program-tr | --program-t)
1100 ac_prev=program_transform_name ;;
1101 -program-transform-name=* | --program-transform-name=* \
1102 | --program-transform-nam=* | --program-transform-na=* \
1103 | --program-transform-n=* | --program-transform-=* \
1104 | --program-transform=* | --program-transfor=* \
1105 | --program-transfo=* | --program-transf=* \
1106 | --program-trans=* | --program-tran=* \
1107 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001110 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1111 ac_prev=pdfdir ;;
1112 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1113 pdfdir=$ac_optarg ;;
1114
1115 -psdir | --psdir | --psdi | --psd | --ps)
1116 ac_prev=psdir ;;
1117 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1118 psdir=$ac_optarg ;;
1119
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1121 | -silent | --silent | --silen | --sile | --sil)
1122 silent=yes ;;
1123
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001124 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1125 ac_prev=sbindir ;;
1126 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1127 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001129
1130 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1131 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1132 | --sharedst | --shareds | --shared | --share | --shar \
1133 | --sha | --sh)
1134 ac_prev=sharedstatedir ;;
1135 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1136 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1137 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1138 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001140
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001141 -site | --site | --sit)
1142 ac_prev=site ;;
1143 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001145
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1147 ac_prev=srcdir ;;
1148 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001151 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1152 | --syscon | --sysco | --sysc | --sys | --sy)
1153 ac_prev=sysconfdir ;;
1154 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1155 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001157
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001160 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001162
1163 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1164 verbose=yes ;;
1165
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 -version | --version | --versio | --versi | --vers | -V)
1167 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168
1169 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001170 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001172 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001173 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001174 ac_useropt_orig=$ac_useropt
1175 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1176 case $ac_user_opts in
1177 *"
1178"with_$ac_useropt"
1179"*) ;;
1180 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1181 ac_unrecognized_sep=', ';;
1182 esac
1183 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184
1185 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001186 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001187 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001188 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001189 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001190 ac_useropt_orig=$ac_useropt
1191 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1192 case $ac_user_opts in
1193 *"
1194"with_$ac_useropt"
1195"*) ;;
1196 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1197 ac_unrecognized_sep=', ';;
1198 esac
1199 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201 --x)
1202 # Obsolete; use --with-x.
1203 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
1205 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1206 | --x-incl | --x-inc | --x-in | --x-i)
1207 ac_prev=x_includes ;;
1208 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1209 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
1212 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1213 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1214 ac_prev=x_libraries ;;
1215 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1216 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001218
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001219 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1220Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221 ;;
1222
Martin v. Löwis11437992002-04-12 09:54:03 +00001223 *=*)
1224 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1225 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 case $ac_envvar in #(
1227 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001228 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001229 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001230 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001231 export $ac_envvar ;;
1232
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001233 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001235 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001236 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001237 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001238 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239 ;;
1240
1241 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001242done
1243
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001246 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247fi
1248
Matthias Kloseb9621712010-04-24 17:59:49 +00001249if test -n "$ac_unrecognized_opts"; then
1250 case $enable_option_checking in
1251 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001252 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1254 esac
1255fi
1256
1257# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001258for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1259 datadir sysconfdir sharedstatedir localstatedir includedir \
1260 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1261 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001262do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001263 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 # Remove trailing slashes.
1265 case $ac_val in
1266 */ )
1267 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1268 eval $ac_var=\$ac_val;;
1269 esac
1270 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001272 [\\/$]* | ?:[\\/]* ) continue;;
1273 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001275 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001276done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277
Martin v. Löwis11437992002-04-12 09:54:03 +00001278# There might be people who depend on the old broken behavior: `$host'
1279# used to hold the argument of --host etc.
1280# FIXME: To remove some day.
1281build=$build_alias
1282host=$host_alias
1283target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001284
Martin v. Löwis11437992002-04-12 09:54:03 +00001285# FIXME: To remove some day.
1286if test "x$host_alias" != x; then
1287 if test "x$build_alias" = x; then
1288 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001289 elif test "x$build_alias" != "x$host_alias"; then
1290 cross_compiling=yes
1291 fi
1292fi
1293
1294ac_tool_prefix=
1295test -n "$host_alias" && ac_tool_prefix=$host_alias-
1296
1297test "$silent" = yes && exec 6>/dev/null
1298
Guido van Rossum627b2d71993-12-24 10:39:16 +00001299
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001300ac_pwd=`pwd` && test -n "$ac_pwd" &&
1301ac_ls_di=`ls -di .` &&
1302ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001303 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001305 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001306
1307
Guido van Rossum627b2d71993-12-24 10:39:16 +00001308# Find the source files, if location was not specified.
1309if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001310 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001311 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001312 ac_confdir=`$as_dirname -- "$as_myself" ||
1313$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1314 X"$as_myself" : 'X\(//\)[^/]' \| \
1315 X"$as_myself" : 'X\(//\)$' \| \
1316 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1317$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001318 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1319 s//\1/
1320 q
1321 }
1322 /^X\(\/\/\)[^/].*/{
1323 s//\1/
1324 q
1325 }
1326 /^X\(\/\/\)$/{
1327 s//\1/
1328 q
1329 }
1330 /^X\(\/\).*/{
1331 s//\1/
1332 q
1333 }
1334 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001335 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337 srcdir=..
1338 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001339else
1340 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342if test ! -r "$srcdir/$ac_unique_file"; then
1343 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001344 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1347ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001348 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001349 pwd)`
1350# When building in place, set srcdir=.
1351if test "$ac_abs_confdir" = "$ac_pwd"; then
1352 srcdir=.
1353fi
1354# Remove unnecessary trailing slashes from srcdir.
1355# Double slashes in file names in object file debugging info
1356# mess up M-x gdb in Emacs.
1357case $srcdir in
1358*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1359esac
1360for ac_var in $ac_precious_vars; do
1361 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1362 eval ac_env_${ac_var}_value=\$${ac_var}
1363 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1364 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1365done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001366
Martin v. Löwis11437992002-04-12 09:54:03 +00001367#
1368# Report the --help message.
1369#
1370if test "$ac_init_help" = "long"; then
1371 # Omit some internal or obsolete options to make the list less imposing.
1372 # This message is too long to be a string in the A/UX 3.1 sh.
1373 cat <<_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001374\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001375
1376Usage: $0 [OPTION]... [VAR=VALUE]...
1377
1378To assign environment variables (e.g., CC, CFLAGS...), specify them as
1379VAR=VALUE. See below for descriptions of some of the useful variables.
1380
1381Defaults for the options are specified in brackets.
1382
1383Configuration:
1384 -h, --help display this help and exit
1385 --help=short display options specific to this package
1386 --help=recursive display the short help of all the included packages
1387 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001388 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 --cache-file=FILE cache test results in FILE [disabled]
1390 -C, --config-cache alias for \`--cache-file=config.cache'
1391 -n, --no-create do not create output files
1392 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1393
Martin v. Löwis11437992002-04-12 09:54:03 +00001394Installation directories:
1395 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001396 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001397 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001398 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001399
1400By default, \`make install' will install all the files in
1401\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1402an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1403for instance \`--prefix=\$HOME'.
1404
1405For better control, use the options below.
1406
1407Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001408 --bindir=DIR user executables [EPREFIX/bin]
1409 --sbindir=DIR system admin executables [EPREFIX/sbin]
1410 --libexecdir=DIR program executables [EPREFIX/libexec]
1411 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1412 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1413 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1414 --libdir=DIR object code libraries [EPREFIX/lib]
1415 --includedir=DIR C header files [PREFIX/include]
1416 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1417 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1418 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1419 --infodir=DIR info documentation [DATAROOTDIR/info]
1420 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1421 --mandir=DIR man documentation [DATAROOTDIR/man]
1422 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1423 --htmldir=DIR html documentation [DOCDIR]
1424 --dvidir=DIR dvi documentation [DOCDIR]
1425 --pdfdir=DIR pdf documentation [DOCDIR]
1426 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001427_ACEOF
1428
1429 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001430
1431System types:
1432 --build=BUILD configure for building on BUILD [guessed]
1433 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434_ACEOF
1435fi
1436
1437if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001438 case $ac_init_help in
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001439 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001440 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001441 cat <<\_ACEOF
1442
1443Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001445 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1446 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001447 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001448 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001449 --enable-framework[=INSTALLDIR]
1450 Build (MacOSX|Darwin) framework
1451 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001452 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001453 --enable-loadable-sqlite-extensions
1454 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001455 --enable-ipv6 Enable ipv6 (with ipv4) support
1456 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001457 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001458 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001459
1460Optional Packages:
1461 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1462 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001463 --with-universal-archs=ARCH
1464 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001465 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001466 --with-framework-name=FRAMEWORK
1467 specify an alternate name of the framework built
1468 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001469 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001470 --with-cxx-main=<compiler>
1471 compile main() and link python executable with C++
1472 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001473 --with-suffix=.exe set executable suffix
1474 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001475 --with-hash-algorithm=[fnv|siphash24]
1476 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001477 --with-address-sanitizer
1478 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001479 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001480 --with-system-expat build pyexpat module using an installed expat
1481 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001482 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001483 --with-system-libmpdec build _decimal module using an installed libmpdec
1484 library
Ned Deilyd819b932013-09-06 01:07:05 -07001485 --with-tcltk-includes='-I...'
1486 override search for Tcl and Tk include files
1487 --with-tcltk-libs='-L...'
1488 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001489 --with-dbmliborder=db1:db2:...
1490 order to check db backends for dbm. Valid value is a
1491 colon separated string with the backend names
1492 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001494 --with(out)-threads[=DIRECTORY]
1495 disable/enable thread support
1496 --with(out)-thread[=DIRECTORY]
1497 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001499 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001500 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001501 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-fpectl enable SIGFPE catching
1503 --with-libm=STRING math library
1504 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001505 --with(out)-computed-gotos
1506 Use computed gotos in evaluation loop (enabled by
1507 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001508 --with(out)-ensurepip=[=upgrade]
1509 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001510
1511Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001512 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001513 CC C compiler command
1514 CFLAGS C compiler flags
1515 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1516 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001517 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001518 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001519 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001520 CPP C preprocessor
1521
1522Use these variables to override the choices made by `configure' or to help
1523it to find libraries and programs with nonstandard names/locations.
1524
Georg Brandle2e15612009-05-20 18:25:10 +00001525Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001526_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001527ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001528fi
1529
1530if test "$ac_init_help" = "recursive"; then
1531 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001532 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001533 test -d "$ac_dir" ||
1534 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1535 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001536 ac_builddir=.
1537
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001538case "$ac_dir" in
1539.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1540*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001541 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001542 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001543 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001544 case $ac_top_builddir_sub in
1545 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1546 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1547 esac ;;
1548esac
1549ac_abs_top_builddir=$ac_pwd
1550ac_abs_builddir=$ac_pwd$ac_dir_suffix
1551# for backward compatibility:
1552ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001553
1554case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001557 ac_top_srcdir=$ac_top_builddir_sub
1558 ac_abs_top_srcdir=$ac_pwd ;;
1559 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001561 ac_top_srcdir=$srcdir
1562 ac_abs_top_srcdir=$srcdir ;;
1563 *) # Relative name.
1564 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1565 ac_top_srcdir=$ac_top_build_prefix$srcdir
1566 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001567esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001569
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001570 cd "$ac_dir" || { ac_status=$?; continue; }
1571 # Check for guested configure.
1572 if test -f "$ac_srcdir/configure.gnu"; then
1573 echo &&
1574 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1575 elif test -f "$ac_srcdir/configure"; then
1576 echo &&
1577 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 fi || ac_status=$?
1581 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001582 done
1583fi
1584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001586if $ac_init_version; then
1587 cat <<\_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001588python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001589generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001590
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001591Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001592This configure script is free software; the Free Software Foundation
1593gives unlimited permission to copy, distribute and modify it.
1594_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001597
1598## ------------------------ ##
1599## Autoconf initialization. ##
1600## ------------------------ ##
1601
1602# ac_fn_c_try_compile LINENO
1603# --------------------------
1604# Try to compile conftest.$ac_ext, and return whether this succeeded.
1605ac_fn_c_try_compile ()
1606{
1607 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1608 rm -f conftest.$ac_objext
1609 if { { ac_try="$ac_compile"
1610case "(($ac_try" in
1611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1612 *) ac_try_echo=$ac_try;;
1613esac
1614eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1615$as_echo "$ac_try_echo"; } >&5
1616 (eval "$ac_compile") 2>conftest.err
1617 ac_status=$?
1618 if test -s conftest.err; then
1619 grep -v '^ *+' conftest.err >conftest.er1
1620 cat conftest.er1 >&5
1621 mv -f conftest.er1 conftest.err
1622 fi
1623 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1624 test $ac_status = 0; } && {
1625 test -z "$ac_c_werror_flag" ||
1626 test ! -s conftest.err
1627 } && test -s conftest.$ac_objext; then :
1628 ac_retval=0
1629else
1630 $as_echo "$as_me: failed program was:" >&5
1631sed 's/^/| /' conftest.$ac_ext >&5
1632
1633 ac_retval=1
1634fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001635 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001636 as_fn_set_status $ac_retval
1637
1638} # ac_fn_c_try_compile
1639
Matthias Kloseb9621712010-04-24 17:59:49 +00001640# ac_fn_c_try_link LINENO
1641# -----------------------
1642# Try to link conftest.$ac_ext, and return whether this succeeded.
1643ac_fn_c_try_link ()
1644{
1645 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1646 rm -f conftest.$ac_objext conftest$ac_exeext
1647 if { { ac_try="$ac_link"
1648case "(($ac_try" in
1649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1650 *) ac_try_echo=$ac_try;;
1651esac
1652eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1653$as_echo "$ac_try_echo"; } >&5
1654 (eval "$ac_link") 2>conftest.err
1655 ac_status=$?
1656 if test -s conftest.err; then
1657 grep -v '^ *+' conftest.err >conftest.er1
1658 cat conftest.er1 >&5
1659 mv -f conftest.er1 conftest.err
1660 fi
1661 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1662 test $ac_status = 0; } && {
1663 test -z "$ac_c_werror_flag" ||
1664 test ! -s conftest.err
1665 } && test -s conftest$ac_exeext && {
1666 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001667 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001668 }; then :
1669 ac_retval=0
1670else
1671 $as_echo "$as_me: failed program was:" >&5
1672sed 's/^/| /' conftest.$ac_ext >&5
1673
1674 ac_retval=1
1675fi
1676 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1677 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1678 # interfere with the next link command; also delete a directory that is
1679 # left behind by Apple's compiler. We do this before executing the actions.
1680 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001681 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001682 as_fn_set_status $ac_retval
1683
1684} # ac_fn_c_try_link
1685
Matthias Kloseb9621712010-04-24 17:59:49 +00001686# ac_fn_c_try_cpp LINENO
1687# ----------------------
1688# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1689ac_fn_c_try_cpp ()
1690{
1691 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692 if { { ac_try="$ac_cpp conftest.$ac_ext"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1700 ac_status=$?
1701 if test -s conftest.err; then
1702 grep -v '^ *+' conftest.err >conftest.er1
1703 cat conftest.er1 >&5
1704 mv -f conftest.er1 conftest.err
1705 fi
1706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001707 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001708 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1709 test ! -s conftest.err
1710 }; then :
1711 ac_retval=0
1712else
1713 $as_echo "$as_me: failed program was:" >&5
1714sed 's/^/| /' conftest.$ac_ext >&5
1715
1716 ac_retval=1
1717fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001718 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001719 as_fn_set_status $ac_retval
1720
1721} # ac_fn_c_try_cpp
1722
1723# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1724# -------------------------------------------------------
1725# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1726# the include files in INCLUDES and setting the cache variable VAR
1727# accordingly.
1728ac_fn_c_check_header_mongrel ()
1729{
1730 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001731 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1733$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001734if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001735 $as_echo_n "(cached) " >&6
1736fi
1737eval ac_res=\$$3
1738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1739$as_echo "$ac_res" >&6; }
1740else
1741 # Is the header compilable?
1742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1743$as_echo_n "checking $2 usability... " >&6; }
1744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1745/* end confdefs.h. */
1746$4
1747#include <$2>
1748_ACEOF
1749if ac_fn_c_try_compile "$LINENO"; then :
1750 ac_header_compiler=yes
1751else
1752 ac_header_compiler=no
1753fi
1754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1756$as_echo "$ac_header_compiler" >&6; }
1757
1758# Is the header present?
1759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1760$as_echo_n "checking $2 presence... " >&6; }
1761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1762/* end confdefs.h. */
1763#include <$2>
1764_ACEOF
1765if ac_fn_c_try_cpp "$LINENO"; then :
1766 ac_header_preproc=yes
1767else
1768 ac_header_preproc=no
1769fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001770rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1772$as_echo "$ac_header_preproc" >&6; }
1773
1774# So? What about this header?
1775case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1776 yes:no: )
1777 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1778$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1779 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1780$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1781 ;;
1782 no:yes:* )
1783 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1784$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1786$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1788$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1790$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1791 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1792$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001793( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001794## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001795## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001796 ) | sed "s/^/$as_me: WARNING: /" >&2
1797 ;;
1798esac
1799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1800$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001801if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001802 $as_echo_n "(cached) " >&6
1803else
1804 eval "$3=\$ac_header_compiler"
1805fi
1806eval ac_res=\$$3
1807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1808$as_echo "$ac_res" >&6; }
1809fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001810 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001811
1812} # ac_fn_c_check_header_mongrel
1813
1814# ac_fn_c_try_run LINENO
1815# ----------------------
1816# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1817# that executables *can* be run.
1818ac_fn_c_try_run ()
1819{
1820 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1821 if { { ac_try="$ac_link"
1822case "(($ac_try" in
1823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1824 *) ac_try_echo=$ac_try;;
1825esac
1826eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1827$as_echo "$ac_try_echo"; } >&5
1828 (eval "$ac_link") 2>&5
1829 ac_status=$?
1830 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1831 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1832 { { case "(($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_try") 2>&5
1839 ac_status=$?
1840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1841 test $ac_status = 0; }; }; then :
1842 ac_retval=0
1843else
1844 $as_echo "$as_me: program exited with status $ac_status" >&5
1845 $as_echo "$as_me: failed program was:" >&5
1846sed 's/^/| /' conftest.$ac_ext >&5
1847
1848 ac_retval=$ac_status
1849fi
1850 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001851 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001852 as_fn_set_status $ac_retval
1853
1854} # ac_fn_c_try_run
1855
1856# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1857# -------------------------------------------------------
1858# Tests whether HEADER exists and can be compiled using the include files in
1859# INCLUDES, setting the cache variable VAR accordingly.
1860ac_fn_c_check_header_compile ()
1861{
1862 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1864$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001865if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001866 $as_echo_n "(cached) " >&6
1867else
1868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1869/* end confdefs.h. */
1870$4
1871#include <$2>
1872_ACEOF
1873if ac_fn_c_try_compile "$LINENO"; then :
1874 eval "$3=yes"
1875else
1876 eval "$3=no"
1877fi
1878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1879fi
1880eval ac_res=\$$3
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1882$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001883 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001884
1885} # ac_fn_c_check_header_compile
1886
Matthias Kloseb9621712010-04-24 17:59:49 +00001887# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1888# -------------------------------------------
1889# Tests whether TYPE exists after having included INCLUDES, setting cache
1890# variable VAR accordingly.
1891ac_fn_c_check_type ()
1892{
1893 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1895$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001896if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001897 $as_echo_n "(cached) " >&6
1898else
1899 eval "$3=no"
1900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1901/* end confdefs.h. */
1902$4
1903int
1904main ()
1905{
1906if (sizeof ($2))
1907 return 0;
1908 ;
1909 return 0;
1910}
1911_ACEOF
1912if ac_fn_c_try_compile "$LINENO"; then :
1913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1914/* end confdefs.h. */
1915$4
1916int
1917main ()
1918{
1919if (sizeof (($2)))
1920 return 0;
1921 ;
1922 return 0;
1923}
1924_ACEOF
1925if ac_fn_c_try_compile "$LINENO"; then :
1926
1927else
1928 eval "$3=yes"
1929fi
1930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1931fi
1932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1933fi
1934eval ac_res=\$$3
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1936$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001937 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001938
1939} # ac_fn_c_check_type
1940
1941# ac_fn_c_find_uintX_t LINENO BITS VAR
1942# ------------------------------------
1943# Finds an unsigned integer type with width BITS, setting cache variable VAR
1944# accordingly.
1945ac_fn_c_find_uintX_t ()
1946{
1947 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1949$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001950if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001951 $as_echo_n "(cached) " >&6
1952else
1953 eval "$3=no"
1954 # Order is important - never check a type that is potentially smaller
1955 # than half of the expected target width.
1956 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1957 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1959/* end confdefs.h. */
1960$ac_includes_default
1961int
1962main ()
1963{
1964static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001965test_array [0] = 0;
1966return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001967
1968 ;
1969 return 0;
1970}
1971_ACEOF
1972if ac_fn_c_try_compile "$LINENO"; then :
1973 case $ac_type in #(
1974 uint$2_t) :
1975 eval "$3=yes" ;; #(
1976 *) :
1977 eval "$3=\$ac_type" ;;
1978esac
1979fi
1980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001981 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001982
1983else
1984 break
1985fi
1986 done
1987fi
1988eval ac_res=\$$3
1989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1990$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001991 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001992
1993} # ac_fn_c_find_uintX_t
1994
1995# ac_fn_c_find_intX_t LINENO BITS VAR
1996# -----------------------------------
1997# Finds a signed integer type with width BITS, setting cache variable VAR
1998# accordingly.
1999ac_fn_c_find_intX_t ()
2000{
2001 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2003$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002004if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002005 $as_echo_n "(cached) " >&6
2006else
2007 eval "$3=no"
2008 # Order is important - never check a type that is potentially smaller
2009 # than half of the expected target width.
2010 for ac_type in int$2_t 'int' 'long int' \
2011 'long long int' 'short int' 'signed char'; do
2012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013/* end confdefs.h. */
2014$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002015 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002016int
2017main ()
2018{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002019static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002020test_array [0] = 0;
2021return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002022
2023 ;
2024 return 0;
2025}
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2029/* end confdefs.h. */
2030$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002031 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002032int
2033main ()
2034{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002035static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002036 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002037test_array [0] = 0;
2038return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002039
2040 ;
2041 return 0;
2042}
2043_ACEOF
2044if ac_fn_c_try_compile "$LINENO"; then :
2045
2046else
2047 case $ac_type in #(
2048 int$2_t) :
2049 eval "$3=yes" ;; #(
2050 *) :
2051 eval "$3=\$ac_type" ;;
2052esac
2053fi
2054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2055fi
2056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002057 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002058
2059else
2060 break
2061fi
2062 done
2063fi
2064eval ac_res=\$$3
2065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2066$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002067 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002068
2069} # ac_fn_c_find_intX_t
2070
2071# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2072# --------------------------------------------
2073# Tries to find the compile-time value of EXPR in a program that includes
2074# INCLUDES, setting VAR accordingly. Returns whether the value could be
2075# computed
2076ac_fn_c_compute_int ()
2077{
2078 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2079 if test "$cross_compiling" = yes; then
2080 # Depending upon the size, compute the lo and hi bounds.
2081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2082/* end confdefs.h. */
2083$4
2084int
2085main ()
2086{
2087static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002088test_array [0] = 0;
2089return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002090
2091 ;
2092 return 0;
2093}
2094_ACEOF
2095if ac_fn_c_try_compile "$LINENO"; then :
2096 ac_lo=0 ac_mid=0
2097 while :; do
2098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2099/* end confdefs.h. */
2100$4
2101int
2102main ()
2103{
2104static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002105test_array [0] = 0;
2106return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002107
2108 ;
2109 return 0;
2110}
2111_ACEOF
2112if ac_fn_c_try_compile "$LINENO"; then :
2113 ac_hi=$ac_mid; break
2114else
2115 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2116 if test $ac_lo -le $ac_mid; then
2117 ac_lo= ac_hi=
2118 break
2119 fi
2120 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2121fi
2122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123 done
2124else
2125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2126/* end confdefs.h. */
2127$4
2128int
2129main ()
2130{
2131static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002132test_array [0] = 0;
2133return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002134
2135 ;
2136 return 0;
2137}
2138_ACEOF
2139if ac_fn_c_try_compile "$LINENO"; then :
2140 ac_hi=-1 ac_mid=-1
2141 while :; do
2142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2143/* end confdefs.h. */
2144$4
2145int
2146main ()
2147{
2148static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002149test_array [0] = 0;
2150return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002151
2152 ;
2153 return 0;
2154}
2155_ACEOF
2156if ac_fn_c_try_compile "$LINENO"; then :
2157 ac_lo=$ac_mid; break
2158else
2159 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2160 if test $ac_mid -le $ac_hi; then
2161 ac_lo= ac_hi=
2162 break
2163 fi
2164 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2165fi
2166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2167 done
2168else
2169 ac_lo= ac_hi=
2170fi
2171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2172fi
2173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2174# Binary search between lo and hi bounds.
2175while test "x$ac_lo" != "x$ac_hi"; do
2176 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178/* end confdefs.h. */
2179$4
2180int
2181main ()
2182{
2183static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002184test_array [0] = 0;
2185return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002186
2187 ;
2188 return 0;
2189}
2190_ACEOF
2191if ac_fn_c_try_compile "$LINENO"; then :
2192 ac_hi=$ac_mid
2193else
2194 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2195fi
2196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2197done
2198case $ac_lo in #((
2199?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2200'') ac_retval=1 ;;
2201esac
2202 else
2203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2204/* end confdefs.h. */
2205$4
2206static long int longval () { return $2; }
2207static unsigned long int ulongval () { return $2; }
2208#include <stdio.h>
2209#include <stdlib.h>
2210int
2211main ()
2212{
2213
2214 FILE *f = fopen ("conftest.val", "w");
2215 if (! f)
2216 return 1;
2217 if (($2) < 0)
2218 {
2219 long int i = longval ();
2220 if (i != ($2))
2221 return 1;
2222 fprintf (f, "%ld", i);
2223 }
2224 else
2225 {
2226 unsigned long int i = ulongval ();
2227 if (i != ($2))
2228 return 1;
2229 fprintf (f, "%lu", i);
2230 }
2231 /* Do not output a trailing newline, as this causes \r\n confusion
2232 on some platforms. */
2233 return ferror (f) || fclose (f) != 0;
2234
2235 ;
2236 return 0;
2237}
2238_ACEOF
2239if ac_fn_c_try_run "$LINENO"; then :
2240 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2241else
2242 ac_retval=1
2243fi
2244rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2245 conftest.$ac_objext conftest.beam conftest.$ac_ext
2246rm -f conftest.val
2247
2248 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002249 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002250 as_fn_set_status $ac_retval
2251
2252} # ac_fn_c_compute_int
2253
2254# ac_fn_c_check_func LINENO FUNC VAR
2255# ----------------------------------
2256# Tests whether FUNC exists, setting the cache variable VAR accordingly
2257ac_fn_c_check_func ()
2258{
2259 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2261$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002262if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002263 $as_echo_n "(cached) " >&6
2264else
2265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2266/* end confdefs.h. */
2267/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2268 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2269#define $2 innocuous_$2
2270
2271/* System header to define __stub macros and hopefully few prototypes,
2272 which can conflict with char $2 (); below.
2273 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2274 <limits.h> exists even on freestanding compilers. */
2275
2276#ifdef __STDC__
2277# include <limits.h>
2278#else
2279# include <assert.h>
2280#endif
2281
2282#undef $2
2283
2284/* Override any GCC internal prototype to avoid an error.
2285 Use char because int might match the return type of a GCC
2286 builtin and then its argument prototype would still apply. */
2287#ifdef __cplusplus
2288extern "C"
2289#endif
2290char $2 ();
2291/* The GNU C library defines this for functions which it implements
2292 to always fail with ENOSYS. Some functions are actually named
2293 something starting with __ and the normal name is an alias. */
2294#if defined __stub_$2 || defined __stub___$2
2295choke me
2296#endif
2297
2298int
2299main ()
2300{
2301return $2 ();
2302 ;
2303 return 0;
2304}
2305_ACEOF
2306if ac_fn_c_try_link "$LINENO"; then :
2307 eval "$3=yes"
2308else
2309 eval "$3=no"
2310fi
2311rm -f core conftest.err conftest.$ac_objext \
2312 conftest$ac_exeext conftest.$ac_ext
2313fi
2314eval ac_res=\$$3
2315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2316$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002317 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002318
2319} # ac_fn_c_check_func
2320
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002321# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2322# ---------------------------------------------
2323# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2324# accordingly.
2325ac_fn_c_check_decl ()
2326{
2327 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2328 as_decl_name=`echo $2|sed 's/ *(.*//'`
2329 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2331$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2332if eval \${$3+:} false; then :
2333 $as_echo_n "(cached) " >&6
2334else
2335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2336/* end confdefs.h. */
2337$4
2338int
2339main ()
2340{
2341#ifndef $as_decl_name
2342#ifdef __cplusplus
2343 (void) $as_decl_use;
2344#else
2345 (void) $as_decl_name;
2346#endif
2347#endif
2348
2349 ;
2350 return 0;
2351}
2352_ACEOF
2353if ac_fn_c_try_compile "$LINENO"; then :
2354 eval "$3=yes"
2355else
2356 eval "$3=no"
2357fi
2358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2359fi
2360eval ac_res=\$$3
2361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2362$as_echo "$ac_res" >&6; }
2363 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2364
2365} # ac_fn_c_check_decl
2366
Matthias Kloseb9621712010-04-24 17:59:49 +00002367# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2368# ----------------------------------------------------
2369# Tries to find if the field MEMBER exists in type AGGR, after including
2370# INCLUDES, setting cache variable VAR accordingly.
2371ac_fn_c_check_member ()
2372{
2373 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2375$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002376if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002377 $as_echo_n "(cached) " >&6
2378else
2379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2380/* end confdefs.h. */
2381$5
2382int
2383main ()
2384{
2385static $2 ac_aggr;
2386if (ac_aggr.$3)
2387return 0;
2388 ;
2389 return 0;
2390}
2391_ACEOF
2392if ac_fn_c_try_compile "$LINENO"; then :
2393 eval "$4=yes"
2394else
2395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2396/* end confdefs.h. */
2397$5
2398int
2399main ()
2400{
2401static $2 ac_aggr;
2402if (sizeof ac_aggr.$3)
2403return 0;
2404 ;
2405 return 0;
2406}
2407_ACEOF
2408if ac_fn_c_try_compile "$LINENO"; then :
2409 eval "$4=yes"
2410else
2411 eval "$4=no"
2412fi
2413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2414fi
2415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2416fi
2417eval ac_res=\$$4
2418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2419$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002420 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002421
2422} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002423cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002424This file contains any messages produced by compilers while
2425running configure, to aid debugging if configure makes a mistake.
2426
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002427It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002428generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002429
2430 $ $0 $@
2431
2432_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002433exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002434{
2435cat <<_ASUNAME
2436## --------- ##
2437## Platform. ##
2438## --------- ##
2439
2440hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2441uname -m = `(uname -m) 2>/dev/null || echo unknown`
2442uname -r = `(uname -r) 2>/dev/null || echo unknown`
2443uname -s = `(uname -s) 2>/dev/null || echo unknown`
2444uname -v = `(uname -v) 2>/dev/null || echo unknown`
2445
2446/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2447/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2448
2449/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2450/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2451/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002452/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002453/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2454/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2455/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2456
2457_ASUNAME
2458
2459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2460for as_dir in $PATH
2461do
2462 IFS=$as_save_IFS
2463 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002464 $as_echo "PATH: $as_dir"
2465 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002467
2468} >&5
2469
2470cat >&5 <<_ACEOF
2471
2472
2473## ----------- ##
2474## Core tests. ##
2475## ----------- ##
2476
2477_ACEOF
2478
2479
2480# Keep a trace of the command line.
2481# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002482# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002483# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002484# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002485ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002486ac_configure_args0=
2487ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002488ac_must_keep_next=false
2489for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002490do
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 for ac_arg
2492 do
2493 case $ac_arg in
2494 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2495 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2496 | -silent | --silent | --silen | --sile | --sil)
2497 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002500 esac
2501 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002504 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002506 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002507 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002508 case $ac_arg in
2509 *=* | --config-cache | -C | -disable-* | --disable-* \
2510 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2511 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2512 | -with-* | --with-* | -without-* | --without-* | --x)
2513 case "$ac_configure_args0 " in
2514 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2515 esac
2516 ;;
2517 -* ) ac_must_keep_next=true ;;
2518 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002519 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002520 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002521 ;;
2522 esac
2523 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002524done
Matthias Kloseb9621712010-04-24 17:59:49 +00002525{ ac_configure_args0=; unset ac_configure_args0;}
2526{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002527
2528# When interrupted or exit'd, cleanup temporary files, and complete
2529# config.log. We remove comments because anyway the quotes in there
2530# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531# WARNING: Use '\'' to represent an apostrophe within the trap.
2532# 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 +00002533trap 'exit_status=$?
2534 # Save into config.log some information that might help in debugging.
2535 {
2536 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002537
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002538 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002539## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002540## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 echo
2542 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543(
2544 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2545 eval ac_val=\$$ac_var
2546 case $ac_val in #(
2547 *${as_nl}*)
2548 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002549 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2550$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551 esac
2552 case $ac_var in #(
2553 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002554 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2555 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 esac ;;
2557 esac
2558 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002559 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002560 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2561 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563 "s/'\''/'\''\\\\'\'''\''/g;
2564 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2565 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002566 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002568 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569 esac |
2570 sort
2571)
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002573
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002574 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002575## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002576## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002577 echo
2578 for ac_var in $ac_subst_vars
2579 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580 eval ac_val=\$$ac_var
2581 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002585 done | sort
2586 echo
2587
2588 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002589 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002591## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002592 echo
2593 for ac_var in $ac_subst_files
2594 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595 eval ac_val=\$$ac_var
2596 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002599 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002600 done | sort
2601 echo
2602 fi
2603
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002605 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002606## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002607## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 echo
2611 fi
2612 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002613 $as_echo "$as_me: caught signal $ac_signal"
2614 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616 rm -f core *.core core.conftest.* &&
2617 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002620for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002621 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002622done
2623ac_signal=0
2624
2625# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002627
Matthias Kloseb9621712010-04-24 17:59:49 +00002628$as_echo "/* confdefs.h */" > confdefs.h
2629
Martin v. Löwis11437992002-04-12 09:54:03 +00002630# Predefined preprocessor variables.
2631
2632cat >>confdefs.h <<_ACEOF
2633#define PACKAGE_NAME "$PACKAGE_NAME"
2634_ACEOF
2635
Martin v. Löwis11437992002-04-12 09:54:03 +00002636cat >>confdefs.h <<_ACEOF
2637#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2638_ACEOF
2639
Martin v. Löwis11437992002-04-12 09:54:03 +00002640cat >>confdefs.h <<_ACEOF
2641#define PACKAGE_VERSION "$PACKAGE_VERSION"
2642_ACEOF
2643
Martin v. Löwis11437992002-04-12 09:54:03 +00002644cat >>confdefs.h <<_ACEOF
2645#define PACKAGE_STRING "$PACKAGE_STRING"
2646_ACEOF
2647
Martin v. Löwis11437992002-04-12 09:54:03 +00002648cat >>confdefs.h <<_ACEOF
2649#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2650_ACEOF
2651
Matthias Kloseb9621712010-04-24 17:59:49 +00002652cat >>confdefs.h <<_ACEOF
2653#define PACKAGE_URL "$PACKAGE_URL"
2654_ACEOF
2655
Martin v. Löwis11437992002-04-12 09:54:03 +00002656
2657# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002658# Prefer an explicitly selected file to automatically selected ones.
2659ac_site_file1=NONE
2660ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002661if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002662 # We do not want a PATH search for config.site.
2663 case $CONFIG_SITE in #((
2664 -*) ac_site_file1=./$CONFIG_SITE;;
2665 */*) ac_site_file1=$CONFIG_SITE;;
2666 *) ac_site_file1=./$CONFIG_SITE;;
2667 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002668elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 ac_site_file1=$prefix/share/config.site
2670 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002671else
Matthias Kloseb9621712010-04-24 17:59:49 +00002672 ac_site_file1=$ac_default_prefix/share/config.site
2673 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002675for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002676do
Matthias Kloseb9621712010-04-24 17:59:49 +00002677 test "x$ac_site_file" = xNONE && continue
2678 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2679 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2680$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002682 . "$ac_site_file" \
2683 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2685as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002686See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002687 fi
2688done
2689
2690if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002691 # Some versions of bash will fail to source /dev/null (special files
2692 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2693 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2694 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2695$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002697 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2698 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002699 esac
2700 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002701else
Matthias Kloseb9621712010-04-24 17:59:49 +00002702 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2703$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002704 >$cache_file
2705fi
2706
2707# Check that the precious variables saved in the cache have kept the same
2708# value.
2709ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002710for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002711 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2712 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002713 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2714 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002715 case $ac_old_set,$ac_new_set in
2716 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002717 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2718$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 +00002719 ac_cache_corrupted=: ;;
2720 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002721 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2722$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002723 ac_cache_corrupted=: ;;
2724 ,);;
2725 *)
2726 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002727 # differences in whitespace do not lead to failure.
2728 ac_old_val_w=`echo x $ac_old_val`
2729 ac_new_val_w=`echo x $ac_new_val`
2730 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2731 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2732$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2733 ac_cache_corrupted=:
2734 else
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2736$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2737 eval $ac_var=\$ac_old_val
2738 fi
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2740$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2742$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 fi;;
2744 esac
2745 # Pass precious variables to config.status.
2746 if test "$ac_new_set" = set; then
2747 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002748 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002749 *) ac_arg=$ac_var=$ac_new_val ;;
2750 esac
2751 case " $ac_configure_args " in
2752 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002753 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002754 esac
2755 fi
2756done
2757if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002758 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2759$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2761$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002762 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002764## -------------------- ##
2765## Main body of script. ##
2766## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002767
Guido van Rossum7f43da71994-08-01 12:15:30 +00002768ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002769ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002770ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2771ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2772ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002773
Guido van Rossum627b2d71993-12-24 10:39:16 +00002774
Michael W. Hudson54241132001-12-07 15:38:26 +00002775
Trent Nelson4d4ec652012-10-16 08:51:24 -04002776
Trent Nelson5595ab52012-10-17 04:47:31 -04002777if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002778 # If we're building out-of-tree, we need to make sure the following
2779 # resources get picked up before their $srcdir counterparts.
2780 # Objects/ -> typeslots.inc
2781 # Include/ -> Python-ast.h, graminit.h
2782 # Python/ -> importlib.h
2783 # (A side effect of this is that these resources will automatically be
2784 # regenerated when building out-of-tree, regardless of whether or not
2785 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2786 # off.)
2787 BASECPPFLAGS="-IObjects -IInclude -IPython"
2788else
2789 BASECPPFLAGS=""
2790fi
2791
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002792
2793
2794
2795
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002796if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002797then
2798# Extract the first word of "hg", so it can be a program name with args.
2799set dummy hg; ac_word=$2
2800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2801$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002802if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002803 $as_echo_n "(cached) " >&6
2804else
2805 if test -n "$HAS_HG"; then
2806 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2807else
2808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2809for as_dir in $PATH
2810do
2811 IFS=$as_save_IFS
2812 test -z "$as_dir" && as_dir=.
2813 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002815 ac_cv_prog_HAS_HG="found"
2816 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2817 break 2
2818 fi
2819done
2820 done
2821IFS=$as_save_IFS
2822
2823 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2824fi
2825fi
2826HAS_HG=$ac_cv_prog_HAS_HG
2827if test -n "$HAS_HG"; then
2828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2829$as_echo "$HAS_HG" >&6; }
2830else
2831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2832$as_echo "no" >&6; }
2833fi
2834
2835
2836else
2837HAS_HG=no-repository
2838fi
2839if test $HAS_HG = found
2840then
2841 HGVERSION="hg id -i \$(srcdir)"
2842 HGTAG="hg id -t \$(srcdir)"
2843 HGBRANCH="hg id -b \$(srcdir)"
2844else
2845 HGVERSION=""
2846 HGTAG=""
2847 HGBRANCH=""
2848fi
2849
2850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002851ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002852
2853
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002854ac_aux_dir=
2855for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2856 if test -f "$ac_dir/install-sh"; then
2857 ac_aux_dir=$ac_dir
2858 ac_install_sh="$ac_aux_dir/install-sh -c"
2859 break
2860 elif test -f "$ac_dir/install.sh"; then
2861 ac_aux_dir=$ac_dir
2862 ac_install_sh="$ac_aux_dir/install.sh -c"
2863 break
2864 elif test -f "$ac_dir/shtool"; then
2865 ac_aux_dir=$ac_dir
2866 ac_install_sh="$ac_aux_dir/shtool install -c"
2867 break
2868 fi
2869done
2870if test -z "$ac_aux_dir"; then
2871 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2872fi
2873
2874# These three variables are undocumented and unsupported,
2875# and are intended to be withdrawn in a future Autoconf release.
2876# They can cause serious problems if a builder's source tree is in a directory
2877# whose full name contains unusual characters.
2878ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2879ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2880ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2881
2882
2883# Make sure we can run config.sub.
2884$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2885 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2886
2887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2888$as_echo_n "checking build system type... " >&6; }
2889if ${ac_cv_build+:} false; then :
2890 $as_echo_n "(cached) " >&6
2891else
2892 ac_build_alias=$build_alias
2893test "x$ac_build_alias" = x &&
2894 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2895test "x$ac_build_alias" = x &&
2896 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2897ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2898 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2899
2900fi
2901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2902$as_echo "$ac_cv_build" >&6; }
2903case $ac_cv_build in
2904*-*-*) ;;
2905*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2906esac
2907build=$ac_cv_build
2908ac_save_IFS=$IFS; IFS='-'
2909set x $ac_cv_build
2910shift
2911build_cpu=$1
2912build_vendor=$2
2913shift; shift
2914# Remember, the first character of IFS is used to create $*,
2915# except with old shells:
2916build_os=$*
2917IFS=$ac_save_IFS
2918case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2919
2920
2921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2922$as_echo_n "checking host system type... " >&6; }
2923if ${ac_cv_host+:} false; then :
2924 $as_echo_n "(cached) " >&6
2925else
2926 if test "x$host_alias" = x; then
2927 ac_cv_host=$ac_cv_build
2928else
2929 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2930 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2931fi
2932
2933fi
2934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2935$as_echo "$ac_cv_host" >&6; }
2936case $ac_cv_host in
2937*-*-*) ;;
2938*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2939esac
2940host=$ac_cv_host
2941ac_save_IFS=$IFS; IFS='-'
2942set x $ac_cv_host
2943shift
2944host_cpu=$1
2945host_vendor=$2
2946shift; shift
2947# Remember, the first character of IFS is used to create $*,
2948# except with old shells:
2949host_os=$*
2950IFS=$ac_save_IFS
2951case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2952
2953
2954
doko@python.orga10e4a92013-01-25 18:45:12 +01002955
2956
Ned Deilyfcbc2462014-08-22 13:32:49 -07002957# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2958rm -f pybuilddir.txt
2959
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002960if test "$cross_compiling" = yes; then
2961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2962$as_echo_n "checking for python interpreter for cross build... " >&6; }
2963 if test -z "$PYTHON_FOR_BUILD"; then
2964 for interp in python$PACKAGE_VERSION python3 python; do
2965 which $interp >/dev/null 2>&1 || continue
2966 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2967 break
2968 fi
2969 interp=
2970 done
2971 if test x$interp = x; then
2972 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2973 fi
2974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2975$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002976 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 +02002977 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002978elif test "$cross_compiling" = maybe; then
2979 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002980else
2981 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2982fi
2983
2984
Martin v. Löwis11437992002-04-12 09:54:03 +00002985
Benjamin Petersond23f8222009-04-05 19:13:16 +00002986if test "$prefix" != "/"; then
2987 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2988fi
2989
2990
Martin v. Löwis11437992002-04-12 09:54:03 +00002991
2992
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002993# We don't use PACKAGE_ variables, and they cause conflicts
2994# with other autoconf-based packages that include Python.h
2995grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2996rm confdefs.h
2997mv confdefs.h.new confdefs.h
2998
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002999
Larry Hastingsf5002bd2014-03-16 23:05:59 -07003000VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003001
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003002# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003003
3004SOVERSION=1.0
3005
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003006# The later defininition of _XOPEN_SOURCE disables certain features
3007# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3008
Matthias Kloseb9621712010-04-24 17:59:49 +00003009$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003010
3011
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003012# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3013# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3014# them.
3015
Matthias Kloseb9621712010-04-24 17:59:49 +00003016$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003017
3018
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003019# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3020# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3021# them.
3022
Matthias Kloseb9621712010-04-24 17:59:49 +00003023$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003024
3025
Martin v. Löwisd6320502004-08-12 13:45:08 +00003026# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3027# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3028
Matthias Kloseb9621712010-04-24 17:59:49 +00003029$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003030
3031
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003032# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3033# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3034# them.
3035
Matthias Kloseb9621712010-04-24 17:59:49 +00003036$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003037
3038
3039
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003040define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003041
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003042# Arguments passed to configure.
3043
3044CONFIG_ARGS="$ac_configure_args"
3045
Matthias Kloseb9621712010-04-24 17:59:49 +00003046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3047$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003048# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003049if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003050 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003051 case $enableval in
3052 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003053 # Locate the best usable SDK, see Mac/README.txt for more
3054 # information
3055 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003056 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003057 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003058 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3059 if test ! -d "${enableval}"
3060 then
3061 enableval=/
3062 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003064 ;;
3065 esac
3066 case $enableval in
3067 no)
3068 UNIVERSALSDK=
3069 enable_universalsdk=
3070 ;;
3071 *)
3072 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003073 if test ! -d "${UNIVERSALSDK}"
3074 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003075 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003076 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003077 ;;
3078 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003079
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003080
Thomas Wouters477c8d52006-05-27 19:21:47 +00003081else
3082
3083 UNIVERSALSDK=
3084 enable_universalsdk=
3085
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003086fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003087
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003088if test -n "${UNIVERSALSDK}"
3089then
Matthias Kloseb9621712010-04-24 17:59:49 +00003090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3091$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003092else
Matthias Kloseb9621712010-04-24 17:59:49 +00003093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3094$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003095fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003097
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003098
Ned Deily87adb6e2013-10-18 21:09:56 -07003099ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003100
Ned Deilycbfb9a52012-06-23 16:02:19 -07003101# For backward compatibility reasons we prefer to select '32-bit' if available,
3102# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003103UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003104if test "`uname -s`" = "Darwin"
3105then
3106 if test -n "${UNIVERSALSDK}"
3107 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003108 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003109 then
3110 UNIVERSAL_ARCHS="intel"
3111 fi
3112 fi
3113fi
3114
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003115
Matthias Kloseb9621712010-04-24 17:59:49 +00003116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3117$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003118
3119# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003120if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003121 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003122 UNIVERSAL_ARCHS="$withval"
3123
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003124fi
3125
Ned Deily87adb6e2013-10-18 21:09:56 -07003126if test -n "${UNIVERSALSDK}"
3127then
3128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3129$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3130else
3131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3132$as_echo "no" >&6; }
3133fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003134
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003135
3136# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003137if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003138 withval=$with_framework_name;
3139 PYTHONFRAMEWORK=${withval}
3140 PYTHONFRAMEWORKDIR=${withval}.framework
3141 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3142
3143else
3144
3145 PYTHONFRAMEWORK=Python
3146 PYTHONFRAMEWORKDIR=Python.framework
3147 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3148
3149fi
3150
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003151# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003152if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003153 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003154 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003155 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003156 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003157 esac
3158 case $enableval in
3159 no)
3160 PYTHONFRAMEWORK=
3161 PYTHONFRAMEWORKDIR=no-framework
3162 PYTHONFRAMEWORKPREFIX=
3163 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003164 FRAMEWORKINSTALLFIRST=
3165 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003166 FRAMEWORKALTINSTALLFIRST=
3167 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003168 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003169 if test "x${prefix}" = "xNONE"; then
3170 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3171 else
3172 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3173 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003174 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003175 ;;
3176 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003177 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003178 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003179 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003180 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003181 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3182 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003183 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003184 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003185
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003186 if test "x${prefix}" = "xNONE" ; then
3187 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003188
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003189 else
3190 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3191 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003192
3193 case "${enableval}" in
3194 /System*)
3195 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3196 if test "${prefix}" = "NONE" ; then
3197 # See below
3198 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3199 fi
3200 ;;
3201
3202 /Library*)
3203 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3204 ;;
3205
3206 */Library/Frameworks)
3207 MDIR="`dirname "${enableval}"`"
3208 MDIR="`dirname "${MDIR}"`"
3209 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3210
3211 if test "${prefix}" = "NONE"; then
3212 # User hasn't specified the
3213 # --prefix option, but wants to install
3214 # the framework in a non-default location,
3215 # ensure that the compatibility links get
3216 # installed relative to that prefix as well
3217 # instead of in /usr/local.
3218 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3219 fi
3220 ;;
3221
3222 *)
3223 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3224 ;;
3225 esac
3226
Jack Jansen127e56e2001-09-11 14:41:54 +00003227 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003228
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003229 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003230 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003232
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003233 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003234
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003235 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3236
3237 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3238
Jack Jansene578a632001-08-15 01:27:14 +00003239 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003240
Guido van Rossum563e7081996-09-10 18:20:48 +00003241else
Martin v. Löwis11437992002-04-12 09:54:03 +00003242
Jack Jansene578a632001-08-15 01:27:14 +00003243 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003244 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003245 PYTHONFRAMEWORKPREFIX=
3246 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003247 FRAMEWORKINSTALLFIRST=
3248 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003249 FRAMEWORKALTINSTALLFIRST=
3250 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003251 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003252 if test "x${prefix}" = "xNONE" ; then
3253 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3254 else
3255 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3256 fi
Jack Jansene578a632001-08-15 01:27:14 +00003257 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003258
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003259
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003260fi
3261
Thomas Wouters477c8d52006-05-27 19:21:47 +00003262
3263
Michael W. Hudson54241132001-12-07 15:38:26 +00003264
3265
3266
3267
Jack Jansene578a632001-08-15 01:27:14 +00003268
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003269
3270
3271
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003272
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003273
Ned Deilyb8f944f2013-11-21 22:42:25 -08003274
Jack Jansene578a632001-08-15 01:27:14 +00003275##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003276## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003277## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003278##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279# Set name for machine-dependent library files
3280
Matthias Kloseb9621712010-04-24 17:59:49 +00003281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3282$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003283if test -z "$MACHDEP"
3284then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003285 # avoid using uname for cross builds
3286 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003287 # ac_sys_system and ac_sys_release are used for setting
3288 # a lot of different things including 'define_xopen_source'
3289 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003290 case "$host" in
3291 *-*-linux*)
3292 ac_sys_system=Linux
3293 ;;
3294 *-*-cygwin*)
3295 ac_sys_system=Cygwin
3296 ;;
3297 *)
3298 # for now, limit cross builds to known configurations
3299 MACHDEP="unknown"
3300 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3301 esac
3302 ac_sys_release=
3303 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003304 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003305 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003306 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003307 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003308 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003309 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003310 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003311 fi
3312 ac_md_system=`echo $ac_sys_system |
3313 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3314 ac_md_release=`echo $ac_sys_release |
3315 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3316 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003317
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003318 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003319 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003320 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003321 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003322 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003323 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003324 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003325fi
Guido van Rossum91922671997-10-09 20:24:13 +00003326
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003327
3328if test "$cross_compiling" = yes; then
3329 case "$host" in
3330 *-*-linux*)
3331 case "$host_cpu" in
3332 arm*)
3333 _host_cpu=arm
3334 ;;
3335 *)
3336 _host_cpu=$host_cpu
3337 esac
3338 ;;
3339 *-*-cygwin*)
3340 _host_cpu=
3341 ;;
3342 *)
3343 # for now, limit cross builds to known configurations
3344 MACHDEP="unknown"
3345 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3346 esac
3347 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3348fi
3349
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003350# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3351# disable features if it is defined, without any means to access these
3352# features as extensions. For these systems, we skip the definition of
3353# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3354# some feature, make sure there is no alternative way to access this
3355# feature. Also, when using wildcards, make sure you have verified the
3356# need for not defining _XOPEN_SOURCE on all systems matching the
3357# wildcard, and that the wildcard does not include future systems
3358# (which may remove their limitations).
3359case $ac_sys_system/$ac_sys_release in
3360 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3361 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003362 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003363 # In addition, Stefan Krah confirms that issue #1244610 exists through
3364 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003365 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003366 define_xopen_source=no
3367 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3368 # also defined. This can be overridden by defining _BSD_SOURCE
3369 # As this has a different meaning on Linux, only define it on OpenBSD
3370
Matthias Kloseb9621712010-04-24 17:59:49 +00003371$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003372
3373 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003374 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003375 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3376 # also defined. This can be overridden by defining _BSD_SOURCE
3377 # As this has a different meaning on Linux, only define it on OpenBSD
3378
Matthias Kloseb9621712010-04-24 17:59:49 +00003379$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003380
3381 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003382 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3383 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3384 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003385 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 +00003386 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003387 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3388 # request to enable features supported by the standard as a request
3389 # to disable features not supported by the standard. The best way
3390 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3391 # entirely and define __EXTENSIONS__ instead.
3392 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003393 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003394 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3395 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003396 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003397 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003398 define_xopen_source=no;;
3399 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003400 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003401 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003402 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003403 # On FreeBSD 4, the math functions C89 does not cover are never defined
3404 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3405 FreeBSD/4.*)
3406 define_xopen_source=no;;
3407 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3408 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3409 # identifies itself as Darwin/7.*
3410 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3411 # disables platform specific features beyond repair.
3412 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3413 # has no effect, don't bother defining them
3414 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003415 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003416 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003417 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003418 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3419 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3420 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003421 AIX/4)
3422 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003423 AIX/5)
3424 if test `uname -r` -eq 1; then
3425 define_xopen_source=no
3426 fi
3427 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003428 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3429 # defining NI_NUMERICHOST.
3430 QNX/6.3.2)
3431 define_xopen_source=no
3432 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003433
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003434esac
3435
3436if test $define_xopen_source = yes
3437then
Victor Stinner14d098d2011-09-07 22:29:43 +02003438 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003439
Victor Stinner14d098d2011-09-07 22:29:43 +02003440$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003441
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003442
3443 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3444 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3445 # several APIs are not declared. Since this is also needed in some
3446 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003447
Matthias Kloseb9621712010-04-24 17:59:49 +00003448$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003449
3450
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003451
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003452$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003453
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003454fi
3455
Christian Heimes647cd872013-12-07 23:39:33 +01003456# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3457case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003458 hp*|HP*)
3459 define_stdc_a1=yes;;
3460 *)
3461 define_stdc_a1=no;;
3462esac
3463
3464if test $define_stdc_a1 = yes
3465then
Christian Heimes647cd872013-12-07 23:39:33 +01003466
3467$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3468
Christian Heimesb02bcae2013-12-08 15:21:08 +01003469fi
Christian Heimes647cd872013-12-07 23:39:33 +01003470
Guido van Rossum91922671997-10-09 20:24:13 +00003471#
3472# SGI compilers allow the specification of the both the ABI and the
3473# ISA on the command line. Depending on the values of these switches,
3474# different and often incompatable code will be generated.
3475#
3476# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3477# thus supply support for various ABI/ISA combinations. The MACHDEP
3478# variable is also adjusted.
3479#
3480
3481if test ! -z "$SGI_ABI"
3482then
3483 CC="cc $SGI_ABI"
3484 LDFLAGS="$SGI_ABI $LDFLAGS"
3485 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3488$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003489
Jack Jansen6b08a402004-06-03 12:41:45 +00003490# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3491# it may influence the way we can build extensions, so distutils
3492# needs to check it
3493
Thomas Wouters477c8d52006-05-27 19:21:47 +00003494
Jack Jansen6b08a402004-06-03 12:41:45 +00003495CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003496EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003497
Guido van Rossum627b2d71993-12-24 10:39:16 +00003498# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003499
3500# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3501# for debug/optimization stuff. BASECFLAGS is for flags that are required
3502# just to get things to compile and link. Users are free to override OPT
3503# when running configure or make. The build should not break if they do.
3504# BASECFLAGS should generally not be messed with, however.
3505
3506# XXX shouldn't some/most/all of this code be merged with the stuff later
3507# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3509$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003511# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003512if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003513 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003514 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003515 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003516 without_gcc=yes;;
3517 yes) CC=gcc
3518 without_gcc=no;;
3519 *) CC=$withval
3520 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003521 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003522else
Martin v. Löwis11437992002-04-12 09:54:03 +00003523
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003524 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003525 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003526 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003527 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003528 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003529fi
3530
Matthias Kloseb9621712010-04-24 17:59:49 +00003531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3532$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003533
Guido van Rossum8b131c51995-03-09 14:10:13 +00003534# If the user switches compilers, we can't believe the cache
3535if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3536then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003537 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003538(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003539fi
3540
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003541# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3542# when the compiler supports them, but we don't always want -O2, and
3543# we set -g later.
3544if test -z "$CFLAGS"; then
3545 CFLAGS=
3546fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003547
3548if test "$ac_sys_system" = "Darwin"
3549then
3550 # Compiler selection on MacOSX is more complicated than
3551 # AC_PROG_CC can handle, see Mac/README.txt for more
3552 # information
3553 if test -z "${CC}"
3554 then
3555 found_gcc=
3556 found_clang=
3557 as_save_IFS=$IFS; IFS=:
3558 for as_dir in $PATH
3559 do
3560 IFS=$as_save_IFS
3561 if test -x $as_dir/gcc; then
3562 if test -z "${found_gcc}"; then
3563 found_gcc=$as_dir/gcc
3564 fi
3565 fi
3566 if test -x $as_dir/clang; then
3567 if test -z "${found_clang}"; then
3568 found_clang=$as_dir/clang
3569 fi
3570 fi
3571 done
3572 IFS=$as_save_IFS
3573
3574 if test -n "$found_gcc" -a -n "$found_clang"
3575 then
3576 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3577 then
3578 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3579$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3580 CC="$found_clang"
3581 CXX="$found_clang++"
3582 fi
3583
3584
3585 elif test -z "$found_gcc" -a -n "$found_clang"
3586 then
3587 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3588$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3589 CC="$found_clang"
3590 CXX="$found_clang++"
3591
3592 elif test -z "$found_gcc" -a -z "$found_clang"
3593 then
3594 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3595 if test -n "${found_clang}"
3596 then
3597 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3598$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3599 CC="${found_clang}"
3600 CXX="`/usr/bin/xcrun -find clang++`"
3601
3602 # else: use default behaviour
3603 fi
3604 fi
3605 fi
3606fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003607ac_ext=c
3608ac_cpp='$CPP $CPPFLAGS'
3609ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3610ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3611ac_compiler_gnu=$ac_cv_c_compiler_gnu
3612if test -n "$ac_tool_prefix"; then
3613 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3614set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3616$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003617if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003619else
3620 if test -n "$CC"; then
3621 ac_cv_prog_CC="$CC" # Let the user override the test.
3622else
Martin v. Löwis11437992002-04-12 09:54:03 +00003623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3624for as_dir in $PATH
3625do
3626 IFS=$as_save_IFS
3627 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003629 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 $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 +00003632 break 2
3633 fi
3634done
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003636IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003637
Jack Jansendd19cf82001-12-06 22:36:17 +00003638fi
3639fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003640CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003641if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3643$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003644else
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3646$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003647fi
3648
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003649
Martin v. Löwis11437992002-04-12 09:54:03 +00003650fi
3651if test -z "$ac_cv_prog_CC"; then
3652 ac_ct_CC=$CC
3653 # Extract the first word of "gcc", so it can be a program name with args.
3654set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3656$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003657if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003658 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003659else
3660 if test -n "$ac_ct_CC"; then
3661 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3662else
3663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3664for as_dir in $PATH
3665do
3666 IFS=$as_save_IFS
3667 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003669 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003670 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 $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 +00003672 break 2
3673 fi
3674done
Matthias Kloseb9621712010-04-24 17:59:49 +00003675 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003676IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003677
3678fi
3679fi
3680ac_ct_CC=$ac_cv_prog_ac_ct_CC
3681if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3683$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003684else
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3686$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003687fi
3688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003689 if test "x$ac_ct_CC" = x; then
3690 CC=""
3691 else
3692 case $cross_compiling:$ac_tool_warned in
3693yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003694{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3695$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696ac_tool_warned=yes ;;
3697esac
3698 CC=$ac_ct_CC
3699 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003700else
3701 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003702fi
3703
Jack Jansendd19cf82001-12-06 22:36:17 +00003704if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003705 if test -n "$ac_tool_prefix"; then
3706 # 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 +00003707set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3709$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003710if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003712else
3713 if test -n "$CC"; then
3714 ac_cv_prog_CC="$CC" # Let the user override the test.
3715else
Martin v. Löwis11437992002-04-12 09:54:03 +00003716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3717for as_dir in $PATH
3718do
3719 IFS=$as_save_IFS
3720 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003722 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003723 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 $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 +00003725 break 2
3726 fi
3727done
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003730
3731fi
3732fi
3733CC=$ac_cv_prog_CC
3734if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3736$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003737else
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3739$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003740fi
3741
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003742
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003744fi
3745if test -z "$CC"; then
3746 # Extract the first word of "cc", so it can be a program name with args.
3747set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3749$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003750if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003751 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003752else
3753 if test -n "$CC"; then
3754 ac_cv_prog_CC="$CC" # Let the user override the test.
3755else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003756 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3758for as_dir in $PATH
3759do
3760 IFS=$as_save_IFS
3761 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003763 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003764 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3765 ac_prog_rejected=yes
3766 continue
3767 fi
3768 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 $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 +00003770 break 2
3771 fi
3772done
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003774IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003775
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003776if test $ac_prog_rejected = yes; then
3777 # We found a bogon in the path, so make sure we never use it.
3778 set dummy $ac_cv_prog_CC
3779 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003780 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003781 # We chose a different compiler from the bogus one.
3782 # However, it has the same basename, so the bogon will be chosen
3783 # first if we set CC to just the basename; use the full file name.
3784 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003785 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003786 fi
3787fi
3788fi
3789fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003790CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003791if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3793$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003794else
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3796$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003797fi
3798
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799
Martin v. Löwis11437992002-04-12 09:54:03 +00003800fi
3801if test -z "$CC"; then
3802 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003803 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003804 do
3805 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3806set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3808$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003809if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003811else
3812 if test -n "$CC"; then
3813 ac_cv_prog_CC="$CC" # Let the user override the test.
3814else
Martin v. Löwis11437992002-04-12 09:54:03 +00003815as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3816for as_dir in $PATH
3817do
3818 IFS=$as_save_IFS
3819 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003821 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003822 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 $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 +00003824 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003825 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003826done
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003828IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003829
3830fi
3831fi
3832CC=$ac_cv_prog_CC
3833if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3835$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003836else
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3838$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003839fi
3840
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841
Martin v. Löwis11437992002-04-12 09:54:03 +00003842 test -n "$CC" && break
3843 done
3844fi
3845if test -z "$CC"; then
3846 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003848do
3849 # Extract the first word of "$ac_prog", so it can be a program name with args.
3850set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3852$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003853if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003854 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003855else
3856 if test -n "$ac_ct_CC"; then
3857 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3858else
3859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3860for as_dir in $PATH
3861do
3862 IFS=$as_save_IFS
3863 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003865 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003866 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003867 $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 +00003868 break 2
3869 fi
3870done
Matthias Kloseb9621712010-04-24 17:59:49 +00003871 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003872IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003873
Martin v. Löwis11437992002-04-12 09:54:03 +00003874fi
3875fi
3876ac_ct_CC=$ac_cv_prog_ac_ct_CC
3877if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3879$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003880else
Matthias Kloseb9621712010-04-24 17:59:49 +00003881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3882$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003883fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885
Martin v. Löwis11437992002-04-12 09:54:03 +00003886 test -n "$ac_ct_CC" && break
3887done
Michael W. Hudson54241132001-12-07 15:38:26 +00003888
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003889 if test "x$ac_ct_CC" = x; then
3890 CC=""
3891 else
3892 case $cross_compiling:$ac_tool_warned in
3893yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003894{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3895$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003896ac_tool_warned=yes ;;
3897esac
3898 CC=$ac_ct_CC
3899 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003900fi
3901
3902fi
3903
3904
Matthias Kloseb9621712010-04-24 17:59:49 +00003905test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3906$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003907as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003908See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003909
3910# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003911$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3912set X $ac_compile
3913ac_compiler=$2
3914for ac_option in --version -v -V -qversion; do
3915 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003916case "(($ac_try" in
3917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3918 *) ac_try_echo=$ac_try;;
3919esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003920eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3921$as_echo "$ac_try_echo"; } >&5
3922 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003923 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003924 if test -s conftest.err; then
3925 sed '10a\
3926... rest of stderr output deleted ...
3927 10q' conftest.err >conftest.er1
3928 cat conftest.er1 >&5
3929 fi
3930 rm -f conftest.er1 conftest.err
3931 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3932 test $ac_status = 0; }
3933done
Martin v. Löwis11437992002-04-12 09:54:03 +00003934
Matthias Kloseb9621712010-04-24 17:59:49 +00003935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003936/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003937
Martin v. Löwis11437992002-04-12 09:54:03 +00003938int
3939main ()
3940{
3941
3942 ;
3943 return 0;
3944}
3945_ACEOF
3946ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003947ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003948# Try to create an executable without -o first, disregard a.out.
3949# It will help us diagnose broken compilers, and finding out an intuition
3950# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3952$as_echo_n "checking whether the C compiler works... " >&6; }
3953ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3954
3955# The possible output files:
3956ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3957
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958ac_rmfiles=
3959for ac_file in $ac_files
3960do
3961 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003962 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3964 esac
3965done
3966rm -f $ac_rmfiles
3967
Matthias Kloseb9621712010-04-24 17:59:49 +00003968if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003969case "(($ac_try" in
3970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3971 *) ac_try_echo=$ac_try;;
3972esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003973eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3974$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003976 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003977 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3978 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3980# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3981# in a Makefile. We should not override ac_cv_exeext if it was cached,
3982# so that the user can short-circuit this test for compilers unknown to
3983# Autoconf.
3984for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003985do
3986 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003987 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003988 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003989 ;;
3990 [ab].out )
3991 # We found the default executable, but exeext='' is most
3992 # certainly right.
3993 break;;
3994 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003995 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003996 then :; else
3997 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3998 fi
3999 # We set ac_cv_exeext here because the later test for it is not
4000 # safe: cross compilers may not add the suffix if given an `-o'
4001 # argument, so we may need to know it at that point already.
4002 # Even if this section looks crufty: it has the advantage of
4003 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004004 break;;
4005 * )
4006 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004007 esac
4008done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009test "$ac_cv_exeext" = no && ac_cv_exeext=
4010
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004011else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004012 ac_file=''
4013fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004014if test -z "$ac_file"; then :
4015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4016$as_echo "no" >&6; }
4017$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004018sed 's/^/| /' conftest.$ac_ext >&5
4019
Matthias Kloseb9621712010-04-24 17:59:49 +00004020{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4021$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004022as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004023See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004024else
4025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4026$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004027fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4029$as_echo_n "checking for C compiler default output file name... " >&6; }
4030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4031$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004032ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004033
Matthias Kloseb9621712010-04-24 17:59:49 +00004034rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004035ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4037$as_echo_n "checking for suffix of executables... " >&6; }
4038if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004039case "(($ac_try" in
4040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4041 *) ac_try_echo=$ac_try;;
4042esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004043eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4044$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004045 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004046 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004047 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4048 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004049 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4050# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4051# work properly (i.e., refer to `conftest.exe'), while it won't with
4052# `rm'.
4053for ac_file in conftest.exe conftest conftest.*; do
4054 test -f "$ac_file" || continue
4055 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004056 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004057 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4058 break;;
4059 * ) break;;
4060 esac
4061done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004062else
Matthias Kloseb9621712010-04-24 17:59:49 +00004063 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4064$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004065as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004066See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004067fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004068rm -f conftest conftest$ac_cv_exeext
4069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4070$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004071
4072rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004073EXEEXT=$ac_cv_exeext
4074ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4076/* end confdefs.h. */
4077#include <stdio.h>
4078int
4079main ()
4080{
4081FILE *f = fopen ("conftest.out", "w");
4082 return ferror (f) || fclose (f) != 0;
4083
4084 ;
4085 return 0;
4086}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004088ac_clean_files="$ac_clean_files conftest.out"
4089# Check that the compiler produces executables we can run. If not, either
4090# the compiler is broken, or we cross compile.
4091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4092$as_echo_n "checking whether we are cross compiling... " >&6; }
4093if test "$cross_compiling" != yes; then
4094 { { ac_try="$ac_link"
4095case "(($ac_try" in
4096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4097 *) ac_try_echo=$ac_try;;
4098esac
4099eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4100$as_echo "$ac_try_echo"; } >&5
4101 (eval "$ac_link") 2>&5
4102 ac_status=$?
4103 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4104 test $ac_status = 0; }
4105 if { ac_try='./conftest$ac_cv_exeext'
4106 { { case "(($ac_try" in
4107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4108 *) ac_try_echo=$ac_try;;
4109esac
4110eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4111$as_echo "$ac_try_echo"; } >&5
4112 (eval "$ac_try") 2>&5
4113 ac_status=$?
4114 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4115 test $ac_status = 0; }; }; then
4116 cross_compiling=no
4117 else
4118 if test "$cross_compiling" = maybe; then
4119 cross_compiling=yes
4120 else
4121 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4122$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004123as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004124If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004125See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 fi
4127 fi
4128fi
4129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4130$as_echo "$cross_compiling" >&6; }
4131
4132rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4133ac_clean_files=$ac_clean_files_save
4134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4135$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004136if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 $as_echo_n "(cached) " >&6
4138else
4139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004140/* end confdefs.h. */
4141
4142int
4143main ()
4144{
4145
4146 ;
4147 return 0;
4148}
4149_ACEOF
4150rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004151if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004152case "(($ac_try" in
4153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4154 *) ac_try_echo=$ac_try;;
4155esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004156eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4157$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004159 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004160 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4161 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004162 for ac_file in conftest.o conftest.obj conftest.*; do
4163 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004164 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004165 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004166 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4167 break;;
4168 esac
4169done
4170else
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004172sed 's/^/| /' conftest.$ac_ext >&5
4173
Matthias Kloseb9621712010-04-24 17:59:49 +00004174{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4175$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004176as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004177See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004178fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004179rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4182$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004183OBJEXT=$ac_cv_objext
4184ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4186$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004187if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004188 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004189else
Matthias Kloseb9621712010-04-24 17:59:49 +00004190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004191/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004192
Martin v. Löwis11437992002-04-12 09:54:03 +00004193int
4194main ()
4195{
4196#ifndef __GNUC__
4197 choke me
4198#endif
4199
4200 ;
4201 return 0;
4202}
4203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004204if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004205 ac_compiler_gnu=yes
4206else
Matthias Kloseb9621712010-04-24 17:59:49 +00004207 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004210ac_cv_c_compiler_gnu=$ac_compiler_gnu
4211
4212fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4214$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4215if test $ac_compiler_gnu = yes; then
4216 GCC=yes
4217else
4218 GCC=
4219fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004220ac_test_CFLAGS=${CFLAGS+set}
4221ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4223$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004224if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004225 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004226else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227 ac_save_c_werror_flag=$ac_c_werror_flag
4228 ac_c_werror_flag=yes
4229 ac_cv_prog_cc_g=no
4230 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004232/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004233
Martin v. Löwis11437992002-04-12 09:54:03 +00004234int
4235main ()
4236{
4237
4238 ;
4239 return 0;
4240}
4241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004242if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004243 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004244else
Matthias Kloseb9621712010-04-24 17:59:49 +00004245 CFLAGS=""
4246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004247/* end confdefs.h. */
4248
4249int
4250main ()
4251{
4252
4253 ;
4254 return 0;
4255}
4256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004257if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004258
Matthias Kloseb9621712010-04-24 17:59:49 +00004259else
4260 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263/* end confdefs.h. */
4264
4265int
4266main ()
4267{
4268
4269 ;
4270 return 0;
4271}
4272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004273if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4281 ac_c_werror_flag=$ac_save_c_werror_flag
4282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4284$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004285if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004286 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004287elif test $ac_cv_prog_cc_g = yes; then
4288 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004289 CFLAGS="-g -O2"
4290 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004291 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004292 fi
4293else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004294 if test "$GCC" = yes; then
4295 CFLAGS="-O2"
4296 else
4297 CFLAGS=
4298 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4301$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004302if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004303 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004304else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004306ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004308/* end confdefs.h. */
4309#include <stdarg.h>
4310#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004311struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004312/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4313struct buf { int x; };
4314FILE * (*rcsopen) (struct buf *, struct stat *, int);
4315static char *e (p, i)
4316 char **p;
4317 int i;
4318{
4319 return p[i];
4320}
4321static char *f (char * (*g) (char **, int), char **p, ...)
4322{
4323 char *s;
4324 va_list v;
4325 va_start (v,p);
4326 s = g (p, va_arg (v,int));
4327 va_end (v);
4328 return s;
4329}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004330
4331/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4332 function prototypes and stuff, but not '\xHH' hex character constants.
4333 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004335 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4336 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004338int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4339
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4341 inside strings and character constants. */
4342#define FOO(x) 'x'
4343int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4344
Skip Montanaro6dead952003-09-25 14:50:04 +00004345int test (int i, double x);
4346struct s1 {int (*f) (int a);};
4347struct s2 {int (*f) (double a);};
4348int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4349int argc;
4350char **argv;
4351int
4352main ()
4353{
4354return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4355 ;
4356 return 0;
4357}
4358_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4360 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004361do
4362 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004363 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366rm -f core conftest.err conftest.$ac_objext
4367 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004368done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004370CC=$ac_save_CC
4371
4372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004373# AC_CACHE_VAL
4374case "x$ac_cv_prog_cc_c89" in
4375 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4377$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4380$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004381 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004382 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4384$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004385esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004386if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004387
Matthias Kloseb9621712010-04-24 17:59:49 +00004388fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004389
Martin v. Löwis11437992002-04-12 09:54:03 +00004390ac_ext=c
4391ac_cpp='$CPP $CPPFLAGS'
4392ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4393ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4394ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004395
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004396
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004397
4398
Matthias Kloseb9621712010-04-24 17:59:49 +00004399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4400$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004401
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004402# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004403if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004404 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004405
4406 case $withval in
4407 no) with_cxx_main=no
4408 MAINCC='$(CC)';;
4409 yes) with_cxx_main=yes
4410 MAINCC='$(CXX)';;
4411 *) with_cxx_main=yes
4412 MAINCC=$withval
4413 if test -z "$CXX"
4414 then
4415 CXX=$withval
4416 fi;;
4417 esac
4418else
4419
4420 with_cxx_main=no
4421 MAINCC='$(CC)'
4422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004423fi
4424
Matthias Kloseb9621712010-04-24 17:59:49 +00004425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4426$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004427
4428preset_cxx="$CXX"
4429if test -z "$CXX"
4430then
4431 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004432 gcc) if test -n "$ac_tool_prefix"; then
4433 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4434set dummy ${ac_tool_prefix}g++; ac_word=$2
4435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4436$as_echo_n "checking for $ac_word... " >&6; }
4437if ${ac_cv_path_CXX+:} false; then :
4438 $as_echo_n "(cached) " >&6
4439else
4440 case $CXX in
4441 [\\/]* | ?:[\\/]*)
4442 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4443 ;;
4444 *)
4445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4446for as_dir in notfound
4447do
4448 IFS=$as_save_IFS
4449 test -z "$as_dir" && as_dir=.
4450 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004451 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004452 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4454 break 2
4455 fi
4456done
4457 done
4458IFS=$as_save_IFS
4459
4460 ;;
4461esac
4462fi
4463CXX=$ac_cv_path_CXX
4464if test -n "$CXX"; then
4465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4466$as_echo "$CXX" >&6; }
4467else
4468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4469$as_echo "no" >&6; }
4470fi
4471
4472
4473fi
4474if test -z "$ac_cv_path_CXX"; then
4475 ac_pt_CXX=$CXX
4476 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004477set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4479$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004480if ${ac_cv_path_ac_pt_CXX+:} false; then :
4481 $as_echo_n "(cached) " >&6
4482else
4483 case $ac_pt_CXX in
4484 [\\/]* | ?:[\\/]*)
4485 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4486 ;;
4487 *)
4488 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4489for as_dir in notfound
4490do
4491 IFS=$as_save_IFS
4492 test -z "$as_dir" && as_dir=.
4493 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004494 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004495 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4496 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4497 break 2
4498 fi
4499done
4500 done
4501IFS=$as_save_IFS
4502
4503 ;;
4504esac
4505fi
4506ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4507if test -n "$ac_pt_CXX"; then
4508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4509$as_echo "$ac_pt_CXX" >&6; }
4510else
4511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4512$as_echo "no" >&6; }
4513fi
4514
4515 if test "x$ac_pt_CXX" = x; then
4516 CXX="g++"
4517 else
4518 case $cross_compiling:$ac_tool_warned in
4519yes:)
4520{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4521$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4522ac_tool_warned=yes ;;
4523esac
4524 CXX=$ac_pt_CXX
4525 fi
4526else
4527 CXX="$ac_cv_path_CXX"
4528fi
4529 ;;
4530 cc) if test -n "$ac_tool_prefix"; then
4531 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4532set dummy ${ac_tool_prefix}c++; ac_word=$2
4533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4534$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004535if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004536 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004537else
4538 case $CXX in
4539 [\\/]* | ?:[\\/]*)
4540 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4541 ;;
4542 *)
4543 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4544for as_dir in notfound
4545do
4546 IFS=$as_save_IFS
4547 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004548 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004549 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004550 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004551 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004552 break 2
4553 fi
4554done
Matthias Kloseb9621712010-04-24 17:59:49 +00004555 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004556IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004557
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004558 ;;
4559esac
4560fi
4561CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004562if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4564$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004565else
Matthias Kloseb9621712010-04-24 17:59:49 +00004566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4567$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004569
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004570
4571fi
4572if test -z "$ac_cv_path_CXX"; then
4573 ac_pt_CXX=$CXX
4574 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004575set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4577$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004578if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004579 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004580else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004581 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004582 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004583 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 +00004584 ;;
4585 *)
4586 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4587for as_dir in notfound
4588do
4589 IFS=$as_save_IFS
4590 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004591 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004592 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004593 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004594 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004595 break 2
4596 fi
4597done
Matthias Kloseb9621712010-04-24 17:59:49 +00004598 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004599IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004600
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004601 ;;
4602esac
4603fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004604ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4605if test -n "$ac_pt_CXX"; then
4606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4607$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004608else
Matthias Kloseb9621712010-04-24 17:59:49 +00004609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4610$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004612
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004613 if test "x$ac_pt_CXX" = x; then
4614 CXX="c++"
4615 else
4616 case $cross_compiling:$ac_tool_warned in
4617yes:)
4618{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4619$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4620ac_tool_warned=yes ;;
4621esac
4622 CXX=$ac_pt_CXX
4623 fi
4624else
4625 CXX="$ac_cv_path_CXX"
4626fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004627 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004628 clang|*/clang) if test -n "$ac_tool_prefix"; then
4629 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4630set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4632$as_echo_n "checking for $ac_word... " >&6; }
4633if ${ac_cv_path_CXX+:} false; then :
4634 $as_echo_n "(cached) " >&6
4635else
4636 case $CXX in
4637 [\\/]* | ?:[\\/]*)
4638 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4639 ;;
4640 *)
4641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4642for as_dir in notfound
4643do
4644 IFS=$as_save_IFS
4645 test -z "$as_dir" && as_dir=.
4646 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004647 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004648 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4649 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4650 break 2
4651 fi
4652done
4653 done
4654IFS=$as_save_IFS
4655
Ned Deilycbfb9a52012-06-23 16:02:19 -07004656 ;;
4657esac
4658fi
4659CXX=$ac_cv_path_CXX
4660if test -n "$CXX"; then
4661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4662$as_echo "$CXX" >&6; }
4663else
4664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4665$as_echo "no" >&6; }
4666fi
4667
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004668
4669fi
4670if test -z "$ac_cv_path_CXX"; then
4671 ac_pt_CXX=$CXX
4672 # Extract the first word of "clang++", so it can be a program name with args.
4673set dummy clang++; ac_word=$2
4674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4675$as_echo_n "checking for $ac_word... " >&6; }
4676if ${ac_cv_path_ac_pt_CXX+:} false; then :
4677 $as_echo_n "(cached) " >&6
4678else
4679 case $ac_pt_CXX in
4680 [\\/]* | ?:[\\/]*)
4681 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4682 ;;
4683 *)
4684 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4685for as_dir in notfound
4686do
4687 IFS=$as_save_IFS
4688 test -z "$as_dir" && as_dir=.
4689 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004690 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004691 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4692 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4693 break 2
4694 fi
4695done
4696 done
4697IFS=$as_save_IFS
4698
4699 ;;
4700esac
4701fi
4702ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4703if test -n "$ac_pt_CXX"; then
4704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4705$as_echo "$ac_pt_CXX" >&6; }
4706else
4707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4708$as_echo "no" >&6; }
4709fi
4710
4711 if test "x$ac_pt_CXX" = x; then
4712 CXX="clang++"
4713 else
4714 case $cross_compiling:$ac_tool_warned in
4715yes:)
4716{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4717$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4718ac_tool_warned=yes ;;
4719esac
4720 CXX=$ac_pt_CXX
4721 fi
4722else
4723 CXX="$ac_cv_path_CXX"
4724fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004725 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004726 esac
4727 if test "$CXX" = "notfound"
4728 then
4729 CXX=""
4730 fi
4731fi
4732if test -z "$CXX"
4733then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004734 if test -n "$ac_tool_prefix"; then
4735 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4736 do
4737 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4738set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4740$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004741if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004742 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004743else
4744 if test -n "$CXX"; then
4745 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4746else
4747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4748for as_dir in $PATH
4749do
4750 IFS=$as_save_IFS
4751 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004752 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004753 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004754 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004755 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004756 break 2
4757 fi
4758done
Matthias Kloseb9621712010-04-24 17:59:49 +00004759 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004760IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004761
4762fi
4763fi
4764CXX=$ac_cv_prog_CXX
4765if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4767$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004768else
Matthias Kloseb9621712010-04-24 17:59:49 +00004769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4770$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004771fi
4772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004773
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004774 test -n "$CXX" && break
4775 done
4776fi
4777if test -z "$CXX"; then
4778 ac_ct_CXX=$CXX
4779 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4780do
4781 # Extract the first word of "$ac_prog", so it can be a program name with args.
4782set dummy $ac_prog; ac_word=$2
4783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4784$as_echo_n "checking for $ac_word... " >&6; }
4785if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4786 $as_echo_n "(cached) " >&6
4787else
4788 if test -n "$ac_ct_CXX"; then
4789 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4790else
4791as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4792for as_dir in $PATH
4793do
4794 IFS=$as_save_IFS
4795 test -z "$as_dir" && as_dir=.
4796 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004797 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004798 ac_cv_prog_ac_ct_CXX="$ac_prog"
4799 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4800 break 2
4801 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004802done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004803 done
4804IFS=$as_save_IFS
4805
4806fi
4807fi
4808ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4809if test -n "$ac_ct_CXX"; then
4810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4811$as_echo "$ac_ct_CXX" >&6; }
4812else
4813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4814$as_echo "no" >&6; }
4815fi
4816
4817
4818 test -n "$ac_ct_CXX" && break
4819done
4820
4821 if test "x$ac_ct_CXX" = x; then
4822 CXX="notfound"
4823 else
4824 case $cross_compiling:$ac_tool_warned in
4825yes:)
4826{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4827$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4828ac_tool_warned=yes ;;
4829esac
4830 CXX=$ac_ct_CXX
4831 fi
4832fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004833
4834 if test "$CXX" = "notfound"
4835 then
4836 CXX=""
4837 fi
4838fi
4839if test "$preset_cxx" != "$CXX"
4840then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004841 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004842
4843 By default, distutils will build C++ extension modules with \"$CXX\".
4844 If this is not intended, then set CXX on the configure command line.
4845 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004846$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847
4848 By default, distutils will build C++ extension modules with \"$CXX\".
4849 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004850 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004851fi
4852
4853
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4855$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4856save_LDFLAGS="$LDFLAGS"
4857LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004858
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4860/* end confdefs.h. */
4861
4862int
4863main ()
4864{
4865
4866 ;
4867 return 0;
4868}
4869_ACEOF
4870if ac_fn_c_try_link "$LINENO"; then :
4871 NO_AS_NEEDED="-Wl,--no-as-needed"
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4873$as_echo "yes" >&6; }
4874else
4875 NO_AS_NEEDED=""
4876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4877$as_echo "no" >&6; }
4878fi
4879rm -f core conftest.err conftest.$ac_objext \
4880 conftest$ac_exeext conftest.$ac_ext
4881LDFLAGS="$save_LDFLAGS"
4882
4883
4884
4885# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004886ac_ext=c
4887ac_cpp='$CPP $CPPFLAGS'
4888ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4889ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4890ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4892$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004893# On Suns, sometimes $CPP names a directory.
4894if test -n "$CPP" && test -d "$CPP"; then
4895 CPP=
4896fi
4897if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004898 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004899 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004900else
Martin v. Löwis11437992002-04-12 09:54:03 +00004901 # Double quotes because CPP needs to be expanded
4902 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4903 do
4904 ac_preproc_ok=false
4905for ac_c_preproc_warn_flag in '' yes
4906do
4907 # Use a header file that comes with gcc, so configuring glibc
4908 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004909 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4910 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004911 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004912 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004914/* end confdefs.h. */
4915#ifdef __STDC__
4916# include <limits.h>
4917#else
4918# include <assert.h>
4919#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004920 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004922if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004923
Matthias Kloseb9621712010-04-24 17:59:49 +00004924else
Martin v. Löwis11437992002-04-12 09:54:03 +00004925 # Broken: fails on valid input.
4926continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004927fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004928rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004929
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004930 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004931 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004934#include <ac_nonexistent.h>
4935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004936if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004937 # Broken: success on invalid input.
4938continue
4939else
Martin v. Löwis11437992002-04-12 09:54:03 +00004940 # Passes both tests.
4941ac_preproc_ok=:
4942break
4943fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004944rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004945
4946done
4947# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004948rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004949if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004950 break
4951fi
4952
4953 done
4954 ac_cv_prog_CPP=$CPP
4955
4956fi
4957 CPP=$ac_cv_prog_CPP
4958else
4959 ac_cv_prog_CPP=$CPP
4960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4962$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004963ac_preproc_ok=false
4964for ac_c_preproc_warn_flag in '' yes
4965do
4966 # Use a header file that comes with gcc, so configuring glibc
4967 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004968 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4969 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004970 # On the NeXT, cc -E runs the code through the compiler's parser,
4971 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004973/* end confdefs.h. */
4974#ifdef __STDC__
4975# include <limits.h>
4976#else
4977# include <assert.h>
4978#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004979 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004981if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004982
Matthias Kloseb9621712010-04-24 17:59:49 +00004983else
Martin v. Löwis11437992002-04-12 09:54:03 +00004984 # Broken: fails on valid input.
4985continue
4986fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004987rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004989 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004990 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004992/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004993#include <ac_nonexistent.h>
4994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004995if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004996 # Broken: success on invalid input.
4997continue
4998else
Martin v. Löwis11437992002-04-12 09:54:03 +00004999 # Passes both tests.
5000ac_preproc_ok=:
5001break
5002fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005003rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005004
5005done
5006# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005007rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005008if $ac_preproc_ok; then :
5009
Martin v. Löwis11437992002-04-12 09:54:03 +00005010else
Matthias Kloseb9621712010-04-24 17:59:49 +00005011 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5012$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005013as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02005014See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005015fi
5016
5017ac_ext=c
5018ac_cpp='$CPP $CPPFLAGS'
5019ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5020ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5021ac_compiler_gnu=$ac_cv_c_compiler_gnu
5022
5023
Matthias Kloseb9621712010-04-24 17:59:49 +00005024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5025$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005026if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005027 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00005028else
Matthias Kloseb9621712010-04-24 17:59:49 +00005029 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005030 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 # Loop through the user's path and test for each of PROGNAME-LIST
5032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005033for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5034do
5035 IFS=$as_save_IFS
5036 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 for ac_prog in grep ggrep; do
5038 for ac_exec_ext in '' $ac_executable_extensions; do
5039 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005040 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005041# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005042 # Check for GNU $ac_path_GREP
5043case `"$ac_path_GREP" --version 2>&1` in
5044*GNU*)
5045 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5046*)
5047 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005048 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005049 while :
5050 do
5051 cat "conftest.in" "conftest.in" >"conftest.tmp"
5052 mv "conftest.tmp" "conftest.in"
5053 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005054 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005055 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5056 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005057 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005058 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5059 # Best one so far, save it but keep looking for a better one
5060 ac_cv_path_GREP="$ac_path_GREP"
5061 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005062 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005063 # 10*(2^10) chars as input seems more than enough
5064 test $ac_count -gt 10 && break
5065 done
5066 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5067esac
5068
Matthias Kloseb9621712010-04-24 17:59:49 +00005069 $ac_path_GREP_found && break 3
5070 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005071 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005073IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005074 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005075 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 +00005076 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005077else
5078 ac_cv_path_GREP=$GREP
5079fi
5080
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005081fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5083$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005084 GREP="$ac_cv_path_GREP"
5085
5086
Matthias Kloseb9621712010-04-24 17:59:49 +00005087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5088$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005089if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005091else
5092 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5093 then ac_cv_path_EGREP="$GREP -E"
5094 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005095 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005096 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 # Loop through the user's path and test for each of PROGNAME-LIST
5098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005099for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5100do
5101 IFS=$as_save_IFS
5102 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 for ac_prog in egrep; do
5104 for ac_exec_ext in '' $ac_executable_extensions; do
5105 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005106 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005107# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005108 # Check for GNU $ac_path_EGREP
5109case `"$ac_path_EGREP" --version 2>&1` in
5110*GNU*)
5111 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5112*)
5113 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005114 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005115 while :
5116 do
5117 cat "conftest.in" "conftest.in" >"conftest.tmp"
5118 mv "conftest.tmp" "conftest.in"
5119 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005120 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005121 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5122 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005123 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005124 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5125 # Best one so far, save it but keep looking for a better one
5126 ac_cv_path_EGREP="$ac_path_EGREP"
5127 ac_path_EGREP_max=$ac_count
5128 fi
5129 # 10*(2^10) chars as input seems more than enough
5130 test $ac_count -gt 10 && break
5131 done
5132 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5133esac
5134
Matthias Kloseb9621712010-04-24 17:59:49 +00005135 $ac_path_EGREP_found && break 3
5136 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005137 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005138 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005139IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005140 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005141 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 +00005142 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005143else
5144 ac_cv_path_EGREP=$EGREP
5145fi
5146
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005147 fi
5148fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5150$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005151 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005152
5153
Matthias Kloseb9621712010-04-24 17:59:49 +00005154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5155$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005156if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005157 $as_echo_n "(cached) " >&6
5158else
5159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005160/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005161#include <stdlib.h>
5162#include <stdarg.h>
5163#include <string.h>
5164#include <float.h>
5165
5166int
5167main ()
5168{
5169
5170 ;
5171 return 0;
5172}
5173_ACEOF
5174if ac_fn_c_try_compile "$LINENO"; then :
5175 ac_cv_header_stdc=yes
5176else
5177 ac_cv_header_stdc=no
5178fi
5179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5180
5181if test $ac_cv_header_stdc = yes; then
5182 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5184/* end confdefs.h. */
5185#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005186
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005187_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005188if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005189 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005190
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005191else
Matthias Kloseb9621712010-04-24 17:59:49 +00005192 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005193fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005194rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005195
Matthias Kloseb9621712010-04-24 17:59:49 +00005196fi
5197
5198if test $ac_cv_header_stdc = yes; then
5199 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5201/* end confdefs.h. */
5202#include <stdlib.h>
5203
5204_ACEOF
5205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5206 $EGREP "free" >/dev/null 2>&1; then :
5207
5208else
5209 ac_cv_header_stdc=no
5210fi
5211rm -f conftest*
5212
5213fi
5214
5215if test $ac_cv_header_stdc = yes; then
5216 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5217 if test "$cross_compiling" = yes; then :
5218 :
5219else
5220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5221/* end confdefs.h. */
5222#include <ctype.h>
5223#include <stdlib.h>
5224#if ((' ' & 0x0FF) == 0x020)
5225# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5226# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5227#else
5228# define ISLOWER(c) \
5229 (('a' <= (c) && (c) <= 'i') \
5230 || ('j' <= (c) && (c) <= 'r') \
5231 || ('s' <= (c) && (c) <= 'z'))
5232# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5233#endif
5234
5235#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5236int
5237main ()
5238{
5239 int i;
5240 for (i = 0; i < 256; i++)
5241 if (XOR (islower (i), ISLOWER (i))
5242 || toupper (i) != TOUPPER (i))
5243 return 2;
5244 return 0;
5245}
5246_ACEOF
5247if ac_fn_c_try_run "$LINENO"; then :
5248
5249else
5250 ac_cv_header_stdc=no
5251fi
5252rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5253 conftest.$ac_objext conftest.beam conftest.$ac_ext
5254fi
5255
5256fi
5257fi
5258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5259$as_echo "$ac_cv_header_stdc" >&6; }
5260if test $ac_cv_header_stdc = yes; then
5261
5262$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5263
5264fi
5265
5266# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5267for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5268 inttypes.h stdint.h unistd.h
5269do :
5270 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5271ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5272"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005273if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005274 cat >>confdefs.h <<_ACEOF
5275#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5276_ACEOF
5277
5278fi
5279
5280done
5281
5282
5283
5284 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 +02005285if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005286 MINIX=yes
5287else
5288 MINIX=
5289fi
5290
5291
5292 if test "$MINIX" = yes; then
5293
5294$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5295
5296
5297$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5298
5299
5300$as_echo "#define _MINIX 1" >>confdefs.h
5301
5302 fi
5303
5304
5305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5306$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005307if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005308 $as_echo_n "(cached) " >&6
5309else
5310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5311/* end confdefs.h. */
5312
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005313# define __EXTENSIONS__ 1
5314 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005315int
5316main ()
5317{
5318
5319 ;
5320 return 0;
5321}
5322_ACEOF
5323if ac_fn_c_try_compile "$LINENO"; then :
5324 ac_cv_safe_to_define___extensions__=yes
5325else
5326 ac_cv_safe_to_define___extensions__=no
5327fi
5328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5329fi
5330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5331$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5332 test $ac_cv_safe_to_define___extensions__ = yes &&
5333 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5334
5335 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5336
5337 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5338
5339 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5340
5341 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5342
5343
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005344
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005345# Check for unsupported systems
5346case $ac_sys_system/$ac_sys_release in
5347atheos*|Linux*/1*)
5348 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5349 echo See README for details.
5350 exit 1;;
5351esac
5352
5353
Matthias Kloseb9621712010-04-24 17:59:49 +00005354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5355$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005356
5357# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005358if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005359 withval=$with_suffix;
5360 case $withval in
5361 no) EXEEXT=;;
5362 yes) EXEEXT=.exe;;
5363 *) EXEEXT=$withval;;
5364 esac
5365fi
5366
Matthias Kloseb9621712010-04-24 17:59:49 +00005367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5368$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369
5370# Test whether we're running on a non-case-sensitive system, in which
5371# case we give a warning if no ext is given
5372
Matthias Kloseb9621712010-04-24 17:59:49 +00005373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5374$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005375if test ! -d CaseSensitiveTestDir; then
5376mkdir CaseSensitiveTestDir
5377fi
5378
5379if test -d casesensitivetestdir
5380then
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5382$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383 BUILDEXEEXT=.exe
5384else
Matthias Kloseb9621712010-04-24 17:59:49 +00005385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5386$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005387 BUILDEXEEXT=$EXEEXT
5388fi
5389rmdir CaseSensitiveTestDir
5390
5391case $MACHDEP in
5392bsdos*)
5393 case $CC in
5394 gcc) CC="$CC -D_HAVE_BSDI";;
5395 esac;;
5396esac
5397
5398case $ac_sys_system in
5399hp*|HP*)
5400 case $CC in
5401 cc|*/cc) CC="$CC -Ae";;
5402 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005403esac
5404
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005405MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5406
5407
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408
5409
Matthias Kloseb9621712010-04-24 17:59:49 +00005410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5411$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005412if test -z "$LIBRARY"
5413then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005414 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5417$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418
5419# LDLIBRARY is the name of the library to link against (as opposed to the
5420# name of the library into which to insert object files). BLDLIBRARY is also
5421# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5422# is blank as the main program is not linked directly against LDLIBRARY.
5423# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5424# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5425# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5426# DLLLIBRARY is the shared (i.e., DLL) library.
5427#
5428# RUNSHARED is used to run shared python without installed libraries
5429#
5430# INSTSONAME is the name of the shared library that will be use to install
5431# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005432#
5433# LDVERSION is the shared library version number, normally the Python version
5434# with the ABI build flags appended.
5435
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436
5437
5438
5439
5440
5441
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005442
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443LDLIBRARY="$LIBRARY"
5444BLDLIBRARY='$(LDLIBRARY)'
5445INSTSONAME='$(LDLIBRARY)'
5446DLLLIBRARY=''
5447LDLIBRARYDIR=''
5448RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005449LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005450
5451# LINKCC is the command that links the python executable -- default is $(CC).
5452# If CXX is set, and if it is needed to link a main function that was
5453# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5454# python might then depend on the C++ runtime
5455# This is altered for AIX in order to build the export list before
5456# linking.
5457
Matthias Kloseb9621712010-04-24 17:59:49 +00005458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5459$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005460if test -z "$LINKCC"
5461then
5462 LINKCC='$(PURIFY) $(MAINCC)'
5463 case $ac_sys_system in
5464 AIX*)
5465 exp_extra="\"\""
5466 if test $ac_sys_release -ge 5 -o \
5467 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5468 exp_extra="."
5469 fi
5470 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005471 QNX*)
5472 # qcc must be used because the other compilers do not
5473 # support -N.
5474 LINKCC=qcc;;
5475 esac
5476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5478$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005479
5480# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5481# make sure we default having it set to "no": this is used by
5482# distutils.unixccompiler to know if it should add --enable-new-dtags
5483# to linker command lines, and failing to detect GNU ld simply results
5484# in the same bahaviour as before.
5485
Matthias Kloseb9621712010-04-24 17:59:49 +00005486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5487$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005488ac_prog=ld
5489if test "$GCC" = yes; then
5490 ac_prog=`$CC -print-prog-name=ld`
5491fi
5492case `"$ac_prog" -V 2>&1 < /dev/null` in
5493 *GNU*)
5494 GNULD=yes;;
5495 *)
5496 GNULD=no;;
5497esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5499$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005500
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5502$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005503if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005504 $as_echo_n "(cached) " >&6
5505else
5506 ac_cv_c_inline=no
5507for ac_kw in inline __inline__ __inline; do
5508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5509/* end confdefs.h. */
5510#ifndef __cplusplus
5511typedef int foo_t;
5512static $ac_kw foo_t static_foo () {return 0; }
5513$ac_kw foo_t foo () {return 0; }
5514#endif
5515
5516_ACEOF
5517if ac_fn_c_try_compile "$LINENO"; then :
5518 ac_cv_c_inline=$ac_kw
5519fi
5520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5521 test "$ac_cv_c_inline" != no && break
5522done
5523
5524fi
5525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5526$as_echo "$ac_cv_c_inline" >&6; }
5527
5528case $ac_cv_c_inline in
5529 inline | yes) ;;
5530 *)
5531 case $ac_cv_c_inline in
5532 no) ac_val=;;
5533 *) ac_val=$ac_cv_c_inline;;
5534 esac
5535 cat >>confdefs.h <<_ACEOF
5536#ifndef __cplusplus
5537#define inline $ac_val
5538#endif
5539_ACEOF
5540 ;;
5541esac
5542
5543if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005544
5545$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005546
5547
5548fi
5549
5550
Matthias Kloseb9621712010-04-24 17:59:49 +00005551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5552$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005553# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005554if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555 enableval=$enable_shared;
5556fi
5557
5558
5559if test -z "$enable_shared"
5560then
5561 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005562 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005563 enable_shared="yes";;
5564 *)
5565 enable_shared="no";;
5566 esac
5567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5569$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005570
Matthias Kloseb9621712010-04-24 17:59:49 +00005571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5572$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005573# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005574if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005575 enableval=$enable_profiling;
5576fi
5577
5578if test "x$enable_profiling" = xyes; then
5579 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005580 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005582/* end confdefs.h. */
5583int main() { return 0; }
5584_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005585if ac_fn_c_try_link "$LINENO"; then :
5586
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005588 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005589fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005590rm -f core conftest.err conftest.$ac_objext \
5591 conftest$ac_exeext conftest.$ac_ext
5592 CC="$ac_save_cc"
5593else
5594 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005595fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5597$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598
doko@ubuntu.comba015832012-06-30 16:52:05 +02005599if test "x$enable_profiling" = xyes; then
5600 BASECFLAGS="-pg $BASECFLAGS"
5601 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602fi
5603
Matthias Kloseb9621712010-04-24 17:59:49 +00005604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5605$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005606
5607# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5608# library that we build, but we do not want to link against it (we
5609# will find it with a -framework option). For this reason there is an
5610# extra variable BLDLIBRARY against which Python and the extension
5611# modules are linked, BLDLIBRARY. This is normally the same as
5612# LDLIBRARY, but empty for MacOSX framework builds.
5613if test "$enable_framework"
5614then
5615 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005616 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005617 BLDLIBRARY=''
5618else
5619 BLDLIBRARY='$(LDLIBRARY)'
5620fi
5621
5622# Other platforms follow
5623if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005624 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625
Matthias Kloseb9621712010-04-24 17:59:49 +00005626$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627
5628 case $ac_sys_system in
5629 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005630 LDLIBRARY='libpython$(LDVERSION).dll.a'
5631 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005632 ;;
5633 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005634 LDLIBRARY='libpython$(LDVERSION).so'
5635 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005636 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005637 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005638 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005639 then
5640 PY3LIBRARY=libpython3.so
5641 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005642 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005643 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005644 LDLIBRARY='libpython$(LDVERSION).so'
5645 BLDLIBRARY='-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 case $ac_sys_system in
5648 FreeBSD*)
5649 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5650 ;;
5651 esac
5652 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005653 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005654 then
5655 PY3LIBRARY=libpython3.so
5656 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657 ;;
5658 hp*|HP*)
5659 case `uname -m` in
5660 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005661 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662 ;;
5663 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005664 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665 ;;
5666 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005667 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005668 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005671 LDLIBRARY='libpython$(LDVERSION).dylib'
5672 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005673 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005675 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005676 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005677 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005678 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679
5680 esac
5681else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005682 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683 case $ac_sys_system in
5684 CYGWIN*)
5685 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005686 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687 ;;
5688 esac
5689fi
5690
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005691if test "$cross_compiling" = yes; then
5692 RUNSHARED=
5693fi
5694
Matthias Kloseb9621712010-04-24 17:59:49 +00005695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5696$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697
5698if test -n "$ac_tool_prefix"; then
5699 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5700set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5702$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005703if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005704 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705else
5706 if test -n "$RANLIB"; then
5707 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5708else
5709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5710for as_dir in $PATH
5711do
5712 IFS=$as_save_IFS
5713 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005714 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005715 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005717 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718 break 2
5719 fi
5720done
Matthias Kloseb9621712010-04-24 17:59:49 +00005721 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722IFS=$as_save_IFS
5723
5724fi
5725fi
5726RANLIB=$ac_cv_prog_RANLIB
5727if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5729$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730else
Matthias Kloseb9621712010-04-24 17:59:49 +00005731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5732$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733fi
5734
5735
5736fi
5737if test -z "$ac_cv_prog_RANLIB"; then
5738 ac_ct_RANLIB=$RANLIB
5739 # Extract the first word of "ranlib", so it can be a program name with args.
5740set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5742$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005743if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005744 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745else
5746 if test -n "$ac_ct_RANLIB"; then
5747 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5748else
5749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5750for as_dir in $PATH
5751do
5752 IFS=$as_save_IFS
5753 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005754 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005755 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005757 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758 break 2
5759 fi
5760done
Matthias Kloseb9621712010-04-24 17:59:49 +00005761 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762IFS=$as_save_IFS
5763
5764fi
5765fi
5766ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5767if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5769$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770else
Matthias Kloseb9621712010-04-24 17:59:49 +00005771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5772$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773fi
5774
5775 if test "x$ac_ct_RANLIB" = x; then
5776 RANLIB=":"
5777 else
5778 case $cross_compiling:$ac_tool_warned in
5779yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005780{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5781$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782ac_tool_warned=yes ;;
5783esac
5784 RANLIB=$ac_ct_RANLIB
5785 fi
5786else
5787 RANLIB="$ac_cv_prog_RANLIB"
5788fi
5789
5790
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005791if test -n "$ac_tool_prefix"; then
5792 for ac_prog in ar aal
5793 do
5794 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5795set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5797$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005798if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005799 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800else
5801 if test -n "$AR"; then
5802 ac_cv_prog_AR="$AR" # Let the user override the test.
5803else
5804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5805for as_dir in $PATH
5806do
5807 IFS=$as_save_IFS
5808 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005809 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005810 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005811 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005812 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813 break 2
5814 fi
5815done
Matthias Kloseb9621712010-04-24 17:59:49 +00005816 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817IFS=$as_save_IFS
5818
5819fi
5820fi
5821AR=$ac_cv_prog_AR
5822if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5824$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825else
Matthias Kloseb9621712010-04-24 17:59:49 +00005826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5827$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828fi
5829
5830
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005831 test -n "$AR" && break
5832 done
5833fi
5834if test -z "$AR"; then
5835 ac_ct_AR=$AR
5836 for ac_prog in ar aal
5837do
5838 # Extract the first word of "$ac_prog", so it can be a program name with args.
5839set dummy $ac_prog; ac_word=$2
5840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5841$as_echo_n "checking for $ac_word... " >&6; }
5842if ${ac_cv_prog_ac_ct_AR+:} false; then :
5843 $as_echo_n "(cached) " >&6
5844else
5845 if test -n "$ac_ct_AR"; then
5846 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5847else
5848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5849for as_dir in $PATH
5850do
5851 IFS=$as_save_IFS
5852 test -z "$as_dir" && as_dir=.
5853 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005854 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005855 ac_cv_prog_ac_ct_AR="$ac_prog"
5856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5857 break 2
5858 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005860 done
5861IFS=$as_save_IFS
5862
5863fi
5864fi
5865ac_ct_AR=$ac_cv_prog_ac_ct_AR
5866if test -n "$ac_ct_AR"; then
5867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5868$as_echo "$ac_ct_AR" >&6; }
5869else
5870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5871$as_echo "no" >&6; }
5872fi
5873
5874
5875 test -n "$ac_ct_AR" && break
5876done
5877
5878 if test "x$ac_ct_AR" = x; then
5879 AR="ar"
5880 else
5881 case $cross_compiling:$ac_tool_warned in
5882yes:)
5883{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5884$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5885ac_tool_warned=yes ;;
5886esac
5887 AR=$ac_ct_AR
5888 fi
5889fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890
5891
5892# tweak ARFLAGS only if the user didn't set it on the command line
5893
5894if test -z "$ARFLAGS"
5895then
5896 ARFLAGS="rc"
5897fi
5898
doko@ubuntu.com58844492012-06-30 18:25:32 +02005899if test -n "$ac_tool_prefix"; then
5900 for ac_prog in readelf
5901 do
5902 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5903set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5905$as_echo_n "checking for $ac_word... " >&6; }
5906if ${ac_cv_prog_READELF+:} false; then :
5907 $as_echo_n "(cached) " >&6
5908else
5909 if test -n "$READELF"; then
5910 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5911else
5912as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5913for as_dir in $PATH
5914do
5915 IFS=$as_save_IFS
5916 test -z "$as_dir" && as_dir=.
5917 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005918 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005919 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5920 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5921 break 2
5922 fi
5923done
5924 done
5925IFS=$as_save_IFS
5926
5927fi
5928fi
5929READELF=$ac_cv_prog_READELF
5930if test -n "$READELF"; then
5931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5932$as_echo "$READELF" >&6; }
5933else
5934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5935$as_echo "no" >&6; }
5936fi
5937
5938
5939 test -n "$READELF" && break
5940 done
5941fi
5942if test -z "$READELF"; then
5943 ac_ct_READELF=$READELF
5944 for ac_prog in readelf
5945do
5946 # Extract the first word of "$ac_prog", so it can be a program name with args.
5947set dummy $ac_prog; ac_word=$2
5948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5949$as_echo_n "checking for $ac_word... " >&6; }
5950if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5951 $as_echo_n "(cached) " >&6
5952else
5953 if test -n "$ac_ct_READELF"; then
5954 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5955else
5956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5957for as_dir in $PATH
5958do
5959 IFS=$as_save_IFS
5960 test -z "$as_dir" && as_dir=.
5961 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005962 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005963 ac_cv_prog_ac_ct_READELF="$ac_prog"
5964 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5965 break 2
5966 fi
5967done
5968 done
5969IFS=$as_save_IFS
5970
5971fi
5972fi
5973ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5974if test -n "$ac_ct_READELF"; then
5975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5976$as_echo "$ac_ct_READELF" >&6; }
5977else
5978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5979$as_echo "no" >&6; }
5980fi
5981
5982
5983 test -n "$ac_ct_READELF" && break
5984done
5985
5986 if test "x$ac_ct_READELF" = x; then
5987 READELF=":"
5988 else
5989 case $cross_compiling:$ac_tool_warned in
5990yes:)
5991{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5992$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5993ac_tool_warned=yes ;;
5994esac
5995 READELF=$ac_ct_READELF
5996 fi
5997fi
5998
5999if test "$cross_compiling" = yes; then
6000 case "$READELF" in
6001 readelf|:)
6002 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6003 ;;
6004 esac
6005fi
6006
6007
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008
Matthias Klosec4c48422012-10-21 23:05:35 +02006009for ac_prog in python$PACKAGE_VERSION python3 python
6010do
6011 # Extract the first word of "$ac_prog", so it can be a program name with args.
6012set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6014$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006015if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006016 $as_echo_n "(cached) " >&6
6017else
Matthias Klosec4c48422012-10-21 23:05:35 +02006018 if test -n "$PYTHON"; then
6019 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006020else
6021as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6022for as_dir in $PATH
6023do
6024 IFS=$as_save_IFS
6025 test -z "$as_dir" && as_dir=.
6026 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006027 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006028 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006029 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6030 break 2
6031 fi
6032done
6033 done
6034IFS=$as_save_IFS
6035
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006036fi
6037fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006038PYTHON=$ac_cv_prog_PYTHON
6039if test -n "$PYTHON"; then
6040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6041$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006042else
6043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6044$as_echo "no" >&6; }
6045fi
6046
6047
Matthias Klosec4c48422012-10-21 23:05:35 +02006048 test -n "$PYTHON" && break
6049done
6050test -n "$PYTHON" || PYTHON="not-found"
6051
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006052if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006053 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6054else
6055 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006056fi
6057
6058
Kushal Das02d23a22014-04-15 23:50:06 +05306059for ac_prog in python$PACKAGE_VERSION python3 python
6060do
6061 # Extract the first word of "$ac_prog", so it can be a program name with args.
6062set dummy $ac_prog; ac_word=$2
6063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6064$as_echo_n "checking for $ac_word... " >&6; }
6065if ${ac_cv_prog_PYTHON+:} false; then :
6066 $as_echo_n "(cached) " >&6
6067else
6068 if test -n "$PYTHON"; then
6069 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6070else
6071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6072for as_dir in $PATH
6073do
6074 IFS=$as_save_IFS
6075 test -z "$as_dir" && as_dir=.
6076 for ac_exec_ext in '' $ac_executable_extensions; do
6077 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6078 ac_cv_prog_PYTHON="$ac_prog"
6079 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6080 break 2
6081 fi
6082done
6083 done
6084IFS=$as_save_IFS
6085
6086fi
6087fi
6088PYTHON=$ac_cv_prog_PYTHON
6089if test -n "$PYTHON"; then
6090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6091$as_echo "$PYTHON" >&6; }
6092else
6093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6094$as_echo "no" >&6; }
6095fi
6096
6097
6098 test -n "$PYTHON" && break
6099done
6100test -n "$PYTHON" || PYTHON="not-found"
6101
6102if test "$PYTHON" = not-found; then
6103 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6104else
6105 OPCODEHGEN="$PYTHON"
6106fi
6107
6108
6109
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006110case $MACHDEP in
6111bsdos*|hp*|HP*)
6112 # install -d does not work on BSDI or HP-UX
6113 if test -z "$INSTALL"
6114 then
6115 INSTALL="${srcdir}/install-sh -c"
6116 fi
6117esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006118# Find a good install program. We prefer a C program (faster),
6119# so one script is as good as another. But avoid the broken or
6120# incompatible versions:
6121# SysV /etc/install, /usr/sbin/install
6122# SunOS /usr/etc/install
6123# IRIX /sbin/install
6124# AIX /bin/install
6125# AmigaOS /C/install, which installs bootblocks on floppy discs
6126# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6127# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6128# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6129# OS/2's system install, which has a completely different semantic
6130# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006131# Reject install programs that cannot install multiple files.
6132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6133$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006134if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006135if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006136 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006137else
6138 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6139for as_dir in $PATH
6140do
6141 IFS=$as_save_IFS
6142 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006143 # Account for people who put trailing slashes in PATH elements.
6144case $as_dir/ in #((
6145 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006146 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006147 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006148 /usr/ucb/* ) ;;
6149 *)
6150 # OSF1 and SCO ODT 3.0 have their own names for install.
6151 # Don't use installbsd from OSF since it installs stuff as root
6152 # by default.
6153 for ac_prog in ginstall scoinst install; do
6154 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006155 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156 if test $ac_prog = install &&
6157 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6158 # AIX install. It has an incompatible calling convention.
6159 :
6160 elif test $ac_prog = install &&
6161 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6162 # program-specific install script used by HP pwplus--don't use.
6163 :
6164 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006165 rm -rf conftest.one conftest.two conftest.dir
6166 echo one > conftest.one
6167 echo two > conftest.two
6168 mkdir conftest.dir
6169 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6170 test -s conftest.one && test -s conftest.two &&
6171 test -s conftest.dir/conftest.one &&
6172 test -s conftest.dir/conftest.two
6173 then
6174 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6175 break 3
6176 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006177 fi
6178 fi
6179 done
6180 done
6181 ;;
6182esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006183
6184 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006185IFS=$as_save_IFS
6186
Matthias Kloseb9621712010-04-24 17:59:49 +00006187rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188
6189fi
6190 if test "${ac_cv_path_install+set}" = set; then
6191 INSTALL=$ac_cv_path_install
6192 else
6193 # As a last resort, use the slow shell script. Don't cache a
6194 # value for INSTALL within a source directory, because that will
6195 # break other packages using the cache if that directory is
6196 # removed, or if the value is a relative name.
6197 INSTALL=$ac_install_sh
6198 fi
6199fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6201$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202
6203# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6204# It thinks the first close brace ends the variable substitution.
6205test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6206
6207test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6208
6209test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6210
Matthias Klose93a0ef12012-03-15 18:08:34 +01006211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6212$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6213if test -z "$MKDIR_P"; then
6214 if ${ac_cv_path_mkdir+:} false; then :
6215 $as_echo_n "(cached) " >&6
6216else
6217 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6218for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6219do
6220 IFS=$as_save_IFS
6221 test -z "$as_dir" && as_dir=.
6222 for ac_prog in mkdir gmkdir; do
6223 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006224 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006225 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6226 'mkdir (GNU coreutils) '* | \
6227 'mkdir (coreutils) '* | \
6228 'mkdir (fileutils) '4.1*)
6229 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6230 break 3;;
6231 esac
6232 done
6233 done
6234 done
6235IFS=$as_save_IFS
6236
6237fi
6238
6239 test -d ./--version && rmdir ./--version
6240 if test "${ac_cv_path_mkdir+set}" = set; then
6241 MKDIR_P="$ac_cv_path_mkdir -p"
6242 else
6243 # As a last resort, use the slow shell script. Don't cache a
6244 # value for MKDIR_P within a source directory, because that will
6245 # break other packages using the cache if that directory is
6246 # removed, or if the value is a relative name.
6247 MKDIR_P="$ac_install_sh -d"
6248 fi
6249fi
6250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6251$as_echo "$MKDIR_P" >&6; }
6252
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006253
6254# Not every filesystem supports hard links
6255
6256if test -z "$LN" ; then
6257 case $ac_sys_system in
6258 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006259 *) LN=ln;;
6260 esac
6261fi
6262
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006263# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006264
6265ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006266
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006267# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6269$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006270
6271# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006272if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006273 withval=$with_pydebug;
6274if test "$withval" != no
6275then
6276
Matthias Kloseb9621712010-04-24 17:59:49 +00006277$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006278
Matthias Kloseb9621712010-04-24 17:59:49 +00006279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6280$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006281 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006282 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006283else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6284$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006285fi
6286else
Matthias Kloseb9621712010-04-24 17:59:49 +00006287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6288$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006289fi
6290
6291
6292# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6293# merged with this chunk of code?
6294
6295# Optimizer/debugger flags
6296# ------------------------
6297# (The following bit of code is complicated enough - please keep things
6298# indented properly. Just pretend you're editing Python code. ;-)
6299
6300# There are two parallel sets of case statements below, one that checks to
6301# see if OPT was set and one that does BASECFLAGS setting based upon
6302# compiler and platform. BASECFLAGS tweaks need to be made even if the
6303# user set OPT.
6304
6305# tweak OPT based on compiler and platform, only if the user didn't set
6306# it on the command line
6307
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006308if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309then
6310 case $GCC in
6311 yes)
6312 if test "$CC" != 'g++' ; then
6313 STRICT_PROTO="-Wstrict-prototypes"
6314 fi
6315 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6316 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6317 WRAP="-fwrapv"
6318 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006319
6320 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006321 case $CC in
6322 *clang*) WRAP="-fwrapv"
6323 ;;
6324 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006325
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006326 case $ac_cv_prog_cc_g in
6327 yes)
6328 if test "$Py_DEBUG" = 'true' ; then
6329 # Optimization messes up debuggers, so turn it off for
6330 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006331 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332 else
6333 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6334 fi
6335 ;;
6336 *)
6337 OPT="-O3 -Wall $STRICT_PROTO"
6338 ;;
6339 esac
6340 case $ac_sys_system in
6341 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6342 ;;
6343 esac
6344 ;;
6345
6346 *)
6347 OPT="-O"
6348 ;;
6349 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006350fi
6351
6352
6353
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006354
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006355# The -arch flags for universal builds on OSX
6356UNIVERSAL_ARCH_FLAGS=
6357
6358
6359# tweak BASECFLAGS based on compiler and platform
6360case $GCC in
6361yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006362 # Python doesn't violate C99 aliasing rules, but older versions of
6363 # GCC produce warnings for legal Python code. Enable
6364 # -fno-strict-aliasing on versions of GCC that support but produce
6365 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6367$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006368 ac_save_cc="$CC"
6369 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006370 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006371 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006372 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006373else
Matthias Kloseb9621712010-04-24 17:59:49 +00006374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006375/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006376
Matthias Kloseb159a552010-04-25 21:00:44 +00006377
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006378int
6379main ()
6380{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006381
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006382 ;
6383 return 0;
6384}
Matthias Kloseb159a552010-04-25 21:00:44 +00006385
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006387if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006388
6389 CC="$ac_save_cc -fstrict-aliasing"
6390 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006392/* end confdefs.h. */
6393
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006394 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006395int
6396main ()
6397{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006398double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006399 ;
6400 return 0;
6401}
Matthias Kloseb159a552010-04-25 21:00:44 +00006402
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006404if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006405
6406 ac_cv_no_strict_aliasing=no
6407
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408else
Matthias Kloseb159a552010-04-25 21:00:44 +00006409
6410 ac_cv_no_strict_aliasing=yes
6411
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006412fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006414
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006415else
Matthias Kloseb159a552010-04-25 21:00:44 +00006416
6417 ac_cv_no_strict_aliasing=no
6418
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006419fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006421fi
6422
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006423 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006424 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6426$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006427 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006428 then
6429 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6430 fi
6431
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6433$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6434 ac_save_cc="$CC"
6435 CC="$CC -Wunused-result -Werror"
6436 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006437 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006438 $as_echo_n "(cached) " >&6
6439else
6440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6441/* end confdefs.h. */
6442
6443
6444int
6445main ()
6446{
6447
6448 ;
6449 return 0;
6450}
6451
6452_ACEOF
6453if ac_fn_c_try_compile "$LINENO"; then :
6454
6455 ac_cv_disable_unused_result_warning=yes
6456
6457else
6458
6459 ac_cv_disable_unused_result_warning=no
6460
6461fi
6462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6463fi
6464
6465 CFLAGS="$save_CFLAGS"
6466 CC="$ac_save_cc"
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6468$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6469
6470 if test $ac_cv_disable_unused_result_warning = yes
6471 then
6472 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6473 fi
6474
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6476$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6477 ac_save_cc="$CC"
6478 CC="$CC -Werror=declaration-after-statement"
6479 save_CFLAGS="$CFLAGS"
6480 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6481 $as_echo_n "(cached) " >&6
6482else
6483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6484/* end confdefs.h. */
6485
6486
6487int
6488main ()
6489{
6490
6491 ;
6492 return 0;
6493}
6494
6495_ACEOF
6496if ac_fn_c_try_compile "$LINENO"; then :
6497
6498 ac_cv_declaration_after_statement_warning=yes
6499
6500else
6501
6502 ac_cv_declaration_after_statement_warning=no
6503
6504fi
6505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6506fi
6507
6508 CFLAGS="$save_CFLAGS"
6509 CC="$ac_save_cc"
6510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6511$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6512
6513 if test $ac_cv_declaration_after_statement_warning = yes
6514 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006515 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006516 fi
6517
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6519$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6520 ac_save_cc="$CC"
6521 CC="$CC -Wsign-compare"
6522 save_CFLAGS="$CFLAGS"
6523 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6524 $as_echo_n "(cached) " >&6
6525else
6526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6527/* end confdefs.h. */
6528
6529
6530int
6531main ()
6532{
6533
6534 ;
6535 return 0;
6536}
6537
6538_ACEOF
6539if ac_fn_c_try_compile "$LINENO"; then :
6540
6541 ac_cv_enable_sign_compare_warning=yes
6542
6543else
6544
6545 ac_cv_enable_sign_compare_warning=no
6546
6547fi
6548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6549fi
6550
6551 CFLAGS="$save_CFLAGS"
6552 CC="$ac_save_cc"
6553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6554$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6555
6556 if test $ac_cv_enable_sign_compare_warning = yes
6557 then
6558 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6559 fi
6560
6561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6562$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6563 ac_save_cc="$CC"
6564 CC="$CC -Wunreachable-code"
6565 save_CFLAGS="$CFLAGS"
6566 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6567 $as_echo_n "(cached) " >&6
6568else
6569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6570/* end confdefs.h. */
6571
6572
6573int
6574main ()
6575{
6576
6577 ;
6578 return 0;
6579}
6580
6581_ACEOF
6582if ac_fn_c_try_compile "$LINENO"; then :
6583
6584 ac_cv_enable_unreachable_code_warning=yes
6585
6586else
6587
6588 ac_cv_enable_unreachable_code_warning=no
6589
6590fi
6591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6592fi
6593
6594 CFLAGS="$save_CFLAGS"
6595 CC="$ac_save_cc"
6596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6597$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
6598
6599 # Don't enable unreachable code warning in debug mode, since it usually
6600 # results in non-standard code paths.
6601 if test $ac_cv_enable_unreachable_code_warning = yes && test "$Py_DEBUG" != "true"
6602 then
6603 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
6604 fi
6605
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006606 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6607 # support. Without this, treatment of subnormals doesn't follow
6608 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006609 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006610 alpha*)
6611 BASECFLAGS="$BASECFLAGS -mieee"
6612 ;;
6613 esac
6614
6615 case $ac_sys_system in
6616 SCO_SV*)
6617 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6618 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006619
6620 # is there any other compiler on Darwin besides gcc?
6621 Darwin*)
6622 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6623 # used to be here, but non-Apple gcc doesn't accept them.
6624 if test "${CC}" = gcc
6625 then
6626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006627$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006628 case "${UNIVERSALSDK}" in
6629 */MacOSX10.4u.sdk)
6630 # Build using 10.4 SDK, force usage of gcc when the
6631 # compiler is gcc, otherwise the user will get very
6632 # confusing error messages when building on OSX 10.6
6633 CC=gcc-4.0
6634 CPP=cpp-4.0
6635 ;;
6636 esac
6637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006638$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006639 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006640
Ned Deily87adb6e2013-10-18 21:09:56 -07006641 if test "${enable_universalsdk}"
6642 then
6643 case "$UNIVERSAL_ARCHS" in
6644 32-bit)
6645 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6646 LIPO_32BIT_FLAGS=""
6647 ARCH_RUN_32BIT=""
6648 ;;
6649 64-bit)
6650 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6651 LIPO_32BIT_FLAGS=""
6652 ARCH_RUN_32BIT="true"
6653 ;;
6654 all)
6655 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6656 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6657 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6658 ;;
6659 intel)
6660 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6661 LIPO_32BIT_FLAGS="-extract i386"
6662 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6663 ;;
6664 intel-32)
6665 UNIVERSAL_ARCH_FLAGS="-arch i386"
6666 LIPO_32BIT_FLAGS=""
6667 ARCH_RUN_32BIT=""
6668 ;;
6669 3-way)
6670 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6671 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6672 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6673 ;;
6674 *)
6675 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6676 ;;
6677 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006678
Ned Deily87adb6e2013-10-18 21:09:56 -07006679 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6680 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6681 if test "${UNIVERSALSDK}" != "/"
6682 then
6683 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6684 fi
6685 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006686
Ned Deily87adb6e2013-10-18 21:09:56 -07006687 # Calculate an appropriate deployment target for this build:
6688 # The deployment target value is used explicitly to enable certain
6689 # features are enabled (such as builtin libedit support for readline)
6690 # through the use of Apple's Availabiliy Macros and is used as a
6691 # component of the string returned by distutils.get_platform().
6692 #
6693 # Use the value from:
6694 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6695 # 2. the operating system version of the build machine if >= 10.6
6696 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6697 # below to pick either 10.3, 10.4, or 10.5 as the target.
6698 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006699
Ned Deily87adb6e2013-10-18 21:09:56 -07006700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6701$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006702 cur_target_major=`sw_vers -productVersion | \
6703 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6704 cur_target_minor=`sw_vers -productVersion | \
6705 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6706 cur_target="${cur_target_major}.${cur_target_minor}"
6707 if test ${cur_target_major} -eq 10 && \
6708 test ${cur_target_minor} -ge 3 && \
6709 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006710 then
Ned Deily36820b62014-06-25 13:44:22 -07006711 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006712 cur_target=10.3
6713 if test ${enable_universalsdk}
6714 then
6715 case "$UNIVERSAL_ARCHS" in
6716 all|3-way|intel|64-bit)
6717 # These configurations were first supported in 10.5
6718 cur_target='10.5'
6719 ;;
6720 esac
6721 else
6722 if test `/usr/bin/arch` = "i386"
6723 then
6724 # 10.4 was the first release to support Intel archs
6725 cur_target="10.4"
6726 fi
6727 fi
6728 fi
6729 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006730
Ned Deily87adb6e2013-10-18 21:09:56 -07006731 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6732 # environment with a value that is the same as what we'll use
6733 # in the Makefile to ensure that we'll get the same compiler
6734 # environment during configure and build time.
6735 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6736 export MACOSX_DEPLOYMENT_TARGET
6737 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6739$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006740
Ned Deily87adb6e2013-10-18 21:09:56 -07006741 # end of Darwin* tests
6742 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006743 esac
6744 ;;
6745
6746*)
6747 case $ac_sys_system in
6748 OpenUNIX*|UnixWare*)
6749 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6750 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006751 SCO_SV*)
6752 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6753 ;;
6754 esac
6755 ;;
6756esac
6757
6758if test "$Py_DEBUG" = 'true'; then
6759 :
6760else
6761 OPT="-DNDEBUG $OPT"
6762fi
6763
6764if test "$ac_arch_flags"
6765then
6766 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6767fi
6768
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006769# On some compilers, pthreads are available without further options
6770# (e.g. MacOS X). On some of these systems, the compiler will not
6771# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6772# So we have to see first whether pthreads are available without
6773# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6775$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006776if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006777 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006778else
Matthias Kloseb9621712010-04-24 17:59:49 +00006779 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006780 ac_cv_pthread_is_default=no
6781else
Matthias Kloseb9621712010-04-24 17:59:49 +00006782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006783/* end confdefs.h. */
6784
Stefan Krah7dba5942012-11-22 22:49:11 +01006785#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006786#include <pthread.h>
6787
6788void* routine(void* p){return NULL;}
6789
6790int main(){
6791 pthread_t p;
6792 if(pthread_create(&p,NULL,routine,NULL)!=0)
6793 return 1;
6794 (void)pthread_detach(p);
6795 return 0;
6796}
6797
6798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006799if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006800
6801 ac_cv_pthread_is_default=yes
6802 ac_cv_kthread=no
6803 ac_cv_pthread=no
6804
6805else
Matthias Kloseb9621712010-04-24 17:59:49 +00006806 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6809 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006810fi
6811
6812
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006813fi
6814
Matthias Kloseb9621712010-04-24 17:59:49 +00006815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6816$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006817
6818
6819if test $ac_cv_pthread_is_default = yes
6820then
6821 ac_cv_kpthread=no
6822else
6823# -Kpthread, if available, provides the right #defines
6824# and linker options to make pthread_create available
6825# Some compilers won't report that they do not support -Kpthread,
6826# so we need to run a program to see whether it really made the
6827# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6829$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006830if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006831 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006832else
6833 ac_save_cc="$CC"
6834CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006835if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006836 ac_cv_kpthread=no
6837else
Matthias Kloseb9621712010-04-24 17:59:49 +00006838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006839/* end confdefs.h. */
6840
Stefan Krah7dba5942012-11-22 22:49:11 +01006841#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006842#include <pthread.h>
6843
6844void* routine(void* p){return NULL;}
6845
6846int main(){
6847 pthread_t p;
6848 if(pthread_create(&p,NULL,routine,NULL)!=0)
6849 return 1;
6850 (void)pthread_detach(p);
6851 return 0;
6852}
6853
6854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006855if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006856 ac_cv_kpthread=yes
6857else
Matthias Kloseb9621712010-04-24 17:59:49 +00006858 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6861 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006862fi
6863
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006864CC="$ac_save_cc"
6865fi
6866
Matthias Kloseb9621712010-04-24 17:59:49 +00006867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6868$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006869fi
6870
6871if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6872then
6873# -Kthread, if available, provides the right #defines
6874# and linker options to make pthread_create available
6875# Some compilers won't report that they do not support -Kthread,
6876# so we need to run a program to see whether it really made the
6877# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6879$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006880if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006881 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006882else
6883 ac_save_cc="$CC"
6884CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006885if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006886 ac_cv_kthread=no
6887else
Matthias Kloseb9621712010-04-24 17:59:49 +00006888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006889/* end confdefs.h. */
6890
Stefan Krah7dba5942012-11-22 22:49:11 +01006891#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006892#include <pthread.h>
6893
6894void* routine(void* p){return NULL;}
6895
6896int main(){
6897 pthread_t p;
6898 if(pthread_create(&p,NULL,routine,NULL)!=0)
6899 return 1;
6900 (void)pthread_detach(p);
6901 return 0;
6902}
6903
6904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006905if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006906 ac_cv_kthread=yes
6907else
Matthias Kloseb9621712010-04-24 17:59:49 +00006908 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6911 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006912fi
6913
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006914CC="$ac_save_cc"
6915fi
6916
Matthias Kloseb9621712010-04-24 17:59:49 +00006917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6918$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006919fi
6920
6921if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6922then
6923# -pthread, if available, provides the right #defines
6924# and linker options to make pthread_create available
6925# Some compilers won't report that they do not support -pthread,
6926# so we need to run a program to see whether it really made the
6927# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6929$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006930if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006931 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006932else
6933 ac_save_cc="$CC"
6934CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006935if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006936 ac_cv_pthread=no
6937else
Matthias Kloseb9621712010-04-24 17:59:49 +00006938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006939/* end confdefs.h. */
6940
Stefan Krah7dba5942012-11-22 22:49:11 +01006941#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006942#include <pthread.h>
6943
6944void* routine(void* p){return NULL;}
6945
6946int main(){
6947 pthread_t p;
6948 if(pthread_create(&p,NULL,routine,NULL)!=0)
6949 return 1;
6950 (void)pthread_detach(p);
6951 return 0;
6952}
6953
6954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006955if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006956 ac_cv_pthread=yes
6957else
Matthias Kloseb9621712010-04-24 17:59:49 +00006958 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6961 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006962fi
6963
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006964CC="$ac_save_cc"
6965fi
6966
Matthias Kloseb9621712010-04-24 17:59:49 +00006967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6968$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006969fi
6970
6971# If we have set a CC compiler flag for thread support then
6972# check if it works for CXX, too.
6973ac_cv_cxx_thread=no
6974if test ! -z "$CXX"
6975then
Matthias Kloseb9621712010-04-24 17:59:49 +00006976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6977$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006978ac_save_cxx="$CXX"
6979
6980if test "$ac_cv_kpthread" = "yes"
6981then
6982 CXX="$CXX -Kpthread"
6983 ac_cv_cxx_thread=yes
6984elif test "$ac_cv_kthread" = "yes"
6985then
6986 CXX="$CXX -Kthread"
6987 ac_cv_cxx_thread=yes
6988elif test "$ac_cv_pthread" = "yes"
6989then
6990 CXX="$CXX -pthread"
6991 ac_cv_cxx_thread=yes
6992fi
6993
6994if test $ac_cv_cxx_thread = yes
6995then
6996 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6997 $CXX -c conftest.$ac_ext 2>&5
6998 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6999 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7000 then
7001 ac_cv_cxx_thread=yes
7002 else
7003 ac_cv_cxx_thread=no
7004 fi
7005 rm -fr conftest*
7006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7008$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007009fi
7010CXX="$ac_save_cxx"
7011
7012
7013# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7015$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007016if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007017 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007018else
Matthias Kloseb9621712010-04-24 17:59:49 +00007019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007020/* end confdefs.h. */
7021#include <stdlib.h>
7022#include <stdarg.h>
7023#include <string.h>
7024#include <float.h>
7025
7026int
7027main ()
7028{
7029
7030 ;
7031 return 0;
7032}
7033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007034if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007035 ac_cv_header_stdc=yes
7036else
Matthias Kloseb9621712010-04-24 17:59:49 +00007037 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007038fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7040
7041if test $ac_cv_header_stdc = yes; then
7042 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007044/* end confdefs.h. */
7045#include <string.h>
7046
7047_ACEOF
7048if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007049 $EGREP "memchr" >/dev/null 2>&1; then :
7050
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007051else
7052 ac_cv_header_stdc=no
7053fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007054rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007055
7056fi
7057
7058if test $ac_cv_header_stdc = yes; then
7059 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007061/* end confdefs.h. */
7062#include <stdlib.h>
7063
7064_ACEOF
7065if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007066 $EGREP "free" >/dev/null 2>&1; then :
7067
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007068else
7069 ac_cv_header_stdc=no
7070fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007071rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007072
7073fi
7074
7075if test $ac_cv_header_stdc = yes; then
7076 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007077 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007078 :
7079else
Matthias Kloseb9621712010-04-24 17:59:49 +00007080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007081/* end confdefs.h. */
7082#include <ctype.h>
7083#include <stdlib.h>
7084#if ((' ' & 0x0FF) == 0x020)
7085# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7086# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7087#else
7088# define ISLOWER(c) \
7089 (('a' <= (c) && (c) <= 'i') \
7090 || ('j' <= (c) && (c) <= 'r') \
7091 || ('s' <= (c) && (c) <= 'z'))
7092# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7093#endif
7094
7095#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7096int
7097main ()
7098{
7099 int i;
7100 for (i = 0; i < 256; i++)
7101 if (XOR (islower (i), ISLOWER (i))
7102 || toupper (i) != TOUPPER (i))
7103 return 2;
7104 return 0;
7105}
7106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007107if ac_fn_c_try_run "$LINENO"; then :
7108
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007109else
Matthias Kloseb9621712010-04-24 17:59:49 +00007110 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007111fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007112rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7113 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007114fi
7115
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007116fi
7117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7119$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007120if test $ac_cv_header_stdc = yes; then
7121
Matthias Kloseb9621712010-04-24 17:59:49 +00007122$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007123
7124fi
7125
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007126for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007127fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007128ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007129sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007130unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007131poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007132sys/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 +01007133sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007134sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007135sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007136sys/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 -07007137libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007138bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7139sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007140do :
7141 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7142ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007143if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007144 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007145#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007146_ACEOF
7147
7148fi
7149
Guido van Rossum627b2d71993-12-24 10:39:16 +00007150done
7151
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007152ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007153for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007154 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7156$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007157if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007158 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007159else
Matthias Kloseb9621712010-04-24 17:59:49 +00007160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007161/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007162#include <sys/types.h>
7163#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007164
Martin v. Löwis11437992002-04-12 09:54:03 +00007165int
7166main ()
7167{
7168if ((DIR *) 0)
7169return 0;
7170 ;
7171 return 0;
7172}
7173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007174if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007175 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007176else
Matthias Kloseb9621712010-04-24 17:59:49 +00007177 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007181eval ac_res=\$$as_ac_Header
7182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7183$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007184if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007185 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007186#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007187_ACEOF
7188
7189ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007190fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007191
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007192done
7193# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7194if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7196$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007197if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007198 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007199else
Martin v. Löwis11437992002-04-12 09:54:03 +00007200 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007202/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007204/* Override any GCC internal prototype to avoid an error.
7205 Use char because int might match the return type of a GCC
7206 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007207#ifdef __cplusplus
7208extern "C"
7209#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007210char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007211int
7212main ()
7213{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007214return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007215 ;
7216 return 0;
7217}
7218_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007219for ac_lib in '' dir; do
7220 if test -z "$ac_lib"; then
7221 ac_res="none required"
7222 else
7223 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007224 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007225 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007226 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007227 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007228fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007229rm -f core conftest.err conftest.$ac_objext \
7230 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007231 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007232 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007234done
Victor Stinnere0be4232011-10-25 13:06:09 +02007235if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007236
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007237else
7238 ac_cv_search_opendir=no
7239fi
7240rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007241LIBS=$ac_func_search_save_LIBS
7242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7244$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007245ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007246if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007247 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007248
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007249fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007250
Michael W. Hudson54241132001-12-07 15:38:26 +00007251else
Matthias Kloseb9621712010-04-24 17:59:49 +00007252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7253$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007254if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007255 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007256else
7257 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007259/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007260
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007261/* Override any GCC internal prototype to avoid an error.
7262 Use char because int might match the return type of a GCC
7263 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007264#ifdef __cplusplus
7265extern "C"
7266#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007267char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007268int
7269main ()
7270{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007271return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007272 ;
7273 return 0;
7274}
7275_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007276for ac_lib in '' x; do
7277 if test -z "$ac_lib"; then
7278 ac_res="none required"
7279 else
7280 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007281 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007282 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007283 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007284 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007286rm -f core conftest.err conftest.$ac_objext \
7287 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007288 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007289 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007291done
Victor Stinnere0be4232011-10-25 13:06:09 +02007292if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007293
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007294else
7295 ac_cv_search_opendir=no
7296fi
7297rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007298LIBS=$ac_func_search_save_LIBS
7299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7301$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007302ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007303if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007304 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007305
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007306fi
7307
7308fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007309
Matthias Kloseb9621712010-04-24 17:59:49 +00007310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7311$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007312if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007313 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007314else
Matthias Kloseb9621712010-04-24 17:59:49 +00007315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007316/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007317#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007318int
7319main ()
7320{
7321return makedev(0, 0);
7322 ;
7323 return 0;
7324}
7325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007326if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007327 ac_cv_header_sys_types_h_makedev=yes
7328else
Matthias Kloseb9621712010-04-24 17:59:49 +00007329 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007331rm -f core conftest.err conftest.$ac_objext \
7332 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007333
7334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7336$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007337
7338if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007339ac_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 +02007340if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007341
Matthias Kloseb9621712010-04-24 17:59:49 +00007342$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007343
7344fi
7345
7346
7347
7348 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007349 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 +02007350if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007351
Matthias Kloseb9621712010-04-24 17:59:49 +00007352$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007353
7354fi
7355
7356
7357 fi
7358fi
7359
Michael W. Hudson54241132001-12-07 15:38:26 +00007360
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007361# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7362for ac_header in net/if.h
7363do :
7364 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7365#ifdef STDC_HEADERS
7366# include <stdlib.h>
7367# include <stddef.h>
7368#else
7369# ifdef HAVE_STDLIB_H
7370# include <stdlib.h>
7371# endif
7372#endif
7373#ifdef HAVE_SYS_SOCKET_H
7374# include <sys/socket.h>
7375#endif
7376
7377"
Victor Stinnere0be4232011-10-25 13:06:09 +02007378if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007379 cat >>confdefs.h <<_ACEOF
7380#define HAVE_NET_IF_H 1
7381_ACEOF
7382
7383fi
7384
7385done
7386
7387
Martin v. Löwis11017b12006-01-14 18:12:57 +00007388# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007389for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007390do :
7391 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 +00007392#ifdef HAVE_ASM_TYPES_H
7393#include <asm/types.h>
7394#endif
7395#ifdef HAVE_SYS_SOCKET_H
7396#include <sys/socket.h>
7397#endif
7398
Matthias Kloseb9621712010-04-24 17:59:49 +00007399"
Victor Stinnere0be4232011-10-25 13:06:09 +02007400if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007401 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007402#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007403_ACEOF
7404
7405fi
7406
7407done
7408
7409
Charles-François Natali47413c12011-10-06 19:47:44 +02007410# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007411for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007412do :
7413 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7414ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7415#ifdef HAVE_SYS_SOCKET_H
7416#include <sys/socket.h>
7417#endif
7418
7419"
7420if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7421 cat >>confdefs.h <<_ACEOF
7422#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7423_ACEOF
7424
7425fi
7426
7427done
7428
7429
Guido van Rossum627b2d71993-12-24 10:39:16 +00007430# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007431was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7433$as_echo_n "checking for clock_t in time.h... " >&6; }
7434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007435/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007436#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007437
7438_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007439if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007440 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007441 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007442else
Martin v. Löwis11437992002-04-12 09:54:03 +00007443
7444
Matthias Kloseb9621712010-04-24 17:59:49 +00007445$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007446
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007447
Guido van Rossum627b2d71993-12-24 10:39:16 +00007448fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007449rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007450
Matthias Kloseb9621712010-04-24 17:59:49 +00007451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7452$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007453
Matthias Kloseb9621712010-04-24 17:59:49 +00007454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7455$as_echo_n "checking for makedev... " >&6; }
7456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007457/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007458
Jesus Cea740f53a2010-04-28 11:35:30 +00007459#if defined(MAJOR_IN_MKDEV)
7460#include <sys/mkdev.h>
7461#elif defined(MAJOR_IN_SYSMACROS)
7462#include <sys/sysmacros.h>
7463#else
7464#include <sys/types.h>
7465#endif
7466
Neal Norwitz11690112002-07-30 01:08:28 +00007467int
7468main ()
7469{
Jesus Cea740f53a2010-04-28 11:35:30 +00007470
7471 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007472 ;
7473 return 0;
7474}
Matthias Kloseb159a552010-04-25 21:00:44 +00007475
Neal Norwitz11690112002-07-30 01:08:28 +00007476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007477if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007478 ac_cv_has_makedev=yes
7479else
Matthias Kloseb9621712010-04-24 17:59:49 +00007480 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007481fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007482rm -f core conftest.err conftest.$ac_objext \
7483 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7485$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007486if test "$ac_cv_has_makedev" = "yes"; then
7487
Matthias Kloseb9621712010-04-24 17:59:49 +00007488$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007489
7490fi
7491
Christian Heimes985ecdc2013-11-20 11:46:18 +01007492# byte swapping
7493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7494$as_echo_n "checking for le64toh... " >&6; }
7495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7496/* end confdefs.h. */
7497
7498#ifdef HAVE_ENDIAN_H
7499#include <endian.h>
7500#elif defined(HAVE_SYS_ENDIAN_H)
7501#include <sys/endian.h>
7502#endif
7503
7504int
7505main ()
7506{
7507
7508 le64toh(1)
7509 ;
7510 return 0;
7511}
7512
7513_ACEOF
7514if ac_fn_c_try_link "$LINENO"; then :
7515 ac_cv_has_le64toh=yes
7516else
7517 ac_cv_has_le64toh=no
7518fi
7519rm -f core conftest.err conftest.$ac_objext \
7520 conftest$ac_exeext conftest.$ac_ext
7521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7522$as_echo "$ac_cv_has_le64toh" >&6; }
7523if test "$ac_cv_has_le64toh" = "yes"; then
7524
7525$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7526
7527fi
7528
Martin v. Löwis399a6892002-10-04 10:22:02 +00007529# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7530# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7531# defined, but the compiler does not support pragma redefine_extname,
7532# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7533# structures (such as rlimit64) without declaring them. As a
7534# work-around, disable LFS on such configurations
7535
7536use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7538$as_echo_n "checking Solaris LFS bug... " >&6; }
7539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007540/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007541
7542#define _LARGEFILE_SOURCE 1
7543#define _FILE_OFFSET_BITS 64
7544#include <sys/resource.h>
7545
Martin v. Löwis399a6892002-10-04 10:22:02 +00007546int
7547main ()
7548{
7549struct rlimit foo;
7550 ;
7551 return 0;
7552}
7553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007554if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007555 sol_lfs_bug=no
7556else
Matthias Kloseb9621712010-04-24 17:59:49 +00007557 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7561$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007562if test "$sol_lfs_bug" = "yes"; then
7563 use_lfs=no
7564fi
7565
7566if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007567# Two defines needed to enable largefile support on various platforms
7568# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007569case $ac_sys_system/$ac_sys_release in
7570AIX*)
7571
7572$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7573
7574 ;;
7575esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007576
Matthias Kloseb9621712010-04-24 17:59:49 +00007577$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007578
7579
Matthias Kloseb9621712010-04-24 17:59:49 +00007580$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007581
Martin v. Löwis399a6892002-10-04 10:22:02 +00007582fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007583
Guido van Rossum84e7b241996-08-19 21:59:00 +00007584# Add some code to confdefs.h so that the test for off_t works on SCO
7585cat >> confdefs.h <<\EOF
7586#if defined(SCO_DS)
7587#undef _OFF_T
7588#endif
7589EOF
7590
Guido van Rossumef2255b2000-03-10 22:30:29 +00007591# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007592ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007593if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007594
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007595else
Martin v. Löwis11437992002-04-12 09:54:03 +00007596
7597cat >>confdefs.h <<_ACEOF
7598#define mode_t int
7599_ACEOF
7600
7601fi
7602
Matthias Kloseb9621712010-04-24 17:59:49 +00007603ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007604if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007605
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007606else
Martin v. Löwis11437992002-04-12 09:54:03 +00007607
7608cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007609#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007610_ACEOF
7611
7612fi
7613
Matthias Kloseb9621712010-04-24 17:59:49 +00007614ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007615if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007616
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007617else
Martin v. Löwis11437992002-04-12 09:54:03 +00007618
7619cat >>confdefs.h <<_ACEOF
7620#define pid_t int
7621_ACEOF
7622
7623fi
7624
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007625
Martin v. Löwis11437992002-04-12 09:54:03 +00007626cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007627#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007628_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007629
Matthias Kloseb9621712010-04-24 17:59:49 +00007630ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007631if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007632
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007633else
Martin v. Löwis11437992002-04-12 09:54:03 +00007634
7635cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007636#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007637_ACEOF
7638
7639fi
7640
Matthias Kloseb9621712010-04-24 17:59:49 +00007641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7642$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007643if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007644 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007645else
Matthias Kloseb9621712010-04-24 17:59:49 +00007646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007647/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007648#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007649
7650_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007651if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007652 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007653 ac_cv_type_uid_t=yes
7654else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007655 ac_cv_type_uid_t=no
7656fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007657rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007658
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7661$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007662if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007663
Matthias Kloseb9621712010-04-24 17:59:49 +00007664$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007665
7666
Matthias Kloseb9621712010-04-24 17:59:49 +00007667$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007668
7669fi
7670
Mark Dickinson983bc162012-12-02 12:11:38 +00007671
7672# There are two separate checks for each of the exact-width integer types we
7673# need. First we check whether the type is available using the usual
7674# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7675# and <stdint.h> where available). We then also use the special type checks of
7676# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7677# directly, #define's uint32_t to be a suitable type.
7678
7679ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7680if test "x$ac_cv_type_uint32_t" = xyes; then :
7681
7682$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7683
7684fi
7685
Matthias Kloseb9621712010-04-24 17:59:49 +00007686ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7687case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007688 no|yes) ;; #(
7689 *)
7690
Matthias Kloseb9621712010-04-24 17:59:49 +00007691$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007692
7693
7694cat >>confdefs.h <<_ACEOF
7695#define uint32_t $ac_cv_c_uint32_t
7696_ACEOF
7697;;
7698 esac
7699
Mark Dickinson983bc162012-12-02 12:11:38 +00007700
7701ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7702if test "x$ac_cv_type_uint64_t" = xyes; then :
7703
7704$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7705
7706fi
7707
Matthias Kloseb9621712010-04-24 17:59:49 +00007708ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7709case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007710 no|yes) ;; #(
7711 *)
7712
Matthias Kloseb9621712010-04-24 17:59:49 +00007713$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007714
7715
7716cat >>confdefs.h <<_ACEOF
7717#define uint64_t $ac_cv_c_uint64_t
7718_ACEOF
7719;;
7720 esac
7721
Mark Dickinson983bc162012-12-02 12:11:38 +00007722
7723ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7724if test "x$ac_cv_type_int32_t" = xyes; then :
7725
7726$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7727
7728fi
7729
Matthias Kloseb9621712010-04-24 17:59:49 +00007730ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7731case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007732 no|yes) ;; #(
7733 *)
7734
7735cat >>confdefs.h <<_ACEOF
7736#define int32_t $ac_cv_c_int32_t
7737_ACEOF
7738;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007739esac
7740
Mark Dickinson983bc162012-12-02 12:11:38 +00007741
7742ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7743if test "x$ac_cv_type_int64_t" = xyes; then :
7744
7745$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7746
7747fi
7748
Matthias Kloseb9621712010-04-24 17:59:49 +00007749ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7750case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007751 no|yes) ;; #(
7752 *)
7753
7754cat >>confdefs.h <<_ACEOF
7755#define int64_t $ac_cv_c_int64_t
7756_ACEOF
7757;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007758esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007759
Mark Dickinson983bc162012-12-02 12:11:38 +00007760
Matthias Kloseb9621712010-04-24 17:59:49 +00007761ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007762if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007763
Matthias Kloseb9621712010-04-24 17:59:49 +00007764$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007765
7766fi
7767
Stefan Krah1919b7e2012-03-21 18:25:23 +01007768ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7769if test "x$ac_cv_type___uint128_t" = xyes; then :
7770
7771$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7772
7773fi
7774
Jack Jansendd19cf82001-12-06 22:36:17 +00007775
Michael W. Hudson54241132001-12-07 15:38:26 +00007776# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007777# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007778# The cast to long int works around a bug in the HP C Compiler
7779# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7780# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7781# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7783$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007784if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007786else
Matthias Kloseb9621712010-04-24 17:59:49 +00007787 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 +00007788
Martin v. Löwis11437992002-04-12 09:54:03 +00007789else
Matthias Kloseb9621712010-04-24 17:59:49 +00007790 if test "$ac_cv_type_int" = yes; then
7791 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7792$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007793as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007794See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007795 else
7796 ac_cv_sizeof_int=0
7797 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007799
Martin v. Löwis11437992002-04-12 09:54:03 +00007800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7802$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007803
7804
7805
Martin v. Löwis11437992002-04-12 09:54:03 +00007806cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007807#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007808_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007809
7810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007811# The cast to long int works around a bug in the HP C Compiler
7812# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7813# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7814# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7816$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007817if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007818 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007819else
Matthias Kloseb9621712010-04-24 17:59:49 +00007820 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 +00007821
Martin v. Löwis11437992002-04-12 09:54:03 +00007822else
Matthias Kloseb9621712010-04-24 17:59:49 +00007823 if test "$ac_cv_type_long" = yes; then
7824 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7825$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007826as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007827See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007828 else
7829 ac_cv_sizeof_long=0
7830 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007832
Martin v. Löwis11437992002-04-12 09:54:03 +00007833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7835$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007836
7837
7838
Martin v. Löwis11437992002-04-12 09:54:03 +00007839cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007840#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007841_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007842
7843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844# The cast to long int works around a bug in the HP C Compiler
7845# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7846# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7847# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7849$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007850if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007851 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007852else
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 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 +00007854
Martin v. Löwis11437992002-04-12 09:54:03 +00007855else
Matthias Kloseb9621712010-04-24 17:59:49 +00007856 if test "$ac_cv_type_void_p" = yes; then
7857 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7858$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007859as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007860See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861 else
7862 ac_cv_sizeof_void_p=0
7863 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007865
Martin v. Löwis11437992002-04-12 09:54:03 +00007866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7868$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869
7870
7871
Martin v. Löwis11437992002-04-12 09:54:03 +00007872cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007873#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007874_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007875
7876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007877# The cast to long int works around a bug in the HP C Compiler
7878# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7879# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7880# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7882$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007883if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007885else
Matthias Kloseb9621712010-04-24 17:59:49 +00007886 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 +00007887
Martin v. Löwis11437992002-04-12 09:54:03 +00007888else
Matthias Kloseb9621712010-04-24 17:59:49 +00007889 if test "$ac_cv_type_short" = yes; then
7890 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007892as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007893See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894 else
7895 ac_cv_sizeof_short=0
7896 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007898
Martin v. Löwis11437992002-04-12 09:54:03 +00007899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7901$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007902
7903
7904
Martin v. Löwis11437992002-04-12 09:54:03 +00007905cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007906#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007907_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007908
7909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007910# The cast to long int works around a bug in the HP C Compiler
7911# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7912# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7913# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7915$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007916if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007917 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007918else
Matthias Kloseb9621712010-04-24 17:59:49 +00007919 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 +00007920
Martin v. Löwis11437992002-04-12 09:54:03 +00007921else
Matthias Kloseb9621712010-04-24 17:59:49 +00007922 if test "$ac_cv_type_float" = yes; then
7923 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7924$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007925as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007926See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007927 else
7928 ac_cv_sizeof_float=0
7929 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007931
Martin v. Löwis11437992002-04-12 09:54:03 +00007932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7934$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007935
7936
7937
Martin v. Löwis11437992002-04-12 09:54:03 +00007938cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007939#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007940_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007941
7942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007943# The cast to long int works around a bug in the HP C Compiler
7944# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7945# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7946# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7948$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007949if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007950 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007951else
Matthias Kloseb9621712010-04-24 17:59:49 +00007952 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 +00007953
Martin v. Löwis11437992002-04-12 09:54:03 +00007954else
Matthias Kloseb9621712010-04-24 17:59:49 +00007955 if test "$ac_cv_type_double" = yes; then
7956 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7957$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007958as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007959See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007960 else
7961 ac_cv_sizeof_double=0
7962 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007964
Martin v. Löwis11437992002-04-12 09:54:03 +00007965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7967$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007968
7969
7970
Martin v. Löwis11437992002-04-12 09:54:03 +00007971cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007972#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007973_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007974
7975
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007976# The cast to long int works around a bug in the HP C Compiler
7977# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7978# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7979# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7981$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007982if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007983 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007984else
Matthias Kloseb9621712010-04-24 17:59:49 +00007985 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 +00007986
Martin v. Löwis11437992002-04-12 09:54:03 +00007987else
Matthias Kloseb9621712010-04-24 17:59:49 +00007988 if test "$ac_cv_type_fpos_t" = yes; then
7989 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007991as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007992See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993 else
7994 ac_cv_sizeof_fpos_t=0
7995 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007997
Martin v. Löwis11437992002-04-12 09:54:03 +00007998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8000$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008001
8002
8003
Martin v. Löwis11437992002-04-12 09:54:03 +00008004cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008005#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008006_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008007
Michael W. Hudson54241132001-12-07 15:38:26 +00008008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009# The cast to long int works around a bug in the HP C Compiler
8010# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8011# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8012# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8014$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008015if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008016 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008017else
Matthias Kloseb9621712010-04-24 17:59:49 +00008018 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 +00008019
Martin v. Löwis18e16552006-02-15 17:27:45 +00008020else
Matthias Kloseb9621712010-04-24 17:59:49 +00008021 if test "$ac_cv_type_size_t" = yes; then
8022 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8023$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008024as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008025See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008026 else
8027 ac_cv_sizeof_size_t=0
8028 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008029fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008030
Martin v. Löwis18e16552006-02-15 17:27:45 +00008031fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8033$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008034
8035
8036
Martin v. Löwis18e16552006-02-15 17:27:45 +00008037cat >>confdefs.h <<_ACEOF
8038#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8039_ACEOF
8040
8041
Christian Heimes400adb02008-02-01 08:12:03 +00008042# The cast to long int works around a bug in the HP C Compiler
8043# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8044# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8045# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8047$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008048if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008049 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008050else
Matthias Kloseb9621712010-04-24 17:59:49 +00008051 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 +00008052
Christian Heimes400adb02008-02-01 08:12:03 +00008053else
Matthias Kloseb9621712010-04-24 17:59:49 +00008054 if test "$ac_cv_type_pid_t" = yes; then
8055 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8056$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008057as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008058See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008059 else
8060 ac_cv_sizeof_pid_t=0
8061 fi
8062fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008063
Christian Heimes400adb02008-02-01 08:12:03 +00008064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8066$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008067
8068
8069
8070cat >>confdefs.h <<_ACEOF
8071#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8072_ACEOF
8073
8074
Michael W. Hudson54241132001-12-07 15:38:26 +00008075
Matthias Kloseb9621712010-04-24 17:59:49 +00008076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8077$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008078have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008080/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008081
Martin v. Löwis11437992002-04-12 09:54:03 +00008082int
8083main ()
8084{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008085long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008086 ;
8087 return 0;
8088}
8089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008090if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008091
8092
Matthias Kloseb9621712010-04-24 17:59:49 +00008093$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008094
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008095 have_long_long=yes
8096
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8100$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008101if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008102# The cast to long int works around a bug in the HP C Compiler
8103# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8104# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8105# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8107$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008108if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008109 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008110else
Matthias Kloseb9621712010-04-24 17:59:49 +00008111 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 +00008112
Martin v. Löwis11437992002-04-12 09:54:03 +00008113else
Matthias Kloseb9621712010-04-24 17:59:49 +00008114 if test "$ac_cv_type_long_long" = yes; then
8115 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8116$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008117as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008118See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008119 else
8120 ac_cv_sizeof_long_long=0
8121 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008122fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008123
Martin v. Löwis11437992002-04-12 09:54:03 +00008124fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8126$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008127
8128
8129
Martin v. Löwis11437992002-04-12 09:54:03 +00008130cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008131#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008132_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008133
Michael W. Hudson54241132001-12-07 15:38:26 +00008134
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008135fi
8136
Matthias Kloseb9621712010-04-24 17:59:49 +00008137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8138$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008139have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008141/* end confdefs.h. */
8142
8143int
8144main ()
8145{
8146long double x; x = (long double)0;
8147 ;
8148 return 0;
8149}
8150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008151if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008152
8153
Matthias Kloseb9621712010-04-24 17:59:49 +00008154$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008155
8156 have_long_double=yes
8157
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008158fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8161$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008162if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008163# The cast to long int works around a bug in the HP C Compiler
8164# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8165# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8166# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8168$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008169if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008170 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008171else
Matthias Kloseb9621712010-04-24 17:59:49 +00008172 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 +00008173
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008174else
Matthias Kloseb9621712010-04-24 17:59:49 +00008175 if test "$ac_cv_type_long_double" = yes; then
8176 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8177$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008178as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008179See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008180 else
8181 ac_cv_sizeof_long_double=0
8182 fi
8183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008184
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008185fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8187$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008188
8189
8190
8191cat >>confdefs.h <<_ACEOF
8192#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8193_ACEOF
8194
8195
8196fi
8197
8198
Matthias Kloseb9621712010-04-24 17:59:49 +00008199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8200$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008201have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008203/* end confdefs.h. */
8204
8205int
8206main ()
8207{
8208_Bool x; x = (_Bool)0;
8209 ;
8210 return 0;
8211}
8212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008213if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008214
8215
Matthias Kloseb9621712010-04-24 17:59:49 +00008216$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008217
8218 have_c99_bool=yes
8219
Thomas Woutersb2137042007-02-01 18:02:27 +00008220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8223$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008224if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008225# The cast to long int works around a bug in the HP C Compiler
8226# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8227# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8228# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8230$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008231if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008232 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008233else
Matthias Kloseb9621712010-04-24 17:59:49 +00008234 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 +00008235
Thomas Woutersb2137042007-02-01 18:02:27 +00008236else
Matthias Kloseb9621712010-04-24 17:59:49 +00008237 if test "$ac_cv_type__Bool" = yes; then
8238 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8239$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008240as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008241See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008242 else
8243 ac_cv_sizeof__Bool=0
8244 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008246
Thomas Woutersb2137042007-02-01 18:02:27 +00008247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8249$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008250
8251
8252
Thomas Woutersb2137042007-02-01 18:02:27 +00008253cat >>confdefs.h <<_ACEOF
8254#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8255_ACEOF
8256
8257
8258fi
8259
Matthias Kloseb9621712010-04-24 17:59:49 +00008260ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008261 #include <stdint.h>
8262 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008263 #ifdef HAVE_INTTYPES_H
8264 #include <inttypes.h>
8265 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008266"
Victor Stinnere0be4232011-10-25 13:06:09 +02008267if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008268
8269cat >>confdefs.h <<_ACEOF
8270#define HAVE_UINTPTR_T 1
8271_ACEOF
8272
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008273# The cast to long int works around a bug in the HP C Compiler
8274# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8275# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8276# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8278$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008279if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008280 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008281else
Matthias Kloseb9621712010-04-24 17:59:49 +00008282 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 +00008283
Martin v. Löwis11437992002-04-12 09:54:03 +00008284else
Matthias Kloseb9621712010-04-24 17:59:49 +00008285 if test "$ac_cv_type_uintptr_t" = yes; then
8286 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8287$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008288as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008289See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008290 else
8291 ac_cv_sizeof_uintptr_t=0
8292 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008293fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008294
Martin v. Löwis11437992002-04-12 09:54:03 +00008295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8297$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008298
8299
8300
Martin v. Löwis11437992002-04-12 09:54:03 +00008301cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008302#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008303_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008304
Michael W. Hudson54241132001-12-07 15:38:26 +00008305
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008306fi
8307
Thomas Wouters89f507f2006-12-13 04:49:30 +00008308
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008309# The cast to long int works around a bug in the HP C Compiler
8310# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8311# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8312# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8314$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008315if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008316 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008317else
Matthias Kloseb9621712010-04-24 17:59:49 +00008318 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008319#ifdef HAVE_SYS_TYPES_H
8320#include <sys/types.h>
8321#endif
8322
Matthias Kloseb9621712010-04-24 17:59:49 +00008323"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008324
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008325else
Matthias Kloseb9621712010-04-24 17:59:49 +00008326 if test "$ac_cv_type_off_t" = yes; then
8327 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8328$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008329as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008330See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008331 else
8332 ac_cv_sizeof_off_t=0
8333 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008335
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008336fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8338$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008339
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008340
8341
Martin v. Löwis11437992002-04-12 09:54:03 +00008342cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008343#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008344_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008345
Michael W. Hudson54241132001-12-07 15:38:26 +00008346
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008347
Matthias Kloseb9621712010-04-24 17:59:49 +00008348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8349$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008350if test "$have_long_long" = yes
8351then
8352if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008353 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008354
Matthias Kloseb9621712010-04-24 17:59:49 +00008355$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008356
Matthias Kloseb9621712010-04-24 17:59:49 +00008357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8358$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008359else
Matthias Kloseb9621712010-04-24 17:59:49 +00008360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8361$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008362fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008363else
Matthias Kloseb9621712010-04-24 17:59:49 +00008364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8365$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008366fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008367
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008368# The cast to long int works around a bug in the HP C Compiler
8369# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8370# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8371# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8373$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008374if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008375 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008376else
Matthias Kloseb9621712010-04-24 17:59:49 +00008377 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008378#ifdef HAVE_SYS_TYPES_H
8379#include <sys/types.h>
8380#endif
8381#ifdef HAVE_TIME_H
8382#include <time.h>
8383#endif
8384
Matthias Kloseb9621712010-04-24 17:59:49 +00008385"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008386
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008387else
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 if test "$ac_cv_type_time_t" = yes; then
8389 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8390$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008391as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008392See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008393 else
8394 ac_cv_sizeof_time_t=0
8395 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008396fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008397
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008398fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8400$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008401
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008402
8403
Martin v. Löwis11437992002-04-12 09:54:03 +00008404cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008405#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008406_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008407
Michael W. Hudson54241132001-12-07 15:38:26 +00008408
8409
Trent Mick635f6fb2000-08-23 21:33:05 +00008410# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008411ac_save_cc="$CC"
8412if test "$ac_cv_kpthread" = "yes"
8413then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008414elif test "$ac_cv_kthread" = "yes"
8415then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008416elif test "$ac_cv_pthread" = "yes"
8417then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008418fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008419
Matthias Kloseb9621712010-04-24 17:59:49 +00008420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8421$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008422have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008424/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008425
8426 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008427int
8428main ()
8429{
Guido van Rossum12580492000-09-24 16:47:19 +00008430pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008431 ;
8432 return 0;
8433}
Matthias Kloseb159a552010-04-25 21:00:44 +00008434
Martin v. Löwis11437992002-04-12 09:54:03 +00008435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008436if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008437 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8441$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008442if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008443 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008444# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8445# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8446# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8448$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008449if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008451else
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008453#ifdef HAVE_PTHREAD_H
8454#include <pthread.h>
8455#endif
8456
Matthias Kloseb9621712010-04-24 17:59:49 +00008457"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008458
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008459else
Matthias Kloseb9621712010-04-24 17:59:49 +00008460 if test "$ac_cv_type_pthread_t" = yes; then
8461 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8462$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008463as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008464See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008465 else
8466 ac_cv_sizeof_pthread_t=0
8467 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008468fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008469
Trent Mick635f6fb2000-08-23 21:33:05 +00008470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8472$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008473
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008474
8475
Martin v. Löwis11437992002-04-12 09:54:03 +00008476cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008477#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008478_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008479
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008480
Trent Mick635f6fb2000-08-23 21:33:05 +00008481fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008482CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008483
Michael W. Hudson54241132001-12-07 15:38:26 +00008484
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008485case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008486 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008487 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8488 ;;
8489 Darwin/*)
8490 OTHER_LIBTOOL_OPT=""
8491 ;;
8492esac
8493
8494
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008495
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008496case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008497 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008498 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8499 if test "${enable_universalsdk}"; then
8500 :
8501 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008502 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008503 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008504 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008505 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008506 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008507 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008508 if test ${gcc_version} '<' 4.0
8509 then
8510 LIBTOOL_CRUFT="-lcc_dynamic"
8511 else
8512 LIBTOOL_CRUFT=""
8513 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008514 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008515 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008516else
Matthias Kloseb9621712010-04-24 17:59:49 +00008517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008518/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008519
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008520 #include <unistd.h>
8521 int main(int argc, char*argv[])
8522 {
8523 if (sizeof(long) == 4) {
8524 return 0;
8525 } else {
8526 return 1;
8527 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008528 }
8529
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008531if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008532 ac_osx_32bit=yes
8533else
Matthias Kloseb9621712010-04-24 17:59:49 +00008534 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008536rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8537 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008538fi
8539
8540
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008541 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008542 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008543 i386)
8544 MACOSX_DEFAULT_ARCH="i386"
8545 ;;
8546 ppc)
8547 MACOSX_DEFAULT_ARCH="ppc"
8548 ;;
8549 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008550 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008551 ;;
8552 esac
8553 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008554 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008555 i386)
8556 MACOSX_DEFAULT_ARCH="x86_64"
8557 ;;
8558 ppc)
8559 MACOSX_DEFAULT_ARCH="ppc64"
8560 ;;
8561 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008562 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008563 ;;
8564 esac
8565
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008566 fi
8567
8568 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008569 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008570 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008571esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8573$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008574if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008575then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008576 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008577 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008578 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008579
Matthias Kloseb9621712010-04-24 17:59:49 +00008580$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008581
Matthias Kloseb9621712010-04-24 17:59:49 +00008582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8583$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008584 if test $enable_shared = "yes"
8585 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008586 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 +00008587 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008588else
Matthias Kloseb9621712010-04-24 17:59:49 +00008589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8590$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008591fi
8592
Matthias Kloseb9621712010-04-24 17:59:49 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8594$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008595case $ac_sys_system/$ac_sys_release in
8596 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008597
Matthias Kloseb9621712010-04-24 17:59:49 +00008598$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008599
Matthias Kloseb9621712010-04-24 17:59:49 +00008600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8601$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008602 ;;
8603 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8605$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008606 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008607esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008608
Guido van Rossum0a516c91994-09-12 10:58:40 +00008609# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008610
Michael W. Hudson54241132001-12-07 15:38:26 +00008611
8612
8613
8614
Benjamin Peterson99f03762010-04-11 22:15:28 +00008615
Thomas Wouters477c8d52006-05-27 19:21:47 +00008616
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008617# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8618# -- usually .so, .sl on HP-UX, .dll on Cygwin
8619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8620$as_echo_n "checking the extension of shared libraries... " >&6; }
8621if test -z "$SHLIB_SUFFIX"; then
8622 case $ac_sys_system in
8623 hp*|HP*)
8624 case `uname -m` in
8625 ia64) SHLIB_SUFFIX=.so;;
8626 *) SHLIB_SUFFIX=.sl;;
8627 esac
8628 ;;
8629 CYGWIN*) SHLIB_SUFFIX=.dll;;
8630 *) SHLIB_SUFFIX=.so;;
8631 esac
8632fi
8633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8634$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008635
Guido van Rossum0a516c91994-09-12 10:58:40 +00008636# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008637# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008638# (Shared libraries in this instance are shared modules to be loaded into
8639# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8641$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008642if test -z "$LDSHARED"
8643then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008644 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008645 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008646 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008647 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008648 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008649 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008650 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008651 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008652 if test "$GCC" = "yes" ; then
8653 LDSHARED='$(CC) -shared'
8654 LDCXXSHARED='$(CXX) -shared'
8655 else
8656 LDSHARED='$(CC) -G'
8657 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008658 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008659 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008660 if test "$GCC" = "yes" ; then
8661 LDSHARED='$(CC) -shared'
8662 LDCXXSHARED='$(CXX) -shared'
8663 else
8664 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008665 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008666 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008667 LDSHARED='$(CC) -bundle'
8668 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008669 if test "$enable_framework" ; then
8670 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008671 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8672 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008673 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008674 else
8675 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008676 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008677 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008678 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008679 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008680 LDSHARED='$(CC) -bundle'
8681 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008682 if test "$enable_framework" ; then
8683 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008684 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8685 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008686 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008687 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008688 # No framework, use the Python app as bundle-loader
8689 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008690 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008691 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008692 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008693 Darwin/*)
8694 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8695 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008696
Ned Deily36820b62014-06-25 13:44:22 -07008697 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8698 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8699 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8700 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8701 if test ${dep_target_major} -eq 10 && \
8702 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008703 then
Ned Deily36820b62014-06-25 13:44:22 -07008704 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008705 LDSHARED='$(CC) -bundle'
8706 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008707 if test "$enable_framework" ; then
8708 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008709 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8710 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008711 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008712 else
8713 # No framework, use the Python app as bundle-loader
8714 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8715 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008716 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008717 fi
Ned Deily36820b62014-06-25 13:44:22 -07008718 else
8719 # building for OS X 10.3 and later
8720 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8721 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8722 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008723 fi
8724 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008725 Linux*|GNU*|QNX*)
8726 LDSHARED='$(CC) -shared'
8727 LDCXXSHARED='$(CXX) -shared';;
8728 BSD/OS*/4*)
8729 LDSHARED="gcc -shared"
8730 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008731 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008732 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008733 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008734 LDSHARED='$(CC) -shared'
8735 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008736 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008737 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008738 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008739 OpenBSD*)
8740 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8741 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008742 LDSHARED='$(CC) -shared $(CCSHARED)'
8743 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008744 else
8745 case `uname -r` in
8746 [01].* | 2.[0-7] | 2.[0-7].*)
8747 LDSHARED="ld -Bshareable ${LDFLAGS}"
8748 ;;
8749 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008750 LDSHARED='$(CC) -shared $(CCSHARED)'
8751 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008752 ;;
8753 esac
8754 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008755 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008756 LDSHARED='$(CC) -shared'
8757 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008758 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008759 if test "$GCC" = "yes" ; then
8760 LDSHARED='$(CC) -shared'
8761 LDCXXSHARED='$(CXX) -shared'
8762 else
8763 LDSHARED='$(CC) -G'
8764 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008765 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008766 SCO_SV*)
8767 LDSHARED='$(CC) -Wl,-G,-Bexport'
8768 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8769 CYGWIN*)
8770 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8771 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008772 *) LDSHARED="ld";;
8773 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8776$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008777LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008778BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008779# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008780# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8782$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008783if test -z "$CCSHARED"
8784then
Guido van Rossum07397971997-04-29 21:49:50 +00008785 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008786 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008787 then CCSHARED="-fPIC";
8788 elif test `uname -p` = sparc;
8789 then CCSHARED="-xcode=pic32";
8790 else CCSHARED="-Kpic";
8791 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008792 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008793 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008794 else CCSHARED="+z";
8795 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008796 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008797 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008798 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008799 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008800 if test "$GCC" = "yes"
8801 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008802 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008803 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008804 SCO_SV*)
8805 if test "$GCC" = "yes"
8806 then CCSHARED="-fPIC"
8807 else CCSHARED="-Kpic -belf"
8808 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008809 IRIX*/6*) case $CC in
8810 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008811 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008812 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008813 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8816$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008817# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008818# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8820$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008821if test -z "$LINKFORSHARED"
8822then
Guido van Rossum07397971997-04-29 21:49:50 +00008823 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008824 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008825 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008826 LINKFORSHARED="-Wl,-E -Wl,+s";;
8827# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008828 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008829 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008830 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008831 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008832 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008833
8834 # Issue #18075: the default maximum stack size (8MBytes) is too
8835 # small for the default recursion limit. Increase the stack size
8836 # to ensure that tests don't crash
8837 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8838
Jack Jansene578a632001-08-15 01:27:14 +00008839 if test "$enable_framework"
8840 then
Jack Jansenda49e192005-01-07 13:08:22 +00008841 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008842 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008843 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008844 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008845 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008846 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008847 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008848 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8849 then
8850 LINKFORSHARED="-Wl,--export-dynamic"
8851 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008852 SunOS/5*) case $CC in
8853 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008854 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008855 then
8856 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008857 fi;;
8858 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008859 CYGWIN*)
8860 if test $enable_shared = "no"
8861 then
8862 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8863 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008864 QNX*)
8865 # -Wl,-E causes the symbols to be added to the dynamic
8866 # symbol table so that they can be found when a module
8867 # is loaded. -N 2048K causes the stack size to be set
8868 # to 2048 kilobytes so that the stack doesn't overflow
8869 # when running test_compile.py.
8870 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008871 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8874$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008875
Michael W. Hudson54241132001-12-07 15:38:26 +00008876
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008877
Matthias Kloseb9621712010-04-24 17:59:49 +00008878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8879$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008880if test ! "$LIBRARY" = "$LDLIBRARY"
8881then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008882 case $ac_sys_system in
8883 CYGWIN*)
8884 # Cygwin needs CCSHARED when building extension DLLs
8885 # but not when building the interpreter DLL.
8886 CFLAGSFORSHARED='';;
8887 *)
8888 CFLAGSFORSHARED='$(CCSHARED)'
8889 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8892$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008893
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008894# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8895# library (with --enable-shared).
8896# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008897# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8898# if it is not required, since it creates a dependency of the shared library
8899# to LIBS. This, in turn, means that applications linking the shared libpython
8900# don't need to link LIBS explicitly. The default should be only changed
8901# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008902
Matthias Kloseb9621712010-04-24 17:59:49 +00008903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8904$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008905case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008906 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008907 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008908esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8910$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008911
8912
Guido van Rossum627b2d71993-12-24 10:39:16 +00008913# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8915$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008916if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008917 $as_echo_n "(cached) " >&6
8918else
8919 ac_check_lib_save_LIBS=$LIBS
8920LIBS="-lsendfile $LIBS"
8921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8922/* end confdefs.h. */
8923
8924/* Override any GCC internal prototype to avoid an error.
8925 Use char because int might match the return type of a GCC
8926 builtin and then its argument prototype would still apply. */
8927#ifdef __cplusplus
8928extern "C"
8929#endif
8930char sendfile ();
8931int
8932main ()
8933{
8934return sendfile ();
8935 ;
8936 return 0;
8937}
8938_ACEOF
8939if ac_fn_c_try_link "$LINENO"; then :
8940 ac_cv_lib_sendfile_sendfile=yes
8941else
8942 ac_cv_lib_sendfile_sendfile=no
8943fi
8944rm -f core conftest.err conftest.$ac_objext \
8945 conftest$ac_exeext conftest.$ac_ext
8946LIBS=$ac_check_lib_save_LIBS
8947fi
8948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8949$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008950if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008951 cat >>confdefs.h <<_ACEOF
8952#define HAVE_LIBSENDFILE 1
8953_ACEOF
8954
8955 LIBS="-lsendfile $LIBS"
8956
8957fi
8958
Matthias Kloseb9621712010-04-24 17:59:49 +00008959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8960$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008961if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008962 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008963else
Martin v. Löwis11437992002-04-12 09:54:03 +00008964 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008965LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008968
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008969/* Override any GCC internal prototype to avoid an error.
8970 Use char because int might match the return type of a GCC
8971 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008972#ifdef __cplusplus
8973extern "C"
8974#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008975char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008976int
8977main ()
8978{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008979return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008980 ;
8981 return 0;
8982}
8983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008984if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008985 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008986else
Matthias Kloseb9621712010-04-24 17:59:49 +00008987 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008989rm -f core conftest.err conftest.$ac_objext \
8990 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008991LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8994$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008995if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008996 cat >>confdefs.h <<_ACEOF
8997#define HAVE_LIBDL 1
8998_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008999
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009000 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009001
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009002fi
9003 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9005$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009006if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009007 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009008else
Martin v. Löwis11437992002-04-12 09:54:03 +00009009 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009010LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009012/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009013
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009014/* Override any GCC internal prototype to avoid an error.
9015 Use char because int might match the return type of a GCC
9016 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009017#ifdef __cplusplus
9018extern "C"
9019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009020char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009021int
9022main ()
9023{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009024return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009025 ;
9026 return 0;
9027}
9028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009029if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009030 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009031else
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009034rm -f core conftest.err conftest.$ac_objext \
9035 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009036LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9039$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009040if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009041 cat >>confdefs.h <<_ACEOF
9042#define HAVE_LIBDLD 1
9043_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009044
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009045 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009046
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009047fi
9048 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009049
Georg Brandlb1441c72009-01-03 22:33:39 +00009050# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009051if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9053$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009054if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009055 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009056else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009057 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009061/* Override any GCC internal prototype to avoid an error.
9062 Use char because int might match the return type of a GCC
9063 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009064#ifdef __cplusplus
9065extern "C"
9066#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009067char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009068int
9069main ()
9070{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009071return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009072 ;
9073 return 0;
9074}
9075_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009076for ac_lib in '' pthread rt posix4; do
9077 if test -z "$ac_lib"; then
9078 ac_res="none required"
9079 else
9080 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009081 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009082 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009083 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009084 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009085fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009086rm -f core conftest.err conftest.$ac_objext \
9087 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009088 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009089 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009091done
Victor Stinnere0be4232011-10-25 13:06:09 +02009092if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009093
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009094else
9095 ac_cv_search_sem_init=no
9096fi
9097rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009098LIBS=$ac_func_search_save_LIBS
9099fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9101$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009102ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009103if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009104 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009105
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009106fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009107 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009108 # posix4 on Solaris 2.6
9109 # pthread (first!) on Linux
9110fi
9111
Martin v. Löwis19d17342003-06-14 21:03:05 +00009112# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9114$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009115if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009116 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009117else
9118 ac_check_lib_save_LIBS=$LIBS
9119LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009121/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009122
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009123/* Override any GCC internal prototype to avoid an error.
9124 Use char because int might match the return type of a GCC
9125 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009126#ifdef __cplusplus
9127extern "C"
9128#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009129char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009130int
9131main ()
9132{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009133return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009134 ;
9135 return 0;
9136}
9137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009138if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009139 ac_cv_lib_intl_textdomain=yes
9140else
Matthias Kloseb9621712010-04-24 17:59:49 +00009141 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009142fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009143rm -f core conftest.err conftest.$ac_objext \
9144 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009145LIBS=$ac_check_lib_save_LIBS
9146fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9148$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009149if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009150
Matthias Kloseb9621712010-04-24 17:59:49 +00009151$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009152
Brett Cannonc6d936e2009-06-07 20:09:53 +00009153 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009154fi
9155
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009156
9157# checks for system dependent C++ extensions support
9158case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009159 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9160$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009162/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009163
Georg Brandl59e87bd2011-02-15 19:48:59 +00009164 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009165int
9166main ()
9167{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009168loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009169 ;
9170 return 0;
9171}
Matthias Kloseb159a552010-04-25 21:00:44 +00009172
Martin v. Löwis11437992002-04-12 09:54:03 +00009173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009174if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009175
Matthias Kloseb159a552010-04-25 21:00:44 +00009176
Matthias Kloseb9621712010-04-24 17:59:49 +00009177$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009178
Matthias Kloseb159a552010-04-25 21:00:44 +00009179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009180$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009181
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009182else
Matthias Kloseb159a552010-04-25 21:00:44 +00009183
9184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009185$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009186
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009187fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009188rm -f core conftest.err conftest.$ac_objext \
9189 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009190 *) ;;
9191esac
9192
Christian Heimes985ecdc2013-11-20 11:46:18 +01009193# check for systems that require aligned memory access
9194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9195$as_echo_n "checking aligned memory access is required... " >&6; }
9196if test "$cross_compiling" = yes; then :
9197 aligned_required=yes
9198else
9199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9200/* end confdefs.h. */
9201
9202int main()
9203{
9204 char s[16];
9205 int i, *p1, *p2;
9206 for (i=0; i < 16; i++)
9207 s[i] = i;
9208 p1 = (int*)(s+1);
9209 p2 = (int*)(s+2);
9210 if (*p1 == *p2)
9211 return 1;
9212 return 0;
9213}
9214
9215_ACEOF
9216if ac_fn_c_try_run "$LINENO"; then :
9217 aligned_required=no
9218else
9219 aligned_required=yes
9220fi
9221rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9222 conftest.$ac_objext conftest.beam conftest.$ac_ext
9223fi
9224
9225
9226if test "$aligned_required" = yes ; then
9227
9228$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9229
9230fi
9231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9232$as_echo "$aligned_required" >&6; }
9233
9234
9235# str, bytes and memoryview hash algorithm
9236
9237
9238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9239$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9240
9241# Check whether --with-hash_algorithm was given.
9242if test "${with_hash_algorithm+set}" = set; then :
9243 withval=$with_hash_algorithm;
9244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9245$as_echo "$withval" >&6; }
9246case "$withval" in
9247 siphash24)
9248 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9249
9250 ;;
9251 fnv)
9252 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9253
9254 ;;
9255 *)
9256 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9257 ;;
9258esac
9259
9260else
9261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9262$as_echo "default" >&6; }
9263fi
9264
9265
Charles-François Natalid30b0222014-05-08 23:08:51 +01009266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9267$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9268
9269# Check whether --with-address_sanitizer was given.
9270if test "${with_address_sanitizer+set}" = set; then :
9271 withval=$with_address_sanitizer;
9272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9273$as_echo "$withval" >&6; }
9274BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9275LDFLAGS="-fsanitize=address $LDFLAGS"
9276
9277else
9278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9279$as_echo "no" >&6; }
9280fi
9281
9282
Guido van Rossum70c7f481998-03-26 18:44:10 +00009283# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9285$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009286if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009287 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009288else
Martin v. Löwis11437992002-04-12 09:54:03 +00009289 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009290LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009293
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009294/* Override any GCC internal prototype to avoid an error.
9295 Use char because int might match the return type of a GCC
9296 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009297#ifdef __cplusplus
9298extern "C"
9299#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009300char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009301int
9302main ()
9303{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009304return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009305 ;
9306 return 0;
9307}
9308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009309if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009310 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009311else
Matthias Kloseb9621712010-04-24 17:59:49 +00009312 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009313fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009314rm -f core conftest.err conftest.$ac_objext \
9315 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009316LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9319$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009320if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009321 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009322fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009323 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9325$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009326if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009327 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009328else
Martin v. Löwis11437992002-04-12 09:54:03 +00009329 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009330LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009333
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009334/* Override any GCC internal prototype to avoid an error.
9335 Use char because int might match the return type of a GCC
9336 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009337#ifdef __cplusplus
9338extern "C"
9339#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009340char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009341int
9342main ()
9343{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009344return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009345 ;
9346 return 0;
9347}
9348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009349if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009350 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009351else
Matthias Kloseb9621712010-04-24 17:59:49 +00009352 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009353fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009354rm -f core conftest.err conftest.$ac_objext \
9355 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009356LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009357fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9359$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009360if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009361 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009362fi
9363 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009364
Matthias Kloseb9621712010-04-24 17:59:49 +00009365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9366$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009367
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009368# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009369if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009370 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9372$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009373LIBS="$withval $LIBS"
9374
9375else
Matthias Kloseb9621712010-04-24 17:59:49 +00009376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9377$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009378fi
9379
Guido van Rossum7f43da71994-08-01 12:15:30 +00009380
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009381if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009382 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9383set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9385$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009386if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009387 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009388else
9389 case $PKG_CONFIG in
9390 [\\/]* | ?:[\\/]*)
9391 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9392 ;;
9393 *)
9394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9395for as_dir in $PATH
9396do
9397 IFS=$as_save_IFS
9398 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009399 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009400 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009401 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009402 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009403 break 2
9404 fi
9405done
Matthias Kloseb9621712010-04-24 17:59:49 +00009406 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009407IFS=$as_save_IFS
9408
9409 ;;
9410esac
9411fi
9412PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9413if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9415$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009416else
Matthias Kloseb9621712010-04-24 17:59:49 +00009417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9418$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009419fi
9420
9421
9422fi
9423if test -z "$ac_cv_path_PKG_CONFIG"; then
9424 ac_pt_PKG_CONFIG=$PKG_CONFIG
9425 # Extract the first word of "pkg-config", so it can be a program name with args.
9426set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9428$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009429if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009430 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009431else
9432 case $ac_pt_PKG_CONFIG in
9433 [\\/]* | ?:[\\/]*)
9434 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9435 ;;
9436 *)
9437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9438for as_dir in $PATH
9439do
9440 IFS=$as_save_IFS
9441 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009442 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009443 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009444 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009445 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009446 break 2
9447 fi
9448done
Matthias Kloseb9621712010-04-24 17:59:49 +00009449 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009450IFS=$as_save_IFS
9451
9452 ;;
9453esac
9454fi
9455ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9456if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9458$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009459else
Matthias Kloseb9621712010-04-24 17:59:49 +00009460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9461$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009462fi
9463
9464 if test "x$ac_pt_PKG_CONFIG" = x; then
9465 PKG_CONFIG=""
9466 else
9467 case $cross_compiling:$ac_tool_warned in
9468yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009469{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9470$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009471ac_tool_warned=yes ;;
9472esac
9473 PKG_CONFIG=$ac_pt_PKG_CONFIG
9474 fi
9475else
9476 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9477fi
9478
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009479
9480# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9482$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009483
9484# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009485if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009486 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009487else
9488 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009489fi
9490
9491
Matthias Kloseb9621712010-04-24 17:59:49 +00009492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9493$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009494
9495# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9497$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009498
9499# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009500if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009501 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009502else
9503 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009504fi
9505
9506
9507if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009508 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9509else
9510 LIBFFI_INCLUDEDIR=""
9511fi
9512
9513
Matthias Kloseb9621712010-04-24 17:59:49 +00009514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9515$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009516
Stefan Krah60187b52012-03-23 19:06:27 +01009517# Check for use of the system libmpdec library
9518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9519$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9520
9521# Check whether --with-system_libmpdec was given.
9522if test "${with_system_libmpdec+set}" = set; then :
9523 withval=$with_system_libmpdec;
9524else
9525 with_system_libmpdec="no"
9526fi
9527
9528
9529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9530$as_echo "$with_system_libmpdec" >&6; }
9531
Benjamin Peterson076ed002010-10-31 17:11:02 +00009532# Check for support for loadable sqlite extensions
9533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9534$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9535# Check whether --enable-loadable-sqlite-extensions was given.
9536if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9537 enableval=$enable_loadable_sqlite_extensions;
9538else
9539 enable_loadable_sqlite_extensions="no"
9540fi
9541
9542
9543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9544$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9545
Ned Deilyd819b932013-09-06 01:07:05 -07009546# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9547
9548
9549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9550$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9551
9552# Check whether --with-tcltk-includes was given.
9553if test "${with_tcltk_includes+set}" = set; then :
9554 withval=$with_tcltk_includes;
9555else
9556 with_tcltk_includes="default"
9557fi
9558
9559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9560$as_echo "$with_tcltk_includes" >&6; }
9561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9562$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9563
9564# Check whether --with-tcltk-libs was given.
9565if test "${with_tcltk_libs+set}" = set; then :
9566 withval=$with_tcltk_libs;
9567else
9568 with_tcltk_libs="default"
9569fi
9570
9571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9572$as_echo "$with_tcltk_libs" >&6; }
9573if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9574then
9575 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9576 then
9577 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9578 fi
9579 TCLTK_INCLUDES=""
9580 TCLTK_LIBS=""
9581else
9582 TCLTK_INCLUDES="$with_tcltk_includes"
9583 TCLTK_LIBS="$with_tcltk_libs"
9584fi
9585
Matthias Klose55708cc2009-04-30 08:06:49 +00009586# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9588$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009589
9590# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009591if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009592 withval=$with_dbmliborder;
9593if test x$with_dbmliborder = xyes
9594then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009595as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009596else
9597 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9598 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9599 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009600 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009601 fi
9602 done
9603fi
9604fi
9605
Matthias Kloseb9621712010-04-24 17:59:49 +00009606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9607$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009608
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009609# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009610
9611
Matthias Kloseb9621712010-04-24 17:59:49 +00009612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9613$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009615# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009616if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009617 withval=$with_signal_module;
9618fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009619
9620
9621if test -z "$with_signal_module"
9622then with_signal_module="yes"
9623fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9625$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009626
9627if test "${with_signal_module}" = "yes"; then
9628 USE_SIGNAL_MODULE=""
9629 SIGNAL_OBJS=""
9630else
9631 USE_SIGNAL_MODULE="#"
9632 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9633fi
9634
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009635# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009636
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009637USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009638
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009639
Martin v. Löwis11437992002-04-12 09:54:03 +00009640
9641# Templates for things AC_DEFINEd more than once.
9642# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009643
9644
Martin v. Löwis11437992002-04-12 09:54:03 +00009645
Matthias Kloseb9621712010-04-24 17:59:49 +00009646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9647$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009648
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009649# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009650if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009651 withval=$with_threads;
9652fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009653
9654
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009655# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009656
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009657# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009658if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659 withval=$with_thread; with_threads=$with_thread
9660fi
9661
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009662
9663if test -z "$with_threads"
9664then with_threads="yes"
9665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9667$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009668
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009669
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009670if test "$with_threads" = "no"
9671then
9672 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009673elif test "$ac_cv_pthread_is_default" = yes
9674then
Matthias Kloseb9621712010-04-24 17:59:49 +00009675 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009676
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009677 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009678 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009679
9680 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009681 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009682elif test "$ac_cv_kpthread" = "yes"
9683then
9684 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009685 if test "$ac_cv_cxx_thread" = "yes"; then
9686 CXX="$CXX -Kpthread"
9687 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009688 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009689
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009690 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009691 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009692elif test "$ac_cv_kthread" = "yes"
9693then
9694 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009695 if test "$ac_cv_cxx_thread" = "yes"; then
9696 CXX="$CXX -Kthread"
9697 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009698 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009699
9700 posix_threads=yes
9701 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009702elif test "$ac_cv_pthread" = "yes"
9703then
9704 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009705 if test "$ac_cv_cxx_thread" = "yes"; then
9706 CXX="$CXX -pthread"
9707 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009708 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009709
9710 posix_threads=yes
9711 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009712else
9713 if test ! -z "$with_threads" -a -d "$with_threads"
9714 then LDFLAGS="$LDFLAGS -L$with_threads"
9715 fi
9716 if test ! -z "$withval" -a -d "$withval"
9717 then LDFLAGS="$LDFLAGS -L$withval"
9718 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009719
9720 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009721 # define _POSIX_THREADS in unistd.h. Some apparently don't
9722 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9724$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009726/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009727
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009728#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009729#ifdef _POSIX_THREADS
9730yes
9731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009732
9733_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009734if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009735 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009736 unistd_defines_pthreads=yes
9737else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009738 unistd_defines_pthreads=no
9739fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009740rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009741
Matthias Kloseb9621712010-04-24 17:59:49 +00009742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9743$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009744
Matthias Kloseb9621712010-04-24 17:59:49 +00009745 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009746
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009747 # Just looking for pthread_create in libpthread is not enough:
9748 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9749 # So we really have to include pthread.h, and then link.
9750 _libs=$LIBS
9751 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9753$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009755/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009756
9757#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009758#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009759
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009760void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009761int
9762main ()
9763{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009764
9765pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009766 ;
9767 return 0;
9768}
9769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009770if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009771
Matthias Kloseb9621712010-04-24 17:59:49 +00009772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9773$as_echo "yes" >&6; }
9774 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009775
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009776 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009777 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009778else
Martin v. Löwis11437992002-04-12 09:54:03 +00009779
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009780 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009781 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009782if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009783 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009784
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009785 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009786 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009787else
Guido van Rossumad678af1998-10-02 14:42:15 +00009788
Matthias Kloseb9621712010-04-24 17:59:49 +00009789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9790$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009791if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009792 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009793else
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009795LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009798
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009799/* Override any GCC internal prototype to avoid an error.
9800 Use char because int might match the return type of a GCC
9801 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009802#ifdef __cplusplus
9803extern "C"
9804#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009805char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009806int
9807main ()
9808{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009809return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009810 ;
9811 return 0;
9812}
9813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009814if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009815 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009816else
Matthias Kloseb9621712010-04-24 17:59:49 +00009817 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009819rm -f core conftest.err conftest.$ac_objext \
9820 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009821LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9824$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009825if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009826 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009827
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009828 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009829 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009830 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009831else
Greg Steinadf63d62000-07-05 10:38:09 +00009832
Matthias Kloseb9621712010-04-24 17:59:49 +00009833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9834$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009835if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009836 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009837else
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009839LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009841/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009843/* Override any GCC internal prototype to avoid an error.
9844 Use char because int might match the return type of a GCC
9845 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009846#ifdef __cplusplus
9847extern "C"
9848#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009849char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009850int
9851main ()
9852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009853return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 ;
9855 return 0;
9856}
9857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009858if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009859 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009860else
Matthias Kloseb9621712010-04-24 17:59:49 +00009861 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009863rm -f core conftest.err conftest.$ac_objext \
9864 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009865LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9868$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009869if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009870 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009871
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009872 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009873 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009874 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009875else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009876
Matthias Kloseb9621712010-04-24 17:59:49 +00009877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9878$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009879if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009880 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009881else
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009883LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009887/* Override any GCC internal prototype to avoid an error.
9888 Use char because int might match the return type of a GCC
9889 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009890#ifdef __cplusplus
9891extern "C"
9892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009893char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009894int
9895main ()
9896{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009897return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009898 ;
9899 return 0;
9900}
9901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009902if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009903 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009904else
Matthias Kloseb9621712010-04-24 17:59:49 +00009905 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009907rm -f core conftest.err conftest.$ac_objext \
9908 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009909LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9912$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009913if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009914 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009915
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009916 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009917 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009918 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009919else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009920
Matthias Kloseb9621712010-04-24 17:59:49 +00009921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9922$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009923if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009924 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009925else
Martin v. Löwis11437992002-04-12 09:54:03 +00009926 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009927LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009931/* Override any GCC internal prototype to avoid an error.
9932 Use char because int might match the return type of a GCC
9933 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009934#ifdef __cplusplus
9935extern "C"
9936#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009937char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009938int
9939main ()
9940{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009941return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009942 ;
9943 return 0;
9944}
9945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009946if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009947 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009948else
Matthias Kloseb9621712010-04-24 17:59:49 +00009949 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009951rm -f core conftest.err conftest.$ac_objext \
9952 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009953LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9956$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009957if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009958 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009959
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009960 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009961 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009962 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009963else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009964
Martin v. Löwis130fb172001-07-19 11:00:41 +00009965 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009966fi
9967
Guido van Rossum627b2d71993-12-24 10:39:16 +00009968
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009969fi
9970
Guido van Rossum0be3e491997-05-22 20:33:33 +00009971fi
9972
Guido van Rossum49545951997-12-02 19:28:29 +00009973fi
9974
Guido van Rossumb93a8621998-05-07 13:27:32 +00009975fi
9976
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009978rm -f core conftest.err conftest.$ac_objext \
9979 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009980
Matthias Kloseb9621712010-04-24 17:59:49 +00009981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9982$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009983if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009984 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009985else
Martin v. Löwis11437992002-04-12 09:54:03 +00009986 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009987LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009990
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009991/* Override any GCC internal prototype to avoid an error.
9992 Use char because int might match the return type of a GCC
9993 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009994#ifdef __cplusplus
9995extern "C"
9996#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009997char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009998int
9999main ()
10000{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010001return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010002 ;
10003 return 0;
10004}
10005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010006if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010007 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010008else
Matthias Kloseb9621712010-04-24 17:59:49 +000010009 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010011rm -f core conftest.err conftest.$ac_objext \
10012 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010013LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10016$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010017if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010018 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010019
Martin v. Löwis130fb172001-07-19 11:00:41 +000010020 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010021 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010022 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010023fi
10024
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010025
Neal Norwitza978ab02002-11-02 16:58:05 +000010026 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10028$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010029if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010030 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010031else
Martin v. Löwis11437992002-04-12 09:54:03 +000010032 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010033LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010035/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010037/* Override any GCC internal prototype to avoid an error.
10038 Use char because int might match the return type of a GCC
10039 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010040#ifdef __cplusplus
10041extern "C"
10042#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010043char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010044int
10045main ()
10046{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010047return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 ;
10049 return 0;
10050}
10051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010052if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010053 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010054else
Matthias Kloseb9621712010-04-24 17:59:49 +000010055 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010057rm -f core conftest.err conftest.$ac_objext \
10058 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010059LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10062$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010063if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010064 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010065
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010066 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010067 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010068 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010069fi
10070
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010071 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010072fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010073
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010074if test "$posix_threads" = "yes"; then
10075 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010076
Matthias Kloseb9621712010-04-24 17:59:49 +000010077$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010078
10079 fi
10080
10081 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10082 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010083 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010084$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010085
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010086 ;;
10087 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010088$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010089
10090 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010091 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010092$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010093
10094 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010095 esac
10096
Matthias Kloseb9621712010-04-24 17:59:49 +000010097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10098$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010099 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010100 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010101else
Matthias Kloseb9621712010-04-24 17:59:49 +000010102 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010103 ac_cv_pthread_system_supported=no
10104else
Matthias Kloseb9621712010-04-24 17:59:49 +000010105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010106/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010107
10108 #include <stdio.h>
10109 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010110 void *foo(void *parm) {
10111 return NULL;
10112 }
10113 main() {
10114 pthread_attr_t attr;
10115 pthread_t id;
10116 if (pthread_attr_init(&attr)) exit(-1);
10117 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10118 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10119 exit(0);
10120 }
10121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010122if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010123 ac_cv_pthread_system_supported=yes
10124else
Matthias Kloseb9621712010-04-24 17:59:49 +000010125 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010127rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10128 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010129fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010130
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010131
Guido van Rossum627b2d71993-12-24 10:39:16 +000010132fi
10133
Matthias Kloseb9621712010-04-24 17:59:49 +000010134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10135$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010136 if test "$ac_cv_pthread_system_supported" = "yes"; then
10137
Matthias Kloseb9621712010-04-24 17:59:49 +000010138$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010139
10140 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010141 for ac_func in pthread_sigmask
10142do :
10143 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010144if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010145 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010146#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010147_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010148 case $ac_sys_system in
10149 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010150
Matthias Kloseb9621712010-04-24 17:59:49 +000010151$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010152
10153 ;;
10154 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010155fi
10156done
10157
Christian Heimesf77b4b22013-08-21 13:26:05 +020010158 for ac_func in pthread_atfork
10159do :
10160 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10161if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10162 cat >>confdefs.h <<_ACEOF
10163#define HAVE_PTHREAD_ATFORK 1
10164_ACEOF
10165
10166fi
10167done
10168
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010169fi
10170
10171
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010172# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010173
Matthias Kloseb9621712010-04-24 17:59:49 +000010174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10175$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010177if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010179 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10181$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010182 ipv6=no
10183 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010184 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10185$as_echo "yes" >&6; }
10186 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010187
10188 ipv6=yes
10189 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010190 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010191else
Martin v. Löwis11437992002-04-12 09:54:03 +000010192
Matthias Kloseb9621712010-04-24 17:59:49 +000010193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010194/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010195 /* AF_INET6 available check */
10196#include <sys/types.h>
10197#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010198int
10199main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010200{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010201int domain = AF_INET6;
10202 ;
10203 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010204}
Martin v. Löwis11437992002-04-12 09:54:03 +000010205_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010206if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010207
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10209$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010210 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010211
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010212else
Matthias Kloseb159a552010-04-25 21:00:44 +000010213
Matthias Kloseb9621712010-04-24 17:59:49 +000010214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10215$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010216 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010217
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010218fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010220
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010221if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10223$as_echo_n "checking if RFC2553 API is available... " >&6; }
10224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010225/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010226
10227 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010228#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010229int
10230main ()
10231{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010232struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010233 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 ;
10235 return 0;
10236}
Matthias Kloseb159a552010-04-25 21:00:44 +000010237
Martin v. Löwis11437992002-04-12 09:54:03 +000010238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010239if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010240
10241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010242$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010243 ipv6=yes
10244
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010245else
Matthias Kloseb159a552010-04-25 21:00:44 +000010246
10247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010248$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010249 ipv6=no
10250
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010253fi
10254
10255if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010256 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010257
10258fi
10259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010260fi
10261
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010262
10263ipv6type=unknown
10264ipv6lib=none
10265ipv6trylibc=no
10266
10267if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10269$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010270 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10271 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010272 case $i in
10273 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010275/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010276
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010277#include <netinet/in.h>
10278#ifdef IPV6_INRIA_VERSION
10279yes
10280#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010281_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010282if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010283 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010284 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010285fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010286rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010287
10288 ;;
10289 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010291/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010292
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010293#include <netinet/in.h>
10294#ifdef __KAME__
10295yes
10296#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010297_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010298if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010300 ipv6type=$i;
10301 ipv6lib=inet6
10302 ipv6libdir=/usr/local/v6/lib
10303 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010304fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010305rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010306
10307 ;;
10308 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010310/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010311
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010312#include <features.h>
10313#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10314yes
10315#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010316_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010317if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010318 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010319 ipv6type=$i;
10320 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010321fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010322rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010323
10324 ;;
10325 linux-inet6)
10326 if test -d /usr/inet6; then
10327 ipv6type=$i
10328 ipv6lib=inet6
10329 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010330 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010331 fi
10332 ;;
10333 solaris)
10334 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010335 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010336 ipv6type=$i
10337 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010338 fi
10339 fi
10340 ;;
10341 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010343/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010344
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010345#include <sys/param.h>
10346#ifdef _TOSHIBA_INET6
10347yes
10348#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010349_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010350if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010352 ipv6type=$i;
10353 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010354 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010355fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010356rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010357
10358 ;;
10359 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010361/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010362
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010363#include </usr/local/v6/include/sys/v6config.h>
10364#ifdef __V6D__
10365yes
10366#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010367_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010368if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010369 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010370 ipv6type=$i;
10371 ipv6lib=v6;
10372 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010373 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010374fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010375rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010376
10377 ;;
10378 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010380/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010381
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010382#include <sys/param.h>
10383#ifdef _ZETA_MINAMI_INET6
10384yes
10385#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010386_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010387if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010388 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010389 ipv6type=$i;
10390 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010391 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010392fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010393rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010394
10395 ;;
10396 esac
10397 if test "$ipv6type" != "unknown"; then
10398 break
10399 fi
10400 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10402$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010403fi
10404
10405if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10406 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10407 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10408 echo "using lib$ipv6lib"
10409 else
10410 if test $ipv6trylibc = "yes"; then
10411 echo "using libc"
10412 else
10413 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10414 echo "You need to fetch lib$ipv6lib.a from appropriate"
10415 echo 'ipv6 kit and compile beforehand.'
10416 exit 1
10417 fi
10418 fi
10419fi
10420
Matthias Kloseb9621712010-04-24 17:59:49 +000010421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10422$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010424/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010425
10426 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010427int
10428main ()
10429{
10430FSIORefNum fRef = 0
10431 ;
10432 return 0;
10433}
Matthias Kloseb159a552010-04-25 21:00:44 +000010434
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010436if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010437
Matthias Kloseb159a552010-04-25 21:00:44 +000010438
Matthias Kloseb9621712010-04-24 17:59:49 +000010439$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010440
Matthias Kloseb9621712010-04-24 17:59:49 +000010441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10442$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010443
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010444else
Matthias Kloseb159a552010-04-25 21:00:44 +000010445
Matthias Kloseb9621712010-04-24 17:59:49 +000010446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10447$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010448
10449fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10451
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010452# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10454$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010455
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010456# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010457if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010458 withval=$with_doc_strings;
10459fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010460
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010461
10462if test -z "$with_doc_strings"
10463then with_doc_strings="yes"
10464fi
10465if test "$with_doc_strings" != "no"
10466then
10467
Matthias Kloseb9621712010-04-24 17:59:49 +000010468$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010469
10470fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10472$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010473
Antoine Pitrou042b1282010-08-13 21:15:58 +000010474# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10476$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010478# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010479if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010480 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010481if test "$withval" != no
10482then
10483
Matthias Kloseb9621712010-04-24 17:59:49 +000010484$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010485
Matthias Kloseb9621712010-04-24 17:59:49 +000010486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10487$as_echo "yes" >&6; }
10488else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10489$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010490fi
10491else
Matthias Kloseb9621712010-04-24 17:59:49 +000010492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10493$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010494fi
10495
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010496
10497# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10499$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010501# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010502if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010503 withval=$with_pymalloc;
10504fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010505
Neil Schemenauera35c6882001-02-27 04:45:05 +000010506
Neil Schemenauer16c22972002-03-22 15:34:49 +000010507if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010508then
10509 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010510fi
10511if test "$with_pymalloc" != "no"
10512then
Martin v. Löwis11437992002-04-12 09:54:03 +000010513
Matthias Kloseb9621712010-04-24 17:59:49 +000010514$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010515
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010516 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010517fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10519$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010520
Benjamin Peterson05159c42009-12-03 03:01:27 +000010521# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10523$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010524
10525# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010526if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010527 withval=$with_valgrind;
10528else
10529 with_valgrind=no
10530fi
10531
Matthias Kloseb9621712010-04-24 17:59:49 +000010532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10533$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010534if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010535 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 +020010536if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010537
Matthias Kloseb9621712010-04-24 17:59:49 +000010538$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010539
10540else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010541 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010542
10543fi
10544
10545
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010546 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010547fi
10548
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010549# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010550
Guido van Rossum98935bf2001-09-05 19:13:16 +000010551DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010552
Guido van Rossume97ee181999-12-20 21:27:22 +000010553# the dlopen() function means we might want to use dynload_shlib.o. some
10554# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010555for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010556do :
10557 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010558if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010559 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010560#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010561_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010562
Guido van Rossume97ee181999-12-20 21:27:22 +000010563fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010564done
Guido van Rossume97ee181999-12-20 21:27:22 +000010565
Michael W. Hudson54241132001-12-07 15:38:26 +000010566
Guido van Rossume97ee181999-12-20 21:27:22 +000010567# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10568# loading of modules.
10569
Matthias Kloseb9621712010-04-24 17:59:49 +000010570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10571$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010572if test -z "$DYNLOADFILE"
10573then
10574 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010575 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10576 if test "$ac_cv_func_dlopen" = yes
10577 then DYNLOADFILE="dynload_shlib.o"
10578 else DYNLOADFILE="dynload_aix.o"
10579 fi
10580 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010581 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010582 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10583 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010584 *)
10585 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10586 # out any dynamic loading
10587 if test "$ac_cv_func_dlopen" = yes
10588 then DYNLOADFILE="dynload_shlib.o"
10589 else DYNLOADFILE="dynload_stub.o"
10590 fi
10591 ;;
10592 esac
10593fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10595$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010596if test "$DYNLOADFILE" != "dynload_stub.o"
10597then
Martin v. Löwis11437992002-04-12 09:54:03 +000010598
Matthias Kloseb9621712010-04-24 17:59:49 +000010599$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010600
10601fi
10602
Neil Schemenauer4e425612001-06-19 15:44:15 +000010603# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10604
Michael W. Hudson54241132001-12-07 15:38:26 +000010605
Matthias Kloseb9621712010-04-24 17:59:49 +000010606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10607$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010608if test -z "$MACHDEP_OBJS"
10609then
Jack Jansene578a632001-08-15 01:27:14 +000010610 MACHDEP_OBJS=$extra_machdep_objs
10611else
10612 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010613fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010614if test -z "$MACHDEP_OBJS"; then
10615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10616$as_echo "none" >&6; }
10617else
10618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10619$as_echo "$MACHDEP_OBJS" >&6; }
10620fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010621
Guido van Rossum627b2d71993-12-24 10:39:16 +000010622# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010623for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010624 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010625 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010626 futimens futimes gai_strerror \
10627 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010628 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010629 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010630 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10631 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010632 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010633 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010634 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010635 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010636 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010637 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010638 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10639 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010640 sigaction sigaltstack siginterrupt sigpending sigrelse \
10641 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010642 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010643 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010644 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010645do :
10646 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10647ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010648if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010649 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010650#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010651_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010652
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010653fi
10654done
10655
Michael W. Hudson54241132001-12-07 15:38:26 +000010656
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010657ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10658 #include <dirent.h>
10659"
10660if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10661
10662$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10663
10664fi
10665
10666
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010667# For some functions, having a definition is not sufficient, since
10668# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10670$as_echo_n "checking for chroot... " >&6; }
10671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010672/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010673#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010674int
10675main ()
10676{
10677void *x=chroot
10678 ;
10679 return 0;
10680}
10681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010682if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010683
Matthias Kloseb9621712010-04-24 17:59:49 +000010684$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010685
Matthias Kloseb159a552010-04-25 21:00:44 +000010686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010687$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010688else
Matthias Kloseb9621712010-04-24 17:59:49 +000010689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10690$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010691
10692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10695$as_echo_n "checking for link... " >&6; }
10696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010697/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010698#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010699int
10700main ()
10701{
10702void *x=link
10703 ;
10704 return 0;
10705}
10706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010707if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010708
Matthias Kloseb9621712010-04-24 17:59:49 +000010709$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010710
Matthias Kloseb159a552010-04-25 21:00:44 +000010711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010712$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010713else
Matthias Kloseb9621712010-04-24 17:59:49 +000010714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10715$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010716
10717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10720$as_echo_n "checking for symlink... " >&6; }
10721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010722/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010723#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010724int
10725main ()
10726{
10727void *x=symlink
10728 ;
10729 return 0;
10730}
10731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010732if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010733
Matthias Kloseb9621712010-04-24 17:59:49 +000010734$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010735
Matthias Kloseb159a552010-04-25 21:00:44 +000010736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010737$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010738else
Matthias Kloseb9621712010-04-24 17:59:49 +000010739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10740$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010741
10742fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10745$as_echo_n "checking for fchdir... " >&6; }
10746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010747/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010748#include <unistd.h>
10749int
10750main ()
10751{
10752void *x=fchdir
10753 ;
10754 return 0;
10755}
10756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010757if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010758
Matthias Kloseb9621712010-04-24 17:59:49 +000010759$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010760
Matthias Kloseb159a552010-04-25 21:00:44 +000010761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010762$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010763else
Matthias Kloseb9621712010-04-24 17:59:49 +000010764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10765$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010766
10767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10770$as_echo_n "checking for fsync... " >&6; }
10771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010772/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010773#include <unistd.h>
10774int
10775main ()
10776{
10777void *x=fsync
10778 ;
10779 return 0;
10780}
10781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010782if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010783
Matthias Kloseb9621712010-04-24 17:59:49 +000010784$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010785
Matthias Kloseb159a552010-04-25 21:00:44 +000010786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010787$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010788else
Matthias Kloseb9621712010-04-24 17:59:49 +000010789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10790$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010791
10792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10795$as_echo_n "checking for fdatasync... " >&6; }
10796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010797/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010798#include <unistd.h>
10799int
10800main ()
10801{
10802void *x=fdatasync
10803 ;
10804 return 0;
10805}
10806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010807if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010808
Matthias Kloseb9621712010-04-24 17:59:49 +000010809$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010810
Matthias Kloseb159a552010-04-25 21:00:44 +000010811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010812$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010813else
Matthias Kloseb9621712010-04-24 17:59:49 +000010814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10815$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010816
10817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10820$as_echo_n "checking for epoll... " >&6; }
10821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010822/* end confdefs.h. */
10823#include <sys/epoll.h>
10824int
10825main ()
10826{
10827void *x=epoll_create
10828 ;
10829 return 0;
10830}
10831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010832if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010833
Matthias Kloseb9621712010-04-24 17:59:49 +000010834$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010835
Matthias Kloseb159a552010-04-25 21:00:44 +000010836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010837$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010838else
Matthias Kloseb9621712010-04-24 17:59:49 +000010839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10840$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010841
10842fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10845$as_echo_n "checking for epoll_create1... " >&6; }
10846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10847/* end confdefs.h. */
10848#include <sys/epoll.h>
10849int
10850main ()
10851{
10852void *x=epoll_create1
10853 ;
10854 return 0;
10855}
10856_ACEOF
10857if ac_fn_c_try_compile "$LINENO"; then :
10858
10859$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10860
10861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10862$as_echo "yes" >&6; }
10863else
10864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10865$as_echo "no" >&6; }
10866
10867fi
10868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10870$as_echo_n "checking for kqueue... " >&6; }
10871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010872/* end confdefs.h. */
10873
10874#include <sys/types.h>
10875#include <sys/event.h>
10876
10877int
10878main ()
10879{
10880int x=kqueue()
10881 ;
10882 return 0;
10883}
10884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010885if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010886
Matthias Kloseb9621712010-04-24 17:59:49 +000010887$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010888
Matthias Kloseb159a552010-04-25 21:00:44 +000010889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010890$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010891else
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10893$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010894
10895fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10898$as_echo_n "checking for prlimit... " >&6; }
10899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10900/* end confdefs.h. */
10901
10902#include <sys/time.h>
10903#include <sys/resource.h>
10904
10905int
10906main ()
10907{
10908void *x=prlimit
10909 ;
10910 return 0;
10911}
10912_ACEOF
10913if ac_fn_c_try_compile "$LINENO"; then :
10914
10915$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10916
10917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10918$as_echo "yes" >&6; }
10919else
10920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10921$as_echo "no" >&6; }
10922
10923fi
10924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10925
Martin v. Löwisd5843682002-11-21 20:41:28 +000010926# On some systems (eg. FreeBSD 5), we would find a definition of the
10927# functions ctermid_r, setgroups in the library, but no prototype
10928# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10929# address to avoid compiler warnings and potential miscompilations
10930# because of the missing prototypes.
10931
Matthias Kloseb9621712010-04-24 17:59:49 +000010932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10933$as_echo_n "checking for ctermid_r... " >&6; }
10934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010935/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010936
Martin v. Löwisd5843682002-11-21 20:41:28 +000010937#include <stdio.h>
10938
Martin v. Löwisd5843682002-11-21 20:41:28 +000010939int
10940main ()
10941{
10942void* p = ctermid_r
10943 ;
10944 return 0;
10945}
10946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010947if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010948
Matthias Kloseb9621712010-04-24 17:59:49 +000010949$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010950
Matthias Kloseb159a552010-04-25 21:00:44 +000010951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010952$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010953else
Matthias Kloseb9621712010-04-24 17:59:49 +000010954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10955$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010956
10957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10959
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10961$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010962if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010963 $as_echo_n "(cached) " >&6
10964else
10965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010966/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010967#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010968int
10969main ()
10970{
10971void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010972
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010973 ;
10974 return 0;
10975}
10976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010977if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010978 ac_cv_flock_decl=yes
10979else
10980 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010981
10982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010984
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010985fi
10986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10987$as_echo "$ac_cv_flock_decl" >&6; }
10988if test "x${ac_cv_flock_decl}" = xyes; then
10989 for ac_func in flock
10990do :
10991 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010992if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010993 cat >>confdefs.h <<_ACEOF
10994#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010995_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010996
Antoine Pitroua3000072010-09-07 14:52:42 +000010997else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010999$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011000if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011001 $as_echo_n "(cached) " >&6
11002else
11003 ac_check_lib_save_LIBS=$LIBS
11004LIBS="-lbsd $LIBS"
11005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11006/* end confdefs.h. */
11007
11008/* Override any GCC internal prototype to avoid an error.
11009 Use char because int might match the return type of a GCC
11010 builtin and then its argument prototype would still apply. */
11011#ifdef __cplusplus
11012extern "C"
11013#endif
11014char flock ();
11015int
11016main ()
11017{
11018return flock ();
11019 ;
11020 return 0;
11021}
11022_ACEOF
11023if ac_fn_c_try_link "$LINENO"; then :
11024 ac_cv_lib_bsd_flock=yes
11025else
11026 ac_cv_lib_bsd_flock=no
11027fi
11028rm -f core conftest.err conftest.$ac_objext \
11029 conftest$ac_exeext conftest.$ac_ext
11030LIBS=$ac_check_lib_save_LIBS
11031fi
11032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11033$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011034if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011035 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011036
11037
11038$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11039
11040
11041fi
11042
11043
11044fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011045done
11046
Antoine Pitroua3000072010-09-07 14:52:42 +000011047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011048
Matthias Kloseb9621712010-04-24 17:59:49 +000011049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11050$as_echo_n "checking for getpagesize... " >&6; }
11051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011052/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011053
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011054#include <unistd.h>
11055
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011056int
11057main ()
11058{
11059void* p = getpagesize
11060 ;
11061 return 0;
11062}
11063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011064if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011065
Matthias Kloseb9621712010-04-24 17:59:49 +000011066$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011067
Matthias Kloseb159a552010-04-25 21:00:44 +000011068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011069$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011070else
Matthias Kloseb9621712010-04-24 17:59:49 +000011071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11072$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011073
11074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011076
Victor Stinner984890f2011-11-24 13:53:38 +010011077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11078$as_echo_n "checking for broken unsetenv... " >&6; }
11079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11080/* end confdefs.h. */
11081
11082#include <stdlib.h>
11083
11084int
11085main ()
11086{
11087int res = unsetenv("DUMMY")
11088 ;
11089 return 0;
11090}
11091_ACEOF
11092if ac_fn_c_try_compile "$LINENO"; then :
11093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11094$as_echo "no" >&6; }
11095else
11096
11097$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11098
11099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11100$as_echo "yes" >&6; }
11101
11102fi
11103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11104
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011105for ac_prog in true
11106do
11107 # Extract the first word of "$ac_prog", so it can be a program name with args.
11108set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11110$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011111if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011112 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011113else
11114 if test -n "$TRUE"; then
11115 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11116else
11117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11118for as_dir in $PATH
11119do
11120 IFS=$as_save_IFS
11121 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011122 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011123 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011124 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011125 $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 +000011126 break 2
11127 fi
11128done
Matthias Kloseb9621712010-04-24 17:59:49 +000011129 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011130IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011131
11132fi
11133fi
11134TRUE=$ac_cv_prog_TRUE
11135if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11137$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011138else
Matthias Kloseb9621712010-04-24 17:59:49 +000011139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11140$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011141fi
11142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011143
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011144 test -n "$TRUE" && break
11145done
11146test -n "$TRUE" || TRUE="/bin/true"
11147
11148
Matthias Kloseb9621712010-04-24 17:59:49 +000011149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11150$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011151if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011152 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011153else
11154 ac_check_lib_save_LIBS=$LIBS
11155LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011157/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011158
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011159/* Override any GCC internal prototype to avoid an error.
11160 Use char because int might match the return type of a GCC
11161 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011162#ifdef __cplusplus
11163extern "C"
11164#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011165char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011166int
11167main ()
11168{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011169return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011170 ;
11171 return 0;
11172}
11173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011174if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011175 ac_cv_lib_c_inet_aton=yes
11176else
Matthias Kloseb9621712010-04-24 17:59:49 +000011177 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011178fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011179rm -f core conftest.err conftest.$ac_objext \
11180 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011181LIBS=$ac_check_lib_save_LIBS
11182fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11184$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011185if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011186 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011187else
Matthias Kloseb9621712010-04-24 17:59:49 +000011188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11189$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011190if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011191 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011192else
11193 ac_check_lib_save_LIBS=$LIBS
11194LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011196/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011198/* Override any GCC internal prototype to avoid an error.
11199 Use char because int might match the return type of a GCC
11200 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011201#ifdef __cplusplus
11202extern "C"
11203#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011204char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011205int
11206main ()
11207{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011208return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011209 ;
11210 return 0;
11211}
11212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011213if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011214 ac_cv_lib_resolv_inet_aton=yes
11215else
Matthias Kloseb9621712010-04-24 17:59:49 +000011216 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011217fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011218rm -f core conftest.err conftest.$ac_objext \
11219 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011220LIBS=$ac_check_lib_save_LIBS
11221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11223$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011224if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011225 cat >>confdefs.h <<_ACEOF
11226#define HAVE_LIBRESOLV 1
11227_ACEOF
11228
11229 LIBS="-lresolv $LIBS"
11230
11231fi
11232
11233
11234fi
11235
11236
Christian Heimesd0764e22007-12-04 15:00:33 +000011237# On Tru64, chflags seems to be present, but calling it will
11238# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11240$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011241if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011242 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011243else
Matthias Kloseb9621712010-04-24 17:59:49 +000011244 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011245 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011246else
Matthias Kloseb9621712010-04-24 17:59:49 +000011247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011248/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011249
Christian Heimesd0764e22007-12-04 15:00:33 +000011250#include <sys/stat.h>
11251#include <unistd.h>
11252int main(int argc, char*argv[])
11253{
11254 if(chflags(argv[0], 0) != 0)
11255 return 1;
11256 return 0;
11257}
Ned Deily3eb67d52011-06-28 00:00:28 -070011258
Christian Heimesd0764e22007-12-04 15:00:33 +000011259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011260if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011261 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011262else
Matthias Kloseb9621712010-04-24 17:59:49 +000011263 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011265rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11266 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011267fi
11268
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011269
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11272$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011273if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011274 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011275if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011276 ac_cv_have_chflags="yes"
11277else
11278 ac_cv_have_chflags="no"
11279fi
11280
11281fi
11282if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011283
Matthias Kloseb9621712010-04-24 17:59:49 +000011284$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011285
11286fi
11287
Matthias Kloseb9621712010-04-24 17:59:49 +000011288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11289$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011290if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011291 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011292else
Matthias Kloseb9621712010-04-24 17:59:49 +000011293 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011294 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011295else
Matthias Kloseb9621712010-04-24 17:59:49 +000011296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011297/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011298
Christian Heimesd0764e22007-12-04 15:00:33 +000011299#include <sys/stat.h>
11300#include <unistd.h>
11301int main(int argc, char*argv[])
11302{
11303 if(lchflags(argv[0], 0) != 0)
11304 return 1;
11305 return 0;
11306}
Ned Deily3eb67d52011-06-28 00:00:28 -070011307
Christian Heimesd0764e22007-12-04 15:00:33 +000011308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011309if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011310 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011311else
Matthias Kloseb9621712010-04-24 17:59:49 +000011312 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11315 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011316fi
11317
11318
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011319fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11321$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011322if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011323 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011324if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011325 ac_cv_have_lchflags="yes"
11326else
11327 ac_cv_have_lchflags="no"
11328fi
11329
11330fi
11331if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011332
Matthias Kloseb9621712010-04-24 17:59:49 +000011333$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011334
11335fi
11336
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011337case $ac_sys_system/$ac_sys_release in
11338Darwin/*)
11339 _CUR_CFLAGS="${CFLAGS}"
11340 _CUR_LDFLAGS="${LDFLAGS}"
11341 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11342 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11343 ;;
11344esac
11345
Matthias Kloseb9621712010-04-24 17:59:49 +000011346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11347$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011348if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011349 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011350else
11351 ac_check_lib_save_LIBS=$LIBS
11352LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011354/* end confdefs.h. */
11355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011356/* Override any GCC internal prototype to avoid an error.
11357 Use char because int might match the return type of a GCC
11358 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011359#ifdef __cplusplus
11360extern "C"
11361#endif
11362char inflateCopy ();
11363int
11364main ()
11365{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011366return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011367 ;
11368 return 0;
11369}
11370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011371if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011372 ac_cv_lib_z_inflateCopy=yes
11373else
Matthias Kloseb9621712010-04-24 17:59:49 +000011374 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011375fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011376rm -f core conftest.err conftest.$ac_objext \
11377 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011378LIBS=$ac_check_lib_save_LIBS
11379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11381$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011382if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011383
Matthias Kloseb9621712010-04-24 17:59:49 +000011384$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011385
11386fi
11387
11388
11389case $ac_sys_system/$ac_sys_release in
11390Darwin/*)
11391 CFLAGS="${_CUR_CFLAGS}"
11392 LDFLAGS="${_CUR_LDFLAGS}"
11393 ;;
11394esac
11395
Matthias Kloseb9621712010-04-24 17:59:49 +000011396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11397$as_echo_n "checking for hstrerror... " >&6; }
11398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011399/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011400
Martin v. Löwise9416172003-05-03 10:12:45 +000011401#include <netdb.h>
11402
Martin v. Löwise9416172003-05-03 10:12:45 +000011403int
11404main ()
11405{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011406void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011407 ;
11408 return 0;
11409}
11410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011411if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011412
Matthias Kloseb9621712010-04-24 17:59:49 +000011413$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011414
Matthias Kloseb159a552010-04-25 21:00:44 +000011415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011416$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011417else
Matthias Kloseb9621712010-04-24 17:59:49 +000011418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11419$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011420
11421fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011422rm -f core conftest.err conftest.$ac_objext \
11423 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011424
Matthias Kloseb9621712010-04-24 17:59:49 +000011425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11426$as_echo_n "checking for inet_aton... " >&6; }
11427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011428/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011429
Martin v. Löwis86d66262006-02-17 08:40:11 +000011430#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011431#include <sys/socket.h>
11432#include <netinet/in.h>
11433#include <arpa/inet.h>
11434
Martin v. Löwise9416172003-05-03 10:12:45 +000011435int
11436main ()
11437{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011438void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011439 ;
11440 return 0;
11441}
11442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011443if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011444
Matthias Kloseb9621712010-04-24 17:59:49 +000011445$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011446
Matthias Kloseb159a552010-04-25 21:00:44 +000011447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011448$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011449else
Matthias Kloseb9621712010-04-24 17:59:49 +000011450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11451$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011452
11453fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011454rm -f core conftest.err conftest.$ac_objext \
11455 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011456
Matthias Kloseb9621712010-04-24 17:59:49 +000011457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11458$as_echo_n "checking for inet_pton... " >&6; }
11459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011460/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011461
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011462#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011463#include <sys/socket.h>
11464#include <netinet/in.h>
11465#include <arpa/inet.h>
11466
Martin v. Löwise9416172003-05-03 10:12:45 +000011467int
11468main ()
11469{
11470void* p = inet_pton
11471 ;
11472 return 0;
11473}
11474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011475if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011476
Matthias Kloseb9621712010-04-24 17:59:49 +000011477$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011478
Matthias Kloseb159a552010-04-25 21:00:44 +000011479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011480$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011481else
Matthias Kloseb9621712010-04-24 17:59:49 +000011482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11483$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011484
11485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011487
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011488# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11490$as_echo_n "checking for setgroups... " >&6; }
11491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011492/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011493
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011494#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011495#ifdef HAVE_GRP_H
11496#include <grp.h>
11497#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011498
Martin v. Löwisd5843682002-11-21 20:41:28 +000011499int
11500main ()
11501{
11502void* p = setgroups
11503 ;
11504 return 0;
11505}
11506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011507if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011508
Matthias Kloseb9621712010-04-24 17:59:49 +000011509$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011510
Matthias Kloseb159a552010-04-25 21:00:44 +000011511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011512$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011513else
Matthias Kloseb9621712010-04-24 17:59:49 +000011514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11515$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011516
11517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011519
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011520# check for openpty and forkpty
11521
11522for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011523do :
11524 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011525if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011526 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011527#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011528_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011529
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011530else
Matthias Kloseb9621712010-04-24 17:59:49 +000011531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11532$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011533if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011534 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011535else
Martin v. Löwis11437992002-04-12 09:54:03 +000011536 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011537LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011539/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011540
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011541/* Override any GCC internal prototype to avoid an error.
11542 Use char because int might match the return type of a GCC
11543 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011544#ifdef __cplusplus
11545extern "C"
11546#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011547char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011548int
11549main ()
11550{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011551return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011552 ;
11553 return 0;
11554}
11555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011556if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011557 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011558else
Matthias Kloseb9621712010-04-24 17:59:49 +000011559 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011560fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011561rm -f core conftest.err conftest.$ac_objext \
11562 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011563LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11566$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011567if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011568 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011569 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011570else
Matthias Kloseb9621712010-04-24 17:59:49 +000011571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11572$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011573if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011574 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011575else
11576 ac_check_lib_save_LIBS=$LIBS
11577LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011579/* end confdefs.h. */
11580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011581/* Override any GCC internal prototype to avoid an error.
11582 Use char because int might match the return type of a GCC
11583 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011584#ifdef __cplusplus
11585extern "C"
11586#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011587char openpty ();
11588int
11589main ()
11590{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011591return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011592 ;
11593 return 0;
11594}
11595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011596if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011597 ac_cv_lib_bsd_openpty=yes
11598else
Matthias Kloseb9621712010-04-24 17:59:49 +000011599 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011600fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011601rm -f core conftest.err conftest.$ac_objext \
11602 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011603LIBS=$ac_check_lib_save_LIBS
11604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11606$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011607if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011608 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011609 LIBS="$LIBS -lbsd"
11610fi
11611
11612
11613fi
11614
Fred Drake8cef4cf2000-06-28 16:40:38 +000011615
11616fi
11617done
11618
11619for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011620do :
11621 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011622if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011623 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011624#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011625_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011626
Fred Drake8cef4cf2000-06-28 16:40:38 +000011627else
Matthias Kloseb9621712010-04-24 17:59:49 +000011628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11629$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011630if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011631 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011632else
Martin v. Löwis11437992002-04-12 09:54:03 +000011633 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011634LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011638/* Override any GCC internal prototype to avoid an error.
11639 Use char because int might match the return type of a GCC
11640 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011641#ifdef __cplusplus
11642extern "C"
11643#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011644char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011645int
11646main ()
11647{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011648return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011649 ;
11650 return 0;
11651}
11652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011653if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011654 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011655else
Matthias Kloseb9621712010-04-24 17:59:49 +000011656 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011657fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011658rm -f core conftest.err conftest.$ac_objext \
11659 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011660LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11663$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011664if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011665 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011666 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011667else
Matthias Kloseb9621712010-04-24 17:59:49 +000011668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11669$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011670if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011671 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011672else
11673 ac_check_lib_save_LIBS=$LIBS
11674LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011676/* end confdefs.h. */
11677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011678/* Override any GCC internal prototype to avoid an error.
11679 Use char because int might match the return type of a GCC
11680 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011681#ifdef __cplusplus
11682extern "C"
11683#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011684char forkpty ();
11685int
11686main ()
11687{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011688return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011689 ;
11690 return 0;
11691}
11692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011693if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011694 ac_cv_lib_bsd_forkpty=yes
11695else
Matthias Kloseb9621712010-04-24 17:59:49 +000011696 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011698rm -f core conftest.err conftest.$ac_objext \
11699 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011700LIBS=$ac_check_lib_save_LIBS
11701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11703$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011704if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011705 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011706 LIBS="$LIBS -lbsd"
11707fi
11708
11709
11710fi
11711
Fred Drake8cef4cf2000-06-28 16:40:38 +000011712
11713fi
11714done
11715
Jack Jansendd19cf82001-12-06 22:36:17 +000011716
Christian Heimesb186d002008-03-18 15:15:01 +000011717# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011718for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011719do :
11720 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011721if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011722 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011723#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011724_ACEOF
11725
11726fi
11727done
11728
11729
Michael W. Hudson54241132001-12-07 15:38:26 +000011730# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011731for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011732do :
11733 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11734ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011735if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011736 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011737#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011738_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011739
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011740fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011741done
11742
Michael W. Hudson54241132001-12-07 15:38:26 +000011743
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011744ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011745if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011746 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011747
Martin v. Löwis1142de32002-03-29 16:28:31 +000011748else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011749 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011750 *" dup2.$ac_objext "* ) ;;
11751 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011752 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011753esac
11754
Martin v. Löwis1142de32002-03-29 16:28:31 +000011755fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011756
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011757ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011758if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011759 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11760
11761else
11762 case " $LIBOBJS " in
11763 *" strdup.$ac_objext "* ) ;;
11764 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11765 ;;
11766esac
11767
11768fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011769
11770
11771for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011772do :
11773 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011774if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011775 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011776#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011779/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011780#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011781int
11782main ()
11783{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011784getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011785 ;
11786 return 0;
11787}
11788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011789if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011790
Matthias Kloseb9621712010-04-24 17:59:49 +000011791$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011792
Guido van Rossum627b2d71993-12-24 10:39:16 +000011793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011795
Guido van Rossum627b2d71993-12-24 10:39:16 +000011796fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011797done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011798
Jack Jansen150753c2003-03-29 22:07:47 +000011799for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011800do :
11801 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011802if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011803 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011804#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011807/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011808#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011809int
11810main ()
11811{
11812setpgrp(0,0);
11813 ;
11814 return 0;
11815}
11816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011817if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011818
Matthias Kloseb9621712010-04-24 17:59:49 +000011819$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011820
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011823
11824fi
11825done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011826
Thomas Wouters3a584202000-08-05 23:28:51 +000011827for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011828do :
11829 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011830if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011831 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011832#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011835/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011836#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011837int
11838main ()
11839{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011840gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011841 ;
11842 return 0;
11843}
11844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011845if ac_fn_c_try_compile "$LINENO"; then :
11846
Guido van Rossum627b2d71993-12-24 10:39:16 +000011847else
Skip Montanaro6dead952003-09-25 14:50:04 +000011848
Matthias Kloseb9621712010-04-24 17:59:49 +000011849$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011850
Martin v. Löwis11437992002-04-12 09:54:03 +000011851
Guido van Rossum627b2d71993-12-24 10:39:16 +000011852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011854
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011855fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011856done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011857
Michael W. Hudson54241132001-12-07 15:38:26 +000011858
Victor Stinnere0be4232011-10-25 13:06:09 +020011859for ac_func in clock_gettime
11860do :
11861 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11862if test "x$ac_cv_func_clock_gettime" = xyes; then :
11863 cat >>confdefs.h <<_ACEOF
11864#define HAVE_CLOCK_GETTIME 1
11865_ACEOF
11866
11867else
11868
11869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11870$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11871if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11872 $as_echo_n "(cached) " >&6
11873else
11874 ac_check_lib_save_LIBS=$LIBS
11875LIBS="-lrt $LIBS"
11876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11877/* end confdefs.h. */
11878
11879/* Override any GCC internal prototype to avoid an error.
11880 Use char because int might match the return type of a GCC
11881 builtin and then its argument prototype would still apply. */
11882#ifdef __cplusplus
11883extern "C"
11884#endif
11885char clock_gettime ();
11886int
11887main ()
11888{
11889return clock_gettime ();
11890 ;
11891 return 0;
11892}
11893_ACEOF
11894if ac_fn_c_try_link "$LINENO"; then :
11895 ac_cv_lib_rt_clock_gettime=yes
11896else
11897 ac_cv_lib_rt_clock_gettime=no
11898fi
11899rm -f core conftest.err conftest.$ac_objext \
11900 conftest$ac_exeext conftest.$ac_ext
11901LIBS=$ac_check_lib_save_LIBS
11902fi
11903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11904$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11905if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11906
Victor Stinner7efb8332014-08-29 15:41:08 +020011907 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020011908 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11909
11910
11911$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11912
11913
11914fi
11915
11916
11917fi
11918done
11919
11920
11921for ac_func in clock_getres
11922do :
11923 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11924if test "x$ac_cv_func_clock_getres" = xyes; then :
11925 cat >>confdefs.h <<_ACEOF
11926#define HAVE_CLOCK_GETRES 1
11927_ACEOF
11928
11929else
11930
11931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11932$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11933if ${ac_cv_lib_rt_clock_getres+:} false; then :
11934 $as_echo_n "(cached) " >&6
11935else
11936 ac_check_lib_save_LIBS=$LIBS
11937LIBS="-lrt $LIBS"
11938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11939/* end confdefs.h. */
11940
11941/* Override any GCC internal prototype to avoid an error.
11942 Use char because int might match the return type of a GCC
11943 builtin and then its argument prototype would still apply. */
11944#ifdef __cplusplus
11945extern "C"
11946#endif
11947char clock_getres ();
11948int
11949main ()
11950{
11951return clock_getres ();
11952 ;
11953 return 0;
11954}
11955_ACEOF
11956if ac_fn_c_try_link "$LINENO"; then :
11957 ac_cv_lib_rt_clock_getres=yes
11958else
11959 ac_cv_lib_rt_clock_getres=no
11960fi
11961rm -f core conftest.err conftest.$ac_objext \
11962 conftest$ac_exeext conftest.$ac_ext
11963LIBS=$ac_check_lib_save_LIBS
11964fi
11965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11966$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11967if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11968
11969 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11970
11971
11972fi
11973
11974
11975fi
11976done
11977
11978
Matthias Kloseb9621712010-04-24 17:59:49 +000011979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11980$as_echo_n "checking for major... " >&6; }
11981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011982/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011983
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011984#if defined(MAJOR_IN_MKDEV)
11985#include <sys/mkdev.h>
11986#elif defined(MAJOR_IN_SYSMACROS)
11987#include <sys/sysmacros.h>
11988#else
11989#include <sys/types.h>
11990#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011991
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011992int
11993main ()
11994{
11995
11996 makedev(major(0),minor(0));
11997
11998 ;
11999 return 0;
12000}
12001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012002if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012003
12004
Matthias Kloseb9621712010-04-24 17:59:49 +000012005$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012006
Matthias Kloseb9621712010-04-24 17:59:49 +000012007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12008$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012009
12010else
Skip Montanaro6dead952003-09-25 14:50:04 +000012011
Matthias Kloseb9621712010-04-24 17:59:49 +000012012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12013$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012014
12015fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012016rm -f core conftest.err conftest.$ac_objext \
12017 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012018
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012019# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012020# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12022$as_echo_n "checking for getaddrinfo... " >&6; }
12023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012024/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012025
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012026#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012027#include <sys/socket.h>
12028#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012029#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012030
Martin v. Löwis11437992002-04-12 09:54:03 +000012031int
12032main ()
12033{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012034getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012035 ;
12036 return 0;
12037}
12038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012039if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012040 have_getaddrinfo=yes
12041else
Matthias Kloseb9621712010-04-24 17:59:49 +000012042 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012044rm -f core conftest.err conftest.$ac_objext \
12045 conftest$ac_exeext conftest.$ac_ext
12046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12047$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012048if test $have_getaddrinfo = yes
12049then
Matthias Kloseb9621712010-04-24 17:59:49 +000012050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12051$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012052 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012053 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012054else
Matthias Kloseb9621712010-04-24 17:59:49 +000012055 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012056
12057if test "${enable_ipv6+set}" = set; then
12058 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12059else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012060 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012061fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012062else
Matthias Kloseb9621712010-04-24 17:59:49 +000012063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012064/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012065
Stefan Krah19c21392012-11-22 23:47:32 +010012066#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012067#include <sys/types.h>
12068#include <netdb.h>
12069#include <string.h>
12070#include <sys/socket.h>
12071#include <netinet/in.h>
12072
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012073int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012074{
12075 int passive, gaierr, inet4 = 0, inet6 = 0;
12076 struct addrinfo hints, *ai, *aitop;
12077 char straddr[INET6_ADDRSTRLEN], strport[16];
12078
12079 for (passive = 0; passive <= 1; passive++) {
12080 memset(&hints, 0, sizeof(hints));
12081 hints.ai_family = AF_UNSPEC;
12082 hints.ai_flags = passive ? AI_PASSIVE : 0;
12083 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012084 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012085 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12086 (void)gai_strerror(gaierr);
12087 goto bad;
12088 }
12089 for (ai = aitop; ai; ai = ai->ai_next) {
12090 if (ai->ai_addr == NULL ||
12091 ai->ai_addrlen == 0 ||
12092 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12093 straddr, sizeof(straddr), strport, sizeof(strport),
12094 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12095 goto bad;
12096 }
12097 switch (ai->ai_family) {
12098 case AF_INET:
12099 if (strcmp(strport, "54321") != 0) {
12100 goto bad;
12101 }
12102 if (passive) {
12103 if (strcmp(straddr, "0.0.0.0") != 0) {
12104 goto bad;
12105 }
12106 } else {
12107 if (strcmp(straddr, "127.0.0.1") != 0) {
12108 goto bad;
12109 }
12110 }
12111 inet4++;
12112 break;
12113 case AF_INET6:
12114 if (strcmp(strport, "54321") != 0) {
12115 goto bad;
12116 }
12117 if (passive) {
12118 if (strcmp(straddr, "::") != 0) {
12119 goto bad;
12120 }
12121 } else {
12122 if (strcmp(straddr, "::1") != 0) {
12123 goto bad;
12124 }
12125 }
12126 inet6++;
12127 break;
12128 case AF_UNSPEC:
12129 goto bad;
12130 break;
12131 default:
12132 /* another family support? */
12133 break;
12134 }
12135 }
12136 }
12137
12138 if (!(inet4 == 0 || inet4 == 2))
12139 goto bad;
12140 if (!(inet6 == 0 || inet6 == 2))
12141 goto bad;
12142
12143 if (aitop)
12144 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012145 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012146
12147 bad:
12148 if (aitop)
12149 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012150 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012151}
12152
Martin v. Löwis11437992002-04-12 09:54:03 +000012153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012154if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012155 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012156else
Matthias Kloseb9621712010-04-24 17:59:49 +000012157 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12160 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012162
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012163fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012164
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012166
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12168$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12169
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012170if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012171then
12172 if test $ipv6 = yes
12173 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012174 echo 'Fatal: You must get working getaddrinfo() function.'
12175 echo ' or you can specify "--disable-ipv6"'.
12176 exit 1
12177 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012178else
Martin v. Löwis11437992002-04-12 09:54:03 +000012179
Matthias Kloseb9621712010-04-24 17:59:49 +000012180$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012181
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012182fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012183
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012184for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012185do :
12186 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012187if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012188 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012189#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012190_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012191
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012192fi
12193done
12194
Michael W. Hudson54241132001-12-07 15:38:26 +000012195
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012196# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12198$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012199if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012200 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012201else
Matthias Kloseb9621712010-04-24 17:59:49 +000012202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012203/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012204#include <sys/types.h>
12205#include <sys/time.h>
12206#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012207
Martin v. Löwis11437992002-04-12 09:54:03 +000012208int
12209main ()
12210{
12211if ((struct tm *) 0)
12212return 0;
12213 ;
12214 return 0;
12215}
12216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012217if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012218 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012219else
Matthias Kloseb9621712010-04-24 17:59:49 +000012220 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012223fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12225$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012226if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012227
Matthias Kloseb9621712010-04-24 17:59:49 +000012228$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012229
12230fi
12231
Matthias Kloseb9621712010-04-24 17:59:49 +000012232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12233$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012234if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012235 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012236else
Matthias Kloseb9621712010-04-24 17:59:49 +000012237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012238/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012239#include <sys/types.h>
12240#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012241
Martin v. Löwis11437992002-04-12 09:54:03 +000012242int
12243main ()
12244{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012245struct tm tm;
12246 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012247 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012248 ;
12249 return 0;
12250}
12251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012252if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012253 ac_cv_struct_tm=time.h
12254else
Matthias Kloseb9621712010-04-24 17:59:49 +000012255 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012258fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12260$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012261if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012262
Matthias Kloseb9621712010-04-24 17:59:49 +000012263$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012264
12265fi
12266
Matthias Kloseb9621712010-04-24 17:59:49 +000012267ac_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 +000012268#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012269
Matthias Kloseb9621712010-04-24 17:59:49 +000012270"
Victor Stinnere0be4232011-10-25 13:06:09 +020012271if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012272
12273cat >>confdefs.h <<_ACEOF
12274#define HAVE_STRUCT_TM_TM_ZONE 1
12275_ACEOF
12276
12277
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012278fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012279
Martin v. Löwis11437992002-04-12 09:54:03 +000012280if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12281
Matthias Kloseb9621712010-04-24 17:59:49 +000012282$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012283
12284else
Matthias Kloseb9621712010-04-24 17:59:49 +000012285 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12286"
Victor Stinnere0be4232011-10-25 13:06:09 +020012287if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012288 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012289else
Matthias Kloseb9621712010-04-24 17:59:49 +000012290 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012291fi
12292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012293cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012294#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012295_ACEOF
12296
Matthias Kloseb9621712010-04-24 17:59:49 +000012297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12298$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012299if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012300 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012301else
Matthias Kloseb9621712010-04-24 17:59:49 +000012302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012303/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012304#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012305#if !HAVE_DECL_TZNAME
12306extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012307#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012308
Martin v. Löwis11437992002-04-12 09:54:03 +000012309int
12310main ()
12311{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012312return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012313 ;
12314 return 0;
12315}
12316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012317if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012318 ac_cv_var_tzname=yes
12319else
Matthias Kloseb9621712010-04-24 17:59:49 +000012320 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012321fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012322rm -f core conftest.err conftest.$ac_objext \
12323 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012324fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12326$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012327 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012328
Matthias Kloseb9621712010-04-24 17:59:49 +000012329$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012330
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012331 fi
12332fi
12333
Matthias Kloseb9621712010-04-24 17:59:49 +000012334ac_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 +020012335if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012336
12337cat >>confdefs.h <<_ACEOF
12338#define HAVE_STRUCT_STAT_ST_RDEV 1
12339_ACEOF
12340
12341
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012342fi
12343
Matthias Kloseb9621712010-04-24 17:59:49 +000012344ac_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 +020012345if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012346
Martin v. Löwis11437992002-04-12 09:54:03 +000012347cat >>confdefs.h <<_ACEOF
12348#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12349_ACEOF
12350
12351
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012352fi
12353
Matthias Kloseb9621712010-04-24 17:59:49 +000012354ac_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 +020012355if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012356
12357cat >>confdefs.h <<_ACEOF
12358#define HAVE_STRUCT_STAT_ST_FLAGS 1
12359_ACEOF
12360
12361
12362fi
12363
Matthias Kloseb9621712010-04-24 17:59:49 +000012364ac_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 +020012365if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012366
12367cat >>confdefs.h <<_ACEOF
12368#define HAVE_STRUCT_STAT_ST_GEN 1
12369_ACEOF
12370
12371
12372fi
12373
Matthias Kloseb9621712010-04-24 17:59:49 +000012374ac_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 +020012375if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012376
12377cat >>confdefs.h <<_ACEOF
12378#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12379_ACEOF
12380
12381
12382fi
12383
Matthias Kloseb9621712010-04-24 17:59:49 +000012384ac_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 +020012385if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012386
Martin v. Löwis11437992002-04-12 09:54:03 +000012387cat >>confdefs.h <<_ACEOF
12388#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12389_ACEOF
12390
12391
Matthias Kloseb9621712010-04-24 17:59:49 +000012392$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012393
12394else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012395 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012396 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012397 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12398 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012399esac
12400
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012401fi
12402
Michael W. Hudson54241132001-12-07 15:38:26 +000012403
Martin v. Löwis11437992002-04-12 09:54:03 +000012404
Matthias Kloseb9621712010-04-24 17:59:49 +000012405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12406$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012407if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012408 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012409else
Matthias Kloseb159a552010-04-25 21:00:44 +000012410
Matthias Kloseb9621712010-04-24 17:59:49 +000012411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012412/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012413#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012414int
12415main ()
12416{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012417return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012418 ;
12419 return 0;
12420}
12421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012422if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012423 ac_cv_header_time_altzone=yes
12424else
Matthias Kloseb9621712010-04-24 17:59:49 +000012425 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012429fi
12430
Matthias Kloseb9621712010-04-24 17:59:49 +000012431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12432$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012433if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012434
Matthias Kloseb9621712010-04-24 17:59:49 +000012435$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012436
12437fi
12438
Guido van Rossumda88dad1995-01-26 00:46:29 +000012439was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12441$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012443/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012444
12445#include <sys/types.h>
12446#include <sys/select.h>
12447#include <sys/time.h>
12448
Martin v. Löwis11437992002-04-12 09:54:03 +000012449int
12450main ()
12451{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012452;
Martin v. Löwis11437992002-04-12 09:54:03 +000012453 ;
12454 return 0;
12455}
12456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012457if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012458
12459
Matthias Kloseb9621712010-04-24 17:59:49 +000012460$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012461
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012462 was_it_defined=yes
12463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12467$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012468
Matthias Kloseb9621712010-04-24 17:59:49 +000012469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12470$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012471if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012472 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012473else
Matthias Kloseb9621712010-04-24 17:59:49 +000012474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012475/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012476#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012477int
12478main ()
12479{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012480struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012481 ;
12482 return 0;
12483}
12484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012485if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012486 ac_cv_struct_addrinfo=yes
12487else
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012489fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12491fi
12492
Matthias Kloseb9621712010-04-24 17:59:49 +000012493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12494$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012495if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012496
Matthias Kloseb9621712010-04-24 17:59:49 +000012497$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012498
12499fi
12500
Matthias Kloseb9621712010-04-24 17:59:49 +000012501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12502$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012503if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012504 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012505else
Matthias Kloseb9621712010-04-24 17:59:49 +000012506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012507/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012508
12509# include <sys/types.h>
12510# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012511int
12512main ()
12513{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012514struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012515 ;
12516 return 0;
12517}
12518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012519if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012520 ac_cv_struct_sockaddr_storage=yes
12521else
Matthias Kloseb9621712010-04-24 17:59:49 +000012522 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12525fi
12526
Matthias Kloseb9621712010-04-24 17:59:49 +000012527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12528$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012529if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012530
Matthias Kloseb9621712010-04-24 17:59:49 +000012531$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012532
12533fi
12534
Guido van Rossum627b2d71993-12-24 10:39:16 +000012535# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012536
Matthias Kloseb9621712010-04-24 17:59:49 +000012537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12538$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012539if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012540 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012541else
Matthias Kloseb9621712010-04-24 17:59:49 +000012542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012543/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012544$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012545int
12546main ()
12547{
12548static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012549test_array [0] = 0;
12550return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012551
12552 ;
12553 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012554}
Martin v. Löwis11437992002-04-12 09:54:03 +000012555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012556if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012557 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012558else
Matthias Kloseb9621712010-04-24 17:59:49 +000012559 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12564$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012565if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012566 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012567
12568fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012569
Matthias Kloseb9621712010-04-24 17:59:49 +000012570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12571$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012572if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012573 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012574else
Matthias Kloseb9621712010-04-24 17:59:49 +000012575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012576/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012577
Martin v. Löwis11437992002-04-12 09:54:03 +000012578int
12579main ()
12580{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012581
Martin v. Löwis11437992002-04-12 09:54:03 +000012582#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012583 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012584 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012585 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012586 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012587 char const *const *pcpcc;
12588 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012589 /* NEC SVR4.0.2 mips cc rejects this. */
12590 struct point {int x, y;};
12591 static struct point const zero = {0,0};
12592 /* AIX XL C 1.02.0.0 rejects this.
12593 It does not let you subtract one const X* pointer from another in
12594 an arm of an if-expression whose if-part is not a constant
12595 expression */
12596 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012597 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012598 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012599 ++pcpcc;
12600 ppc = (char**) pcpcc;
12601 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012602 { /* SCO 3.2v4 cc rejects this sort of thing. */
12603 char tx;
12604 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012605 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012606
Martin v. Löwis11437992002-04-12 09:54:03 +000012607 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012608 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012609 }
12610 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12611 int x[] = {25, 17};
12612 const int *foo = &x[0];
12613 ++foo;
12614 }
12615 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12616 typedef const int *iptr;
12617 iptr p = 0;
12618 ++p;
12619 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012620 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012621 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012622 struct s { int j; const int *ap[3]; } bx;
12623 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012624 }
12625 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12626 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012627 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012628 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012629 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012630#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012631
Martin v. Löwis11437992002-04-12 09:54:03 +000012632 ;
12633 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012634}
Martin v. Löwis11437992002-04-12 09:54:03 +000012635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012636if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012637 ac_cv_c_const=yes
12638else
Matthias Kloseb9621712010-04-24 17:59:49 +000012639 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12644$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012645if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012646
Matthias Kloseb9621712010-04-24 17:59:49 +000012647$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012648
12649fi
12650
Michael W. Hudson54241132001-12-07 15:38:26 +000012651
Guido van Rossumda88dad1995-01-26 00:46:29 +000012652works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12654$as_echo_n "checking for working volatile... " >&6; }
12655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012656/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012657
Martin v. Löwis11437992002-04-12 09:54:03 +000012658int
12659main ()
12660{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012661volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012662 ;
12663 return 0;
12664}
12665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012666if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012667 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012668else
Skip Montanaro6dead952003-09-25 14:50:04 +000012669
Matthias Kloseb9621712010-04-24 17:59:49 +000012670$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012671
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012672
Guido van Rossum627b2d71993-12-24 10:39:16 +000012673fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12676$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012677
Guido van Rossumda88dad1995-01-26 00:46:29 +000012678works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12680$as_echo_n "checking for working signed char... " >&6; }
12681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012682/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012683
Martin v. Löwis11437992002-04-12 09:54:03 +000012684int
12685main ()
12686{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012687signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012688 ;
12689 return 0;
12690}
12691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012692if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012693 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012694else
Skip Montanaro6dead952003-09-25 14:50:04 +000012695
Matthias Kloseb9621712010-04-24 17:59:49 +000012696$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012697
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012698
Guido van Rossum7f43da71994-08-01 12:15:30 +000012699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12702$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012703
Guido van Rossumda88dad1995-01-26 00:46:29 +000012704have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12706$as_echo_n "checking for prototypes... " >&6; }
12707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012708/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012709int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012710int
12711main ()
12712{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012713return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012714 ;
12715 return 0;
12716}
12717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012718if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012719
Matthias Kloseb9621712010-04-24 17:59:49 +000012720$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012721
Matthias Kloseb159a552010-04-25 21:00:44 +000012722 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012723fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12726$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012727
Guido van Rossumda88dad1995-01-26 00:46:29 +000012728works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12730$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012732/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012733
12734#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012735int foo(int x, ...) {
12736 va_list va;
12737 va_start(va, x);
12738 va_arg(va, int);
12739 va_arg(va, char *);
12740 va_arg(va, double);
12741 return 0;
12742}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012743
Martin v. Löwis11437992002-04-12 09:54:03 +000012744int
12745main ()
12746{
Guido van Rossum90eea071996-08-30 20:58:57 +000012747return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012748 ;
12749 return 0;
12750}
12751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012752if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012753
12754
Matthias Kloseb9621712010-04-24 17:59:49 +000012755$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012756
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012757 works=yes
12758
Guido van Rossum627b2d71993-12-24 10:39:16 +000012759fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12762$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012763
Martin v. Löwisd6320502004-08-12 13:45:08 +000012764# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12766$as_echo_n "checking for socketpair... " >&6; }
12767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012768/* end confdefs.h. */
12769
12770#include <sys/types.h>
12771#include <sys/socket.h>
12772
12773int
12774main ()
12775{
12776void *x=socketpair
12777 ;
12778 return 0;
12779}
12780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012781if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012782
Matthias Kloseb9621712010-04-24 17:59:49 +000012783$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012784
Matthias Kloseb159a552010-04-25 21:00:44 +000012785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012786$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012787else
Matthias Kloseb9621712010-04-24 17:59:49 +000012788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12789$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012790
12791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012793
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012794# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12796$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012798/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012799#include <sys/types.h>
12800#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012801int
12802main ()
12803{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012804struct sockaddr x;
12805x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012806 ;
12807 return 0;
12808}
12809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012810if ac_fn_c_try_compile "$LINENO"; then :
12811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12812$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012813
Matthias Kloseb9621712010-04-24 17:59:49 +000012814$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012815
12816else
Matthias Kloseb9621712010-04-24 17:59:49 +000012817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12818$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012819
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012822
Guido van Rossumda88dad1995-01-26 00:46:29 +000012823va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12825$as_echo_n "checking whether va_list is an array... " >&6; }
12826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012827/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012828
12829#ifdef HAVE_STDARG_PROTOTYPES
12830#include <stdarg.h>
12831#else
12832#include <varargs.h>
12833#endif
12834
Martin v. Löwis11437992002-04-12 09:54:03 +000012835int
12836main ()
12837{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012838va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012839 ;
12840 return 0;
12841}
12842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012843if ac_fn_c_try_compile "$LINENO"; then :
12844
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012845else
Skip Montanaro6dead952003-09-25 14:50:04 +000012846
Martin v. Löwis11437992002-04-12 09:54:03 +000012847
Matthias Kloseb9621712010-04-24 17:59:49 +000012848$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012849
Guido van Rossumda88dad1995-01-26 00:46:29 +000012850 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012851
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12855$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012856
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012857# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012858
12859
Matthias Kloseb9621712010-04-24 17:59:49 +000012860ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012861if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012862
Matthias Kloseb9621712010-04-24 17:59:49 +000012863 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012864
Matthias Kloseb9621712010-04-24 17:59:49 +000012865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12866$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012867 OLD_CFLAGS=$CFLAGS
12868 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012870/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012871
12872# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012873
Martin v. Löwis11437992002-04-12 09:54:03 +000012874int
12875main ()
12876{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012877
12878 char *name;
12879 struct hostent *he, *res;
12880 char buffer[2048];
12881 int buflen = 2048;
12882 int h_errnop;
12883
12884 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012885
12886 ;
12887 return 0;
12888}
12889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012890if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012891
Matthias Kloseb9621712010-04-24 17:59:49 +000012892 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012893
Martin v. Löwis11437992002-04-12 09:54:03 +000012894
Matthias Kloseb9621712010-04-24 17:59:49 +000012895$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012896
Matthias Kloseb9621712010-04-24 17:59:49 +000012897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12898$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012899
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012900else
Skip Montanaro6dead952003-09-25 14:50:04 +000012901
Matthias Kloseb9621712010-04-24 17:59:49 +000012902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12903$as_echo "no" >&6; }
12904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12905$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012907/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012908
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012909# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012910
Martin v. Löwis11437992002-04-12 09:54:03 +000012911int
12912main ()
12913{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012914
12915 char *name;
12916 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012917 char buffer[2048];
12918 int buflen = 2048;
12919 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012920
Matthias Kloseb159a552010-04-25 21:00:44 +000012921 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012922
12923 ;
12924 return 0;
12925}
12926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012927if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012928
Matthias Kloseb9621712010-04-24 17:59:49 +000012929 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012930
Martin v. Löwis11437992002-04-12 09:54:03 +000012931
Matthias Kloseb159a552010-04-25 21:00:44 +000012932$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012933
Matthias Kloseb9621712010-04-24 17:59:49 +000012934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12935$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012936
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012937else
Skip Montanaro6dead952003-09-25 14:50:04 +000012938
Matthias Kloseb9621712010-04-24 17:59:49 +000012939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12940$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12942$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12944/* end confdefs.h. */
12945
12946# include <netdb.h>
12947
12948int
12949main ()
12950{
12951
12952 char *name;
12953 struct hostent *he;
12954 struct hostent_data data;
12955
12956 (void) gethostbyname_r(name, he, &data);
12957
12958 ;
12959 return 0;
12960}
12961_ACEOF
12962if ac_fn_c_try_compile "$LINENO"; then :
12963
12964 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12965
12966
12967$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12968
12969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12970$as_echo "yes" >&6; }
12971
12972else
12973
12974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12975$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012976
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012979
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012980fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012982
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012985 CFLAGS=$OLD_CFLAGS
12986
12987else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012988
Matthias Kloseb9621712010-04-24 17:59:49 +000012989 for ac_func in gethostbyname
12990do :
12991 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012992if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012993 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012994#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012995_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012996
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012997fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012998done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012999
Michael W. Hudson54241132001-12-07 15:38:26 +000013000
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013001fi
13002
Michael W. Hudson54241132001-12-07 15:38:26 +000013003
13004
13005
13006
13007
13008
Guido van Rossum627b2d71993-12-24 10:39:16 +000013009# checks for system services
13010# (none yet)
13011
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013012# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013013ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013014if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013015
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013016else
Matthias Kloseb9621712010-04-24 17:59:49 +000013017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13018$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013019if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013020 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013021else
Martin v. Löwis11437992002-04-12 09:54:03 +000013022 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013023LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013025/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013026
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013027/* Override any GCC internal prototype to avoid an error.
13028 Use char because int might match the return type of a GCC
13029 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013030#ifdef __cplusplus
13031extern "C"
13032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013033char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013034int
13035main ()
13036{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013037return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013038 ;
13039 return 0;
13040}
13041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013042if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013043 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013044else
Matthias Kloseb9621712010-04-24 17:59:49 +000013045 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013047rm -f core conftest.err conftest.$ac_objext \
13048 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013049LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013050fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13052$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013053if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013054 cat >>confdefs.h <<_ACEOF
13055#define HAVE_LIBIEEE 1
13056_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013057
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013058 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013059
Guido van Rossum627b2d71993-12-24 10:39:16 +000013060fi
13061
Michael W. Hudson54241132001-12-07 15:38:26 +000013062
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013063fi
13064
Michael W. Hudson54241132001-12-07 15:38:26 +000013065
Guido van Rossum7f253911997-05-09 02:42:48 +000013066# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13068$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013069
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013070# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013071if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013072 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013073if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013074then
13075
Matthias Kloseb9621712010-04-24 17:59:49 +000013076$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013077
Matthias Kloseb9621712010-04-24 17:59:49 +000013078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13079$as_echo "yes" >&6; }
13080else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13081$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013082fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013083else
Matthias Kloseb9621712010-04-24 17:59:49 +000013084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13085$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013086fi
13087
Guido van Rossum7f253911997-05-09 02:42:48 +000013088
Guido van Rossum7f43da71994-08-01 12:15:30 +000013089# check for --with-libm=...
13090
Guido van Rossum563e7081996-09-10 18:20:48 +000013091case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013092Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013093*) LIBM=-lm
13094esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13096$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013098# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013099if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013100 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013101if test "$withval" = no
13102then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13104$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013105elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013106then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13108$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013109else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013110fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013111else
Matthias Kloseb9621712010-04-24 17:59:49 +000013112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13113$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013114fi
13115
Guido van Rossum7f43da71994-08-01 12:15:30 +000013116
13117# check for --with-libc=...
13118
Matthias Kloseb9621712010-04-24 17:59:49 +000013119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13120$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013121
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013122# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013123if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013124 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013125if test "$withval" = no
13126then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13128$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013129elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013130then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13132$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013133else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013134fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013135else
Matthias Kloseb9621712010-04-24 17:59:49 +000013136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13137$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013138fi
13139
Guido van Rossum7f43da71994-08-01 12:15:30 +000013140
Stefan Krah1919b7e2012-03-21 18:25:23 +010013141# **************************************
13142# * Check for gcc x64 inline assembler *
13143# **************************************
13144
13145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13146$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13148/* end confdefs.h. */
13149
13150int
13151main ()
13152{
13153
13154 __asm__ __volatile__ ("movq %rcx, %rax");
13155
13156 ;
13157 return 0;
13158}
13159_ACEOF
13160if ac_fn_c_try_compile "$LINENO"; then :
13161 have_gcc_asm_for_x64=yes
13162else
13163 have_gcc_asm_for_x64=no
13164fi
13165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13167$as_echo "$have_gcc_asm_for_x64" >&6; }
13168if test "$have_gcc_asm_for_x64" = yes
13169then
13170
13171$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13172
13173fi
13174
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013175# **************************************************
13176# * Check for various properties of floating point *
13177# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013178
Matthias Kloseb9621712010-04-24 17:59:49 +000013179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13180$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013181if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013182 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013183else
13184
Matthias Kloseb9621712010-04-24 17:59:49 +000013185if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013186 ac_cv_little_endian_double=no
13187else
Matthias Kloseb9621712010-04-24 17:59:49 +000013188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013189/* end confdefs.h. */
13190
13191#include <string.h>
13192int main() {
13193 double x = 9006104071832581.0;
13194 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13195 return 0;
13196 else
13197 return 1;
13198}
13199
13200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013201if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013202 ac_cv_little_endian_double=yes
13203else
Matthias Kloseb9621712010-04-24 17:59:49 +000013204 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013205fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013206rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13207 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013208fi
13209
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013210fi
13211
Matthias Kloseb9621712010-04-24 17:59:49 +000013212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13213$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013214if test "$ac_cv_little_endian_double" = yes
13215then
13216
Matthias Kloseb9621712010-04-24 17:59:49 +000013217$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013218
13219fi
13220
Matthias Kloseb9621712010-04-24 17:59:49 +000013221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13222$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013223if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013224 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013225else
13226
Matthias Kloseb9621712010-04-24 17:59:49 +000013227if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013228 ac_cv_big_endian_double=no
13229else
Matthias Kloseb9621712010-04-24 17:59:49 +000013230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013231/* end confdefs.h. */
13232
13233#include <string.h>
13234int main() {
13235 double x = 9006104071832581.0;
13236 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13237 return 0;
13238 else
13239 return 1;
13240}
13241
13242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013243if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013244 ac_cv_big_endian_double=yes
13245else
Matthias Kloseb9621712010-04-24 17:59:49 +000013246 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013248rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13249 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013250fi
13251
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013252fi
13253
Matthias Kloseb9621712010-04-24 17:59:49 +000013254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13255$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013256if test "$ac_cv_big_endian_double" = yes
13257then
13258
Matthias Kloseb9621712010-04-24 17:59:49 +000013259$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013260
13261fi
13262
13263# Some ARM platforms use a mixed-endian representation for doubles.
13264# While Python doesn't currently have full support for these platforms
13265# (see e.g., issue 1762561), we can at least make sure that float <-> string
13266# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13268$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013269if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013270 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013271else
13272
Matthias Kloseb9621712010-04-24 17:59:49 +000013273if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013274 ac_cv_mixed_endian_double=no
13275else
Matthias Kloseb9621712010-04-24 17:59:49 +000013276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013277/* end confdefs.h. */
13278
13279#include <string.h>
13280int main() {
13281 double x = 9006104071832581.0;
13282 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13283 return 0;
13284 else
13285 return 1;
13286}
13287
13288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013289if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013290 ac_cv_mixed_endian_double=yes
13291else
Matthias Kloseb9621712010-04-24 17:59:49 +000013292 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013293fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013294rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13295 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013296fi
13297
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013298fi
13299
Matthias Kloseb9621712010-04-24 17:59:49 +000013300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13301$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013302if test "$ac_cv_mixed_endian_double" = yes
13303then
13304
Matthias Kloseb9621712010-04-24 17:59:49 +000013305$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013306
13307fi
13308
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013309# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013310# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013311# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013312# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013313# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013314# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013315
13316# This inline assembler syntax may also work for suncc and icc,
13317# so we try it on all platforms.
13318
Matthias Kloseb9621712010-04-24 17:59:49 +000013319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13320$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013322/* end confdefs.h. */
13323
13324int
13325main ()
13326{
13327
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013328 unsigned short cw;
13329 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13330 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013331
13332 ;
13333 return 0;
13334}
13335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013336if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013337 have_gcc_asm_for_x87=yes
13338else
Matthias Kloseb9621712010-04-24 17:59:49 +000013339 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013340fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13343$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013344if test "$have_gcc_asm_for_x87" = yes
13345then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013346
Matthias Kloseb9621712010-04-24 17:59:49 +000013347$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013348
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013349fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013350
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13352$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13354/* end confdefs.h. */
13355
13356int
13357main ()
13358{
13359
13360 unsigned int fpcr;
13361 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13362 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13363
13364 ;
13365 return 0;
13366}
13367_ACEOF
13368if ac_fn_c_try_compile "$LINENO"; then :
13369 have_gcc_asm_for_mc68881=yes
13370else
13371 have_gcc_asm_for_mc68881=no
13372fi
13373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13375$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13376if test "$have_gcc_asm_for_mc68881" = yes
13377then
13378
13379$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13380
13381fi
13382
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013383# Detect whether system arithmetic is subject to x87-style double
13384# rounding issues. The result of this test has little meaning on non
13385# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13386# mode is round-to-nearest and double rounding issues are present, and
13387# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13389$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013390# $BASECFLAGS may affect the result
13391ac_save_cc="$CC"
13392CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013393if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013394 ac_cv_x87_double_rounding=no
13395else
Matthias Kloseb9621712010-04-24 17:59:49 +000013396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013397/* end confdefs.h. */
13398
13399#include <stdlib.h>
13400#include <math.h>
13401int main() {
13402 volatile double x, y, z;
13403 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13404 x = 0.99999999999999989; /* 1-2**-53 */
13405 y = 1./x;
13406 if (y != 1.)
13407 exit(0);
13408 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13409 x = 1e16;
13410 y = 2.99999;
13411 z = x + y;
13412 if (z != 1e16+4.)
13413 exit(0);
13414 /* both tests show evidence of double rounding */
13415 exit(1);
13416}
13417
13418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013419if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013420 ac_cv_x87_double_rounding=no
13421else
Matthias Kloseb9621712010-04-24 17:59:49 +000013422 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013423fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013424rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13425 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013426fi
13427
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013428CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13430$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013431if test "$ac_cv_x87_double_rounding" = yes
13432then
13433
Matthias Kloseb9621712010-04-24 17:59:49 +000013434$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013435
13436fi
13437
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013438# ************************************
13439# * Check for mathematical functions *
13440# ************************************
13441
13442LIBS_SAVE=$LIBS
13443LIBS="$LIBS $LIBM"
13444
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013445for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13446do :
13447 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13448ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013449if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013450 cat >>confdefs.h <<_ACEOF
13451#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13452_ACEOF
13453
13454fi
13455done
13456
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013457for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013458do :
13459 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13460ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013461if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013462 cat >>confdefs.h <<_ACEOF
13463#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13464_ACEOF
13465
13466fi
13467done
13468
13469ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13470"
Victor Stinnere0be4232011-10-25 13:06:09 +020013471if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013472 ac_have_decl=1
13473else
13474 ac_have_decl=0
13475fi
13476
13477cat >>confdefs.h <<_ACEOF
13478#define HAVE_DECL_ISINF $ac_have_decl
13479_ACEOF
13480ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13481"
Victor Stinnere0be4232011-10-25 13:06:09 +020013482if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013483 ac_have_decl=1
13484else
13485 ac_have_decl=0
13486fi
13487
13488cat >>confdefs.h <<_ACEOF
13489#define HAVE_DECL_ISNAN $ac_have_decl
13490_ACEOF
13491ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13492"
Victor Stinnere0be4232011-10-25 13:06:09 +020013493if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013494 ac_have_decl=1
13495else
13496 ac_have_decl=0
13497fi
13498
13499cat >>confdefs.h <<_ACEOF
13500#define HAVE_DECL_ISFINITE $ac_have_decl
13501_ACEOF
13502
13503
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013504# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13505# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13507$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013508if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013509 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013510else
13511
Matthias Kloseb9621712010-04-24 17:59:49 +000013512if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013513 ac_cv_tanh_preserves_zero_sign=no
13514else
Matthias Kloseb9621712010-04-24 17:59:49 +000013515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013516/* end confdefs.h. */
13517
13518#include <math.h>
13519#include <stdlib.h>
13520int main() {
13521 /* return 0 if either negative zeros don't exist
13522 on this platform or if negative zeros exist
13523 and tanh(-0.) == -0. */
13524 if (atan2(0., -1.) == atan2(-0., -1.) ||
13525 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13526 else exit(1);
13527}
13528
13529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013530if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013531 ac_cv_tanh_preserves_zero_sign=yes
13532else
Matthias Kloseb9621712010-04-24 17:59:49 +000013533 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013534fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13536 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013537fi
13538
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013539fi
13540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13542$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013543if test "$ac_cv_tanh_preserves_zero_sign" = yes
13544then
13545
Matthias Kloseb9621712010-04-24 17:59:49 +000013546$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013547
13548fi
13549
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013550if test "$ac_cv_func_log1p" = yes
13551then
13552 # On some versions of AIX, log1p(-0.) returns 0. instead of
13553 # -0. See issue #9920.
13554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13555$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013556 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013557 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013558else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013559
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013560 if test "$cross_compiling" = yes; then :
13561 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013562else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13564/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013565
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013566 #include <math.h>
13567 #include <stdlib.h>
13568 int main() {
13569 /* Fail if the signs of log1p(-0.) and -0. can be
13570 distinguished. */
13571 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13572 return 0;
13573 else
13574 return 1;
13575 }
13576
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013577_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013578if ac_fn_c_try_run "$LINENO"; then :
13579 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013580else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013581 ac_cv_log1p_drops_zero_sign=yes
13582fi
13583rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13584 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013585fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013586
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013587fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013588
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13590$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13591fi
13592if test "$ac_cv_log1p_drops_zero_sign" = yes
13593then
13594
13595$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13596
13597fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013598
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013599LIBS=$LIBS_SAVE
13600
Mark Dickinsona614f042009-11-28 12:48:43 +000013601# For multiprocessing module, check that sem_open
13602# actually works. For FreeBSD versions <= 7.2,
13603# the kernel module that provides POSIX semaphores
13604# isn't loaded by default, so an attempt to call
13605# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13607$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013608if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013609 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013610else
Matthias Kloseb9621712010-04-24 17:59:49 +000013611 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013612 ac_cv_posix_semaphores_enabled=yes
13613else
Matthias Kloseb9621712010-04-24 17:59:49 +000013614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013615/* end confdefs.h. */
13616
13617#include <unistd.h>
13618#include <fcntl.h>
13619#include <stdio.h>
13620#include <semaphore.h>
13621#include <sys/stat.h>
13622
13623int main(void) {
13624 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13625 if (a == SEM_FAILED) {
13626 perror("sem_open");
13627 return 1;
13628 }
13629 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013630 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013631 return 0;
13632}
13633
13634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013635if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013636 ac_cv_posix_semaphores_enabled=yes
13637else
Matthias Kloseb9621712010-04-24 17:59:49 +000013638 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013640rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13641 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013642fi
13643
13644
Mark Dickinsona614f042009-11-28 12:48:43 +000013645fi
13646
Matthias Kloseb9621712010-04-24 17:59:49 +000013647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13648$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013649if test $ac_cv_posix_semaphores_enabled = no
13650then
13651
Matthias Kloseb9621712010-04-24 17:59:49 +000013652$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013653
13654fi
13655
Mark Dickinson10683072009-04-18 21:18:19 +000013656# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13658$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013659if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013660 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013661else
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013663 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013664else
Matthias Kloseb9621712010-04-24 17:59:49 +000013665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013666/* end confdefs.h. */
13667
13668#include <unistd.h>
13669#include <fcntl.h>
13670#include <stdio.h>
13671#include <semaphore.h>
13672#include <sys/stat.h>
13673
13674int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013675 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013676 int count;
13677 int res;
13678 if(a==SEM_FAILED){
13679 perror("sem_open");
13680 return 1;
13681
13682 }
13683 res = sem_getvalue(a, &count);
13684 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013685 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013686 return res==-1 ? 1 : 0;
13687}
13688
Mark Dickinson10683072009-04-18 21:18:19 +000013689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013690if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013691 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013692else
Matthias Kloseb9621712010-04-24 17:59:49 +000013693 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013694fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013695rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13696 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013697fi
13698
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013699
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013700fi
13701
Matthias Kloseb9621712010-04-24 17:59:49 +000013702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13703$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013704if test $ac_cv_broken_sem_getvalue = yes
13705then
13706
Matthias Kloseb9621712010-04-24 17:59:49 +000013707$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013708
13709fi
13710
Mark Dickinsonbd792642009-03-18 20:06:12 +000013711# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13713$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013714# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013715if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013716 enableval=$enable_big_digits; case $enable_big_digits in
13717yes)
13718 enable_big_digits=30 ;;
13719no)
13720 enable_big_digits=15 ;;
1372115|30)
13722 ;;
13723*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013724 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 +000013725esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13727$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013728
13729cat >>confdefs.h <<_ACEOF
13730#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13731_ACEOF
13732
13733
13734else
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13736$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013737fi
13738
13739
Guido van Rossumef2255b2000-03-10 22:30:29 +000013740# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013741ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013742if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013743
13744
Matthias Kloseb9621712010-04-24 17:59:49 +000013745$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013746
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013747 wchar_h="yes"
13748
Guido van Rossumef2255b2000-03-10 22:30:29 +000013749else
Martin v. Löwis11437992002-04-12 09:54:03 +000013750 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013751
13752fi
13753
Michael W. Hudson54241132001-12-07 15:38:26 +000013754
Martin v. Löwis11437992002-04-12 09:54:03 +000013755
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013756# determine wchar_t size
13757if test "$wchar_h" = yes
13758then
Matthias Kloseb9621712010-04-24 17:59:49 +000013759 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013760# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13761# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13762# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13764$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013765if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013766 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013767else
Matthias Kloseb9621712010-04-24 17:59:49 +000013768 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13769"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013770
Martin v. Löwis11437992002-04-12 09:54:03 +000013771else
Matthias Kloseb9621712010-04-24 17:59:49 +000013772 if test "$ac_cv_type_wchar_t" = yes; then
13773 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13774$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013775as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013776See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013777 else
13778 ac_cv_sizeof_wchar_t=0
13779 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013780fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013781
Martin v. Löwis11437992002-04-12 09:54:03 +000013782fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13784$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013785
13786
13787
Martin v. Löwis11437992002-04-12 09:54:03 +000013788cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013789#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013790_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013791
Michael W. Hudson54241132001-12-07 15:38:26 +000013792
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013793fi
13794
Matthias Kloseb9621712010-04-24 17:59:49 +000013795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13796$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013797have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013799/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013800
13801#include <tcl.h>
13802#if TCL_UTF_MAX != 6
13803# error "NOT UCS4_TCL"
13804#endif
13805int
13806main ()
13807{
13808
13809 ;
13810 return 0;
13811}
13812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013813if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013814
13815
Matthias Kloseb9621712010-04-24 17:59:49 +000013816$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013817
13818 have_ucs4_tcl=yes
13819
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13823$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013824
Skip Montanaro6dead952003-09-25 14:50:04 +000013825# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013826if test "$wchar_h" = yes
13827then
13828 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13830$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013831 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013832 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013833else
13834
Matthias Kloseb9621712010-04-24 17:59:49 +000013835 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013836 ac_cv_wchar_t_signed=yes
13837else
Matthias Kloseb9621712010-04-24 17:59:49 +000013838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013839/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013840
13841 #include <wchar.h>
13842 int main()
13843 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013844 /* Success: exit code 0 */
13845 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013846 }
13847
13848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013849if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013850 ac_cv_wchar_t_signed=yes
13851else
Matthias Kloseb9621712010-04-24 17:59:49 +000013852 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13855 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013856fi
13857
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013858fi
13859
Matthias Kloseb9621712010-04-24 17:59:49 +000013860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13861$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013862fi
13863
Georg Brandl52d168a2008-01-07 18:10:24 +000013864# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013865if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013866 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013867then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013868 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013869
Matthias Kloseb9621712010-04-24 17:59:49 +000013870$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013871
Georg Brandl52d168a2008-01-07 18:10:24 +000013872else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013873 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013874fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13876$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013877
13878# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13880$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013881if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013882 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013883else
Matthias Kloseb9621712010-04-24 17:59:49 +000013884 ac_cv_c_bigendian=unknown
13885 # See if we're dealing with a universal compiler.
13886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13887/* end confdefs.h. */
13888#ifndef __APPLE_CC__
13889 not a universal capable compiler
13890 #endif
13891 typedef int dummy;
13892
Skip Montanaro6dead952003-09-25 14:50:04 +000013893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013894if ac_fn_c_try_compile "$LINENO"; then :
13895
13896 # Check for potential -arch flags. It is not universal unless
13897 # there are at least two -arch flags with different values.
13898 ac_arch=
13899 ac_prev=
13900 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13901 if test -n "$ac_prev"; then
13902 case $ac_word in
13903 i?86 | x86_64 | ppc | ppc64)
13904 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13905 ac_arch=$ac_word
13906 else
13907 ac_cv_c_bigendian=universal
13908 break
13909 fi
13910 ;;
13911 esac
13912 ac_prev=
13913 elif test "x$ac_word" = "x-arch"; then
13914 ac_prev=arch
13915 fi
13916 done
13917fi
13918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13919 if test $ac_cv_c_bigendian = unknown; then
13920 # See if sys/param.h defines the BYTE_ORDER macro.
13921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013922/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013923#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013924 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013925
Martin v. Löwis11437992002-04-12 09:54:03 +000013926int
13927main ()
13928{
Matthias Kloseb9621712010-04-24 17:59:49 +000013929#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13930 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13931 && LITTLE_ENDIAN)
13932 bogus endian macros
13933 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013934
13935 ;
13936 return 0;
13937}
13938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013939if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013940 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013942/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013943#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013945
Martin v. Löwis11437992002-04-12 09:54:03 +000013946int
13947main ()
13948{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013949#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013950 not big endian
13951 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013952
13953 ;
13954 return 0;
13955}
13956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013957if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013958 ac_cv_c_bigendian=yes
13959else
Matthias Kloseb9621712010-04-24 17:59:49 +000013960 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013963fi
13964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13965 fi
13966 if test $ac_cv_c_bigendian = unknown; then
13967 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013969/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013970#include <limits.h>
13971
Martin v. Löwis11437992002-04-12 09:54:03 +000013972int
13973main ()
13974{
Matthias Kloseb9621712010-04-24 17:59:49 +000013975#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13976 bogus endian macros
13977 #endif
13978
Martin v. Löwis11437992002-04-12 09:54:03 +000013979 ;
13980 return 0;
13981}
13982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013983if ac_fn_c_try_compile "$LINENO"; then :
13984 # It does; now see whether it defined to _BIG_ENDIAN or not.
13985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13986/* end confdefs.h. */
13987#include <limits.h>
13988
13989int
13990main ()
13991{
13992#ifndef _BIG_ENDIAN
13993 not big endian
13994 #endif
13995
13996 ;
13997 return 0;
13998}
13999_ACEOF
14000if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014001 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014002else
Matthias Kloseb9621712010-04-24 17:59:49 +000014003 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014004fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14006fi
14007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14008 fi
14009 if test $ac_cv_c_bigendian = unknown; then
14010 # Compile a test program.
14011 if test "$cross_compiling" = yes; then :
14012 # Try to guess by grepping values from an object file.
14013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14014/* end confdefs.h. */
14015short int ascii_mm[] =
14016 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14017 short int ascii_ii[] =
14018 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14019 int use_ascii (int i) {
14020 return ascii_mm[i] + ascii_ii[i];
14021 }
14022 short int ebcdic_ii[] =
14023 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14024 short int ebcdic_mm[] =
14025 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14026 int use_ebcdic (int i) {
14027 return ebcdic_mm[i] + ebcdic_ii[i];
14028 }
14029 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014030
Matthias Kloseb9621712010-04-24 17:59:49 +000014031int
14032main ()
14033{
14034return use_ascii (foo) == use_ebcdic (foo);
14035 ;
14036 return 0;
14037}
14038_ACEOF
14039if ac_fn_c_try_compile "$LINENO"; then :
14040 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14041 ac_cv_c_bigendian=yes
14042 fi
14043 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14044 if test "$ac_cv_c_bigendian" = unknown; then
14045 ac_cv_c_bigendian=no
14046 else
14047 # finding both strings is unlikely to happen, but who knows?
14048 ac_cv_c_bigendian=unknown
14049 fi
14050 fi
14051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014053else
Matthias Kloseb9621712010-04-24 17:59:49 +000014054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014055/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014056$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014057int
14058main ()
14059{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014060
Matthias Kloseb9621712010-04-24 17:59:49 +000014061 /* Are we little or big endian? From Harbison&Steele. */
14062 union
14063 {
14064 long int l;
14065 char c[sizeof (long int)];
14066 } u;
14067 u.l = 1;
14068 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014069
14070 ;
14071 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014072}
Martin v. Löwis11437992002-04-12 09:54:03 +000014073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014074if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014075 ac_cv_c_bigendian=no
14076else
Matthias Kloseb9621712010-04-24 17:59:49 +000014077 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14080 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014082
Matthias Kloseb9621712010-04-24 17:59:49 +000014083 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014084fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14086$as_echo "$ac_cv_c_bigendian" >&6; }
14087 case $ac_cv_c_bigendian in #(
14088 yes)
14089 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14090;; #(
14091 no)
14092 ;; #(
14093 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014094
Matthias Kloseb9621712010-04-24 17:59:49 +000014095$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014096
Matthias Kloseb9621712010-04-24 17:59:49 +000014097 ;; #(
14098 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014099 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014100 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014101 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014102
Michael W. Hudson54241132001-12-07 15:38:26 +000014103
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014104# ABI version string for Python extension modules. This appears between the
14105# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14106# from the following attributes which affect the ABI of this Python build (in
14107# this order):
14108#
14109# * The Python implementation (always 'cpython-' for us)
14110# * The major and minor version numbers
14111# * --with-pydebug (adds a 'd')
14112# * --with-pymalloc (adds a 'm')
14113# * --with-wide-unicode (adds a 'u')
14114#
14115# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014116# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14117# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014118
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14120$as_echo_n "checking ABIFLAGS... " >&6; }
14121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14122$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14124$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014125SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14127$as_echo "$SOABI" >&6; }
14128
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014129
14130case $ac_sys_system in
14131 Linux*|GNU*)
14132 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14133 *)
14134 EXT_SUFFIX=${SHLIB_SUFFIX};;
14135esac
14136
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14138$as_echo_n "checking LDVERSION... " >&6; }
14139LDVERSION='$(VERSION)$(ABIFLAGS)'
14140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14141$as_echo "$LDVERSION" >&6; }
14142
doko@python.org87421192013-01-26 11:39:31 +010014143
14144LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
14145
14146
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014147# Check whether right shifting a negative integer extends the sign bit
14148# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14150$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014151if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014152 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014153else
Martin v. Löwis11437992002-04-12 09:54:03 +000014154
Matthias Kloseb9621712010-04-24 17:59:49 +000014155if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014156 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014157else
Matthias Kloseb9621712010-04-24 17:59:49 +000014158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014159/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014160
14161int main()
14162{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014163 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014164}
14165
Martin v. Löwis11437992002-04-12 09:54:03 +000014166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014167if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014168 ac_cv_rshift_extends_sign=yes
14169else
Matthias Kloseb9621712010-04-24 17:59:49 +000014170 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014172rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14173 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014174fi
14175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014176fi
14177
Matthias Kloseb9621712010-04-24 17:59:49 +000014178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14179$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014180if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014181then
Martin v. Löwis11437992002-04-12 09:54:03 +000014182
Matthias Kloseb9621712010-04-24 17:59:49 +000014183$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014184
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014185fi
14186
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014187# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14189$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014190if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014191 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014192else
Martin v. Löwis11437992002-04-12 09:54:03 +000014193
Matthias Kloseb9621712010-04-24 17:59:49 +000014194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014195/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014196#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014197int
14198main ()
14199{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014200
14201 FILE *f = fopen("/dev/null", "r");
14202 flockfile(f);
14203 getc_unlocked(f);
14204 funlockfile(f);
14205
Martin v. Löwis11437992002-04-12 09:54:03 +000014206 ;
14207 return 0;
14208}
14209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014210if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014211 ac_cv_have_getc_unlocked=yes
14212else
Matthias Kloseb9621712010-04-24 17:59:49 +000014213 ac_cv_have_getc_unlocked=no
14214fi
14215rm -f core conftest.err conftest.$ac_objext \
14216 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014218
Matthias Kloseb9621712010-04-24 17:59:49 +000014219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14220$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014221if test "$ac_cv_have_getc_unlocked" = yes
14222then
Martin v. Löwis11437992002-04-12 09:54:03 +000014223
Matthias Kloseb9621712010-04-24 17:59:49 +000014224$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014225
14226fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014227
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014228# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014229# save the value of LIBS so we don't actually link Python with readline
14230LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014231
Gregory P. Smith18820942008-09-07 06:24:49 +000014232# On some systems we need to link readline to a termcap compatible
14233# library. NOTE: Keep the precedence of listed libraries synchronised
14234# with setup.py.
14235py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14237$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014238for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014239 if test -z "$py_libtermcap"; then
14240 READLINE_LIBS="-lreadline"
14241 else
14242 READLINE_LIBS="-lreadline -l$py_libtermcap"
14243 fi
14244 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014246/* end confdefs.h. */
14247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014248/* Override any GCC internal prototype to avoid an error.
14249 Use char because int might match the return type of a GCC
14250 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014251#ifdef __cplusplus
14252extern "C"
14253#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014254char readline ();
14255int
14256main ()
14257{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014258return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014259 ;
14260 return 0;
14261}
14262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014263if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014264 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014266rm -f core conftest.err conftest.$ac_objext \
14267 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014268 if test $py_cv_lib_readline = yes; then
14269 break
14270 fi
14271done
14272# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14273#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014274if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14276$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014277else
Matthias Kloseb9621712010-04-24 17:59:49 +000014278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14279$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014280
Matthias Kloseb9621712010-04-24 17:59:49 +000014281$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014282
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014283fi
14284
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014285# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14287$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014288if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014289 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014290else
14291 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014292LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014294/* end confdefs.h. */
14295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014296/* Override any GCC internal prototype to avoid an error.
14297 Use char because int might match the return type of a GCC
14298 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014299#ifdef __cplusplus
14300extern "C"
14301#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014302char rl_callback_handler_install ();
14303int
14304main ()
14305{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014306return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014307 ;
14308 return 0;
14309}
14310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014311if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014312 ac_cv_lib_readline_rl_callback_handler_install=yes
14313else
Matthias Kloseb9621712010-04-24 17:59:49 +000014314 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014316rm -f core conftest.err conftest.$ac_objext \
14317 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014318LIBS=$ac_check_lib_save_LIBS
14319fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14321$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014322if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014323
Matthias Kloseb9621712010-04-24 17:59:49 +000014324$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014325
14326fi
14327
14328
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014329# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014331/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014332#include <readline/readline.h>
14333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014334if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014335 have_readline=yes
14336else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014337 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014338
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014339fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014340rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014341if test $have_readline = yes
14342then
Matthias Kloseb9621712010-04-24 17:59:49 +000014343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014344/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014345#include <readline/readline.h>
14346
14347_ACEOF
14348if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014349 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014350
Matthias Kloseb9621712010-04-24 17:59:49 +000014351$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014352
14353fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014354rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014355
Matthias Kloseb9621712010-04-24 17:59:49 +000014356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014357/* end confdefs.h. */
14358#include <readline/readline.h>
14359
14360_ACEOF
14361if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014362 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014363
Matthias Kloseb9621712010-04-24 17:59:49 +000014364$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014365
14366fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014367rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014368
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014369fi
14370
Martin v. Löwis0daad592001-09-30 21:09:59 +000014371# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14373$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014374if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014375 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014376else
Martin v. Löwis11437992002-04-12 09:54:03 +000014377 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014378LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014380/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014381
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014382/* Override any GCC internal prototype to avoid an error.
14383 Use char because int might match the return type of a GCC
14384 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014385#ifdef __cplusplus
14386extern "C"
14387#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014388char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014389int
14390main ()
14391{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014392return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014393 ;
14394 return 0;
14395}
14396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014397if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014398 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014399else
Matthias Kloseb9621712010-04-24 17:59:49 +000014400 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014402rm -f core conftest.err conftest.$ac_objext \
14403 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014404LIBS=$ac_check_lib_save_LIBS
14405fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14407$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014408if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014409
Matthias Kloseb9621712010-04-24 17:59:49 +000014410$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014411
Martin v. Löwis0daad592001-09-30 21:09:59 +000014412fi
14413
Michael W. Hudson54241132001-12-07 15:38:26 +000014414
Thomas Wouters89d996e2007-09-08 17:39:28 +000014415# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14417$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014418if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014419 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014420else
14421 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014422LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014424/* end confdefs.h. */
14425
14426/* Override any GCC internal prototype to avoid an error.
14427 Use char because int might match the return type of a GCC
14428 builtin and then its argument prototype would still apply. */
14429#ifdef __cplusplus
14430extern "C"
14431#endif
14432char rl_completion_display_matches_hook ();
14433int
14434main ()
14435{
14436return rl_completion_display_matches_hook ();
14437 ;
14438 return 0;
14439}
14440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014441if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014442 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14443else
Matthias Kloseb9621712010-04-24 17:59:49 +000014444 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014445fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014446rm -f core conftest.err conftest.$ac_objext \
14447 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014448LIBS=$ac_check_lib_save_LIBS
14449fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14451$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014452if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014453
Matthias Kloseb9621712010-04-24 17:59:49 +000014454$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014455
14456fi
14457
14458
Martin v. Löwis0daad592001-09-30 21:09:59 +000014459# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14461$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014462if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014463 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014464else
Martin v. Löwis11437992002-04-12 09:54:03 +000014465 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014466LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014469
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014470/* Override any GCC internal prototype to avoid an error.
14471 Use char because int might match the return type of a GCC
14472 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014473#ifdef __cplusplus
14474extern "C"
14475#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014476char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014477int
14478main ()
14479{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014480return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014481 ;
14482 return 0;
14483}
14484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014485if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014486 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014487else
Matthias Kloseb9621712010-04-24 17:59:49 +000014488 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014489fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014490rm -f core conftest.err conftest.$ac_objext \
14491 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014492LIBS=$ac_check_lib_save_LIBS
14493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14495$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014496if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014497
Matthias Kloseb9621712010-04-24 17:59:49 +000014498$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014499
Guido van Rossum353ae582001-07-10 16:45:32 +000014500fi
14501
Jack Jansendd19cf82001-12-06 22:36:17 +000014502
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014503# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014505/* end confdefs.h. */
14506#include <readline/readline.h>
14507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014508if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014509 have_readline=yes
14510else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014511 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014512
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014513fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014514rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014515if test $have_readline = yes
14516then
Matthias Kloseb9621712010-04-24 17:59:49 +000014517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014518/* end confdefs.h. */
14519#include <readline/readline.h>
14520
14521_ACEOF
14522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014524
Matthias Kloseb9621712010-04-24 17:59:49 +000014525$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014526
14527fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014528rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014529
14530fi
14531
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060014532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
14533$as_echo_n "checking for append_history in -lreadline... " >&6; }
14534if ${ac_cv_lib_readline_append_history+:} false; then :
14535 $as_echo_n "(cached) " >&6
14536else
14537 ac_check_lib_save_LIBS=$LIBS
14538LIBS="-lreadline $READLINE_LIBS $LIBS"
14539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14540/* end confdefs.h. */
14541
14542/* Override any GCC internal prototype to avoid an error.
14543 Use char because int might match the return type of a GCC
14544 builtin and then its argument prototype would still apply. */
14545#ifdef __cplusplus
14546extern "C"
14547#endif
14548char append_history ();
14549int
14550main ()
14551{
14552return append_history ();
14553 ;
14554 return 0;
14555}
14556_ACEOF
14557if ac_fn_c_try_link "$LINENO"; then :
14558 ac_cv_lib_readline_append_history=yes
14559else
14560 ac_cv_lib_readline_append_history=no
14561fi
14562rm -f core conftest.err conftest.$ac_objext \
14563 conftest$ac_exeext conftest.$ac_ext
14564LIBS=$ac_check_lib_save_LIBS
14565fi
14566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
14567$as_echo "$ac_cv_lib_readline_append_history" >&6; }
14568if test "x$ac_cv_lib_readline_append_history" = xyes; then :
14569
14570$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
14571
14572fi
14573
14574
Martin v. Löwis82bca632006-02-10 20:49:30 +000014575# End of readline checks: restore LIBS
14576LIBS=$LIBS_no_readline
14577
Matthias Kloseb9621712010-04-24 17:59:49 +000014578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14579$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014580if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014581 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014582else
Martin v. Löwis11437992002-04-12 09:54:03 +000014583
Matthias Kloseb9621712010-04-24 17:59:49 +000014584if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014585 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014586else
Matthias Kloseb9621712010-04-24 17:59:49 +000014587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014588/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014589
14590int main()
14591{
14592 int val1 = nice(1);
14593 if (val1 != -1 && val1 == nice(2))
14594 exit(0);
14595 exit(1);
14596}
14597
Martin v. Löwis11437992002-04-12 09:54:03 +000014598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014599if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014600 ac_cv_broken_nice=yes
14601else
Matthias Kloseb9621712010-04-24 17:59:49 +000014602 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014603fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014604rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14605 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014606fi
14607
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014608fi
14609
Matthias Kloseb9621712010-04-24 17:59:49 +000014610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14611$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014612if test "$ac_cv_broken_nice" = yes
14613then
Martin v. Löwis11437992002-04-12 09:54:03 +000014614
Matthias Kloseb9621712010-04-24 17:59:49 +000014615$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014616
14617fi
14618
Matthias Kloseb9621712010-04-24 17:59:49 +000014619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14620$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014621if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014622 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014623else
Matthias Kloseb9621712010-04-24 17:59:49 +000014624 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014625 ac_cv_broken_poll=no
14626else
Matthias Kloseb9621712010-04-24 17:59:49 +000014627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014628/* end confdefs.h. */
14629
14630#include <poll.h>
14631
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014632int main()
14633{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014634 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014635 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014636
14637 close (42);
14638
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014639 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014640 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014641 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014642 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014643 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014644 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014645 return 1;
14646}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014647
14648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014649if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014650 ac_cv_broken_poll=yes
14651else
Matthias Kloseb9621712010-04-24 17:59:49 +000014652 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014653fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14655 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014657
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014658fi
14659
Matthias Kloseb9621712010-04-24 17:59:49 +000014660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14661$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014662if test "$ac_cv_broken_poll" = yes
14663then
14664
Matthias Kloseb9621712010-04-24 17:59:49 +000014665$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014666
14667fi
14668
Brett Cannon43802422005-02-10 20:48:03 +000014669# 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 +000014670# (which is not required by ISO C or UNIX spec) and/or if we support
14671# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014672ac_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 +000014673#include <$ac_cv_struct_tm>
14674
Matthias Kloseb9621712010-04-24 17:59:49 +000014675"
Victor Stinnere0be4232011-10-25 13:06:09 +020014676if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014677
14678cat >>confdefs.h <<_ACEOF
14679#define HAVE_STRUCT_TM_TM_ZONE 1
14680_ACEOF
14681
14682
14683fi
14684
14685if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14686
Matthias Kloseb9621712010-04-24 17:59:49 +000014687$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014688
14689else
Matthias Kloseb9621712010-04-24 17:59:49 +000014690 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14691"
Victor Stinnere0be4232011-10-25 13:06:09 +020014692if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014693 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014694else
Matthias Kloseb9621712010-04-24 17:59:49 +000014695 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014696fi
14697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014698cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014699#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014700_ACEOF
14701
Matthias Kloseb9621712010-04-24 17:59:49 +000014702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14703$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014704if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014705 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014706else
Matthias Kloseb9621712010-04-24 17:59:49 +000014707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014708/* end confdefs.h. */
14709#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014710#if !HAVE_DECL_TZNAME
14711extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014712#endif
14713
14714int
14715main ()
14716{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014717return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014718 ;
14719 return 0;
14720}
14721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014722if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014723 ac_cv_var_tzname=yes
14724else
Matthias Kloseb9621712010-04-24 17:59:49 +000014725 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014726fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014727rm -f core conftest.err conftest.$ac_objext \
14728 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014729fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14731$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014732 if test $ac_cv_var_tzname = yes; then
14733
Matthias Kloseb9621712010-04-24 17:59:49 +000014734$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014735
14736 fi
14737fi
14738
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014739
Martin v. Löwis1d459062005-03-14 21:23:33 +000014740# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14742$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014743if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014744 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014745else
14746
Matthias Kloseb9621712010-04-24 17:59:49 +000014747if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014748 ac_cv_working_tzset=no
14749else
Matthias Kloseb9621712010-04-24 17:59:49 +000014750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014751/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014752
14753#include <stdlib.h>
14754#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014755#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014756
14757#if HAVE_TZNAME
14758extern char *tzname[];
14759#endif
14760
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014761int main()
14762{
Brett Cannon18367812003-09-19 00:59:16 +000014763 /* Note that we need to ensure that not only does tzset(3)
14764 do 'something' with localtime, but it works as documented
14765 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014766 This includes making sure that tzname is set properly if
14767 tm->tm_zone does not exist since it is the alternative way
14768 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014769
14770 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014771 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014772 */
14773
Martin v. Löwis1d459062005-03-14 21:23:33 +000014774 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014775 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14776
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014777 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014778 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014779 if (localtime(&groundhogday)->tm_hour != 0)
14780 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014781#if HAVE_TZNAME
14782 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14783 if (strcmp(tzname[0], "UTC") ||
14784 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14785 exit(1);
14786#endif
Brett Cannon18367812003-09-19 00:59:16 +000014787
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014788 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014789 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014790 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014791 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014792#if HAVE_TZNAME
14793 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14794 exit(1);
14795#endif
Brett Cannon18367812003-09-19 00:59:16 +000014796
14797 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14798 tzset();
14799 if (localtime(&groundhogday)->tm_hour != 11)
14800 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014801#if HAVE_TZNAME
14802 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14803 exit(1);
14804#endif
14805
14806#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014807 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14808 exit(1);
14809 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14810 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014811#endif
Brett Cannon18367812003-09-19 00:59:16 +000014812
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014813 exit(0);
14814}
14815
14816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014817if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014818 ac_cv_working_tzset=yes
14819else
Matthias Kloseb9621712010-04-24 17:59:49 +000014820 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014821fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14823 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014824fi
14825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014826fi
14827
Matthias Kloseb9621712010-04-24 17:59:49 +000014828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14829$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014830if test "$ac_cv_working_tzset" = yes
14831then
14832
Matthias Kloseb9621712010-04-24 17:59:49 +000014833$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014834
14835fi
14836
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014837# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14839$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014840if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014841 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014842else
Matthias Kloseb9621712010-04-24 17:59:49 +000014843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014844/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014845#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014846int
14847main ()
14848{
14849
14850struct stat st;
14851st.st_mtim.tv_nsec = 1;
14852
14853 ;
14854 return 0;
14855}
14856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014857if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014858 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014859else
Matthias Kloseb9621712010-04-24 17:59:49 +000014860 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14863fi
14864
Matthias Kloseb9621712010-04-24 17:59:49 +000014865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14866$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014867if test "$ac_cv_stat_tv_nsec" = yes
14868then
14869
Matthias Kloseb9621712010-04-24 17:59:49 +000014870$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014871
14872fi
14873
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014874# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14876$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014877if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014878 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014879else
Matthias Kloseb9621712010-04-24 17:59:49 +000014880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014881/* end confdefs.h. */
14882#include <sys/stat.h>
14883int
14884main ()
14885{
14886
14887struct stat st;
14888st.st_mtimespec.tv_nsec = 1;
14889
14890 ;
14891 return 0;
14892}
14893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014894if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014895 ac_cv_stat_tv_nsec2=yes
14896else
Matthias Kloseb9621712010-04-24 17:59:49 +000014897 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14900fi
14901
Matthias Kloseb9621712010-04-24 17:59:49 +000014902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14903$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014904if test "$ac_cv_stat_tv_nsec2" = yes
14905then
14906
Matthias Kloseb9621712010-04-24 17:59:49 +000014907$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014908
14909fi
14910
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014911# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014912ac_save_cppflags="$CPPFLAGS"
14913CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014914
14915for ac_header in curses.h ncurses.h
14916do :
14917 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14918ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14919if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14920 cat >>confdefs.h <<_ACEOF
14921#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14922_ACEOF
14923
14924fi
14925
14926done
14927
14928
14929# On Solaris, term.h requires curses.h
14930for ac_header in term.h
14931do :
14932 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14933#ifdef HAVE_CURSES_H
14934#include <curses.h>
14935#endif
14936
14937"
14938if test "x$ac_cv_header_term_h" = xyes; then :
14939 cat >>confdefs.h <<_ACEOF
14940#define HAVE_TERM_H 1
14941_ACEOF
14942
14943fi
14944
14945done
14946
14947
Jack Jansen666b1e72001-10-31 12:11:48 +000014948# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14950$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014951if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014952 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014953else
Matthias Kloseb9621712010-04-24 17:59:49 +000014954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014955/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014956#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014957int
14958main ()
14959{
Jack Jansen666b1e72001-10-31 12:11:48 +000014960
14961 int rtn;
14962 rtn = mvwdelch(0,0,0);
14963
Martin v. Löwis11437992002-04-12 09:54:03 +000014964 ;
14965 return 0;
14966}
14967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014968if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014969 ac_cv_mvwdelch_is_expression=yes
14970else
Matthias Kloseb9621712010-04-24 17:59:49 +000014971 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +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_mvwdelch_is_expression" >&5
14977$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014978
14979if test "$ac_cv_mvwdelch_is_expression" = yes
14980then
Martin v. Löwis11437992002-04-12 09:54:03 +000014981
Matthias Kloseb9621712010-04-24 17:59:49 +000014982$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014983
14984fi
14985
Matthias Kloseb9621712010-04-24 17:59:49 +000014986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14987$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014988if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014989 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014990else
Matthias Kloseb9621712010-04-24 17:59:49 +000014991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014992/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014993#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014994int
14995main ()
14996{
Jack Jansen666b1e72001-10-31 12:11:48 +000014997
14998 WINDOW *w;
14999 w->_flags = 0;
15000
Martin v. Löwis11437992002-04-12 09:54:03 +000015001 ;
15002 return 0;
15003}
15004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015005if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015006 ac_cv_window_has_flags=yes
15007else
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15011fi
15012
Matthias Kloseb9621712010-04-24 17:59:49 +000015013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15014$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015015
Jack Jansen666b1e72001-10-31 12:11:48 +000015016
15017if test "$ac_cv_window_has_flags" = yes
15018then
Martin v. Löwis11437992002-04-12 09:54:03 +000015019
Matthias Kloseb9621712010-04-24 17:59:49 +000015020$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015021
15022fi
15023
Matthias Kloseb9621712010-04-24 17:59:49 +000015024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15025$as_echo_n "checking for is_term_resized... " >&6; }
15026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015027/* end confdefs.h. */
15028#include <curses.h>
15029int
15030main ()
15031{
15032void *x=is_term_resized
15033 ;
15034 return 0;
15035}
15036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015037if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015038
Matthias Kloseb9621712010-04-24 17:59:49 +000015039$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015040
Matthias Kloseb159a552010-04-25 21:00:44 +000015041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015042$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015043else
Matthias Kloseb9621712010-04-24 17:59:49 +000015044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15045$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015046
15047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15049
Matthias Kloseb9621712010-04-24 17:59:49 +000015050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15051$as_echo_n "checking for resize_term... " >&6; }
15052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015053/* end confdefs.h. */
15054#include <curses.h>
15055int
15056main ()
15057{
15058void *x=resize_term
15059 ;
15060 return 0;
15061}
15062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015063if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015064
Matthias Kloseb9621712010-04-24 17:59:49 +000015065$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015066
Matthias Kloseb159a552010-04-25 21:00:44 +000015067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015068$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015069else
Matthias Kloseb9621712010-04-24 17:59:49 +000015070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15071$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015072
15073fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15075
Matthias Kloseb9621712010-04-24 17:59:49 +000015076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15077$as_echo_n "checking for resizeterm... " >&6; }
15078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015079/* end confdefs.h. */
15080#include <curses.h>
15081int
15082main ()
15083{
15084void *x=resizeterm
15085 ;
15086 return 0;
15087}
15088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015089if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015090
Matthias Kloseb9621712010-04-24 17:59:49 +000015091$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015092
Matthias Kloseb159a552010-04-25 21:00:44 +000015093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015094$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015095else
Matthias Kloseb9621712010-04-24 17:59:49 +000015096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15097$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015098
15099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015101# last curses configure check
15102CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15105$as_echo "$as_me: checking for device files" >&6;}
15106
15107if test "x$cross_compiling" = xyes; then
15108 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15110$as_echo_n "checking for /dev/ptmx... " >&6; }
15111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15112$as_echo "not set" >&6; }
15113 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15114 fi
15115 if test "${ac_cv_file__dev_ptc+set}" != set; then
15116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15117$as_echo_n "checking for /dev/ptc... " >&6; }
15118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15119$as_echo "not set" >&6; }
15120 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15121 fi
15122fi
15123
Matthias Kloseb9621712010-04-24 17:59:49 +000015124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15125$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015126if ${ac_cv_file__dev_ptmx+:} false; then :
15127 $as_echo_n "(cached) " >&6
15128else
15129 test "$cross_compiling" = yes &&
15130 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15131if test -r "/dev/ptmx"; then
15132 ac_cv_file__dev_ptmx=yes
15133else
15134 ac_cv_file__dev_ptmx=no
15135fi
15136fi
15137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15138$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15139if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015140
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015141fi
15142
15143if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015144
Matthias Kloseb9621712010-04-24 17:59:49 +000015145$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015146
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15149$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015150if ${ac_cv_file__dev_ptc+:} false; then :
15151 $as_echo_n "(cached) " >&6
15152else
15153 test "$cross_compiling" = yes &&
15154 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15155if test -r "/dev/ptc"; then
15156 ac_cv_file__dev_ptc=yes
15157else
15158 ac_cv_file__dev_ptc=no
15159fi
15160fi
15161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15162$as_echo "$ac_cv_file__dev_ptc" >&6; }
15163if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015164
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015165fi
15166
15167if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015168
Matthias Kloseb9621712010-04-24 17:59:49 +000015169$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015170
Neal Norwitz865400f2003-03-21 01:42:58 +000015171fi
15172
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015173if test "$have_long_long" = yes
15174then
Matthias Kloseb9621712010-04-24 17:59:49 +000015175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15176$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015177 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015178 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015179else
Matthias Kloseb9621712010-04-24 17:59:49 +000015180 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015181 ac_cv_have_long_long_format="cross -- assuming no"
15182 if test x$GCC = xyes; then
15183 save_CFLAGS=$CFLAGS
15184 CFLAGS="$CFLAGS -Werror -Wformat"
15185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15186/* end confdefs.h. */
15187
15188 #include <stdio.h>
15189 #include <stddef.h>
15190
15191int
15192main ()
15193{
15194
15195 char *buffer;
15196 sprintf(buffer, "%lld", (long long)123);
15197 sprintf(buffer, "%lld", (long long)-123);
15198 sprintf(buffer, "%llu", (unsigned long long)123);
15199
15200 ;
15201 return 0;
15202}
15203_ACEOF
15204if ac_fn_c_try_compile "$LINENO"; then :
15205 ac_cv_have_long_long_format=yes
15206
15207fi
15208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15209 CFLAGS=$save_CFLAGS
15210 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015211else
Matthias Kloseb9621712010-04-24 17:59:49 +000015212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015213/* end confdefs.h. */
15214
15215 #include <stdio.h>
15216 #include <stddef.h>
15217 #include <string.h>
15218
15219 #ifdef HAVE_SYS_TYPES_H
15220 #include <sys/types.h>
15221 #endif
15222
15223 int main()
15224 {
15225 char buffer[256];
15226
15227 if (sprintf(buffer, "%lld", (long long)123) < 0)
15228 return 1;
15229 if (strcmp(buffer, "123"))
15230 return 1;
15231
15232 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15233 return 1;
15234 if (strcmp(buffer, "-123"))
15235 return 1;
15236
15237 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15238 return 1;
15239 if (strcmp(buffer, "123"))
15240 return 1;
15241
15242 return 0;
15243 }
15244
15245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015246if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015247 ac_cv_have_long_long_format=yes
15248else
Matthias Kloseb9621712010-04-24 17:59:49 +000015249 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015250fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15252 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015253fi
15254
15255
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015256fi
15257
Matthias Kloseb9621712010-04-24 17:59:49 +000015258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15259$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015260fi
15261
Mark Dickinson89d7d412009-12-31 20:50:59 +000015262if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015263then
15264
Matthias Kloseb9621712010-04-24 17:59:49 +000015265$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015266
15267fi
15268
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015269if test $ac_sys_system = Darwin
15270then
15271 LIBS="$LIBS -framework CoreFoundation"
15272fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015273
Matthias Kloseb9621712010-04-24 17:59:49 +000015274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15275$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015276if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015277 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015278else
Matthias Kloseb9621712010-04-24 17:59:49 +000015279 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015280 ac_cv_have_size_t_format="cross -- assuming yes"
15281
Thomas Wouters477c8d52006-05-27 19:21:47 +000015282else
Matthias Kloseb9621712010-04-24 17:59:49 +000015283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015284/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015285
Thomas Wouters477c8d52006-05-27 19:21:47 +000015286#include <stdio.h>
15287#include <stddef.h>
15288#include <string.h>
15289
Christian Heimes2c181612007-12-17 20:04:13 +000015290#ifdef HAVE_SYS_TYPES_H
15291#include <sys/types.h>
15292#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015293
15294#ifdef HAVE_SSIZE_T
15295typedef ssize_t Py_ssize_t;
15296#elif SIZEOF_VOID_P == SIZEOF_LONG
15297typedef long Py_ssize_t;
15298#else
15299typedef int Py_ssize_t;
15300#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015301
Christian Heimes2c181612007-12-17 20:04:13 +000015302int main()
15303{
15304 char buffer[256];
15305
Thomas Wouters477c8d52006-05-27 19:21:47 +000015306 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15307 return 1;
15308
Thomas Wouters89f507f2006-12-13 04:49:30 +000015309 if (strcmp(buffer, "123"))
15310 return 1;
15311
15312 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15313 return 1;
15314
15315 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015316 return 1;
15317
15318 return 0;
15319}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015320
Thomas Wouters477c8d52006-05-27 19:21:47 +000015321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015322if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015323 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015324else
Matthias Kloseb9621712010-04-24 17:59:49 +000015325 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015326fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015327rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15328 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015329fi
15330
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015331fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15333$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015334if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015335
Matthias Kloseb9621712010-04-24 17:59:49 +000015336$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015337
15338fi
15339
Matthias Kloseb9621712010-04-24 17:59:49 +000015340ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015341#ifdef HAVE_SYS_TYPES_H
15342#include <sys/types.h>
15343#endif
15344#ifdef HAVE_SYS_SOCKET_H
15345#include <sys/socket.h>
15346#endif
15347
Matthias Kloseb9621712010-04-24 17:59:49 +000015348"
Victor Stinnere0be4232011-10-25 13:06:09 +020015349if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015350
Martin v. Löwis11437992002-04-12 09:54:03 +000015351else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015352
Matthias Kloseb9621712010-04-24 17:59:49 +000015353$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015354
15355fi
15356
Michael W. Hudson54241132001-12-07 15:38:26 +000015357
Matthias Kloseb9621712010-04-24 17:59:49 +000015358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15359$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015360if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015361 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015362else
Matthias Kloseb9621712010-04-24 17:59:49 +000015363 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015364 ac_cv_broken_mbstowcs=no
15365else
Matthias Kloseb9621712010-04-24 17:59:49 +000015366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015367/* end confdefs.h. */
15368
Stefan Krah19c21392012-11-22 23:47:32 +010015369#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015370#include<stdlib.h>
15371int main() {
15372 size_t len = -1;
15373 const char *str = "text";
15374 len = mbstowcs(NULL, str, 0);
15375 return (len != 4);
15376}
15377
15378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015379if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015380 ac_cv_broken_mbstowcs=no
15381else
Matthias Kloseb9621712010-04-24 17:59:49 +000015382 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015383fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15385 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015386fi
15387
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015388fi
15389
Matthias Kloseb9621712010-04-24 17:59:49 +000015390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15391$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015392if test "$ac_cv_broken_mbstowcs" = yes
15393then
15394
Matthias Kloseb9621712010-04-24 17:59:49 +000015395$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015396
15397fi
15398
Antoine Pitroub52ec782009-01-25 16:34:23 +000015399# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15401$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015402
15403# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015404if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015405 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015406if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015407then
15408
Matthias Kloseb9621712010-04-24 17:59:49 +000015409$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015410
Matthias Kloseb9621712010-04-24 17:59:49 +000015411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15412$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015413fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015414if test "$withval" = no
15415then
15416
15417$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15418
Matthias Kloseb9621712010-04-24 17:59:49 +000015419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15420$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015421fi
15422
Antoine Pitrou042b1282010-08-13 21:15:58 +000015423else
15424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15425$as_echo "no value specified" >&6; }
15426fi
15427
Antoine Pitroub52ec782009-01-25 16:34:23 +000015428
Matthias Kloseb17289e2012-03-15 19:51:34 +010015429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15430$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15431if ${ac_cv_computed_gotos+:} false; then :
15432 $as_echo_n "(cached) " >&6
15433else
15434 if test "$cross_compiling" = yes; then :
15435 if test "${with_computed_gotos+set}" = set; then
15436 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15437 else
15438 ac_cv_computed_gotos=no
15439 fi
15440else
15441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15442/* end confdefs.h. */
15443
15444int main(int argc, char **argv)
15445{
15446 static void *targets[1] = { &&LABEL1 };
15447 goto LABEL2;
15448LABEL1:
15449 return 0;
15450LABEL2:
15451 goto *targets[0];
15452 return 1;
15453}
15454
15455_ACEOF
15456if ac_fn_c_try_run "$LINENO"; then :
15457 ac_cv_computed_gotos=yes
15458else
15459 ac_cv_computed_gotos=no
15460fi
15461rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15462 conftest.$ac_objext conftest.beam conftest.$ac_ext
15463fi
15464
15465fi
15466
15467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15468$as_echo "$ac_cv_computed_gotos" >&6; }
15469case "$ac_cv_computed_gotos" in yes*)
15470
15471$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15472
15473esac
15474
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015475case $ac_sys_system in
15476AIX*)
15477
15478$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15479 ;;
15480esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015481
Michael W. Hudson54241132001-12-07 15:38:26 +000015482
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015483
15484
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015485for h in `(cd $srcdir;echo Python/thread_*.h)`
15486do
15487 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15488done
15489
Michael W. Hudson54241132001-12-07 15:38:26 +000015490
Ned Deily0db50cf2014-07-25 12:41:31 -070015491SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15493$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015494for dir in $SRCDIRS; do
15495 if test ! -d $dir; then
15496 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015497 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015498done
Matthias Kloseb9621712010-04-24 17:59:49 +000015499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15500$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015501
Stefan Krah1919b7e2012-03-21 18:25:23 +010015502# Availability of -O2:
15503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15504$as_echo_n "checking for -O2... " >&6; }
15505saved_cflags="$CFLAGS"
15506CFLAGS="-O2"
15507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15508/* end confdefs.h. */
15509
15510int
15511main ()
15512{
15513
15514
15515 ;
15516 return 0;
15517}
15518_ACEOF
15519if ac_fn_c_try_compile "$LINENO"; then :
15520 have_O2=yes
15521else
15522 have_O2=no
15523fi
15524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15526$as_echo "$have_O2" >&6; }
15527CFLAGS="$saved_cflags"
15528
15529# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15530# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15532$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15533saved_cflags="$CFLAGS"
15534CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15535if test "$have_O2" = no; then
15536 CFLAGS=""
15537fi
15538if test "$cross_compiling" = yes; then :
15539 have_glibc_memmove_bug=undefined
15540else
15541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15542/* end confdefs.h. */
15543
15544#include <stdio.h>
15545#include <stdlib.h>
15546#include <string.h>
15547void foo(void *p, void *q) { memmove(p, q, 19); }
15548int main() {
15549 char a[32] = "123456789000000000";
15550 foo(&a[9], a);
15551 if (strcmp(a, "123456789123456789000000000") != 0)
15552 return 1;
15553 foo(a, &a[9]);
15554 if (strcmp(a, "123456789000000000") != 0)
15555 return 1;
15556 return 0;
15557}
15558
15559_ACEOF
15560if ac_fn_c_try_run "$LINENO"; then :
15561 have_glibc_memmove_bug=no
15562else
15563 have_glibc_memmove_bug=yes
15564fi
15565rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15566 conftest.$ac_objext conftest.beam conftest.$ac_ext
15567fi
15568
15569CFLAGS="$saved_cflags"
15570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15571$as_echo "$have_glibc_memmove_bug" >&6; }
15572if test "$have_glibc_memmove_bug" = yes; then
15573
15574$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15575
15576fi
15577
15578if test "$have_gcc_asm_for_x87" = yes; then
15579 # Some versions of gcc miscompile inline asm:
15580 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15581 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15582 case $CC in
15583 *gcc*)
15584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15585$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15586 saved_cflags="$CFLAGS"
15587 CFLAGS="-O2"
15588 if test "$cross_compiling" = yes; then :
15589 have_ipa_pure_const_bug=undefined
15590else
15591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15592/* end confdefs.h. */
15593
15594 __attribute__((noinline)) int
15595 foo(int *p) {
15596 int r;
15597 asm ( "movl \$6, (%1)\n\t"
15598 "xorl %0, %0\n\t"
15599 : "=r" (r) : "r" (p) : "memory"
15600 );
15601 return r;
15602 }
15603 int main() {
15604 int p = 8;
15605 if ((foo(&p) ? : p) != 6)
15606 return 1;
15607 return 0;
15608 }
15609
15610_ACEOF
15611if ac_fn_c_try_run "$LINENO"; then :
15612 have_ipa_pure_const_bug=no
15613else
15614 have_ipa_pure_const_bug=yes
15615fi
15616rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15617 conftest.$ac_objext conftest.beam conftest.$ac_ext
15618fi
15619
15620 CFLAGS="$saved_cflags"
15621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15622$as_echo "$have_ipa_pure_const_bug" >&6; }
15623 if test "$have_ipa_pure_const_bug" = yes; then
15624
15625$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15626
15627 fi
15628 ;;
15629 esac
15630fi
15631
Ned Deily322f5ba2013-11-21 23:01:59 -080015632# ensurepip option
15633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15634$as_echo_n "checking for ensurepip... " >&6; }
15635
15636# Check whether --with-ensurepip was given.
15637if test "${with_ensurepip+set}" = set; then :
15638 withval=$with_ensurepip;
15639else
15640 with_ensurepip=upgrade
15641fi
15642
15643case $with_ensurepip in #(
15644 yes|upgrade) :
15645 ENSUREPIP=upgrade ;; #(
15646 install) :
15647 ENSUREPIP=install ;; #(
15648 no) :
15649 ENSUREPIP=no ;; #(
15650 *) :
15651 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15652esac
15653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15654$as_echo "$ENSUREPIP" >&6; }
15655
15656
Guido van Rossum627b2d71993-12-24 10:39:16 +000015657# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015658ac_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 +000015659
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015660ac_config_files="$ac_config_files Modules/ld_so_aix"
15661
Martin v. Löwis11437992002-04-12 09:54:03 +000015662cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015663# This file is a shell script that caches the results of configure
15664# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015665# scripts and configure runs, see configure's option --config-cache.
15666# It is not useful on other systems. If it contains results you don't
15667# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015668#
Martin v. Löwis11437992002-04-12 09:54:03 +000015669# config.status only pays attention to the cache file if you give it
15670# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015671#
Skip Montanaro6dead952003-09-25 14:50:04 +000015672# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015673# loading this file, other *unset* `ac_cv_foo' will be assigned the
15674# following values.
15675
15676_ACEOF
15677
Guido van Rossumf78abae1997-01-21 22:02:36 +000015678# The following way of writing the cache mishandles newlines in values,
15679# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015680# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015681# Ultrix sh set writes to stderr and can't be redirected directly,
15682# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015683(
15684 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15685 eval ac_val=\$$ac_var
15686 case $ac_val in #(
15687 *${as_nl}*)
15688 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015689 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15690$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015691 esac
15692 case $ac_var in #(
15693 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015694 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15695 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015696 esac ;;
15697 esac
15698 done
15699
Martin v. Löwis11437992002-04-12 09:54:03 +000015700 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015701 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15702 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015703 # `set' does not quote correctly, so add quotes: double-quote
15704 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015705 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015706 "s/'/'\\\\''/g;
15707 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015708 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015709 *)
15710 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015711 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015712 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015713 esac |
15714 sort
15715) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015716 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015717 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015718 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015719 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015720 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15721 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015722 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15723 :end' >>confcache
15724if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15725 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015726 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015727 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15728$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015729 if test ! -f "$cache_file" || test -h "$cache_file"; then
15730 cat confcache >"$cache_file"
15731 else
15732 case $cache_file in #(
15733 */* | ?:*)
15734 mv -f confcache "$cache_file"$$ &&
15735 mv -f "$cache_file"$$ "$cache_file" ;; #(
15736 *)
15737 mv -f confcache "$cache_file" ;;
15738 esac
15739 fi
15740 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015741 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015742 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15743$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015744 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015745fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015746rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015747
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015748test "x$prefix" = xNONE && prefix=$ac_default_prefix
15749# Let make expand exec_prefix.
15750test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015751
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015752DEFS=-DHAVE_CONFIG_H
15753
Skip Montanaro6dead952003-09-25 14:50:04 +000015754ac_libobjs=
15755ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015756U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015757for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15758 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015759 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015760 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015761 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15762 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015763 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15764 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015765done
15766LIBOBJS=$ac_libobjs
15767
15768LTLIBOBJS=$ac_ltlibobjs
15769
15770
Martin v. Löwis11437992002-04-12 09:54:03 +000015771
Matthias Kloseb9621712010-04-24 17:59:49 +000015772
Victor Stinnere0be4232011-10-25 13:06:09 +020015773: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015774ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015775ac_clean_files_save=$ac_clean_files
15776ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015777{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15778$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15779as_write_fail=0
15780cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015781#! $SHELL
15782# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015783# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015784# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015785# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015786
Martin v. Löwis11437992002-04-12 09:54:03 +000015787debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015788ac_cs_recheck=false
15789ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015790
Matthias Kloseb9621712010-04-24 17:59:49 +000015791SHELL=\${CONFIG_SHELL-$SHELL}
15792export SHELL
15793_ASEOF
15794cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15795## -------------------- ##
15796## M4sh Initialization. ##
15797## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015799# Be more Bourne compatible
15800DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015801if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015802 emulate sh
15803 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015804 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015805 # is contrary to our usage. Disable this feature.
15806 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015807 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015808else
Matthias Kloseb9621712010-04-24 17:59:49 +000015809 case `(set -o) 2>/dev/null` in #(
15810 *posix*) :
15811 set -o posix ;; #(
15812 *) :
15813 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015814esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015815fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015816
15817
Matthias Kloseb9621712010-04-24 17:59:49 +000015818as_nl='
15819'
15820export as_nl
15821# Printing a long string crashes Solaris 7 /usr/bin/printf.
15822as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15823as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15824as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15825# Prefer a ksh shell builtin over an external printf program on Solaris,
15826# but without wasting forks for bash or zsh.
15827if test -z "$BASH_VERSION$ZSH_VERSION" \
15828 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15829 as_echo='print -r --'
15830 as_echo_n='print -rn --'
15831elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15832 as_echo='printf %s\n'
15833 as_echo_n='printf %s'
15834else
15835 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15836 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15837 as_echo_n='/usr/ucb/echo -n'
15838 else
15839 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15840 as_echo_n_body='eval
15841 arg=$1;
15842 case $arg in #(
15843 *"$as_nl"*)
15844 expr "X$arg" : "X\\(.*\\)$as_nl";
15845 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15846 esac;
15847 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15848 '
15849 export as_echo_n_body
15850 as_echo_n='sh -c $as_echo_n_body as_echo'
15851 fi
15852 export as_echo_body
15853 as_echo='sh -c $as_echo_body as_echo'
15854fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015855
15856# The user is always right.
15857if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015858 PATH_SEPARATOR=:
15859 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15860 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15861 PATH_SEPARATOR=';'
15862 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015863fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015865
15866# IFS
15867# We need space, tab and new line, in precisely that order. Quoting is
15868# there to prevent editors from complaining about space-tab.
15869# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15870# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015871IFS=" "" $as_nl"
15872
15873# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015874as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015875case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015876 *[\\/]* ) as_myself=$0 ;;
15877 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015878for as_dir in $PATH
15879do
15880 IFS=$as_save_IFS
15881 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015882 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15883 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015884IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015885
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015886 ;;
15887esac
15888# We did not find ourselves, most probably we were run as `sh COMMAND'
15889# in which case we are not to be found in the path.
15890if test "x$as_myself" = x; then
15891 as_myself=$0
15892fi
15893if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015894 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15895 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015896fi
15897
Matthias Kloseb9621712010-04-24 17:59:49 +000015898# Unset variables that we do not need and which cause bugs (e.g. in
15899# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15900# suppresses any "Segmentation fault" message there. '((' could
15901# trigger a bug in pdksh 5.2.14.
15902for as_var in BASH_ENV ENV MAIL MAILPATH
15903do eval test x\${$as_var+set} = xset \
15904 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015905done
15906PS1='$ '
15907PS2='> '
15908PS4='+ '
15909
15910# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015911LC_ALL=C
15912export LC_ALL
15913LANGUAGE=C
15914export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015915
Matthias Kloseb9621712010-04-24 17:59:49 +000015916# CDPATH.
15917(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15918
15919
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015920# as_fn_error STATUS ERROR [LINENO LOG_FD]
15921# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015922# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15923# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015924# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015925as_fn_error ()
15926{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015927 as_status=$1; test $as_status -eq 0 && as_status=1
15928 if test "$4"; then
15929 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15930 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015931 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015932 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015933 as_fn_exit $as_status
15934} # as_fn_error
15935
15936
15937# as_fn_set_status STATUS
15938# -----------------------
15939# Set $? to STATUS, without forking.
15940as_fn_set_status ()
15941{
15942 return $1
15943} # as_fn_set_status
15944
15945# as_fn_exit STATUS
15946# -----------------
15947# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15948as_fn_exit ()
15949{
15950 set +e
15951 as_fn_set_status $1
15952 exit $1
15953} # as_fn_exit
15954
15955# as_fn_unset VAR
15956# ---------------
15957# Portably unset VAR.
15958as_fn_unset ()
15959{
15960 { eval $1=; unset $1;}
15961}
15962as_unset=as_fn_unset
15963# as_fn_append VAR VALUE
15964# ----------------------
15965# Append the text in VALUE to the end of the definition contained in VAR. Take
15966# advantage of any shell optimizations that allow amortized linear growth over
15967# repeated appends, instead of the typical quadratic growth present in naive
15968# implementations.
15969if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15970 eval 'as_fn_append ()
15971 {
15972 eval $1+=\$2
15973 }'
15974else
15975 as_fn_append ()
15976 {
15977 eval $1=\$$1\$2
15978 }
15979fi # as_fn_append
15980
15981# as_fn_arith ARG...
15982# ------------------
15983# Perform arithmetic evaluation on the ARGs, and store the result in the
15984# global $as_val. Take advantage of shells that can avoid forks. The arguments
15985# must be portable across $(()) and expr.
15986if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15987 eval 'as_fn_arith ()
15988 {
15989 as_val=$(( $* ))
15990 }'
15991else
15992 as_fn_arith ()
15993 {
15994 as_val=`expr "$@" || test $? -eq 1`
15995 }
15996fi # as_fn_arith
15997
15998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015999if expr a : '\(a\)' >/dev/null 2>&1 &&
16000 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16001 as_expr=expr
16002else
16003 as_expr=false
16004fi
16005
16006if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16007 as_basename=basename
16008else
16009 as_basename=false
16010fi
16011
Matthias Kloseb9621712010-04-24 17:59:49 +000016012if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16013 as_dirname=dirname
16014else
16015 as_dirname=false
16016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016018as_me=`$as_basename -- "$0" ||
16019$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16020 X"$0" : 'X\(//\)$' \| \
16021 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016022$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016023 sed '/^.*\/\([^/][^/]*\)\/*$/{
16024 s//\1/
16025 q
16026 }
16027 /^X\/\(\/\/\)$/{
16028 s//\1/
16029 q
16030 }
16031 /^X\/\(\/\).*/{
16032 s//\1/
16033 q
16034 }
16035 s/.*/./; q'`
16036
Matthias Kloseb9621712010-04-24 17:59:49 +000016037# Avoid depending upon Character Ranges.
16038as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16039as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16040as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16041as_cr_digits='0123456789'
16042as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016043
16044ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016045case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016046-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016047 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016048 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016049 xy) ECHO_C='\c';;
16050 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16051 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016052 esac;;
16053*)
16054 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016055esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016056
Martin v. Löwis11437992002-04-12 09:54:03 +000016057rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016058if test -d conf$$.dir; then
16059 rm -f conf$$.dir/conf$$.file
16060else
16061 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016062 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016063fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016064if (echo >conf$$.file) 2>/dev/null; then
16065 if ln -s conf$$.file conf$$ 2>/dev/null; then
16066 as_ln_s='ln -s'
16067 # ... but there are two gotchas:
16068 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16069 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016070 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016071 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016072 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016073 elif ln conf$$.file conf$$ 2>/dev/null; then
16074 as_ln_s=ln
16075 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016076 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016077 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016078else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016079 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016081rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16082rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016083
Matthias Kloseb9621712010-04-24 17:59:49 +000016084
16085# as_fn_mkdir_p
16086# -------------
16087# Create "$as_dir" as a directory, including parents if necessary.
16088as_fn_mkdir_p ()
16089{
16090
16091 case $as_dir in #(
16092 -*) as_dir=./$as_dir;;
16093 esac
16094 test -d "$as_dir" || eval $as_mkdir_p || {
16095 as_dirs=
16096 while :; do
16097 case $as_dir in #(
16098 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16099 *) as_qdir=$as_dir;;
16100 esac
16101 as_dirs="'$as_qdir' $as_dirs"
16102 as_dir=`$as_dirname -- "$as_dir" ||
16103$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16104 X"$as_dir" : 'X\(//\)[^/]' \| \
16105 X"$as_dir" : 'X\(//\)$' \| \
16106 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16107$as_echo X"$as_dir" |
16108 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16109 s//\1/
16110 q
16111 }
16112 /^X\(\/\/\)[^/].*/{
16113 s//\1/
16114 q
16115 }
16116 /^X\(\/\/\)$/{
16117 s//\1/
16118 q
16119 }
16120 /^X\(\/\).*/{
16121 s//\1/
16122 q
16123 }
16124 s/.*/./; q'`
16125 test -d "$as_dir" && break
16126 done
16127 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016128 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016129
16130
16131} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016132if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016133 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016134else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016135 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016136 as_mkdir_p=false
16137fi
16138
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016139
16140# as_fn_executable_p FILE
16141# -----------------------
16142# Test if FILE is an executable regular file.
16143as_fn_executable_p ()
16144{
16145 test -f "$1" && test -x "$1"
16146} # as_fn_executable_p
16147as_test_x='test -x'
16148as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016149
16150# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016151as_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 +000016152
16153# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016154as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016155
16156
Martin v. Löwis11437992002-04-12 09:54:03 +000016157exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016158## ----------------------------------- ##
16159## Main body of $CONFIG_STATUS script. ##
16160## ----------------------------------- ##
16161_ASEOF
16162test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016163
Matthias Kloseb9621712010-04-24 17:59:49 +000016164cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16165# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016166# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016167# values after options handling.
16168ac_log="
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016169This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016170generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016171
16172 CONFIG_FILES = $CONFIG_FILES
16173 CONFIG_HEADERS = $CONFIG_HEADERS
16174 CONFIG_LINKS = $CONFIG_LINKS
16175 CONFIG_COMMANDS = $CONFIG_COMMANDS
16176 $ $0 $@
16177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016178on `(hostname || uname -n) 2>/dev/null | sed 1q`
16179"
16180
Martin v. Löwis11437992002-04-12 09:54:03 +000016181_ACEOF
16182
Matthias Kloseb9621712010-04-24 17:59:49 +000016183case $ac_config_files in *"
16184"*) set x $ac_config_files; shift; ac_config_files=$*;;
16185esac
16186
16187case $ac_config_headers in *"
16188"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16189esac
16190
16191
16192cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016193# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016194config_files="$ac_config_files"
16195config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016197_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016198
Matthias Kloseb9621712010-04-24 17:59:49 +000016199cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016200ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016201\`$as_me' instantiates files and other configuration actions
16202from templates according to the current configuration. Unless the files
16203and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016204
Matthias Kloseb9621712010-04-24 17:59:49 +000016205Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016206
16207 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016208 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016209 --config print configuration, then exit
16210 -q, --quiet, --silent
16211 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016212 -d, --debug don't remove temporary files
16213 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016214 --file=FILE[:TEMPLATE]
16215 instantiate the configuration file FILE
16216 --header=FILE[:TEMPLATE]
16217 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016218
16219Configuration files:
16220$config_files
16221
16222Configuration headers:
16223$config_headers
16224
Matthias Kloseb9621712010-04-24 17:59:49 +000016225Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016226
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016228cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16229ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016230ac_cs_version="\\
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016231python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016232configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016233 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016234
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016235Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016236This config.status script is free software; the Free Software Foundation
16237gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016238
16239ac_pwd='$ac_pwd'
16240srcdir='$srcdir'
16241INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016242MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016243test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016244_ACEOF
16245
Matthias Kloseb9621712010-04-24 17:59:49 +000016246cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16247# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016248ac_need_defaults=:
16249while test $# != 0
16250do
16251 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016252 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016253 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16254 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016255 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016256 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016257 --*=)
16258 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16259 ac_optarg=
16260 ac_shift=:
16261 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016262 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016263 ac_option=$1
16264 ac_optarg=$2
16265 ac_shift=shift
16266 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016267 esac
16268
Skip Montanaro6dead952003-09-25 14:50:04 +000016269 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016270 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016271 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16272 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016273 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016274 $as_echo "$ac_cs_version"; exit ;;
16275 --config | --confi | --conf | --con | --co | --c )
16276 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016277 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016278 debug=: ;;
16279 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016280 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016281 case $ac_optarg in
16282 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016283 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016284 esac
16285 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016286 ac_need_defaults=false;;
16287 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016288 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016289 case $ac_optarg in
16290 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16291 esac
16292 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016293 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016294 --he | --h)
16295 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016296 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016297Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016298 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016299 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016300 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16301 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16302 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016303
16304 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016305 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016306Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016307
Matthias Kloseb9621712010-04-24 17:59:49 +000016308 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016309 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016310
16311 esac
16312 shift
16313done
16314
Skip Montanaro6dead952003-09-25 14:50:04 +000016315ac_configure_extra_args=
16316
16317if $ac_cs_silent; then
16318 exec 6>/dev/null
16319 ac_configure_extra_args="$ac_configure_extra_args --silent"
16320fi
16321
16322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016323cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016324if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016325 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016326 shift
16327 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16328 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016329 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016330 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016331fi
16332
Martin v. Löwis11437992002-04-12 09:54:03 +000016333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016334cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016335exec 5>>config.log
16336{
16337 echo
16338 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16339## Running $as_me. ##
16340_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016341 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016342} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016343
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016345cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016346_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016347
Matthias Kloseb9621712010-04-24 17:59:49 +000016348cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016349
16350# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016351for ac_config_target in $ac_config_targets
16352do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016353 case $ac_config_target in
16354 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16355 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16356 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016357 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16358 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016359 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16360 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016361 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016362 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016363 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016364
Victor Stinnere0be4232011-10-25 13:06:09 +020016365 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016366 esac
16367done
16368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016369
Martin v. Löwis11437992002-04-12 09:54:03 +000016370# If the user did not use the arguments to specify the items to instantiate,
16371# then the envvar interface is used. Set only those that are not.
16372# We use the long form for the default assignment because of an extremely
16373# bizarre bug on SunOS 4.1.3.
16374if $ac_need_defaults; then
16375 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16376 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16377fi
16378
Skip Montanaro6dead952003-09-25 14:50:04 +000016379# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016380# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016381# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016382# Hook for its removal unless debugging.
16383# Note that there is a small window in which the directory will not be cleaned:
16384# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016385$debug ||
16386{
Victor Stinnere0be4232011-10-25 13:06:09 +020016387 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016388 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016389 : "${ac_tmp:=$tmp}"
16390 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016391' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016392 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016393}
Martin v. Löwis11437992002-04-12 09:54:03 +000016394# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016395
Martin v. Löwis11437992002-04-12 09:54:03 +000016396{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016397 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016398 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016399} ||
16400{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016401 tmp=./conf$$-$RANDOM
16402 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016403} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016404ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016405
Matthias Kloseb9621712010-04-24 17:59:49 +000016406# Set up the scripts for CONFIG_FILES section.
16407# No need to generate them if there are no CONFIG_FILES.
16408# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016409if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016410
Matthias Kloseb9621712010-04-24 17:59:49 +000016411
16412ac_cr=`echo X | tr X '\015'`
16413# On cygwin, bash can eat \r inside `` if the user requested igncr.
16414# But we know of no other shell where ac_cr would be empty at this
16415# point, so we can use a bashism as a fallback.
16416if test "x$ac_cr" = x; then
16417 eval ac_cr=\$\'\\r\'
16418fi
16419ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16420if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016421 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016422else
16423 ac_cs_awk_cr=$ac_cr
16424fi
16425
Victor Stinnere0be4232011-10-25 13:06:09 +020016426echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016427_ACEOF
16428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016429
Matthias Kloseb9621712010-04-24 17:59:49 +000016430{
16431 echo "cat >conf$$subs.awk <<_ACEOF" &&
16432 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16433 echo "_ACEOF"
16434} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016435 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16436ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016437ac_delim='%!_!# '
16438for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016439 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016440 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016441
Matthias Kloseb9621712010-04-24 17:59:49 +000016442 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16443 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016444 break
16445 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016446 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016447 else
16448 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016449 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016450done
Matthias Kloseb9621712010-04-24 17:59:49 +000016451rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016452
Matthias Kloseb9621712010-04-24 17:59:49 +000016453cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016454cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016456sed -n '
16457h
16458s/^/S["/; s/!.*/"]=/
16459p
16460g
16461s/^[^!]*!//
16462:repl
16463t repl
16464s/'"$ac_delim"'$//
16465t delim
16466:nl
16467h
16468s/\(.\{148\}\)..*/\1/
16469t more1
16470s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16471p
16472n
16473b repl
16474:more1
16475s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16476p
16477g
16478s/.\{148\}//
16479t nl
16480:delim
16481h
16482s/\(.\{148\}\)..*/\1/
16483t more2
16484s/["\\]/\\&/g; s/^/"/; s/$/"/
16485p
16486b
16487:more2
16488s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16489p
16490g
16491s/.\{148\}//
16492t delim
16493' <conf$$subs.awk | sed '
16494/^[^""]/{
16495 N
16496 s/\n//
16497}
16498' >>$CONFIG_STATUS || ac_write_fail=1
16499rm -f conf$$subs.awk
16500cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16501_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016502cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016503 for (key in S) S_is_set[key] = 1
16504 FS = ""
16505
16506}
16507{
16508 line = $ 0
16509 nfields = split(line, field, "@")
16510 substed = 0
16511 len = length(field[1])
16512 for (i = 2; i < nfields; i++) {
16513 key = field[i]
16514 keylen = length(key)
16515 if (S_is_set[key]) {
16516 value = S[key]
16517 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16518 len += length(value) + length(field[++i])
16519 substed = 1
16520 } else
16521 len += 1 + keylen
16522 }
16523
16524 print line
16525}
16526
16527_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016529cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16530if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16531 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16532else
16533 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016534fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016535 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016536_ACEOF
16537
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016538# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16539# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016540# trailing colons and then remove the whole line if VPATH becomes empty
16541# (actually we leave an empty line to preserve line numbers).
16542if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016543 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16544h
16545s///
16546s/^/:/
16547s/[ ]*$/:/
16548s/:\$(srcdir):/:/g
16549s/:\${srcdir}:/:/g
16550s/:@srcdir@:/:/g
16551s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016552s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016553x
16554s/\(=[ ]*\).*/\1/
16555G
16556s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016557s/^[^=]*=[ ]*$//
16558}'
16559fi
16560
Matthias Kloseb9621712010-04-24 17:59:49 +000016561cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016562fi # test -n "$CONFIG_FILES"
16563
Matthias Kloseb9621712010-04-24 17:59:49 +000016564# Set up the scripts for CONFIG_HEADERS section.
16565# No need to generate them if there are no CONFIG_HEADERS.
16566# This happens for instance with `./config.status Makefile'.
16567if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016568cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016569BEGIN {
16570_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016571
Matthias Kloseb9621712010-04-24 17:59:49 +000016572# Transform confdefs.h into an awk script `defines.awk', embedded as
16573# here-document in config.status, that substitutes the proper values into
16574# config.h.in to produce config.h.
16575
16576# Create a delimiter string that does not exist in confdefs.h, to ease
16577# handling of long lines.
16578ac_delim='%!_!# '
16579for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016580 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16581 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016582 break
16583 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016584 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016585 else
16586 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16587 fi
16588done
16589
16590# For the awk script, D is an array of macro values keyed by name,
16591# likewise P contains macro parameters if any. Preserve backslash
16592# newline sequences.
16593
16594ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16595sed -n '
16596s/.\{148\}/&'"$ac_delim"'/g
16597t rset
16598:rset
16599s/^[ ]*#[ ]*define[ ][ ]*/ /
16600t def
16601d
16602:def
16603s/\\$//
16604t bsnl
16605s/["\\]/\\&/g
16606s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16607D["\1"]=" \3"/p
16608s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16609d
16610:bsnl
16611s/["\\]/\\&/g
16612s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16613D["\1"]=" \3\\\\\\n"\\/p
16614t cont
16615s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16616t cont
16617d
16618:cont
16619n
16620s/.\{148\}/&'"$ac_delim"'/g
16621t clear
16622:clear
16623s/\\$//
16624t bsnlc
16625s/["\\]/\\&/g; s/^/"/; s/$/"/p
16626d
16627:bsnlc
16628s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16629b cont
16630' <confdefs.h | sed '
16631s/'"$ac_delim"'/"\\\
16632"/g' >>$CONFIG_STATUS || ac_write_fail=1
16633
16634cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16635 for (key in D) D_is_set[key] = 1
16636 FS = ""
16637}
16638/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16639 line = \$ 0
16640 split(line, arg, " ")
16641 if (arg[1] == "#") {
16642 defundef = arg[2]
16643 mac1 = arg[3]
16644 } else {
16645 defundef = substr(arg[1], 2)
16646 mac1 = arg[2]
16647 }
16648 split(mac1, mac2, "(") #)
16649 macro = mac2[1]
16650 prefix = substr(line, 1, index(line, defundef) - 1)
16651 if (D_is_set[macro]) {
16652 # Preserve the white space surrounding the "#".
16653 print prefix "define", macro P[macro] D[macro]
16654 next
16655 } else {
16656 # Replace #undef with comments. This is necessary, for example,
16657 # in the case of _POSIX_SOURCE, which is predefined and required
16658 # on some systems where configure will not decide to define it.
16659 if (defundef == "undef") {
16660 print "/*", prefix defundef, macro, "*/"
16661 next
16662 }
16663 }
16664}
16665{ print }
16666_ACAWK
16667_ACEOF
16668cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016669 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016670fi # test -n "$CONFIG_HEADERS"
16671
16672
16673eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16674shift
16675for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016676do
16677 case $ac_tag in
16678 :[FHLC]) ac_mode=$ac_tag; continue;;
16679 esac
16680 case $ac_mode$ac_tag in
16681 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016682 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016683 :[FH]-) ac_tag=-:-;;
16684 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16685 esac
16686 ac_save_IFS=$IFS
16687 IFS=:
16688 set x $ac_tag
16689 IFS=$ac_save_IFS
16690 shift
16691 ac_file=$1
16692 shift
16693
16694 case $ac_mode in
16695 :L) ac_source=$1;;
16696 :[FH])
16697 ac_file_inputs=
16698 for ac_f
16699 do
16700 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016701 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016702 *) # Look for the file first in the build tree, then in the source tree
16703 # (if the path is not absolute). The absolute path cannot be DOS-style,
16704 # because $ac_f cannot contain `:'.
16705 test -f "$ac_f" ||
16706 case $ac_f in
16707 [\\/$]*) false;;
16708 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16709 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016710 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016711 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016712 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16713 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016714 done
16715
16716 # Let's still pretend it is `configure' which instantiates (i.e., don't
16717 # use $as_me), people would be surprised to read:
16718 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016719 configure_input='Generated from '`
16720 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16721 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016722 if test x"$ac_file" != x-; then
16723 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016724 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16725$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016726 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016727 # Neutralize special characters interpreted by sed in replacement strings.
16728 case $configure_input in #(
16729 *\&* | *\|* | *\\* )
16730 ac_sed_conf_input=`$as_echo "$configure_input" |
16731 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16732 *) ac_sed_conf_input=$configure_input;;
16733 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016734
16735 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016736 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16737 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016738 esac
16739 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016740 esac
16741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016742 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016743$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016744 X"$ac_file" : 'X\(//\)[^/]' \| \
16745 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016746 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016747$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016748 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16749 s//\1/
16750 q
16751 }
16752 /^X\(\/\/\)[^/].*/{
16753 s//\1/
16754 q
16755 }
16756 /^X\(\/\/\)$/{
16757 s//\1/
16758 q
16759 }
16760 /^X\(\/\).*/{
16761 s//\1/
16762 q
16763 }
16764 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016765 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016766 ac_builddir=.
16767
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016768case "$ac_dir" in
16769.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16770*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016771 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016772 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016773 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016774 case $ac_top_builddir_sub in
16775 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16776 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16777 esac ;;
16778esac
16779ac_abs_top_builddir=$ac_pwd
16780ac_abs_builddir=$ac_pwd$ac_dir_suffix
16781# for backward compatibility:
16782ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016783
16784case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016785 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016786 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016787 ac_top_srcdir=$ac_top_builddir_sub
16788 ac_abs_top_srcdir=$ac_pwd ;;
16789 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016790 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016791 ac_top_srcdir=$srcdir
16792 ac_abs_top_srcdir=$srcdir ;;
16793 *) # Relative name.
16794 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16795 ac_top_srcdir=$ac_top_build_prefix$srcdir
16796 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016797esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016798ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016799
Martin v. Löwis11437992002-04-12 09:54:03 +000016800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016801 case $ac_mode in
16802 :F)
16803 #
16804 # CONFIG_FILE
16805 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016806
16807 case $INSTALL in
16808 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016809 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016810 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016811 ac_MKDIR_P=$MKDIR_P
16812 case $MKDIR_P in
16813 [\\/$]* | ?:[\\/]* ) ;;
16814 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16815 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016816_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016817
Matthias Kloseb9621712010-04-24 17:59:49 +000016818cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016819# If the template does not know about datarootdir, expand it.
16820# FIXME: This hack should be removed a few years after 2.60.
16821ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016822ac_sed_dataroot='
16823/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016824 p
16825 q
16826}
16827/@datadir@/p
16828/@docdir@/p
16829/@infodir@/p
16830/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016831/@mandir@/p'
16832case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016833*datarootdir*) ac_datarootdir_seen=yes;;
16834*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16836$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016838cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016839 ac_datarootdir_hack='
16840 s&@datadir@&$datadir&g
16841 s&@docdir@&$docdir&g
16842 s&@infodir@&$infodir&g
16843 s&@localedir@&$localedir&g
16844 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016845 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016846esac
16847_ACEOF
16848
16849# Neutralize VPATH when `$srcdir' = `.'.
16850# Shell code in configure.ac might set extrasub.
16851# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016852cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16853ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016854$extrasub
16855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016856cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016857:t
16858/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016859s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016860s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016861s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016862s&@srcdir@&$ac_srcdir&;t t
16863s&@abs_srcdir@&$ac_abs_srcdir&;t t
16864s&@top_srcdir@&$ac_top_srcdir&;t t
16865s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16866s&@builddir@&$ac_builddir&;t t
16867s&@abs_builddir@&$ac_abs_builddir&;t t
16868s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16869s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016870s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016871$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016872"
Victor Stinnere0be4232011-10-25 13:06:09 +020016873eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16874 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016876test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016877 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16878 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16879 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016881which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016882$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016883which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016884
Victor Stinnere0be4232011-10-25 13:06:09 +020016885 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016886 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016887 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16888 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016889 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016890 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016891 ;;
16892 :H)
16893 #
16894 # CONFIG_HEADER
16895 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016896 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016897 {
16898 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016899 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16900 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016901 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016902 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016903 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16904$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016905 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016906 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016907 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016908 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016909 fi
16910 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016911 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016912 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016913 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016914 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016915 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016917
16918 esac
16919
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016920
16921 case $ac_file$ac_mode in
16922 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16923
16924 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016925done # for ac_tag
16926
Guido van Rossum627b2d71993-12-24 10:39:16 +000016927
Matthias Kloseb9621712010-04-24 17:59:49 +000016928as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016929_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016930ac_clean_files=$ac_clean_files_save
16931
Matthias Kloseb9621712010-04-24 17:59:49 +000016932test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016933 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016934
Martin v. Löwis11437992002-04-12 09:54:03 +000016935
16936# configure is writing to config.log, and then calls config.status.
16937# config.status does its own redirection, appending to config.log.
16938# Unfortunately, on DOS this fails, as config.log is still kept open
16939# by configure, so config.status won't be able to write to it; its
16940# output is simply discarded. So we exec the FD to /dev/null,
16941# effectively closing config.log, so it can be properly (re)opened and
16942# appended to by config.status. When coming back to configure, we
16943# need to make the FD available again.
16944if test "$no_create" != yes; then
16945 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016946 ac_config_status_args=
16947 test "$silent" = yes &&
16948 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016949 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016950 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016951 exec 5>>config.log
16952 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16953 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016954 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016955fi
16956if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16957 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16958$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016959fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016960
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016961
Christian Heimes75ed8902013-11-20 01:11:18 +010016962echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016963if test ! -f Modules/Setup
16964then
16965 cp $srcdir/Modules/Setup.dist Modules/Setup
16966fi
16967
Christian Heimes75ed8902013-11-20 01:11:18 +010016968echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016969if test ! -f Modules/Setup.local
16970then
16971 echo "# Edit this file for local setup changes" >Modules/Setup.local
16972fi
16973
Christian Heimes75ed8902013-11-20 01:11:18 +010016974echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016975$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16976 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016977 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016978mv config.c Modules