blob: 799c6c4704512ea1cce0079dbd4d87a622b1c5cf [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Larry Hastingsf5002bd2014-03-16 23:05:59 -07003# Generated by GNU Autoconf 2.69 for python 3.5.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: http://bugs.python.org/ about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Larry Hastingsf5002bd2014-03-16 23:05:59 -0700583PACKAGE_VERSION='3.5'
584PACKAGE_STRING='python 3.5'
Georg Brandle2e15612009-05-20 18:25:10 +0000585PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
645THREADOBJ
646LDLAST
647USE_THREAD_MODULE
648SIGNAL_OBJS
649USE_SIGNAL_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700650TCLTK_LIBS
651TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LIBFFI_INCLUDEDIR
Benjamin Peterson0f3cde12014-12-15 00:00:23 -0500653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000655PKG_CONFIG
656SHLIBS
657CFLAGSFORSHARED
658LINKFORSHARED
659CCSHARED
660BLDSHARED
661LDCXXSHARED
662LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700663SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBTOOL_CRUFT
665OTHER_LIBTOOL_OPT
666UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700667CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BASECFLAGS
669OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000670ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000671LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100672MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000673INSTALL_DATA
674INSTALL_SCRIPT
675INSTALL_PROGRAM
Kushal Das02d23a22014-04-15 23:50:06 +0530676OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200677PYTHON
678ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200679ac_ct_READELF
680READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000681ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200682ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000683AR
684RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000685USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000686GNULD
687LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000688LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000689RUNSHARED
690INSTSONAME
691LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000692PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000693BLDLIBRARY
694DLLLIBRARY
695LDLIBRARY
696LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100697MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000698BUILDEXEEXT
699EGREP
700GREP
701CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200702NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200703ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000704MAINCC
705CXX
706OBJEXT
707EXEEXT
708ac_ct_CC
709CPPFLAGS
710LDFLAGS
711CFLAGS
712CC
713EXPORT_MACOSX_DEPLOYMENT_TARGET
714CONFIGURE_MACOSX_DEPLOYMENT_TARGET
715SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200716_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000718FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000719FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800720FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000721FRAMEWORKALTINSTALLLAST
722FRAMEWORKALTINSTALLFIRST
723FRAMEWORKINSTALLLAST
724FRAMEWORKINSTALLFIRST
725PYTHONFRAMEWORKINSTALLDIR
726PYTHONFRAMEWORKPREFIX
727PYTHONFRAMEWORKDIR
728PYTHONFRAMEWORKIDENTIFIER
729PYTHONFRAMEWORK
730LIPO_32BIT_FLAGS
731ARCH_RUN_32BIT
732UNIVERSALSDK
733CONFIG_ARGS
734SOVERSION
735VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200736PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100737host_os
738host_vendor
739host_cpu
740host
741build_os
742build_vendor
743build_cpu
744build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500745HAS_HG
746HGBRANCH
747HGTAG
748HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400749BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000750target_alias
751host_alias
752build_alias
753LIBS
754ECHO_T
755ECHO_N
756ECHO_C
757DEFS
758mandir
759localedir
760libdir
761psdir
762pdfdir
763dvidir
764htmldir
765infodir
766docdir
767oldincludedir
768includedir
769localstatedir
770sharedstatedir
771sysconfdir
772datadir
773datarootdir
774libexecdir
775sbindir
776bindir
777program_transform_name
778prefix
779exec_prefix
780PACKAGE_URL
781PACKAGE_BUGREPORT
782PACKAGE_STRING
783PACKAGE_VERSION
784PACKAGE_TARNAME
785PACKAGE_NAME
786PATH_SEPARATOR
787SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000788ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000789ac_user_opts='
790enable_option_checking
791enable_universalsdk
792with_universal_archs
793with_framework_name
794enable_framework
795with_gcc
796with_cxx_main
797with_suffix
798enable_shared
799enable_profiling
800with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100801with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100802with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000803with_libs
804with_system_expat
805with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100806with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000807enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700808with_tcltk_includes
809with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000810with_dbmliborder
811with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_threads
813with_thread
814enable_ipv6
815with_doc_strings
816with_tsc
817with_pymalloc
818with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000819with_fpectl
820with_libm
821with_libc
822enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000823with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800824with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000825'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000826 ac_precious_vars='build_alias
827host_alias
828target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100829MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000830CC
831CFLAGS
832LDFLAGS
833LIBS
834CPPFLAGS
Benjamin Peterson0f3cde12014-12-15 00:00:23 -0500835CPP
836PKG_CONFIG
837PKG_CONFIG_PATH
838PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839
Guido van Rossum627b2d71993-12-24 10:39:16 +0000840
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000842ac_init_help=
843ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000844ac_unrecognized_opts=
845ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846# The variables have the same names as the options, with
847# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000848cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851no_recursion=
852prefix=NONE
853program_prefix=NONE
854program_suffix=NONE
855program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860x_includes=NONE
861x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000862
863# Installation directory options.
864# These are left unexpanded so users can "make install exec_prefix=/foo"
865# and all the variables that are supposed to be based on exec_prefix
866# by default will actually change.
867# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000868# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000869bindir='${exec_prefix}/bin'
870sbindir='${exec_prefix}/sbin'
871libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000872datarootdir='${prefix}/share'
873datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000874sysconfdir='${prefix}/etc'
875sharedstatedir='${prefix}/com'
876localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000877includedir='${prefix}/include'
878oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000879docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
880infodir='${datarootdir}/info'
881htmldir='${docdir}'
882dvidir='${docdir}'
883pdfdir='${docdir}'
884psdir='${docdir}'
885libdir='${exec_prefix}/lib'
886localedir='${datarootdir}/locale'
887mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000892do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893 # If the previous option needs an argument, assign it.
894 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896 ac_prev=
897 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000898 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000900 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200901 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
902 *=) ac_optarg= ;;
903 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000904 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906 # Accept the important Cygnus configure options, so we can diagnose typos.
907
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000908 case $ac_dashdash$ac_option in
909 --)
910 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912 -bindir | --bindir | --bindi | --bind | --bin | --bi)
913 ac_prev=bindir ;;
914 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000915 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000916
917 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000922 -cache-file | --cache-file | --cache-fil | --cache-fi \
923 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
924 ac_prev=cache_file ;;
925 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
926 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 cache_file=$ac_optarg ;;
928
929 --config-cache | -C)
930 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000934 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000937 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
938 | --dataroo | --dataro | --datar)
939 ac_prev=datarootdir ;;
940 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
941 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
942 datarootdir=$ac_optarg ;;
943
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000945 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000946 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000947 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200948 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000949 ac_useropt_orig=$ac_useropt
950 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
951 case $ac_user_opts in
952 *"
953"enable_$ac_useropt"
954"*) ;;
955 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
956 ac_unrecognized_sep=', ';;
957 esac
958 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000959
960 -docdir | --docdir | --docdi | --doc | --do)
961 ac_prev=docdir ;;
962 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
963 docdir=$ac_optarg ;;
964
965 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
966 ac_prev=dvidir ;;
967 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
968 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000969
970 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000971 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000972 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000973 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200974 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000975 ac_useropt_orig=$ac_useropt
976 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
977 case $ac_user_opts in
978 *"
979"enable_$ac_useropt"
980"*) ;;
981 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
982 ac_unrecognized_sep=', ';;
983 esac
984 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
987 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
988 | --exec | --exe | --ex)
989 ac_prev=exec_prefix ;;
990 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
991 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
992 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994
995 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000996 # Obsolete; use --with-gas.
997 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 -help | --help | --hel | --he | -h)
1000 ac_init_help=long ;;
1001 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1002 ac_init_help=recursive ;;
1003 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1004 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
1006 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001011 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1012 ac_prev=htmldir ;;
1013 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1014 | --ht=*)
1015 htmldir=$ac_optarg ;;
1016
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001017 -includedir | --includedir | --includedi | --included | --include \
1018 | --includ | --inclu | --incl | --inc)
1019 ac_prev=includedir ;;
1020 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1021 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023
1024 -infodir | --infodir | --infodi | --infod | --info | --inf)
1025 ac_prev=infodir ;;
1026 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -libdir | --libdir | --libdi | --libd)
1030 ac_prev=libdir ;;
1031 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001033
1034 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1035 | --libexe | --libex | --libe)
1036 ac_prev=libexecdir ;;
1037 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1038 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001041 -localedir | --localedir | --localedi | --localed | --locale)
1042 ac_prev=localedir ;;
1043 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1044 localedir=$ac_optarg ;;
1045
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001047 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048 ac_prev=localstatedir ;;
1049 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001050 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
1053 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1054 ac_prev=mandir ;;
1055 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001059 # Obsolete; use --without-fp.
1060 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
1062 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064 no_create=yes ;;
1065
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001066 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1067 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1068 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1071 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1072 | --oldin | --oldi | --old | --ol | --o)
1073 ac_prev=oldincludedir ;;
1074 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1075 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1076 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1080 ac_prev=prefix ;;
1081 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
1084 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1085 | --program-pre | --program-pr | --program-p)
1086 ac_prev=program_prefix ;;
1087 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1088 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
1091 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1092 | --program-suf | --program-su | --program-s)
1093 ac_prev=program_suffix ;;
1094 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1095 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
1098 -program-transform-name | --program-transform-name \
1099 | --program-transform-nam | --program-transform-na \
1100 | --program-transform-n | --program-transform- \
1101 | --program-transform | --program-transfor \
1102 | --program-transfo | --program-transf \
1103 | --program-trans | --program-tran \
1104 | --progr-tra | --program-tr | --program-t)
1105 ac_prev=program_transform_name ;;
1106 -program-transform-name=* | --program-transform-name=* \
1107 | --program-transform-nam=* | --program-transform-na=* \
1108 | --program-transform-n=* | --program-transform-=* \
1109 | --program-transform=* | --program-transfor=* \
1110 | --program-transfo=* | --program-transf=* \
1111 | --program-trans=* | --program-tran=* \
1112 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001115 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1116 ac_prev=pdfdir ;;
1117 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1118 pdfdir=$ac_optarg ;;
1119
1120 -psdir | --psdir | --psdi | --psd | --ps)
1121 ac_prev=psdir ;;
1122 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1123 psdir=$ac_optarg ;;
1124
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1126 | -silent | --silent | --silen | --sile | --sil)
1127 silent=yes ;;
1128
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001129 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1130 ac_prev=sbindir ;;
1131 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1132 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001134
1135 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1136 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1137 | --sharedst | --shareds | --shared | --share | --shar \
1138 | --sha | --sh)
1139 ac_prev=sharedstatedir ;;
1140 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1141 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1142 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1143 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001145
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001146 -site | --site | --sit)
1147 ac_prev=site ;;
1148 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001150
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1152 ac_prev=srcdir ;;
1153 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1157 | --syscon | --sysco | --sysc | --sys | --sy)
1158 ac_prev=sysconfdir ;;
1159 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1160 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001162
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167
1168 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1169 verbose=yes ;;
1170
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 -version | --version | --versio | --versi | --vers | -V)
1172 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173
1174 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001175 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001178 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001179 ac_useropt_orig=$ac_useropt
1180 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1181 case $ac_user_opts in
1182 *"
1183"with_$ac_useropt"
1184"*) ;;
1185 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1186 ac_unrecognized_sep=', ';;
1187 esac
1188 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189
1190 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001191 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001192 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001194 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001195 ac_useropt_orig=$ac_useropt
1196 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1197 case $ac_user_opts in
1198 *"
1199"with_$ac_useropt"
1200"*) ;;
1201 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1202 ac_unrecognized_sep=', ';;
1203 esac
1204 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001206 --x)
1207 # Obsolete; use --with-x.
1208 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209
1210 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1211 | --x-incl | --x-inc | --x-in | --x-i)
1212 ac_prev=x_includes ;;
1213 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1214 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001215 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216
1217 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1218 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1219 ac_prev=x_libraries ;;
1220 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1221 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001223
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001224 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1225Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226 ;;
1227
Martin v. Löwis11437992002-04-12 09:54:03 +00001228 *=*)
1229 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1230 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001231 case $ac_envvar in #(
1232 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001233 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001234 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001235 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001236 export $ac_envvar ;;
1237
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001238 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001240 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001242 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001243 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244 ;;
1245
1246 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001247done
1248
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001251 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001252fi
1253
Matthias Kloseb9621712010-04-24 17:59:49 +00001254if test -n "$ac_unrecognized_opts"; then
1255 case $enable_option_checking in
1256 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001257 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001258 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1259 esac
1260fi
1261
1262# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001263for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1264 datadir sysconfdir sharedstatedir localstatedir includedir \
1265 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1266 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001267do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001268 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001269 # Remove trailing slashes.
1270 case $ac_val in
1271 */ )
1272 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1273 eval $ac_var=\$ac_val;;
1274 esac
1275 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001276 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277 [\\/$]* | ?:[\\/]* ) continue;;
1278 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001279 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001280 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001281done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282
Martin v. Löwis11437992002-04-12 09:54:03 +00001283# There might be people who depend on the old broken behavior: `$host'
1284# used to hold the argument of --host etc.
1285# FIXME: To remove some day.
1286build=$build_alias
1287host=$host_alias
1288target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001289
Martin v. Löwis11437992002-04-12 09:54:03 +00001290# FIXME: To remove some day.
1291if test "x$host_alias" != x; then
1292 if test "x$build_alias" = x; then
1293 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001294 elif test "x$build_alias" != "x$host_alias"; then
1295 cross_compiling=yes
1296 fi
1297fi
1298
1299ac_tool_prefix=
1300test -n "$host_alias" && ac_tool_prefix=$host_alias-
1301
1302test "$silent" = yes && exec 6>/dev/null
1303
Guido van Rossum627b2d71993-12-24 10:39:16 +00001304
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001305ac_pwd=`pwd` && test -n "$ac_pwd" &&
1306ac_ls_di=`ls -di .` &&
1307ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001308 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001310 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001311
1312
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313# Find the source files, if location was not specified.
1314if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001315 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001316 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001317 ac_confdir=`$as_dirname -- "$as_myself" ||
1318$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1319 X"$as_myself" : 'X\(//\)[^/]' \| \
1320 X"$as_myself" : 'X\(//\)$' \| \
1321 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1322$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001323 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1324 s//\1/
1325 q
1326 }
1327 /^X\(\/\/\)[^/].*/{
1328 s//\1/
1329 q
1330 }
1331 /^X\(\/\/\)$/{
1332 s//\1/
1333 q
1334 }
1335 /^X\(\/\).*/{
1336 s//\1/
1337 q
1338 }
1339 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001340 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001342 srcdir=..
1343 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001344else
1345 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347if test ! -r "$srcdir/$ac_unique_file"; then
1348 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001349 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001351ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1352ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001353 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001354 pwd)`
1355# When building in place, set srcdir=.
1356if test "$ac_abs_confdir" = "$ac_pwd"; then
1357 srcdir=.
1358fi
1359# Remove unnecessary trailing slashes from srcdir.
1360# Double slashes in file names in object file debugging info
1361# mess up M-x gdb in Emacs.
1362case $srcdir in
1363*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1364esac
1365for ac_var in $ac_precious_vars; do
1366 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1367 eval ac_env_${ac_var}_value=\$${ac_var}
1368 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1369 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1370done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001371
Martin v. Löwis11437992002-04-12 09:54:03 +00001372#
1373# Report the --help message.
1374#
1375if test "$ac_init_help" = "long"; then
1376 # Omit some internal or obsolete options to make the list less imposing.
1377 # This message is too long to be a string in the A/UX 3.1 sh.
1378 cat <<_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001379\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001380
1381Usage: $0 [OPTION]... [VAR=VALUE]...
1382
1383To assign environment variables (e.g., CC, CFLAGS...), specify them as
1384VAR=VALUE. See below for descriptions of some of the useful variables.
1385
1386Defaults for the options are specified in brackets.
1387
1388Configuration:
1389 -h, --help display this help and exit
1390 --help=short display options specific to this package
1391 --help=recursive display the short help of all the included packages
1392 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001393 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001394 --cache-file=FILE cache test results in FILE [disabled]
1395 -C, --config-cache alias for \`--cache-file=config.cache'
1396 -n, --no-create do not create output files
1397 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1398
Martin v. Löwis11437992002-04-12 09:54:03 +00001399Installation directories:
1400 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001401 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001402 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001403 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001404
1405By default, \`make install' will install all the files in
1406\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1407an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1408for instance \`--prefix=\$HOME'.
1409
1410For better control, use the options below.
1411
1412Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001413 --bindir=DIR user executables [EPREFIX/bin]
1414 --sbindir=DIR system admin executables [EPREFIX/sbin]
1415 --libexecdir=DIR program executables [EPREFIX/libexec]
1416 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1417 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1418 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1419 --libdir=DIR object code libraries [EPREFIX/lib]
1420 --includedir=DIR C header files [PREFIX/include]
1421 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1422 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1423 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1424 --infodir=DIR info documentation [DATAROOTDIR/info]
1425 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1426 --mandir=DIR man documentation [DATAROOTDIR/man]
1427 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1428 --htmldir=DIR html documentation [DOCDIR]
1429 --dvidir=DIR dvi documentation [DOCDIR]
1430 --pdfdir=DIR pdf documentation [DOCDIR]
1431 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001432_ACEOF
1433
1434 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001435
1436System types:
1437 --build=BUILD configure for building on BUILD [guessed]
1438 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001439_ACEOF
1440fi
1441
1442if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001443 case $ac_init_help in
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001444 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001445 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001446 cat <<\_ACEOF
1447
1448Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001449 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001450 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1451 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001452 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001453 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001454 --enable-framework[=INSTALLDIR]
1455 Build (MacOSX|Darwin) framework
1456 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001457 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001458 --enable-loadable-sqlite-extensions
1459 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001460 --enable-ipv6 Enable ipv6 (with ipv4) support
1461 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001462 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001463 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001464
1465Optional Packages:
1466 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1467 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001468 --with-universal-archs=ARCH
1469 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001470 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001471 --with-framework-name=FRAMEWORK
1472 specify an alternate name of the framework built
1473 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001474 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001475 --with-cxx-main=<compiler>
1476 compile main() and link python executable with C++
1477 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --with-suffix=.exe set executable suffix
1479 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001480 --with-hash-algorithm=[fnv|siphash24]
1481 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001482 --with-address-sanitizer
1483 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001484 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001485 --with-system-expat build pyexpat module using an installed expat
1486 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001487 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001488 --with-system-libmpdec build _decimal module using an installed libmpdec
1489 library
Ned Deilyd819b932013-09-06 01:07:05 -07001490 --with-tcltk-includes='-I...'
1491 override search for Tcl and Tk include files
1492 --with-tcltk-libs='-L...'
1493 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001494 --with-dbmliborder=db1:db2:...
1495 order to check db backends for dbm. Valid value is a
1496 colon separated string with the backend names
1497 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001499 --with(out)-threads[=DIRECTORY]
1500 disable/enable thread support
1501 --with(out)-thread[=DIRECTORY]
1502 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001503 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001504 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001505 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001506 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001507 --with-fpectl enable SIGFPE catching
1508 --with-libm=STRING math library
1509 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001510 --with(out)-computed-gotos
1511 Use computed gotos in evaluation loop (enabled by
1512 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001513 --with(out)-ensurepip=[=upgrade]
1514 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001515
1516Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001517 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001518 CC C compiler command
1519 CFLAGS C compiler flags
1520 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1521 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001522 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001523 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001524 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001525 CPP C preprocessor
Benjamin Peterson0f3cde12014-12-15 00:00:23 -05001526 PKG_CONFIG path to pkg-config utility
1527 PKG_CONFIG_PATH
1528 directories to add to pkg-config's search path
1529 PKG_CONFIG_LIBDIR
1530 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001531
1532Use these variables to override the choices made by `configure' or to help
1533it to find libraries and programs with nonstandard names/locations.
1534
Georg Brandle2e15612009-05-20 18:25:10 +00001535Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001536_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001537ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001538fi
1539
1540if test "$ac_init_help" = "recursive"; then
1541 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001542 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001543 test -d "$ac_dir" ||
1544 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1545 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001546 ac_builddir=.
1547
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548case "$ac_dir" in
1549.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1550*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001551 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001552 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001553 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001554 case $ac_top_builddir_sub in
1555 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1556 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1557 esac ;;
1558esac
1559ac_abs_top_builddir=$ac_pwd
1560ac_abs_builddir=$ac_pwd$ac_dir_suffix
1561# for backward compatibility:
1562ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001563
1564case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001565 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001566 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 ac_top_srcdir=$ac_top_builddir_sub
1568 ac_abs_top_srcdir=$ac_pwd ;;
1569 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001570 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001571 ac_top_srcdir=$srcdir
1572 ac_abs_top_srcdir=$srcdir ;;
1573 *) # Relative name.
1574 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1575 ac_top_srcdir=$ac_top_build_prefix$srcdir
1576 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001577esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001579
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 cd "$ac_dir" || { ac_status=$?; continue; }
1581 # Check for guested configure.
1582 if test -f "$ac_srcdir/configure.gnu"; then
1583 echo &&
1584 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1585 elif test -f "$ac_srcdir/configure"; then
1586 echo &&
1587 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001589 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 fi || ac_status=$?
1591 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001592 done
1593fi
1594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001596if $ac_init_version; then
1597 cat <<\_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001598python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001599generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001600
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001601Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001602This configure script is free software; the Free Software Foundation
1603gives unlimited permission to copy, distribute and modify it.
1604_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001605 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001606fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001607
1608## ------------------------ ##
1609## Autoconf initialization. ##
1610## ------------------------ ##
1611
1612# ac_fn_c_try_compile LINENO
1613# --------------------------
1614# Try to compile conftest.$ac_ext, and return whether this succeeded.
1615ac_fn_c_try_compile ()
1616{
1617 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1618 rm -f conftest.$ac_objext
1619 if { { ac_try="$ac_compile"
1620case "(($ac_try" in
1621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1622 *) ac_try_echo=$ac_try;;
1623esac
1624eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1625$as_echo "$ac_try_echo"; } >&5
1626 (eval "$ac_compile") 2>conftest.err
1627 ac_status=$?
1628 if test -s conftest.err; then
1629 grep -v '^ *+' conftest.err >conftest.er1
1630 cat conftest.er1 >&5
1631 mv -f conftest.er1 conftest.err
1632 fi
1633 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1634 test $ac_status = 0; } && {
1635 test -z "$ac_c_werror_flag" ||
1636 test ! -s conftest.err
1637 } && test -s conftest.$ac_objext; then :
1638 ac_retval=0
1639else
1640 $as_echo "$as_me: failed program was:" >&5
1641sed 's/^/| /' conftest.$ac_ext >&5
1642
1643 ac_retval=1
1644fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001645 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001646 as_fn_set_status $ac_retval
1647
1648} # ac_fn_c_try_compile
1649
Matthias Kloseb9621712010-04-24 17:59:49 +00001650# ac_fn_c_try_link LINENO
1651# -----------------------
1652# Try to link conftest.$ac_ext, and return whether this succeeded.
1653ac_fn_c_try_link ()
1654{
1655 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1656 rm -f conftest.$ac_objext conftest$ac_exeext
1657 if { { ac_try="$ac_link"
1658case "(($ac_try" in
1659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1660 *) ac_try_echo=$ac_try;;
1661esac
1662eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1663$as_echo "$ac_try_echo"; } >&5
1664 (eval "$ac_link") 2>conftest.err
1665 ac_status=$?
1666 if test -s conftest.err; then
1667 grep -v '^ *+' conftest.err >conftest.er1
1668 cat conftest.er1 >&5
1669 mv -f conftest.er1 conftest.err
1670 fi
1671 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1672 test $ac_status = 0; } && {
1673 test -z "$ac_c_werror_flag" ||
1674 test ! -s conftest.err
1675 } && test -s conftest$ac_exeext && {
1676 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001677 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001678 }; then :
1679 ac_retval=0
1680else
1681 $as_echo "$as_me: failed program was:" >&5
1682sed 's/^/| /' conftest.$ac_ext >&5
1683
1684 ac_retval=1
1685fi
1686 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1687 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1688 # interfere with the next link command; also delete a directory that is
1689 # left behind by Apple's compiler. We do this before executing the actions.
1690 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001691 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001692 as_fn_set_status $ac_retval
1693
1694} # ac_fn_c_try_link
1695
Matthias Kloseb9621712010-04-24 17:59:49 +00001696# ac_fn_c_try_cpp LINENO
1697# ----------------------
1698# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1699ac_fn_c_try_cpp ()
1700{
1701 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1702 if { { ac_try="$ac_cpp conftest.$ac_ext"
1703case "(($ac_try" in
1704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1705 *) ac_try_echo=$ac_try;;
1706esac
1707eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1708$as_echo "$ac_try_echo"; } >&5
1709 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1710 ac_status=$?
1711 if test -s conftest.err; then
1712 grep -v '^ *+' conftest.err >conftest.er1
1713 cat conftest.er1 >&5
1714 mv -f conftest.er1 conftest.err
1715 fi
1716 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001717 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001718 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1719 test ! -s conftest.err
1720 }; then :
1721 ac_retval=0
1722else
1723 $as_echo "$as_me: failed program was:" >&5
1724sed 's/^/| /' conftest.$ac_ext >&5
1725
1726 ac_retval=1
1727fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001728 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001729 as_fn_set_status $ac_retval
1730
1731} # ac_fn_c_try_cpp
1732
1733# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1734# -------------------------------------------------------
1735# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1736# the include files in INCLUDES and setting the cache variable VAR
1737# accordingly.
1738ac_fn_c_check_header_mongrel ()
1739{
1740 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001741 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1743$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001744if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001745 $as_echo_n "(cached) " >&6
1746fi
1747eval ac_res=\$$3
1748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1749$as_echo "$ac_res" >&6; }
1750else
1751 # Is the header compilable?
1752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1753$as_echo_n "checking $2 usability... " >&6; }
1754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1755/* end confdefs.h. */
1756$4
1757#include <$2>
1758_ACEOF
1759if ac_fn_c_try_compile "$LINENO"; then :
1760 ac_header_compiler=yes
1761else
1762 ac_header_compiler=no
1763fi
1764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1766$as_echo "$ac_header_compiler" >&6; }
1767
1768# Is the header present?
1769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1770$as_echo_n "checking $2 presence... " >&6; }
1771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1772/* end confdefs.h. */
1773#include <$2>
1774_ACEOF
1775if ac_fn_c_try_cpp "$LINENO"; then :
1776 ac_header_preproc=yes
1777else
1778 ac_header_preproc=no
1779fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001780rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1782$as_echo "$ac_header_preproc" >&6; }
1783
1784# So? What about this header?
1785case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1786 yes:no: )
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1788$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1790$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1791 ;;
1792 no:yes:* )
1793 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1794$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1796$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1798$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1799 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1800$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1801 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1802$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001803( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001804## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001805## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001806 ) | sed "s/^/$as_me: WARNING: /" >&2
1807 ;;
1808esac
1809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1810$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001811if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001812 $as_echo_n "(cached) " >&6
1813else
1814 eval "$3=\$ac_header_compiler"
1815fi
1816eval ac_res=\$$3
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1818$as_echo "$ac_res" >&6; }
1819fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001820 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001821
1822} # ac_fn_c_check_header_mongrel
1823
1824# ac_fn_c_try_run LINENO
1825# ----------------------
1826# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1827# that executables *can* be run.
1828ac_fn_c_try_run ()
1829{
1830 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1831 if { { ac_try="$ac_link"
1832case "(($ac_try" in
1833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1834 *) ac_try_echo=$ac_try;;
1835esac
1836eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1837$as_echo "$ac_try_echo"; } >&5
1838 (eval "$ac_link") 2>&5
1839 ac_status=$?
1840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1841 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1842 { { case "(($ac_try" in
1843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1844 *) ac_try_echo=$ac_try;;
1845esac
1846eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1847$as_echo "$ac_try_echo"; } >&5
1848 (eval "$ac_try") 2>&5
1849 ac_status=$?
1850 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1851 test $ac_status = 0; }; }; then :
1852 ac_retval=0
1853else
1854 $as_echo "$as_me: program exited with status $ac_status" >&5
1855 $as_echo "$as_me: failed program was:" >&5
1856sed 's/^/| /' conftest.$ac_ext >&5
1857
1858 ac_retval=$ac_status
1859fi
1860 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001861 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001862 as_fn_set_status $ac_retval
1863
1864} # ac_fn_c_try_run
1865
1866# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1867# -------------------------------------------------------
1868# Tests whether HEADER exists and can be compiled using the include files in
1869# INCLUDES, setting the cache variable VAR accordingly.
1870ac_fn_c_check_header_compile ()
1871{
1872 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1874$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001875if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001876 $as_echo_n "(cached) " >&6
1877else
1878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1879/* end confdefs.h. */
1880$4
1881#include <$2>
1882_ACEOF
1883if ac_fn_c_try_compile "$LINENO"; then :
1884 eval "$3=yes"
1885else
1886 eval "$3=no"
1887fi
1888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1889fi
1890eval ac_res=\$$3
1891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1892$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001893 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001894
1895} # ac_fn_c_check_header_compile
1896
Matthias Kloseb9621712010-04-24 17:59:49 +00001897# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1898# -------------------------------------------
1899# Tests whether TYPE exists after having included INCLUDES, setting cache
1900# variable VAR accordingly.
1901ac_fn_c_check_type ()
1902{
1903 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1905$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001906if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001907 $as_echo_n "(cached) " >&6
1908else
1909 eval "$3=no"
1910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1911/* end confdefs.h. */
1912$4
1913int
1914main ()
1915{
1916if (sizeof ($2))
1917 return 0;
1918 ;
1919 return 0;
1920}
1921_ACEOF
1922if ac_fn_c_try_compile "$LINENO"; then :
1923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1924/* end confdefs.h. */
1925$4
1926int
1927main ()
1928{
1929if (sizeof (($2)))
1930 return 0;
1931 ;
1932 return 0;
1933}
1934_ACEOF
1935if ac_fn_c_try_compile "$LINENO"; then :
1936
1937else
1938 eval "$3=yes"
1939fi
1940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1941fi
1942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1943fi
1944eval ac_res=\$$3
1945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1946$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001947 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001948
1949} # ac_fn_c_check_type
1950
1951# ac_fn_c_find_uintX_t LINENO BITS VAR
1952# ------------------------------------
1953# Finds an unsigned integer type with width BITS, setting cache variable VAR
1954# accordingly.
1955ac_fn_c_find_uintX_t ()
1956{
1957 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1959$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001960if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001961 $as_echo_n "(cached) " >&6
1962else
1963 eval "$3=no"
1964 # Order is important - never check a type that is potentially smaller
1965 # than half of the expected target width.
1966 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1967 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1969/* end confdefs.h. */
1970$ac_includes_default
1971int
1972main ()
1973{
1974static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001975test_array [0] = 0;
1976return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001977
1978 ;
1979 return 0;
1980}
1981_ACEOF
1982if ac_fn_c_try_compile "$LINENO"; then :
1983 case $ac_type in #(
1984 uint$2_t) :
1985 eval "$3=yes" ;; #(
1986 *) :
1987 eval "$3=\$ac_type" ;;
1988esac
1989fi
1990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001991 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001992
1993else
1994 break
1995fi
1996 done
1997fi
1998eval ac_res=\$$3
1999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2000$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002001 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002002
2003} # ac_fn_c_find_uintX_t
2004
2005# ac_fn_c_find_intX_t LINENO BITS VAR
2006# -----------------------------------
2007# Finds a signed integer type with width BITS, setting cache variable VAR
2008# accordingly.
2009ac_fn_c_find_intX_t ()
2010{
2011 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2013$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002014if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002015 $as_echo_n "(cached) " >&6
2016else
2017 eval "$3=no"
2018 # Order is important - never check a type that is potentially smaller
2019 # than half of the expected target width.
2020 for ac_type in int$2_t 'int' 'long int' \
2021 'long long int' 'short int' 'signed char'; do
2022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2023/* end confdefs.h. */
2024$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002025 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002026int
2027main ()
2028{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002029static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002030test_array [0] = 0;
2031return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002032
2033 ;
2034 return 0;
2035}
2036_ACEOF
2037if ac_fn_c_try_compile "$LINENO"; then :
2038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2039/* end confdefs.h. */
2040$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002041 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002042int
2043main ()
2044{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002045static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002046 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002047test_array [0] = 0;
2048return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002049
2050 ;
2051 return 0;
2052}
2053_ACEOF
2054if ac_fn_c_try_compile "$LINENO"; then :
2055
2056else
2057 case $ac_type in #(
2058 int$2_t) :
2059 eval "$3=yes" ;; #(
2060 *) :
2061 eval "$3=\$ac_type" ;;
2062esac
2063fi
2064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2065fi
2066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002067 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002068
2069else
2070 break
2071fi
2072 done
2073fi
2074eval ac_res=\$$3
2075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2076$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002077 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002078
2079} # ac_fn_c_find_intX_t
2080
2081# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2082# --------------------------------------------
2083# Tries to find the compile-time value of EXPR in a program that includes
2084# INCLUDES, setting VAR accordingly. Returns whether the value could be
2085# computed
2086ac_fn_c_compute_int ()
2087{
2088 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2089 if test "$cross_compiling" = yes; then
2090 # Depending upon the size, compute the lo and hi bounds.
2091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2092/* end confdefs.h. */
2093$4
2094int
2095main ()
2096{
2097static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002098test_array [0] = 0;
2099return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002100
2101 ;
2102 return 0;
2103}
2104_ACEOF
2105if ac_fn_c_try_compile "$LINENO"; then :
2106 ac_lo=0 ac_mid=0
2107 while :; do
2108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2109/* end confdefs.h. */
2110$4
2111int
2112main ()
2113{
2114static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002115test_array [0] = 0;
2116return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002117
2118 ;
2119 return 0;
2120}
2121_ACEOF
2122if ac_fn_c_try_compile "$LINENO"; then :
2123 ac_hi=$ac_mid; break
2124else
2125 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2126 if test $ac_lo -le $ac_mid; then
2127 ac_lo= ac_hi=
2128 break
2129 fi
2130 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2131fi
2132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2133 done
2134else
2135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2136/* end confdefs.h. */
2137$4
2138int
2139main ()
2140{
2141static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002142test_array [0] = 0;
2143return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002144
2145 ;
2146 return 0;
2147}
2148_ACEOF
2149if ac_fn_c_try_compile "$LINENO"; then :
2150 ac_hi=-1 ac_mid=-1
2151 while :; do
2152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2153/* end confdefs.h. */
2154$4
2155int
2156main ()
2157{
2158static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002159test_array [0] = 0;
2160return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002161
2162 ;
2163 return 0;
2164}
2165_ACEOF
2166if ac_fn_c_try_compile "$LINENO"; then :
2167 ac_lo=$ac_mid; break
2168else
2169 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2170 if test $ac_mid -le $ac_hi; then
2171 ac_lo= ac_hi=
2172 break
2173 fi
2174 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2175fi
2176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2177 done
2178else
2179 ac_lo= ac_hi=
2180fi
2181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2182fi
2183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2184# Binary search between lo and hi bounds.
2185while test "x$ac_lo" != "x$ac_hi"; do
2186 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2188/* end confdefs.h. */
2189$4
2190int
2191main ()
2192{
2193static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002194test_array [0] = 0;
2195return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002196
2197 ;
2198 return 0;
2199}
2200_ACEOF
2201if ac_fn_c_try_compile "$LINENO"; then :
2202 ac_hi=$ac_mid
2203else
2204 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2205fi
2206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2207done
2208case $ac_lo in #((
2209?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2210'') ac_retval=1 ;;
2211esac
2212 else
2213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2214/* end confdefs.h. */
2215$4
2216static long int longval () { return $2; }
2217static unsigned long int ulongval () { return $2; }
2218#include <stdio.h>
2219#include <stdlib.h>
2220int
2221main ()
2222{
2223
2224 FILE *f = fopen ("conftest.val", "w");
2225 if (! f)
2226 return 1;
2227 if (($2) < 0)
2228 {
2229 long int i = longval ();
2230 if (i != ($2))
2231 return 1;
2232 fprintf (f, "%ld", i);
2233 }
2234 else
2235 {
2236 unsigned long int i = ulongval ();
2237 if (i != ($2))
2238 return 1;
2239 fprintf (f, "%lu", i);
2240 }
2241 /* Do not output a trailing newline, as this causes \r\n confusion
2242 on some platforms. */
2243 return ferror (f) || fclose (f) != 0;
2244
2245 ;
2246 return 0;
2247}
2248_ACEOF
2249if ac_fn_c_try_run "$LINENO"; then :
2250 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2251else
2252 ac_retval=1
2253fi
2254rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2255 conftest.$ac_objext conftest.beam conftest.$ac_ext
2256rm -f conftest.val
2257
2258 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002259 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002260 as_fn_set_status $ac_retval
2261
2262} # ac_fn_c_compute_int
2263
2264# ac_fn_c_check_func LINENO FUNC VAR
2265# ----------------------------------
2266# Tests whether FUNC exists, setting the cache variable VAR accordingly
2267ac_fn_c_check_func ()
2268{
2269 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2271$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002272if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002273 $as_echo_n "(cached) " >&6
2274else
2275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276/* end confdefs.h. */
2277/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2278 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2279#define $2 innocuous_$2
2280
2281/* System header to define __stub macros and hopefully few prototypes,
2282 which can conflict with char $2 (); below.
2283 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2284 <limits.h> exists even on freestanding compilers. */
2285
2286#ifdef __STDC__
2287# include <limits.h>
2288#else
2289# include <assert.h>
2290#endif
2291
2292#undef $2
2293
2294/* Override any GCC internal prototype to avoid an error.
2295 Use char because int might match the return type of a GCC
2296 builtin and then its argument prototype would still apply. */
2297#ifdef __cplusplus
2298extern "C"
2299#endif
2300char $2 ();
2301/* The GNU C library defines this for functions which it implements
2302 to always fail with ENOSYS. Some functions are actually named
2303 something starting with __ and the normal name is an alias. */
2304#if defined __stub_$2 || defined __stub___$2
2305choke me
2306#endif
2307
2308int
2309main ()
2310{
2311return $2 ();
2312 ;
2313 return 0;
2314}
2315_ACEOF
2316if ac_fn_c_try_link "$LINENO"; then :
2317 eval "$3=yes"
2318else
2319 eval "$3=no"
2320fi
2321rm -f core conftest.err conftest.$ac_objext \
2322 conftest$ac_exeext conftest.$ac_ext
2323fi
2324eval ac_res=\$$3
2325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2326$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002327 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002328
2329} # ac_fn_c_check_func
2330
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002331# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2332# ---------------------------------------------
2333# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2334# accordingly.
2335ac_fn_c_check_decl ()
2336{
2337 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2338 as_decl_name=`echo $2|sed 's/ *(.*//'`
2339 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2341$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2342if eval \${$3+:} false; then :
2343 $as_echo_n "(cached) " >&6
2344else
2345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2346/* end confdefs.h. */
2347$4
2348int
2349main ()
2350{
2351#ifndef $as_decl_name
2352#ifdef __cplusplus
2353 (void) $as_decl_use;
2354#else
2355 (void) $as_decl_name;
2356#endif
2357#endif
2358
2359 ;
2360 return 0;
2361}
2362_ACEOF
2363if ac_fn_c_try_compile "$LINENO"; then :
2364 eval "$3=yes"
2365else
2366 eval "$3=no"
2367fi
2368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2369fi
2370eval ac_res=\$$3
2371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2372$as_echo "$ac_res" >&6; }
2373 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2374
2375} # ac_fn_c_check_decl
2376
Matthias Kloseb9621712010-04-24 17:59:49 +00002377# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2378# ----------------------------------------------------
2379# Tries to find if the field MEMBER exists in type AGGR, after including
2380# INCLUDES, setting cache variable VAR accordingly.
2381ac_fn_c_check_member ()
2382{
2383 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2385$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002386if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002387 $as_echo_n "(cached) " >&6
2388else
2389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2390/* end confdefs.h. */
2391$5
2392int
2393main ()
2394{
2395static $2 ac_aggr;
2396if (ac_aggr.$3)
2397return 0;
2398 ;
2399 return 0;
2400}
2401_ACEOF
2402if ac_fn_c_try_compile "$LINENO"; then :
2403 eval "$4=yes"
2404else
2405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2406/* end confdefs.h. */
2407$5
2408int
2409main ()
2410{
2411static $2 ac_aggr;
2412if (sizeof ac_aggr.$3)
2413return 0;
2414 ;
2415 return 0;
2416}
2417_ACEOF
2418if ac_fn_c_try_compile "$LINENO"; then :
2419 eval "$4=yes"
2420else
2421 eval "$4=no"
2422fi
2423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2424fi
2425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2426fi
2427eval ac_res=\$$4
2428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2429$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002430 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002431
2432} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002433cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002434This file contains any messages produced by compilers while
2435running configure, to aid debugging if configure makes a mistake.
2436
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002437It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002438generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002439
2440 $ $0 $@
2441
2442_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002443exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002444{
2445cat <<_ASUNAME
2446## --------- ##
2447## Platform. ##
2448## --------- ##
2449
2450hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2451uname -m = `(uname -m) 2>/dev/null || echo unknown`
2452uname -r = `(uname -r) 2>/dev/null || echo unknown`
2453uname -s = `(uname -s) 2>/dev/null || echo unknown`
2454uname -v = `(uname -v) 2>/dev/null || echo unknown`
2455
2456/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2457/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2458
2459/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2460/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2461/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002463/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2464/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2465/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2466
2467_ASUNAME
2468
2469as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2470for as_dir in $PATH
2471do
2472 IFS=$as_save_IFS
2473 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002474 $as_echo "PATH: $as_dir"
2475 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002477
2478} >&5
2479
2480cat >&5 <<_ACEOF
2481
2482
2483## ----------- ##
2484## Core tests. ##
2485## ----------- ##
2486
2487_ACEOF
2488
2489
2490# Keep a trace of the command line.
2491# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002492# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002493# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002494# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002495ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002496ac_configure_args0=
2497ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002498ac_must_keep_next=false
2499for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002500do
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 for ac_arg
2502 do
2503 case $ac_arg in
2504 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2505 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2506 | -silent | --silent | --silen | --sile | --sil)
2507 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 esac
2511 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002516 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002518 case $ac_arg in
2519 *=* | --config-cache | -C | -disable-* | --disable-* \
2520 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2521 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2522 | -with-* | --with-* | -without-* | --without-* | --x)
2523 case "$ac_configure_args0 " in
2524 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2525 esac
2526 ;;
2527 -* ) ac_must_keep_next=true ;;
2528 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002529 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002531 ;;
2532 esac
2533 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002534done
Matthias Kloseb9621712010-04-24 17:59:49 +00002535{ ac_configure_args0=; unset ac_configure_args0;}
2536{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002537
2538# When interrupted or exit'd, cleanup temporary files, and complete
2539# config.log. We remove comments because anyway the quotes in there
2540# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541# WARNING: Use '\'' to represent an apostrophe within the trap.
2542# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002543trap 'exit_status=$?
2544 # Save into config.log some information that might help in debugging.
2545 {
2546 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002547
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002548 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002549## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002550## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002551 echo
2552 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553(
2554 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2555 eval ac_val=\$$ac_var
2556 case $ac_val in #(
2557 *${as_nl}*)
2558 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002559 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2560$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002561 esac
2562 case $ac_var in #(
2563 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002564 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2565 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566 esac ;;
2567 esac
2568 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002569 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002570 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2571 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573 "s/'\''/'\''\\\\'\'''\''/g;
2574 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2575 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002576 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002578 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579 esac |
2580 sort
2581)
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002583
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002584 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002585## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002586## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002587 echo
2588 for ac_var in $ac_subst_vars
2589 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590 eval ac_val=\$$ac_var
2591 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002592 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002595 done | sort
2596 echo
2597
2598 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002599 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002601## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002602 echo
2603 for ac_var in $ac_subst_files
2604 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605 eval ac_val=\$$ac_var
2606 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002610 done | sort
2611 echo
2612 fi
2613
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002615 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002616## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002617## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 echo
2621 fi
2622 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 $as_echo "$as_me: caught signal $ac_signal"
2624 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626 rm -f core *.core core.conftest.* &&
2627 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002630for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002631 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002632done
2633ac_signal=0
2634
2635# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002637
Matthias Kloseb9621712010-04-24 17:59:49 +00002638$as_echo "/* confdefs.h */" > confdefs.h
2639
Martin v. Löwis11437992002-04-12 09:54:03 +00002640# Predefined preprocessor variables.
2641
2642cat >>confdefs.h <<_ACEOF
2643#define PACKAGE_NAME "$PACKAGE_NAME"
2644_ACEOF
2645
Martin v. Löwis11437992002-04-12 09:54:03 +00002646cat >>confdefs.h <<_ACEOF
2647#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2648_ACEOF
2649
Martin v. Löwis11437992002-04-12 09:54:03 +00002650cat >>confdefs.h <<_ACEOF
2651#define PACKAGE_VERSION "$PACKAGE_VERSION"
2652_ACEOF
2653
Martin v. Löwis11437992002-04-12 09:54:03 +00002654cat >>confdefs.h <<_ACEOF
2655#define PACKAGE_STRING "$PACKAGE_STRING"
2656_ACEOF
2657
Martin v. Löwis11437992002-04-12 09:54:03 +00002658cat >>confdefs.h <<_ACEOF
2659#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2660_ACEOF
2661
Matthias Kloseb9621712010-04-24 17:59:49 +00002662cat >>confdefs.h <<_ACEOF
2663#define PACKAGE_URL "$PACKAGE_URL"
2664_ACEOF
2665
Martin v. Löwis11437992002-04-12 09:54:03 +00002666
2667# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002668# Prefer an explicitly selected file to automatically selected ones.
2669ac_site_file1=NONE
2670ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002671if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002672 # We do not want a PATH search for config.site.
2673 case $CONFIG_SITE in #((
2674 -*) ac_site_file1=./$CONFIG_SITE;;
2675 */*) ac_site_file1=$CONFIG_SITE;;
2676 *) ac_site_file1=./$CONFIG_SITE;;
2677 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002678elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002679 ac_site_file1=$prefix/share/config.site
2680 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002681else
Matthias Kloseb9621712010-04-24 17:59:49 +00002682 ac_site_file1=$ac_default_prefix/share/config.site
2683 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002685for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002686do
Matthias Kloseb9621712010-04-24 17:59:49 +00002687 test "x$ac_site_file" = xNONE && continue
2688 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2689 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2690$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002691 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002692 . "$ac_site_file" \
2693 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2694$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2695as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002696See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002697 fi
2698done
2699
2700if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002701 # Some versions of bash will fail to source /dev/null (special files
2702 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2703 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2704 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2705$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002707 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2708 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002709 esac
2710 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002711else
Matthias Kloseb9621712010-04-24 17:59:49 +00002712 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2713$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002714 >$cache_file
2715fi
2716
2717# Check that the precious variables saved in the cache have kept the same
2718# value.
2719ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002720for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002721 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2722 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002723 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2724 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002725 case $ac_old_set,$ac_new_set in
2726 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002727 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2728$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 ac_cache_corrupted=: ;;
2730 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002731 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2732$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002733 ac_cache_corrupted=: ;;
2734 ,);;
2735 *)
2736 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002737 # differences in whitespace do not lead to failure.
2738 ac_old_val_w=`echo x $ac_old_val`
2739 ac_new_val_w=`echo x $ac_new_val`
2740 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2742$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2743 ac_cache_corrupted=:
2744 else
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2746$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2747 eval $ac_var=\$ac_old_val
2748 fi
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2750$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2752$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 fi;;
2754 esac
2755 # Pass precious variables to config.status.
2756 if test "$ac_new_set" = set; then
2757 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002758 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002759 *) ac_arg=$ac_var=$ac_new_val ;;
2760 esac
2761 case " $ac_configure_args " in
2762 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002763 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002764 esac
2765 fi
2766done
2767if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002768 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2769$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2770 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2771$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002772 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002774## -------------------- ##
2775## Main body of script. ##
2776## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002777
Guido van Rossum7f43da71994-08-01 12:15:30 +00002778ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002779ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002780ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2781ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2782ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002783
Guido van Rossum627b2d71993-12-24 10:39:16 +00002784
Michael W. Hudson54241132001-12-07 15:38:26 +00002785
Trent Nelson4d4ec652012-10-16 08:51:24 -04002786
Trent Nelson5595ab52012-10-17 04:47:31 -04002787if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002788 # If we're building out-of-tree, we need to make sure the following
2789 # resources get picked up before their $srcdir counterparts.
2790 # Objects/ -> typeslots.inc
2791 # Include/ -> Python-ast.h, graminit.h
2792 # Python/ -> importlib.h
2793 # (A side effect of this is that these resources will automatically be
2794 # regenerated when building out-of-tree, regardless of whether or not
2795 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2796 # off.)
2797 BASECPPFLAGS="-IObjects -IInclude -IPython"
2798else
2799 BASECPPFLAGS=""
2800fi
2801
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002802
2803
2804
2805
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002806if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002807then
2808# Extract the first word of "hg", so it can be a program name with args.
2809set dummy hg; ac_word=$2
2810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2811$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002812if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002813 $as_echo_n "(cached) " >&6
2814else
2815 if test -n "$HAS_HG"; then
2816 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2817else
2818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2819for as_dir in $PATH
2820do
2821 IFS=$as_save_IFS
2822 test -z "$as_dir" && as_dir=.
2823 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002824 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002825 ac_cv_prog_HAS_HG="found"
2826 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2827 break 2
2828 fi
2829done
2830 done
2831IFS=$as_save_IFS
2832
2833 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2834fi
2835fi
2836HAS_HG=$ac_cv_prog_HAS_HG
2837if test -n "$HAS_HG"; then
2838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2839$as_echo "$HAS_HG" >&6; }
2840else
2841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2842$as_echo "no" >&6; }
2843fi
2844
2845
2846else
2847HAS_HG=no-repository
2848fi
2849if test $HAS_HG = found
2850then
2851 HGVERSION="hg id -i \$(srcdir)"
2852 HGTAG="hg id -t \$(srcdir)"
2853 HGBRANCH="hg id -b \$(srcdir)"
2854else
2855 HGVERSION=""
2856 HGTAG=""
2857 HGBRANCH=""
2858fi
2859
2860
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002861ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002862
2863
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002864ac_aux_dir=
2865for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2866 if test -f "$ac_dir/install-sh"; then
2867 ac_aux_dir=$ac_dir
2868 ac_install_sh="$ac_aux_dir/install-sh -c"
2869 break
2870 elif test -f "$ac_dir/install.sh"; then
2871 ac_aux_dir=$ac_dir
2872 ac_install_sh="$ac_aux_dir/install.sh -c"
2873 break
2874 elif test -f "$ac_dir/shtool"; then
2875 ac_aux_dir=$ac_dir
2876 ac_install_sh="$ac_aux_dir/shtool install -c"
2877 break
2878 fi
2879done
2880if test -z "$ac_aux_dir"; then
2881 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2882fi
2883
2884# These three variables are undocumented and unsupported,
2885# and are intended to be withdrawn in a future Autoconf release.
2886# They can cause serious problems if a builder's source tree is in a directory
2887# whose full name contains unusual characters.
2888ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2889ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2890ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2891
2892
2893# Make sure we can run config.sub.
2894$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2895 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2896
2897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2898$as_echo_n "checking build system type... " >&6; }
2899if ${ac_cv_build+:} false; then :
2900 $as_echo_n "(cached) " >&6
2901else
2902 ac_build_alias=$build_alias
2903test "x$ac_build_alias" = x &&
2904 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2905test "x$ac_build_alias" = x &&
2906 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2907ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2908 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2909
2910fi
2911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2912$as_echo "$ac_cv_build" >&6; }
2913case $ac_cv_build in
2914*-*-*) ;;
2915*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2916esac
2917build=$ac_cv_build
2918ac_save_IFS=$IFS; IFS='-'
2919set x $ac_cv_build
2920shift
2921build_cpu=$1
2922build_vendor=$2
2923shift; shift
2924# Remember, the first character of IFS is used to create $*,
2925# except with old shells:
2926build_os=$*
2927IFS=$ac_save_IFS
2928case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2929
2930
2931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2932$as_echo_n "checking host system type... " >&6; }
2933if ${ac_cv_host+:} false; then :
2934 $as_echo_n "(cached) " >&6
2935else
2936 if test "x$host_alias" = x; then
2937 ac_cv_host=$ac_cv_build
2938else
2939 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2940 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2941fi
2942
2943fi
2944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2945$as_echo "$ac_cv_host" >&6; }
2946case $ac_cv_host in
2947*-*-*) ;;
2948*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2949esac
2950host=$ac_cv_host
2951ac_save_IFS=$IFS; IFS='-'
2952set x $ac_cv_host
2953shift
2954host_cpu=$1
2955host_vendor=$2
2956shift; shift
2957# Remember, the first character of IFS is used to create $*,
2958# except with old shells:
2959host_os=$*
2960IFS=$ac_save_IFS
2961case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2962
2963
2964
doko@python.orga10e4a92013-01-25 18:45:12 +01002965
2966
Ned Deilyfcbc2462014-08-22 13:32:49 -07002967# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2968rm -f pybuilddir.txt
2969
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002970if test "$cross_compiling" = yes; then
2971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2972$as_echo_n "checking for python interpreter for cross build... " >&6; }
2973 if test -z "$PYTHON_FOR_BUILD"; then
2974 for interp in python$PACKAGE_VERSION python3 python; do
2975 which $interp >/dev/null 2>&1 || continue
2976 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2977 break
2978 fi
2979 interp=
2980 done
2981 if test x$interp = x; then
2982 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2983 fi
2984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2985$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002986 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002987 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002988elif test "$cross_compiling" = maybe; then
2989 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002990else
2991 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2992fi
2993
2994
Martin v. Löwis11437992002-04-12 09:54:03 +00002995
Benjamin Petersond23f8222009-04-05 19:13:16 +00002996if test "$prefix" != "/"; then
2997 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2998fi
2999
3000
Martin v. Löwis11437992002-04-12 09:54:03 +00003001
3002
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003003# We don't use PACKAGE_ variables, and they cause conflicts
3004# with other autoconf-based packages that include Python.h
3005grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3006rm confdefs.h
3007mv confdefs.h.new confdefs.h
3008
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003009
Larry Hastingsf5002bd2014-03-16 23:05:59 -07003010VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003011
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003012# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003013
3014SOVERSION=1.0
3015
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003016# The later defininition of _XOPEN_SOURCE disables certain features
3017# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3018
Matthias Kloseb9621712010-04-24 17:59:49 +00003019$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003020
3021
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003022# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3023# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3024# them.
3025
Matthias Kloseb9621712010-04-24 17:59:49 +00003026$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003027
3028
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003029# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3030# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3031# them.
3032
Matthias Kloseb9621712010-04-24 17:59:49 +00003033$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003034
3035
Martin v. Löwisd6320502004-08-12 13:45:08 +00003036# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3037# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3038
Matthias Kloseb9621712010-04-24 17:59:49 +00003039$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003040
3041
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003042# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3043# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3044# them.
3045
Matthias Kloseb9621712010-04-24 17:59:49 +00003046$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003047
3048
3049
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003050define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003051
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003052# Arguments passed to configure.
3053
3054CONFIG_ARGS="$ac_configure_args"
3055
Matthias Kloseb9621712010-04-24 17:59:49 +00003056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3057$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003058# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003059if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003060 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003061 case $enableval in
3062 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003063 # Locate the best usable SDK, see Mac/README.txt for more
3064 # information
3065 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003066 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003067 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003068 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3069 if test ! -d "${enableval}"
3070 then
3071 enableval=/
3072 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003073 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003074 ;;
3075 esac
3076 case $enableval in
3077 no)
3078 UNIVERSALSDK=
3079 enable_universalsdk=
3080 ;;
3081 *)
3082 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003083 if test ! -d "${UNIVERSALSDK}"
3084 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003085 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003086 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003087 ;;
3088 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003089
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003090
Thomas Wouters477c8d52006-05-27 19:21:47 +00003091else
3092
3093 UNIVERSALSDK=
3094 enable_universalsdk=
3095
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003096fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003097
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003098if test -n "${UNIVERSALSDK}"
3099then
Matthias Kloseb9621712010-04-24 17:59:49 +00003100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3101$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003102else
Matthias Kloseb9621712010-04-24 17:59:49 +00003103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3104$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003105fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003106
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003107
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003108
Ned Deily87adb6e2013-10-18 21:09:56 -07003109ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003110
Ned Deilycbfb9a52012-06-23 16:02:19 -07003111# For backward compatibility reasons we prefer to select '32-bit' if available,
3112# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003113UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003114if test "`uname -s`" = "Darwin"
3115then
3116 if test -n "${UNIVERSALSDK}"
3117 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003118 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003119 then
3120 UNIVERSAL_ARCHS="intel"
3121 fi
3122 fi
3123fi
3124
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003125
Matthias Kloseb9621712010-04-24 17:59:49 +00003126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3127$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003128
3129# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003130if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003131 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003132 UNIVERSAL_ARCHS="$withval"
3133
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003134fi
3135
Ned Deily87adb6e2013-10-18 21:09:56 -07003136if test -n "${UNIVERSALSDK}"
3137then
3138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3139$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3140else
3141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3142$as_echo "no" >&6; }
3143fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003144
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003145
3146# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003147if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003148 withval=$with_framework_name;
3149 PYTHONFRAMEWORK=${withval}
3150 PYTHONFRAMEWORKDIR=${withval}.framework
3151 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3152
3153else
3154
3155 PYTHONFRAMEWORK=Python
3156 PYTHONFRAMEWORKDIR=Python.framework
3157 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3158
3159fi
3160
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003161# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003162if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003163 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003164 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003165 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003166 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003167 esac
3168 case $enableval in
3169 no)
3170 PYTHONFRAMEWORK=
3171 PYTHONFRAMEWORKDIR=no-framework
3172 PYTHONFRAMEWORKPREFIX=
3173 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003174 FRAMEWORKINSTALLFIRST=
3175 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003176 FRAMEWORKALTINSTALLFIRST=
3177 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003178 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003179 if test "x${prefix}" = "xNONE"; then
3180 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3181 else
3182 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3183 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003184 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003185 ;;
3186 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003187 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003188 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003189 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003190 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003191 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3192 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003193 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003194 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003195
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003196 if test "x${prefix}" = "xNONE" ; then
3197 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003198
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003199 else
3200 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3201 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003202
3203 case "${enableval}" in
3204 /System*)
3205 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3206 if test "${prefix}" = "NONE" ; then
3207 # See below
3208 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3209 fi
3210 ;;
3211
3212 /Library*)
3213 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3214 ;;
3215
3216 */Library/Frameworks)
3217 MDIR="`dirname "${enableval}"`"
3218 MDIR="`dirname "${MDIR}"`"
3219 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3220
3221 if test "${prefix}" = "NONE"; then
3222 # User hasn't specified the
3223 # --prefix option, but wants to install
3224 # the framework in a non-default location,
3225 # ensure that the compatibility links get
3226 # installed relative to that prefix as well
3227 # instead of in /usr/local.
3228 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3229 fi
3230 ;;
3231
3232 *)
3233 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3234 ;;
3235 esac
3236
Jack Jansen127e56e2001-09-11 14:41:54 +00003237 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003238
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003239 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003240 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003241 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003242
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003243 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003244
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003245 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3246
3247 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3248
Jack Jansene578a632001-08-15 01:27:14 +00003249 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003250
Guido van Rossum563e7081996-09-10 18:20:48 +00003251else
Martin v. Löwis11437992002-04-12 09:54:03 +00003252
Jack Jansene578a632001-08-15 01:27:14 +00003253 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003254 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003255 PYTHONFRAMEWORKPREFIX=
3256 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003257 FRAMEWORKINSTALLFIRST=
3258 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003259 FRAMEWORKALTINSTALLFIRST=
3260 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003261 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003262 if test "x${prefix}" = "xNONE" ; then
3263 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3264 else
3265 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3266 fi
Jack Jansene578a632001-08-15 01:27:14 +00003267 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003268
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003269
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003270fi
3271
Thomas Wouters477c8d52006-05-27 19:21:47 +00003272
3273
Michael W. Hudson54241132001-12-07 15:38:26 +00003274
3275
3276
3277
Jack Jansene578a632001-08-15 01:27:14 +00003278
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003279
3280
3281
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003282
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003283
Ned Deilyb8f944f2013-11-21 22:42:25 -08003284
Jack Jansene578a632001-08-15 01:27:14 +00003285##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003286## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003287## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003288##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003289# Set name for machine-dependent library files
3290
Matthias Kloseb9621712010-04-24 17:59:49 +00003291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3292$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003293if test -z "$MACHDEP"
3294then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003295 # avoid using uname for cross builds
3296 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003297 # ac_sys_system and ac_sys_release are used for setting
3298 # a lot of different things including 'define_xopen_source'
3299 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003300 case "$host" in
3301 *-*-linux*)
3302 ac_sys_system=Linux
3303 ;;
3304 *-*-cygwin*)
3305 ac_sys_system=Cygwin
3306 ;;
3307 *)
3308 # for now, limit cross builds to known configurations
3309 MACHDEP="unknown"
3310 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3311 esac
3312 ac_sys_release=
3313 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003314 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003315 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003316 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003317 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003318 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003319 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003320 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003321 fi
3322 ac_md_system=`echo $ac_sys_system |
3323 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3324 ac_md_release=`echo $ac_sys_release |
3325 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3326 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003327
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003328 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003329 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003330 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003331 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003332 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003333 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003334 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003335fi
Guido van Rossum91922671997-10-09 20:24:13 +00003336
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003337
3338if test "$cross_compiling" = yes; then
3339 case "$host" in
3340 *-*-linux*)
3341 case "$host_cpu" in
3342 arm*)
3343 _host_cpu=arm
3344 ;;
3345 *)
3346 _host_cpu=$host_cpu
3347 esac
3348 ;;
3349 *-*-cygwin*)
3350 _host_cpu=
3351 ;;
3352 *)
3353 # for now, limit cross builds to known configurations
3354 MACHDEP="unknown"
3355 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3356 esac
3357 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3358fi
3359
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003360# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3361# disable features if it is defined, without any means to access these
3362# features as extensions. For these systems, we skip the definition of
3363# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3364# some feature, make sure there is no alternative way to access this
3365# feature. Also, when using wildcards, make sure you have verified the
3366# need for not defining _XOPEN_SOURCE on all systems matching the
3367# wildcard, and that the wildcard does not include future systems
3368# (which may remove their limitations).
3369case $ac_sys_system/$ac_sys_release in
3370 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3371 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003372 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003373 # In addition, Stefan Krah confirms that issue #1244610 exists through
3374 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003375 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003376 define_xopen_source=no
3377 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3378 # also defined. This can be overridden by defining _BSD_SOURCE
3379 # As this has a different meaning on Linux, only define it on OpenBSD
3380
Matthias Kloseb9621712010-04-24 17:59:49 +00003381$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003382
3383 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003384 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003385 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3386 # also defined. This can be overridden by defining _BSD_SOURCE
3387 # As this has a different meaning on Linux, only define it on OpenBSD
3388
Matthias Kloseb9621712010-04-24 17:59:49 +00003389$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003390
3391 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003392 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3393 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3394 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003395 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003396 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003397 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3398 # request to enable features supported by the standard as a request
3399 # to disable features not supported by the standard. The best way
3400 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3401 # entirely and define __EXTENSIONS__ instead.
3402 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003403 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003404 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3405 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003406 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003407 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003408 define_xopen_source=no;;
3409 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003410 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003411 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003412 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003413 # On FreeBSD 4, the math functions C89 does not cover are never defined
3414 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3415 FreeBSD/4.*)
3416 define_xopen_source=no;;
3417 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3418 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3419 # identifies itself as Darwin/7.*
3420 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3421 # disables platform specific features beyond repair.
3422 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3423 # has no effect, don't bother defining them
3424 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003425 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003426 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003427 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003428 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3429 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3430 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003431 AIX/4)
3432 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003433 AIX/5)
3434 if test `uname -r` -eq 1; then
3435 define_xopen_source=no
3436 fi
3437 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003438 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3439 # defining NI_NUMERICHOST.
3440 QNX/6.3.2)
3441 define_xopen_source=no
3442 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003443
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003444esac
3445
3446if test $define_xopen_source = yes
3447then
Victor Stinner14d098d2011-09-07 22:29:43 +02003448 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003449
Victor Stinner14d098d2011-09-07 22:29:43 +02003450$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003451
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003452
3453 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3454 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3455 # several APIs are not declared. Since this is also needed in some
3456 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003457
Matthias Kloseb9621712010-04-24 17:59:49 +00003458$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003459
3460
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003461
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003462$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003463
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003464fi
3465
Christian Heimes647cd872013-12-07 23:39:33 +01003466# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3467case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003468 hp*|HP*)
3469 define_stdc_a1=yes;;
3470 *)
3471 define_stdc_a1=no;;
3472esac
3473
3474if test $define_stdc_a1 = yes
3475then
Christian Heimes647cd872013-12-07 23:39:33 +01003476
3477$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3478
Christian Heimesb02bcae2013-12-08 15:21:08 +01003479fi
Christian Heimes647cd872013-12-07 23:39:33 +01003480
Guido van Rossum91922671997-10-09 20:24:13 +00003481#
3482# SGI compilers allow the specification of the both the ABI and the
3483# ISA on the command line. Depending on the values of these switches,
3484# different and often incompatable code will be generated.
3485#
3486# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3487# thus supply support for various ABI/ISA combinations. The MACHDEP
3488# variable is also adjusted.
3489#
3490
3491if test ! -z "$SGI_ABI"
3492then
3493 CC="cc $SGI_ABI"
3494 LDFLAGS="$SGI_ABI $LDFLAGS"
3495 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3498$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003499
Jack Jansen6b08a402004-06-03 12:41:45 +00003500# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3501# it may influence the way we can build extensions, so distutils
3502# needs to check it
3503
Thomas Wouters477c8d52006-05-27 19:21:47 +00003504
Jack Jansen6b08a402004-06-03 12:41:45 +00003505CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003506EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003507
Guido van Rossum627b2d71993-12-24 10:39:16 +00003508# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003509
3510# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3511# for debug/optimization stuff. BASECFLAGS is for flags that are required
3512# just to get things to compile and link. Users are free to override OPT
3513# when running configure or make. The build should not break if they do.
3514# BASECFLAGS should generally not be messed with, however.
3515
3516# XXX shouldn't some/most/all of this code be merged with the stuff later
3517# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3519$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003521# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003522if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003523 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003524 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003525 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003526 without_gcc=yes;;
3527 yes) CC=gcc
3528 without_gcc=no;;
3529 *) CC=$withval
3530 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003531 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003532else
Martin v. Löwis11437992002-04-12 09:54:03 +00003533
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003534 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003535 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003536 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003537 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003538 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003539fi
3540
Matthias Kloseb9621712010-04-24 17:59:49 +00003541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3542$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003543
Guido van Rossum8b131c51995-03-09 14:10:13 +00003544# If the user switches compilers, we can't believe the cache
3545if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3546then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003547 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003548(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003549fi
3550
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003551# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3552# when the compiler supports them, but we don't always want -O2, and
3553# we set -g later.
3554if test -z "$CFLAGS"; then
3555 CFLAGS=
3556fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003557
3558if test "$ac_sys_system" = "Darwin"
3559then
3560 # Compiler selection on MacOSX is more complicated than
3561 # AC_PROG_CC can handle, see Mac/README.txt for more
3562 # information
3563 if test -z "${CC}"
3564 then
3565 found_gcc=
3566 found_clang=
3567 as_save_IFS=$IFS; IFS=:
3568 for as_dir in $PATH
3569 do
3570 IFS=$as_save_IFS
3571 if test -x $as_dir/gcc; then
3572 if test -z "${found_gcc}"; then
3573 found_gcc=$as_dir/gcc
3574 fi
3575 fi
3576 if test -x $as_dir/clang; then
3577 if test -z "${found_clang}"; then
3578 found_clang=$as_dir/clang
3579 fi
3580 fi
3581 done
3582 IFS=$as_save_IFS
3583
3584 if test -n "$found_gcc" -a -n "$found_clang"
3585 then
3586 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3587 then
3588 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3589$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3590 CC="$found_clang"
3591 CXX="$found_clang++"
3592 fi
3593
3594
3595 elif test -z "$found_gcc" -a -n "$found_clang"
3596 then
3597 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3598$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3599 CC="$found_clang"
3600 CXX="$found_clang++"
3601
3602 elif test -z "$found_gcc" -a -z "$found_clang"
3603 then
3604 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3605 if test -n "${found_clang}"
3606 then
3607 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3608$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3609 CC="${found_clang}"
3610 CXX="`/usr/bin/xcrun -find clang++`"
3611
3612 # else: use default behaviour
3613 fi
3614 fi
3615 fi
3616fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003617ac_ext=c
3618ac_cpp='$CPP $CPPFLAGS'
3619ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3620ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3621ac_compiler_gnu=$ac_cv_c_compiler_gnu
3622if test -n "$ac_tool_prefix"; then
3623 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3624set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3626$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003627if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003629else
3630 if test -n "$CC"; then
3631 ac_cv_prog_CC="$CC" # Let the user override the test.
3632else
Martin v. Löwis11437992002-04-12 09:54:03 +00003633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3634for as_dir in $PATH
3635do
3636 IFS=$as_save_IFS
3637 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003639 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003640 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003642 break 2
3643 fi
3644done
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003646IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003647
Jack Jansendd19cf82001-12-06 22:36:17 +00003648fi
3649fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003650CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003651if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3653$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003654else
Matthias Kloseb9621712010-04-24 17:59:49 +00003655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3656$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003657fi
3658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659
Martin v. Löwis11437992002-04-12 09:54:03 +00003660fi
3661if test -z "$ac_cv_prog_CC"; then
3662 ac_ct_CC=$CC
3663 # Extract the first word of "gcc", so it can be a program name with args.
3664set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3666$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003667if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003669else
3670 if test -n "$ac_ct_CC"; then
3671 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3672else
3673as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3674for as_dir in $PATH
3675do
3676 IFS=$as_save_IFS
3677 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003679 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003680 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 break 2
3683 fi
3684done
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003686IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003687
3688fi
3689fi
3690ac_ct_CC=$ac_cv_prog_ac_ct_CC
3691if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3693$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003694else
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3696$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003697fi
3698
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003699 if test "x$ac_ct_CC" = x; then
3700 CC=""
3701 else
3702 case $cross_compiling:$ac_tool_warned in
3703yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003704{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3705$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003706ac_tool_warned=yes ;;
3707esac
3708 CC=$ac_ct_CC
3709 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003710else
3711 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003712fi
3713
Jack Jansendd19cf82001-12-06 22:36:17 +00003714if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003715 if test -n "$ac_tool_prefix"; then
3716 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003717set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3719$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003720if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003722else
3723 if test -n "$CC"; then
3724 ac_cv_prog_CC="$CC" # Let the user override the test.
3725else
Martin v. Löwis11437992002-04-12 09:54:03 +00003726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3727for as_dir in $PATH
3728do
3729 IFS=$as_save_IFS
3730 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003733 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 break 2
3736 fi
3737done
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003740
3741fi
3742fi
3743CC=$ac_cv_prog_CC
3744if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3746$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003747else
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3749$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003750fi
3751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003752
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003754fi
3755if test -z "$CC"; then
3756 # Extract the first word of "cc", so it can be a program name with args.
3757set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3759$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003760if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003762else
3763 if test -n "$CC"; then
3764 ac_cv_prog_CC="$CC" # Let the user override the test.
3765else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003766 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3768for as_dir in $PATH
3769do
3770 IFS=$as_save_IFS
3771 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003773 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003774 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3775 ac_prog_rejected=yes
3776 continue
3777 fi
3778 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003779 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003780 break 2
3781 fi
3782done
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003784IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003785
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003786if test $ac_prog_rejected = yes; then
3787 # We found a bogon in the path, so make sure we never use it.
3788 set dummy $ac_cv_prog_CC
3789 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003790 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003791 # We chose a different compiler from the bogus one.
3792 # However, it has the same basename, so the bogon will be chosen
3793 # first if we set CC to just the basename; use the full file name.
3794 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003795 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003796 fi
3797fi
3798fi
3799fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003800CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003801if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3803$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003804else
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3806$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003807fi
3808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809
Martin v. Löwis11437992002-04-12 09:54:03 +00003810fi
3811if test -z "$CC"; then
3812 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003814 do
3815 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3816set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3818$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003819if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003821else
3822 if test -n "$CC"; then
3823 ac_cv_prog_CC="$CC" # Let the user override the test.
3824else
Martin v. Löwis11437992002-04-12 09:54:03 +00003825as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3826for as_dir in $PATH
3827do
3828 IFS=$as_save_IFS
3829 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003831 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003832 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003834 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003835 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003836done
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003839
3840fi
3841fi
3842CC=$ac_cv_prog_CC
3843if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3845$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003846else
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3848$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003849fi
3850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851
Martin v. Löwis11437992002-04-12 09:54:03 +00003852 test -n "$CC" && break
3853 done
3854fi
3855if test -z "$CC"; then
3856 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003857 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003858do
3859 # Extract the first word of "$ac_prog", so it can be a program name with args.
3860set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3862$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003863if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003865else
3866 if test -n "$ac_ct_CC"; then
3867 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3868else
3869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3870for as_dir in $PATH
3871do
3872 IFS=$as_save_IFS
3873 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003875 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003876 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003877 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003878 break 2
3879 fi
3880done
Matthias Kloseb9621712010-04-24 17:59:49 +00003881 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003883
Martin v. Löwis11437992002-04-12 09:54:03 +00003884fi
3885fi
3886ac_ct_CC=$ac_cv_prog_ac_ct_CC
3887if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3889$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003890else
Matthias Kloseb9621712010-04-24 17:59:49 +00003891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3892$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003893fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895
Martin v. Löwis11437992002-04-12 09:54:03 +00003896 test -n "$ac_ct_CC" && break
3897done
Michael W. Hudson54241132001-12-07 15:38:26 +00003898
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899 if test "x$ac_ct_CC" = x; then
3900 CC=""
3901 else
3902 case $cross_compiling:$ac_tool_warned in
3903yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003904{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3905$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003906ac_tool_warned=yes ;;
3907esac
3908 CC=$ac_ct_CC
3909 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003910fi
3911
3912fi
3913
3914
Matthias Kloseb9621712010-04-24 17:59:49 +00003915test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3916$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003917as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003918See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003919
3920# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003921$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3922set X $ac_compile
3923ac_compiler=$2
3924for ac_option in --version -v -V -qversion; do
3925 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003926case "(($ac_try" in
3927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3928 *) ac_try_echo=$ac_try;;
3929esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003930eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3931$as_echo "$ac_try_echo"; } >&5
3932 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003933 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003934 if test -s conftest.err; then
3935 sed '10a\
3936... rest of stderr output deleted ...
3937 10q' conftest.err >conftest.er1
3938 cat conftest.er1 >&5
3939 fi
3940 rm -f conftest.er1 conftest.err
3941 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3942 test $ac_status = 0; }
3943done
Martin v. Löwis11437992002-04-12 09:54:03 +00003944
Matthias Kloseb9621712010-04-24 17:59:49 +00003945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003946/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003947
Martin v. Löwis11437992002-04-12 09:54:03 +00003948int
3949main ()
3950{
3951
3952 ;
3953 return 0;
3954}
3955_ACEOF
3956ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003957ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003958# Try to create an executable without -o first, disregard a.out.
3959# It will help us diagnose broken compilers, and finding out an intuition
3960# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3962$as_echo_n "checking whether the C compiler works... " >&6; }
3963ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3964
3965# The possible output files:
3966ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3967
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968ac_rmfiles=
3969for ac_file in $ac_files
3970do
3971 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003972 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3974 esac
3975done
3976rm -f $ac_rmfiles
3977
Matthias Kloseb9621712010-04-24 17:59:49 +00003978if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979case "(($ac_try" in
3980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3981 *) ac_try_echo=$ac_try;;
3982esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003983eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3984$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003986 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003987 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3988 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3990# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3991# in a Makefile. We should not override ac_cv_exeext if it was cached,
3992# so that the user can short-circuit this test for compilers unknown to
3993# Autoconf.
3994for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003995do
3996 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003997 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003998 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003999 ;;
4000 [ab].out )
4001 # We found the default executable, but exeext='' is most
4002 # certainly right.
4003 break;;
4004 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004005 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004006 then :; else
4007 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4008 fi
4009 # We set ac_cv_exeext here because the later test for it is not
4010 # safe: cross compilers may not add the suffix if given an `-o'
4011 # argument, so we may need to know it at that point already.
4012 # Even if this section looks crufty: it has the advantage of
4013 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004014 break;;
4015 * )
4016 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004017 esac
4018done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004019test "$ac_cv_exeext" = no && ac_cv_exeext=
4020
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004021else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004022 ac_file=''
4023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004024if test -z "$ac_file"; then :
4025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4026$as_echo "no" >&6; }
4027$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004028sed 's/^/| /' conftest.$ac_ext >&5
4029
Matthias Kloseb9621712010-04-24 17:59:49 +00004030{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4031$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004032as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004033See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004034else
4035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4036$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4039$as_echo_n "checking for C compiler default output file name... " >&6; }
4040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4041$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004042ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004043
Matthias Kloseb9621712010-04-24 17:59:49 +00004044rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4047$as_echo_n "checking for suffix of executables... " >&6; }
4048if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004049case "(($ac_try" in
4050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4051 *) ac_try_echo=$ac_try;;
4052esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004053eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4054$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004055 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004056 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004057 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4058 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004059 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4060# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4061# work properly (i.e., refer to `conftest.exe'), while it won't with
4062# `rm'.
4063for ac_file in conftest.exe conftest conftest.*; do
4064 test -f "$ac_file" || continue
4065 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004066 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004067 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4068 break;;
4069 * ) break;;
4070 esac
4071done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004072else
Matthias Kloseb9621712010-04-24 17:59:49 +00004073 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4074$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004075as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004076See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004078rm -f conftest conftest$ac_cv_exeext
4079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4080$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004081
4082rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004083EXEEXT=$ac_cv_exeext
4084ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4086/* end confdefs.h. */
4087#include <stdio.h>
4088int
4089main ()
4090{
4091FILE *f = fopen ("conftest.out", "w");
4092 return ferror (f) || fclose (f) != 0;
4093
4094 ;
4095 return 0;
4096}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004098ac_clean_files="$ac_clean_files conftest.out"
4099# Check that the compiler produces executables we can run. If not, either
4100# the compiler is broken, or we cross compile.
4101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4102$as_echo_n "checking whether we are cross compiling... " >&6; }
4103if test "$cross_compiling" != yes; then
4104 { { ac_try="$ac_link"
4105case "(($ac_try" in
4106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4107 *) ac_try_echo=$ac_try;;
4108esac
4109eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4110$as_echo "$ac_try_echo"; } >&5
4111 (eval "$ac_link") 2>&5
4112 ac_status=$?
4113 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4114 test $ac_status = 0; }
4115 if { ac_try='./conftest$ac_cv_exeext'
4116 { { case "(($ac_try" in
4117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4118 *) ac_try_echo=$ac_try;;
4119esac
4120eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4121$as_echo "$ac_try_echo"; } >&5
4122 (eval "$ac_try") 2>&5
4123 ac_status=$?
4124 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4125 test $ac_status = 0; }; }; then
4126 cross_compiling=no
4127 else
4128 if test "$cross_compiling" = maybe; then
4129 cross_compiling=yes
4130 else
4131 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4132$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004133as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004134If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004135See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 fi
4137 fi
4138fi
4139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4140$as_echo "$cross_compiling" >&6; }
4141
4142rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4143ac_clean_files=$ac_clean_files_save
4144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4145$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004146if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004147 $as_echo_n "(cached) " >&6
4148else
4149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004150/* end confdefs.h. */
4151
4152int
4153main ()
4154{
4155
4156 ;
4157 return 0;
4158}
4159_ACEOF
4160rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004161if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004162case "(($ac_try" in
4163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4164 *) ac_try_echo=$ac_try;;
4165esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004166eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4167$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004168 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004169 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4171 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004172 for ac_file in conftest.o conftest.obj conftest.*; do
4173 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004174 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004175 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004176 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4177 break;;
4178 esac
4179done
4180else
Matthias Kloseb9621712010-04-24 17:59:49 +00004181 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004182sed 's/^/| /' conftest.$ac_ext >&5
4183
Matthias Kloseb9621712010-04-24 17:59:49 +00004184{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4185$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004186as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004187See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004188fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004189rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004190fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4192$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004193OBJEXT=$ac_cv_objext
4194ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4196$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004197if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004198 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004199else
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004202
Martin v. Löwis11437992002-04-12 09:54:03 +00004203int
4204main ()
4205{
4206#ifndef __GNUC__
4207 choke me
4208#endif
4209
4210 ;
4211 return 0;
4212}
4213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004214if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004215 ac_compiler_gnu=yes
4216else
Matthias Kloseb9621712010-04-24 17:59:49 +00004217 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004220ac_cv_c_compiler_gnu=$ac_compiler_gnu
4221
4222fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4224$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4225if test $ac_compiler_gnu = yes; then
4226 GCC=yes
4227else
4228 GCC=
4229fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004230ac_test_CFLAGS=${CFLAGS+set}
4231ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4233$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004234if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004235 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004236else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237 ac_save_c_werror_flag=$ac_c_werror_flag
4238 ac_c_werror_flag=yes
4239 ac_cv_prog_cc_g=no
4240 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004242/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004243
Martin v. Löwis11437992002-04-12 09:54:03 +00004244int
4245main ()
4246{
4247
4248 ;
4249 return 0;
4250}
4251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004252if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004253 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004254else
Matthias Kloseb9621712010-04-24 17:59:49 +00004255 CFLAGS=""
4256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257/* end confdefs.h. */
4258
4259int
4260main ()
4261{
4262
4263 ;
4264 return 0;
4265}
4266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004267if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004268
Matthias Kloseb9621712010-04-24 17:59:49 +00004269else
4270 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273/* end confdefs.h. */
4274
4275int
4276main ()
4277{
4278
4279 ;
4280 return 0;
4281}
4282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004283if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004284 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4291 ac_c_werror_flag=$ac_save_c_werror_flag
4292fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4294$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004295if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004296 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004297elif test $ac_cv_prog_cc_g = yes; then
4298 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004299 CFLAGS="-g -O2"
4300 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004301 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004302 fi
4303else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004304 if test "$GCC" = yes; then
4305 CFLAGS="-O2"
4306 else
4307 CFLAGS=
4308 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4311$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004312if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004313 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004314else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004315 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004316ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004318/* end confdefs.h. */
4319#include <stdarg.h>
4320#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004321struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004322/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4323struct buf { int x; };
4324FILE * (*rcsopen) (struct buf *, struct stat *, int);
4325static char *e (p, i)
4326 char **p;
4327 int i;
4328{
4329 return p[i];
4330}
4331static char *f (char * (*g) (char **, int), char **p, ...)
4332{
4333 char *s;
4334 va_list v;
4335 va_start (v,p);
4336 s = g (p, va_arg (v,int));
4337 va_end (v);
4338 return s;
4339}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004340
4341/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4342 function prototypes and stuff, but not '\xHH' hex character constants.
4343 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004345 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4346 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004348int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4349
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004350/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4351 inside strings and character constants. */
4352#define FOO(x) 'x'
4353int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4354
Skip Montanaro6dead952003-09-25 14:50:04 +00004355int test (int i, double x);
4356struct s1 {int (*f) (int a);};
4357struct s2 {int (*f) (double a);};
4358int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4359int argc;
4360char **argv;
4361int
4362main ()
4363{
4364return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4365 ;
4366 return 0;
4367}
4368_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4370 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004371do
4372 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004373 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004374 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376rm -f core conftest.err conftest.$ac_objext
4377 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004378done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004380CC=$ac_save_CC
4381
4382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004383# AC_CACHE_VAL
4384case "x$ac_cv_prog_cc_c89" in
4385 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4387$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004388 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4390$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004391 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004392 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4394$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004395esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004396if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004397
Matthias Kloseb9621712010-04-24 17:59:49 +00004398fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004399
Martin v. Löwis11437992002-04-12 09:54:03 +00004400ac_ext=c
4401ac_cpp='$CPP $CPPFLAGS'
4402ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4403ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4404ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004405
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004406
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004407
4408
Matthias Kloseb9621712010-04-24 17:59:49 +00004409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4410$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004411
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004412# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004413if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004414 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004415
4416 case $withval in
4417 no) with_cxx_main=no
4418 MAINCC='$(CC)';;
4419 yes) with_cxx_main=yes
4420 MAINCC='$(CXX)';;
4421 *) with_cxx_main=yes
4422 MAINCC=$withval
4423 if test -z "$CXX"
4424 then
4425 CXX=$withval
4426 fi;;
4427 esac
4428else
4429
4430 with_cxx_main=no
4431 MAINCC='$(CC)'
4432
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004433fi
4434
Matthias Kloseb9621712010-04-24 17:59:49 +00004435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4436$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004437
4438preset_cxx="$CXX"
4439if test -z "$CXX"
4440then
4441 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004442 gcc) if test -n "$ac_tool_prefix"; then
4443 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4444set dummy ${ac_tool_prefix}g++; ac_word=$2
4445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4446$as_echo_n "checking for $ac_word... " >&6; }
4447if ${ac_cv_path_CXX+:} false; then :
4448 $as_echo_n "(cached) " >&6
4449else
4450 case $CXX in
4451 [\\/]* | ?:[\\/]*)
4452 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4453 ;;
4454 *)
4455 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4456for as_dir in notfound
4457do
4458 IFS=$as_save_IFS
4459 test -z "$as_dir" && as_dir=.
4460 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004461 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004462 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4463 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4464 break 2
4465 fi
4466done
4467 done
4468IFS=$as_save_IFS
4469
4470 ;;
4471esac
4472fi
4473CXX=$ac_cv_path_CXX
4474if test -n "$CXX"; then
4475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4476$as_echo "$CXX" >&6; }
4477else
4478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4479$as_echo "no" >&6; }
4480fi
4481
4482
4483fi
4484if test -z "$ac_cv_path_CXX"; then
4485 ac_pt_CXX=$CXX
4486 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004487set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4489$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004490if ${ac_cv_path_ac_pt_CXX+:} false; then :
4491 $as_echo_n "(cached) " >&6
4492else
4493 case $ac_pt_CXX in
4494 [\\/]* | ?:[\\/]*)
4495 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4496 ;;
4497 *)
4498 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4499for as_dir in notfound
4500do
4501 IFS=$as_save_IFS
4502 test -z "$as_dir" && as_dir=.
4503 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004504 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004505 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4506 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4507 break 2
4508 fi
4509done
4510 done
4511IFS=$as_save_IFS
4512
4513 ;;
4514esac
4515fi
4516ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4517if test -n "$ac_pt_CXX"; then
4518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4519$as_echo "$ac_pt_CXX" >&6; }
4520else
4521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4522$as_echo "no" >&6; }
4523fi
4524
4525 if test "x$ac_pt_CXX" = x; then
4526 CXX="g++"
4527 else
4528 case $cross_compiling:$ac_tool_warned in
4529yes:)
4530{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4531$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4532ac_tool_warned=yes ;;
4533esac
4534 CXX=$ac_pt_CXX
4535 fi
4536else
4537 CXX="$ac_cv_path_CXX"
4538fi
4539 ;;
4540 cc) if test -n "$ac_tool_prefix"; then
4541 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4542set dummy ${ac_tool_prefix}c++; ac_word=$2
4543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4544$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004545if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004546 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004547else
4548 case $CXX in
4549 [\\/]* | ?:[\\/]*)
4550 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4551 ;;
4552 *)
4553 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4554for as_dir in notfound
4555do
4556 IFS=$as_save_IFS
4557 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004558 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004559 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004560 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004561 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004562 break 2
4563 fi
4564done
Matthias Kloseb9621712010-04-24 17:59:49 +00004565 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004566IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004567
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004568 ;;
4569esac
4570fi
4571CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004572if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4574$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004575else
Matthias Kloseb9621712010-04-24 17:59:49 +00004576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4577$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004579
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004580
4581fi
4582if test -z "$ac_cv_path_CXX"; then
4583 ac_pt_CXX=$CXX
4584 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004585set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4587$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004588if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004589 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004590else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004591 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004592 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004593 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004594 ;;
4595 *)
4596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4597for as_dir in notfound
4598do
4599 IFS=$as_save_IFS
4600 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004601 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004602 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004603 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004604 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004605 break 2
4606 fi
4607done
Matthias Kloseb9621712010-04-24 17:59:49 +00004608 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004609IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004610
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004611 ;;
4612esac
4613fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004614ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4615if test -n "$ac_pt_CXX"; then
4616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4617$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004618else
Matthias Kloseb9621712010-04-24 17:59:49 +00004619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4620$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004622
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004623 if test "x$ac_pt_CXX" = x; then
4624 CXX="c++"
4625 else
4626 case $cross_compiling:$ac_tool_warned in
4627yes:)
4628{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4629$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4630ac_tool_warned=yes ;;
4631esac
4632 CXX=$ac_pt_CXX
4633 fi
4634else
4635 CXX="$ac_cv_path_CXX"
4636fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004637 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004638 clang|*/clang) if test -n "$ac_tool_prefix"; then
4639 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4640set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4642$as_echo_n "checking for $ac_word... " >&6; }
4643if ${ac_cv_path_CXX+:} false; then :
4644 $as_echo_n "(cached) " >&6
4645else
4646 case $CXX in
4647 [\\/]* | ?:[\\/]*)
4648 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4649 ;;
4650 *)
4651 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4652for as_dir in notfound
4653do
4654 IFS=$as_save_IFS
4655 test -z "$as_dir" && as_dir=.
4656 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004657 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004658 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4659 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4660 break 2
4661 fi
4662done
4663 done
4664IFS=$as_save_IFS
4665
Ned Deilycbfb9a52012-06-23 16:02:19 -07004666 ;;
4667esac
4668fi
4669CXX=$ac_cv_path_CXX
4670if test -n "$CXX"; then
4671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4672$as_echo "$CXX" >&6; }
4673else
4674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4675$as_echo "no" >&6; }
4676fi
4677
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004678
4679fi
4680if test -z "$ac_cv_path_CXX"; then
4681 ac_pt_CXX=$CXX
4682 # Extract the first word of "clang++", so it can be a program name with args.
4683set dummy clang++; ac_word=$2
4684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4685$as_echo_n "checking for $ac_word... " >&6; }
4686if ${ac_cv_path_ac_pt_CXX+:} false; then :
4687 $as_echo_n "(cached) " >&6
4688else
4689 case $ac_pt_CXX in
4690 [\\/]* | ?:[\\/]*)
4691 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4692 ;;
4693 *)
4694 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4695for as_dir in notfound
4696do
4697 IFS=$as_save_IFS
4698 test -z "$as_dir" && as_dir=.
4699 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004700 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004701 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4702 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4703 break 2
4704 fi
4705done
4706 done
4707IFS=$as_save_IFS
4708
4709 ;;
4710esac
4711fi
4712ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4713if test -n "$ac_pt_CXX"; then
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4715$as_echo "$ac_pt_CXX" >&6; }
4716else
4717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4718$as_echo "no" >&6; }
4719fi
4720
4721 if test "x$ac_pt_CXX" = x; then
4722 CXX="clang++"
4723 else
4724 case $cross_compiling:$ac_tool_warned in
4725yes:)
4726{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4727$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4728ac_tool_warned=yes ;;
4729esac
4730 CXX=$ac_pt_CXX
4731 fi
4732else
4733 CXX="$ac_cv_path_CXX"
4734fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004735 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004736 esac
4737 if test "$CXX" = "notfound"
4738 then
4739 CXX=""
4740 fi
4741fi
4742if test -z "$CXX"
4743then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004744 if test -n "$ac_tool_prefix"; then
4745 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4746 do
4747 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4748set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4750$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004751if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004752 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004753else
4754 if test -n "$CXX"; then
4755 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4756else
4757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4758for as_dir in $PATH
4759do
4760 IFS=$as_save_IFS
4761 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004762 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004763 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004764 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004766 break 2
4767 fi
4768done
Matthias Kloseb9621712010-04-24 17:59:49 +00004769 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004770IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004771
4772fi
4773fi
4774CXX=$ac_cv_prog_CXX
4775if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4777$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004778else
Matthias Kloseb9621712010-04-24 17:59:49 +00004779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4780$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004781fi
4782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004783
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004784 test -n "$CXX" && break
4785 done
4786fi
4787if test -z "$CXX"; then
4788 ac_ct_CXX=$CXX
4789 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4790do
4791 # Extract the first word of "$ac_prog", so it can be a program name with args.
4792set dummy $ac_prog; ac_word=$2
4793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4794$as_echo_n "checking for $ac_word... " >&6; }
4795if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4796 $as_echo_n "(cached) " >&6
4797else
4798 if test -n "$ac_ct_CXX"; then
4799 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4800else
4801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4802for as_dir in $PATH
4803do
4804 IFS=$as_save_IFS
4805 test -z "$as_dir" && as_dir=.
4806 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004807 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004808 ac_cv_prog_ac_ct_CXX="$ac_prog"
4809 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4810 break 2
4811 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004813 done
4814IFS=$as_save_IFS
4815
4816fi
4817fi
4818ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4819if test -n "$ac_ct_CXX"; then
4820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4821$as_echo "$ac_ct_CXX" >&6; }
4822else
4823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4824$as_echo "no" >&6; }
4825fi
4826
4827
4828 test -n "$ac_ct_CXX" && break
4829done
4830
4831 if test "x$ac_ct_CXX" = x; then
4832 CXX="notfound"
4833 else
4834 case $cross_compiling:$ac_tool_warned in
4835yes:)
4836{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4837$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4838ac_tool_warned=yes ;;
4839esac
4840 CXX=$ac_ct_CXX
4841 fi
4842fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004843
4844 if test "$CXX" = "notfound"
4845 then
4846 CXX=""
4847 fi
4848fi
4849if test "$preset_cxx" != "$CXX"
4850then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004851 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004852
4853 By default, distutils will build C++ extension modules with \"$CXX\".
4854 If this is not intended, then set CXX on the configure command line.
4855 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004856$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004857
4858 By default, distutils will build C++ extension modules with \"$CXX\".
4859 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004860 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004861fi
4862
4863
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4865$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4866save_LDFLAGS="$LDFLAGS"
4867LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004868
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4870/* end confdefs.h. */
4871
4872int
4873main ()
4874{
4875
4876 ;
4877 return 0;
4878}
4879_ACEOF
4880if ac_fn_c_try_link "$LINENO"; then :
4881 NO_AS_NEEDED="-Wl,--no-as-needed"
4882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4883$as_echo "yes" >&6; }
4884else
4885 NO_AS_NEEDED=""
4886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4887$as_echo "no" >&6; }
4888fi
4889rm -f core conftest.err conftest.$ac_objext \
4890 conftest$ac_exeext conftest.$ac_ext
4891LDFLAGS="$save_LDFLAGS"
4892
4893
4894
4895# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004896ac_ext=c
4897ac_cpp='$CPP $CPPFLAGS'
4898ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4899ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4900ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4902$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004903# On Suns, sometimes $CPP names a directory.
4904if test -n "$CPP" && test -d "$CPP"; then
4905 CPP=
4906fi
4907if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004908 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004909 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004910else
Martin v. Löwis11437992002-04-12 09:54:03 +00004911 # Double quotes because CPP needs to be expanded
4912 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4913 do
4914 ac_preproc_ok=false
4915for ac_c_preproc_warn_flag in '' yes
4916do
4917 # Use a header file that comes with gcc, so configuring glibc
4918 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004919 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4920 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004921 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004922 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004924/* end confdefs.h. */
4925#ifdef __STDC__
4926# include <limits.h>
4927#else
4928# include <assert.h>
4929#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004930 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004932if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004933
Matthias Kloseb9621712010-04-24 17:59:49 +00004934else
Martin v. Löwis11437992002-04-12 09:54:03 +00004935 # Broken: fails on valid input.
4936continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004937fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004938rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004939
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004940 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004941 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004943/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004944#include <ac_nonexistent.h>
4945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004946if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004947 # Broken: success on invalid input.
4948continue
4949else
Martin v. Löwis11437992002-04-12 09:54:03 +00004950 # Passes both tests.
4951ac_preproc_ok=:
4952break
4953fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004954rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004955
4956done
4957# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004958rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004959if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004960 break
4961fi
4962
4963 done
4964 ac_cv_prog_CPP=$CPP
4965
4966fi
4967 CPP=$ac_cv_prog_CPP
4968else
4969 ac_cv_prog_CPP=$CPP
4970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4972$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004973ac_preproc_ok=false
4974for ac_c_preproc_warn_flag in '' yes
4975do
4976 # Use a header file that comes with gcc, so configuring glibc
4977 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004978 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4979 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004980 # On the NeXT, cc -E runs the code through the compiler's parser,
4981 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004983/* end confdefs.h. */
4984#ifdef __STDC__
4985# include <limits.h>
4986#else
4987# include <assert.h>
4988#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004989 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004991if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004992
Matthias Kloseb9621712010-04-24 17:59:49 +00004993else
Martin v. Löwis11437992002-04-12 09:54:03 +00004994 # Broken: fails on valid input.
4995continue
4996fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004997rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004999 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00005000 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00005001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00005002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005003#include <ac_nonexistent.h>
5004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005005if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00005006 # Broken: success on invalid input.
5007continue
5008else
Martin v. Löwis11437992002-04-12 09:54:03 +00005009 # Passes both tests.
5010ac_preproc_ok=:
5011break
5012fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005013rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005014
5015done
5016# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005017rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005018if $ac_preproc_ok; then :
5019
Martin v. Löwis11437992002-04-12 09:54:03 +00005020else
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5022$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005023as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02005024See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005025fi
5026
5027ac_ext=c
5028ac_cpp='$CPP $CPPFLAGS'
5029ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5030ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5031ac_compiler_gnu=$ac_cv_c_compiler_gnu
5032
5033
Matthias Kloseb9621712010-04-24 17:59:49 +00005034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5035$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005036if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00005038else
Matthias Kloseb9621712010-04-24 17:59:49 +00005039 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005040 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 # Loop through the user's path and test for each of PROGNAME-LIST
5042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005043for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5044do
5045 IFS=$as_save_IFS
5046 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 for ac_prog in grep ggrep; do
5048 for ac_exec_ext in '' $ac_executable_extensions; do
5049 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005050 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005051# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005052 # Check for GNU $ac_path_GREP
5053case `"$ac_path_GREP" --version 2>&1` in
5054*GNU*)
5055 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5056*)
5057 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005059 while :
5060 do
5061 cat "conftest.in" "conftest.in" >"conftest.tmp"
5062 mv "conftest.tmp" "conftest.in"
5063 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005064 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005065 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5066 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005067 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005068 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5069 # Best one so far, save it but keep looking for a better one
5070 ac_cv_path_GREP="$ac_path_GREP"
5071 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005072 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005073 # 10*(2^10) chars as input seems more than enough
5074 test $ac_count -gt 10 && break
5075 done
5076 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5077esac
5078
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 $ac_path_GREP_found && break 3
5080 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005081 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005083IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005084 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005085 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005087else
5088 ac_cv_path_GREP=$GREP
5089fi
5090
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005091fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5093$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005094 GREP="$ac_cv_path_GREP"
5095
5096
Matthias Kloseb9621712010-04-24 17:59:49 +00005097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5098$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005099if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005101else
5102 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5103 then ac_cv_path_EGREP="$GREP -E"
5104 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005105 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005106 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 # Loop through the user's path and test for each of PROGNAME-LIST
5108 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005109for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5110do
5111 IFS=$as_save_IFS
5112 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 for ac_prog in egrep; do
5114 for ac_exec_ext in '' $ac_executable_extensions; do
5115 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005116 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005117# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005118 # Check for GNU $ac_path_EGREP
5119case `"$ac_path_EGREP" --version 2>&1` in
5120*GNU*)
5121 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5122*)
5123 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005124 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005125 while :
5126 do
5127 cat "conftest.in" "conftest.in" >"conftest.tmp"
5128 mv "conftest.tmp" "conftest.in"
5129 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005131 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5132 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005134 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5135 # Best one so far, save it but keep looking for a better one
5136 ac_cv_path_EGREP="$ac_path_EGREP"
5137 ac_path_EGREP_max=$ac_count
5138 fi
5139 # 10*(2^10) chars as input seems more than enough
5140 test $ac_count -gt 10 && break
5141 done
5142 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5143esac
5144
Matthias Kloseb9621712010-04-24 17:59:49 +00005145 $ac_path_EGREP_found && break 3
5146 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005147 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005148 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005149IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005150 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005151 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005152 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005153else
5154 ac_cv_path_EGREP=$EGREP
5155fi
5156
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005157 fi
5158fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5160$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005161 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005162
5163
Matthias Kloseb9621712010-04-24 17:59:49 +00005164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5165$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005166if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005167 $as_echo_n "(cached) " >&6
5168else
5169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005170/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005171#include <stdlib.h>
5172#include <stdarg.h>
5173#include <string.h>
5174#include <float.h>
5175
5176int
5177main ()
5178{
5179
5180 ;
5181 return 0;
5182}
5183_ACEOF
5184if ac_fn_c_try_compile "$LINENO"; then :
5185 ac_cv_header_stdc=yes
5186else
5187 ac_cv_header_stdc=no
5188fi
5189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5190
5191if test $ac_cv_header_stdc = yes; then
5192 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5194/* end confdefs.h. */
5195#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005196
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005197_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005198if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005199 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005200
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005201else
Matthias Kloseb9621712010-04-24 17:59:49 +00005202 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005203fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005204rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005205
Matthias Kloseb9621712010-04-24 17:59:49 +00005206fi
5207
5208if test $ac_cv_header_stdc = yes; then
5209 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5211/* end confdefs.h. */
5212#include <stdlib.h>
5213
5214_ACEOF
5215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5216 $EGREP "free" >/dev/null 2>&1; then :
5217
5218else
5219 ac_cv_header_stdc=no
5220fi
5221rm -f conftest*
5222
5223fi
5224
5225if test $ac_cv_header_stdc = yes; then
5226 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5227 if test "$cross_compiling" = yes; then :
5228 :
5229else
5230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5231/* end confdefs.h. */
5232#include <ctype.h>
5233#include <stdlib.h>
5234#if ((' ' & 0x0FF) == 0x020)
5235# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5236# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5237#else
5238# define ISLOWER(c) \
5239 (('a' <= (c) && (c) <= 'i') \
5240 || ('j' <= (c) && (c) <= 'r') \
5241 || ('s' <= (c) && (c) <= 'z'))
5242# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5243#endif
5244
5245#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5246int
5247main ()
5248{
5249 int i;
5250 for (i = 0; i < 256; i++)
5251 if (XOR (islower (i), ISLOWER (i))
5252 || toupper (i) != TOUPPER (i))
5253 return 2;
5254 return 0;
5255}
5256_ACEOF
5257if ac_fn_c_try_run "$LINENO"; then :
5258
5259else
5260 ac_cv_header_stdc=no
5261fi
5262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5263 conftest.$ac_objext conftest.beam conftest.$ac_ext
5264fi
5265
5266fi
5267fi
5268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5269$as_echo "$ac_cv_header_stdc" >&6; }
5270if test $ac_cv_header_stdc = yes; then
5271
5272$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5273
5274fi
5275
5276# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5277for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5278 inttypes.h stdint.h unistd.h
5279do :
5280 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5281ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5282"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005283if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005284 cat >>confdefs.h <<_ACEOF
5285#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5286_ACEOF
5287
5288fi
5289
5290done
5291
5292
5293
5294 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02005295if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005296 MINIX=yes
5297else
5298 MINIX=
5299fi
5300
5301
5302 if test "$MINIX" = yes; then
5303
5304$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5305
5306
5307$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5308
5309
5310$as_echo "#define _MINIX 1" >>confdefs.h
5311
5312 fi
5313
5314
5315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5316$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005317if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005318 $as_echo_n "(cached) " >&6
5319else
5320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5321/* end confdefs.h. */
5322
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005323# define __EXTENSIONS__ 1
5324 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005325int
5326main ()
5327{
5328
5329 ;
5330 return 0;
5331}
5332_ACEOF
5333if ac_fn_c_try_compile "$LINENO"; then :
5334 ac_cv_safe_to_define___extensions__=yes
5335else
5336 ac_cv_safe_to_define___extensions__=no
5337fi
5338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5339fi
5340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5341$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5342 test $ac_cv_safe_to_define___extensions__ = yes &&
5343 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5344
5345 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5346
5347 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5348
5349 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5350
5351 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5352
5353
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005354
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005355# Check for unsupported systems
5356case $ac_sys_system/$ac_sys_release in
5357atheos*|Linux*/1*)
5358 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5359 echo See README for details.
5360 exit 1;;
5361esac
5362
5363
Matthias Kloseb9621712010-04-24 17:59:49 +00005364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5365$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005366
5367# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005368if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369 withval=$with_suffix;
5370 case $withval in
5371 no) EXEEXT=;;
5372 yes) EXEEXT=.exe;;
5373 *) EXEEXT=$withval;;
5374 esac
5375fi
5376
Matthias Kloseb9621712010-04-24 17:59:49 +00005377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5378$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005379
5380# Test whether we're running on a non-case-sensitive system, in which
5381# case we give a warning if no ext is given
5382
Matthias Kloseb9621712010-04-24 17:59:49 +00005383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5384$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005385if test ! -d CaseSensitiveTestDir; then
5386mkdir CaseSensitiveTestDir
5387fi
5388
5389if test -d casesensitivetestdir
5390then
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5392$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005393 BUILDEXEEXT=.exe
5394else
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5396$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005397 BUILDEXEEXT=$EXEEXT
5398fi
5399rmdir CaseSensitiveTestDir
5400
5401case $MACHDEP in
5402bsdos*)
5403 case $CC in
5404 gcc) CC="$CC -D_HAVE_BSDI";;
5405 esac;;
5406esac
5407
5408case $ac_sys_system in
5409hp*|HP*)
5410 case $CC in
5411 cc|*/cc) CC="$CC -Ae";;
5412 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005413esac
5414
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005415MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5416
5417
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418
5419
Matthias Kloseb9621712010-04-24 17:59:49 +00005420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5421$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422if test -z "$LIBRARY"
5423then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005424 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5427$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005428
5429# LDLIBRARY is the name of the library to link against (as opposed to the
5430# name of the library into which to insert object files). BLDLIBRARY is also
5431# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5432# is blank as the main program is not linked directly against LDLIBRARY.
5433# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5434# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5435# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5436# DLLLIBRARY is the shared (i.e., DLL) library.
5437#
5438# RUNSHARED is used to run shared python without installed libraries
5439#
5440# INSTSONAME is the name of the shared library that will be use to install
5441# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005442#
5443# LDVERSION is the shared library version number, normally the Python version
5444# with the ABI build flags appended.
5445
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005446
5447
5448
5449
5450
5451
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005452
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453LDLIBRARY="$LIBRARY"
5454BLDLIBRARY='$(LDLIBRARY)'
5455INSTSONAME='$(LDLIBRARY)'
5456DLLLIBRARY=''
5457LDLIBRARYDIR=''
5458RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005459LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005460
5461# LINKCC is the command that links the python executable -- default is $(CC).
5462# If CXX is set, and if it is needed to link a main function that was
5463# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5464# python might then depend on the C++ runtime
5465# This is altered for AIX in order to build the export list before
5466# linking.
5467
Matthias Kloseb9621712010-04-24 17:59:49 +00005468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5469$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005470if test -z "$LINKCC"
5471then
5472 LINKCC='$(PURIFY) $(MAINCC)'
5473 case $ac_sys_system in
5474 AIX*)
5475 exp_extra="\"\""
5476 if test $ac_sys_release -ge 5 -o \
5477 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5478 exp_extra="."
5479 fi
5480 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005481 QNX*)
5482 # qcc must be used because the other compilers do not
5483 # support -N.
5484 LINKCC=qcc;;
5485 esac
5486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5488$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005489
5490# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5491# make sure we default having it set to "no": this is used by
5492# distutils.unixccompiler to know if it should add --enable-new-dtags
5493# to linker command lines, and failing to detect GNU ld simply results
5494# in the same bahaviour as before.
5495
Matthias Kloseb9621712010-04-24 17:59:49 +00005496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5497$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005498ac_prog=ld
5499if test "$GCC" = yes; then
5500 ac_prog=`$CC -print-prog-name=ld`
5501fi
5502case `"$ac_prog" -V 2>&1 < /dev/null` in
5503 *GNU*)
5504 GNULD=yes;;
5505 *)
5506 GNULD=no;;
5507esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5509$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005510
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5512$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005513if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005514 $as_echo_n "(cached) " >&6
5515else
5516 ac_cv_c_inline=no
5517for ac_kw in inline __inline__ __inline; do
5518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5519/* end confdefs.h. */
5520#ifndef __cplusplus
5521typedef int foo_t;
5522static $ac_kw foo_t static_foo () {return 0; }
5523$ac_kw foo_t foo () {return 0; }
5524#endif
5525
5526_ACEOF
5527if ac_fn_c_try_compile "$LINENO"; then :
5528 ac_cv_c_inline=$ac_kw
5529fi
5530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5531 test "$ac_cv_c_inline" != no && break
5532done
5533
5534fi
5535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5536$as_echo "$ac_cv_c_inline" >&6; }
5537
5538case $ac_cv_c_inline in
5539 inline | yes) ;;
5540 *)
5541 case $ac_cv_c_inline in
5542 no) ac_val=;;
5543 *) ac_val=$ac_cv_c_inline;;
5544 esac
5545 cat >>confdefs.h <<_ACEOF
5546#ifndef __cplusplus
5547#define inline $ac_val
5548#endif
5549_ACEOF
5550 ;;
5551esac
5552
5553if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005554
5555$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005556
5557
5558fi
5559
5560
Matthias Kloseb9621712010-04-24 17:59:49 +00005561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5562$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005563# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005564if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005565 enableval=$enable_shared;
5566fi
5567
5568
5569if test -z "$enable_shared"
5570then
5571 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005572 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005573 enable_shared="yes";;
5574 *)
5575 enable_shared="no";;
5576 esac
5577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5579$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005580
Matthias Kloseb9621712010-04-24 17:59:49 +00005581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5582$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005583# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005584if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005585 enableval=$enable_profiling;
5586fi
5587
5588if test "x$enable_profiling" = xyes; then
5589 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005590 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005592/* end confdefs.h. */
5593int main() { return 0; }
5594_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005595if ac_fn_c_try_link "$LINENO"; then :
5596
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005598 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005600rm -f core conftest.err conftest.$ac_objext \
5601 conftest$ac_exeext conftest.$ac_ext
5602 CC="$ac_save_cc"
5603else
5604 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005605fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5607$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608
doko@ubuntu.comba015832012-06-30 16:52:05 +02005609if test "x$enable_profiling" = xyes; then
5610 BASECFLAGS="-pg $BASECFLAGS"
5611 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005612fi
5613
Matthias Kloseb9621712010-04-24 17:59:49 +00005614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5615$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616
5617# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5618# library that we build, but we do not want to link against it (we
5619# will find it with a -framework option). For this reason there is an
5620# extra variable BLDLIBRARY against which Python and the extension
5621# modules are linked, BLDLIBRARY. This is normally the same as
5622# LDLIBRARY, but empty for MacOSX framework builds.
5623if test "$enable_framework"
5624then
5625 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005626 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627 BLDLIBRARY=''
5628else
5629 BLDLIBRARY='$(LDLIBRARY)'
5630fi
5631
5632# Other platforms follow
5633if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005634 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635
Matthias Kloseb9621712010-04-24 17:59:49 +00005636$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005637
5638 case $ac_sys_system in
5639 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005640 LDLIBRARY='libpython$(LDVERSION).dll.a'
5641 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005642 ;;
5643 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005644 LDLIBRARY='libpython$(LDVERSION).so'
5645 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005646 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005648 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005649 then
5650 PY3LIBRARY=libpython3.so
5651 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005653 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005654 LDLIBRARY='libpython$(LDVERSION).so'
5655 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005656 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657 case $ac_sys_system in
5658 FreeBSD*)
5659 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5660 ;;
5661 esac
5662 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005663 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005664 then
5665 PY3LIBRARY=libpython3.so
5666 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667 ;;
5668 hp*|HP*)
5669 case `uname -m` in
5670 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005671 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672 ;;
5673 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005674 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675 ;;
5676 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005677 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005678 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005681 LDLIBRARY='libpython$(LDVERSION).dylib'
5682 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005683 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005685 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005686 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005687 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005688 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
5690 esac
5691else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005692 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693 case $ac_sys_system in
5694 CYGWIN*)
5695 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005696 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697 ;;
5698 esac
5699fi
5700
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005701if test "$cross_compiling" = yes; then
5702 RUNSHARED=
5703fi
5704
Matthias Kloseb9621712010-04-24 17:59:49 +00005705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5706$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707
5708if test -n "$ac_tool_prefix"; then
5709 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5710set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5712$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005713if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005714 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715else
5716 if test -n "$RANLIB"; then
5717 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5718else
5719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5720for as_dir in $PATH
5721do
5722 IFS=$as_save_IFS
5723 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005724 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005727 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728 break 2
5729 fi
5730done
Matthias Kloseb9621712010-04-24 17:59:49 +00005731 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732IFS=$as_save_IFS
5733
5734fi
5735fi
5736RANLIB=$ac_cv_prog_RANLIB
5737if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5739$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740else
Matthias Kloseb9621712010-04-24 17:59:49 +00005741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5742$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743fi
5744
5745
5746fi
5747if test -z "$ac_cv_prog_RANLIB"; then
5748 ac_ct_RANLIB=$RANLIB
5749 # Extract the first word of "ranlib", so it can be a program name with args.
5750set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5752$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005753if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005754 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755else
5756 if test -n "$ac_ct_RANLIB"; then
5757 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5758else
5759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5760for as_dir in $PATH
5761do
5762 IFS=$as_save_IFS
5763 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005765 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005767 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768 break 2
5769 fi
5770done
Matthias Kloseb9621712010-04-24 17:59:49 +00005771 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772IFS=$as_save_IFS
5773
5774fi
5775fi
5776ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5777if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5779$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780else
Matthias Kloseb9621712010-04-24 17:59:49 +00005781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5782$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783fi
5784
5785 if test "x$ac_ct_RANLIB" = x; then
5786 RANLIB=":"
5787 else
5788 case $cross_compiling:$ac_tool_warned in
5789yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005790{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5791$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792ac_tool_warned=yes ;;
5793esac
5794 RANLIB=$ac_ct_RANLIB
5795 fi
5796else
5797 RANLIB="$ac_cv_prog_RANLIB"
5798fi
5799
5800
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005801if test -n "$ac_tool_prefix"; then
5802 for ac_prog in ar aal
5803 do
5804 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5805set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5807$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005808if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005809 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810else
5811 if test -n "$AR"; then
5812 ac_cv_prog_AR="$AR" # Let the user override the test.
5813else
5814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5815for as_dir in $PATH
5816do
5817 IFS=$as_save_IFS
5818 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005819 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005820 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005821 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005822 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823 break 2
5824 fi
5825done
Matthias Kloseb9621712010-04-24 17:59:49 +00005826 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827IFS=$as_save_IFS
5828
5829fi
5830fi
5831AR=$ac_cv_prog_AR
5832if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5834$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835else
Matthias Kloseb9621712010-04-24 17:59:49 +00005836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5837$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838fi
5839
5840
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005841 test -n "$AR" && break
5842 done
5843fi
5844if test -z "$AR"; then
5845 ac_ct_AR=$AR
5846 for ac_prog in ar aal
5847do
5848 # Extract the first word of "$ac_prog", so it can be a program name with args.
5849set dummy $ac_prog; ac_word=$2
5850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5851$as_echo_n "checking for $ac_word... " >&6; }
5852if ${ac_cv_prog_ac_ct_AR+:} false; then :
5853 $as_echo_n "(cached) " >&6
5854else
5855 if test -n "$ac_ct_AR"; then
5856 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5857else
5858as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5859for as_dir in $PATH
5860do
5861 IFS=$as_save_IFS
5862 test -z "$as_dir" && as_dir=.
5863 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005864 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005865 ac_cv_prog_ac_ct_AR="$ac_prog"
5866 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5867 break 2
5868 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005870 done
5871IFS=$as_save_IFS
5872
5873fi
5874fi
5875ac_ct_AR=$ac_cv_prog_ac_ct_AR
5876if test -n "$ac_ct_AR"; then
5877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5878$as_echo "$ac_ct_AR" >&6; }
5879else
5880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5881$as_echo "no" >&6; }
5882fi
5883
5884
5885 test -n "$ac_ct_AR" && break
5886done
5887
5888 if test "x$ac_ct_AR" = x; then
5889 AR="ar"
5890 else
5891 case $cross_compiling:$ac_tool_warned in
5892yes:)
5893{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5894$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5895ac_tool_warned=yes ;;
5896esac
5897 AR=$ac_ct_AR
5898 fi
5899fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900
5901
5902# tweak ARFLAGS only if the user didn't set it on the command line
5903
5904if test -z "$ARFLAGS"
5905then
5906 ARFLAGS="rc"
5907fi
5908
doko@ubuntu.com58844492012-06-30 18:25:32 +02005909if test -n "$ac_tool_prefix"; then
5910 for ac_prog in readelf
5911 do
5912 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5913set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5915$as_echo_n "checking for $ac_word... " >&6; }
5916if ${ac_cv_prog_READELF+:} false; then :
5917 $as_echo_n "(cached) " >&6
5918else
5919 if test -n "$READELF"; then
5920 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5921else
5922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5923for as_dir in $PATH
5924do
5925 IFS=$as_save_IFS
5926 test -z "$as_dir" && as_dir=.
5927 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005928 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005929 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5931 break 2
5932 fi
5933done
5934 done
5935IFS=$as_save_IFS
5936
5937fi
5938fi
5939READELF=$ac_cv_prog_READELF
5940if test -n "$READELF"; then
5941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5942$as_echo "$READELF" >&6; }
5943else
5944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5945$as_echo "no" >&6; }
5946fi
5947
5948
5949 test -n "$READELF" && break
5950 done
5951fi
5952if test -z "$READELF"; then
5953 ac_ct_READELF=$READELF
5954 for ac_prog in readelf
5955do
5956 # Extract the first word of "$ac_prog", so it can be a program name with args.
5957set dummy $ac_prog; ac_word=$2
5958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5959$as_echo_n "checking for $ac_word... " >&6; }
5960if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5961 $as_echo_n "(cached) " >&6
5962else
5963 if test -n "$ac_ct_READELF"; then
5964 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5965else
5966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5967for as_dir in $PATH
5968do
5969 IFS=$as_save_IFS
5970 test -z "$as_dir" && as_dir=.
5971 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005972 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005973 ac_cv_prog_ac_ct_READELF="$ac_prog"
5974 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5975 break 2
5976 fi
5977done
5978 done
5979IFS=$as_save_IFS
5980
5981fi
5982fi
5983ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5984if test -n "$ac_ct_READELF"; then
5985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5986$as_echo "$ac_ct_READELF" >&6; }
5987else
5988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5989$as_echo "no" >&6; }
5990fi
5991
5992
5993 test -n "$ac_ct_READELF" && break
5994done
5995
5996 if test "x$ac_ct_READELF" = x; then
5997 READELF=":"
5998 else
5999 case $cross_compiling:$ac_tool_warned in
6000yes:)
6001{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6002$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6003ac_tool_warned=yes ;;
6004esac
6005 READELF=$ac_ct_READELF
6006 fi
6007fi
6008
6009if test "$cross_compiling" = yes; then
6010 case "$READELF" in
6011 readelf|:)
6012 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6013 ;;
6014 esac
6015fi
6016
6017
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006018
Matthias Klosec4c48422012-10-21 23:05:35 +02006019for ac_prog in python$PACKAGE_VERSION python3 python
6020do
6021 # Extract the first word of "$ac_prog", so it can be a program name with args.
6022set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6024$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006025if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006026 $as_echo_n "(cached) " >&6
6027else
Matthias Klosec4c48422012-10-21 23:05:35 +02006028 if test -n "$PYTHON"; then
6029 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006030else
6031as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6032for as_dir in $PATH
6033do
6034 IFS=$as_save_IFS
6035 test -z "$as_dir" && as_dir=.
6036 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006037 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006038 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006039 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6040 break 2
6041 fi
6042done
6043 done
6044IFS=$as_save_IFS
6045
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006046fi
6047fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006048PYTHON=$ac_cv_prog_PYTHON
6049if test -n "$PYTHON"; then
6050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6051$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006052else
6053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6054$as_echo "no" >&6; }
6055fi
6056
6057
Matthias Klosec4c48422012-10-21 23:05:35 +02006058 test -n "$PYTHON" && break
6059done
6060test -n "$PYTHON" || PYTHON="not-found"
6061
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006062if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006063 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6064else
6065 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006066fi
6067
6068
Kushal Das02d23a22014-04-15 23:50:06 +05306069for ac_prog in python$PACKAGE_VERSION python3 python
6070do
6071 # Extract the first word of "$ac_prog", so it can be a program name with args.
6072set dummy $ac_prog; ac_word=$2
6073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6074$as_echo_n "checking for $ac_word... " >&6; }
6075if ${ac_cv_prog_PYTHON+:} false; then :
6076 $as_echo_n "(cached) " >&6
6077else
6078 if test -n "$PYTHON"; then
6079 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6080else
6081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6082for as_dir in $PATH
6083do
6084 IFS=$as_save_IFS
6085 test -z "$as_dir" && as_dir=.
6086 for ac_exec_ext in '' $ac_executable_extensions; do
6087 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6088 ac_cv_prog_PYTHON="$ac_prog"
6089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6090 break 2
6091 fi
6092done
6093 done
6094IFS=$as_save_IFS
6095
6096fi
6097fi
6098PYTHON=$ac_cv_prog_PYTHON
6099if test -n "$PYTHON"; then
6100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6101$as_echo "$PYTHON" >&6; }
6102else
6103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6104$as_echo "no" >&6; }
6105fi
6106
6107
6108 test -n "$PYTHON" && break
6109done
6110test -n "$PYTHON" || PYTHON="not-found"
6111
6112if test "$PYTHON" = not-found; then
6113 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6114else
6115 OPCODEHGEN="$PYTHON"
6116fi
6117
6118
6119
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006120case $MACHDEP in
6121bsdos*|hp*|HP*)
6122 # install -d does not work on BSDI or HP-UX
6123 if test -z "$INSTALL"
6124 then
6125 INSTALL="${srcdir}/install-sh -c"
6126 fi
6127esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006128# Find a good install program. We prefer a C program (faster),
6129# so one script is as good as another. But avoid the broken or
6130# incompatible versions:
6131# SysV /etc/install, /usr/sbin/install
6132# SunOS /usr/etc/install
6133# IRIX /sbin/install
6134# AIX /bin/install
6135# AmigaOS /C/install, which installs bootblocks on floppy discs
6136# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6137# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6138# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6139# OS/2's system install, which has a completely different semantic
6140# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006141# Reject install programs that cannot install multiple files.
6142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6143$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006144if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006145if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006146 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006147else
6148 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6149for as_dir in $PATH
6150do
6151 IFS=$as_save_IFS
6152 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006153 # Account for people who put trailing slashes in PATH elements.
6154case $as_dir/ in #((
6155 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006157 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006158 /usr/ucb/* ) ;;
6159 *)
6160 # OSF1 and SCO ODT 3.0 have their own names for install.
6161 # Don't use installbsd from OSF since it installs stuff as root
6162 # by default.
6163 for ac_prog in ginstall scoinst install; do
6164 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006165 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006166 if test $ac_prog = install &&
6167 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6168 # AIX install. It has an incompatible calling convention.
6169 :
6170 elif test $ac_prog = install &&
6171 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6172 # program-specific install script used by HP pwplus--don't use.
6173 :
6174 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006175 rm -rf conftest.one conftest.two conftest.dir
6176 echo one > conftest.one
6177 echo two > conftest.two
6178 mkdir conftest.dir
6179 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6180 test -s conftest.one && test -s conftest.two &&
6181 test -s conftest.dir/conftest.one &&
6182 test -s conftest.dir/conftest.two
6183 then
6184 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6185 break 3
6186 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006187 fi
6188 fi
6189 done
6190 done
6191 ;;
6192esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006193
6194 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195IFS=$as_save_IFS
6196
Matthias Kloseb9621712010-04-24 17:59:49 +00006197rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198
6199fi
6200 if test "${ac_cv_path_install+set}" = set; then
6201 INSTALL=$ac_cv_path_install
6202 else
6203 # As a last resort, use the slow shell script. Don't cache a
6204 # value for INSTALL within a source directory, because that will
6205 # break other packages using the cache if that directory is
6206 # removed, or if the value is a relative name.
6207 INSTALL=$ac_install_sh
6208 fi
6209fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6211$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006212
6213# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6214# It thinks the first close brace ends the variable substitution.
6215test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6216
6217test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6218
6219test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6220
Matthias Klose93a0ef12012-03-15 18:08:34 +01006221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6222$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6223if test -z "$MKDIR_P"; then
6224 if ${ac_cv_path_mkdir+:} false; then :
6225 $as_echo_n "(cached) " >&6
6226else
6227 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6228for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6229do
6230 IFS=$as_save_IFS
6231 test -z "$as_dir" && as_dir=.
6232 for ac_prog in mkdir gmkdir; do
6233 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006234 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006235 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6236 'mkdir (GNU coreutils) '* | \
6237 'mkdir (coreutils) '* | \
6238 'mkdir (fileutils) '4.1*)
6239 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6240 break 3;;
6241 esac
6242 done
6243 done
6244 done
6245IFS=$as_save_IFS
6246
6247fi
6248
6249 test -d ./--version && rmdir ./--version
6250 if test "${ac_cv_path_mkdir+set}" = set; then
6251 MKDIR_P="$ac_cv_path_mkdir -p"
6252 else
6253 # As a last resort, use the slow shell script. Don't cache a
6254 # value for MKDIR_P within a source directory, because that will
6255 # break other packages using the cache if that directory is
6256 # removed, or if the value is a relative name.
6257 MKDIR_P="$ac_install_sh -d"
6258 fi
6259fi
6260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6261$as_echo "$MKDIR_P" >&6; }
6262
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006263
6264# Not every filesystem supports hard links
6265
6266if test -z "$LN" ; then
6267 case $ac_sys_system in
6268 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006269 *) LN=ln;;
6270 esac
6271fi
6272
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006273# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006274
6275ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006276
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006277# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6279$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006280
6281# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006282if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006283 withval=$with_pydebug;
6284if test "$withval" != no
6285then
6286
Matthias Kloseb9621712010-04-24 17:59:49 +00006287$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006288
Matthias Kloseb9621712010-04-24 17:59:49 +00006289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6290$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006291 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006292 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006293else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6294$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006295fi
6296else
Matthias Kloseb9621712010-04-24 17:59:49 +00006297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6298$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006299fi
6300
6301
6302# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6303# merged with this chunk of code?
6304
6305# Optimizer/debugger flags
6306# ------------------------
6307# (The following bit of code is complicated enough - please keep things
6308# indented properly. Just pretend you're editing Python code. ;-)
6309
6310# There are two parallel sets of case statements below, one that checks to
6311# see if OPT was set and one that does BASECFLAGS setting based upon
6312# compiler and platform. BASECFLAGS tweaks need to be made even if the
6313# user set OPT.
6314
6315# tweak OPT based on compiler and platform, only if the user didn't set
6316# it on the command line
6317
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006318if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006319then
6320 case $GCC in
6321 yes)
6322 if test "$CC" != 'g++' ; then
6323 STRICT_PROTO="-Wstrict-prototypes"
6324 fi
6325 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6326 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6327 WRAP="-fwrapv"
6328 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006329
6330 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006331 case $CC in
6332 *clang*) WRAP="-fwrapv"
6333 ;;
6334 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006335
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006336 case $ac_cv_prog_cc_g in
6337 yes)
6338 if test "$Py_DEBUG" = 'true' ; then
6339 # Optimization messes up debuggers, so turn it off for
6340 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006341 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6342 OPT="-g -Og -Wall $STRICT_PROTO"
6343 else
6344 OPT="-g -O0 -Wall $STRICT_PROTO"
6345 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006346 else
6347 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6348 fi
6349 ;;
6350 *)
6351 OPT="-O3 -Wall $STRICT_PROTO"
6352 ;;
6353 esac
6354 case $ac_sys_system in
6355 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6356 ;;
6357 esac
6358 ;;
6359
6360 *)
6361 OPT="-O"
6362 ;;
6363 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006364fi
6365
6366
6367
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006368
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006369# The -arch flags for universal builds on OSX
6370UNIVERSAL_ARCH_FLAGS=
6371
6372
6373# tweak BASECFLAGS based on compiler and platform
6374case $GCC in
6375yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006376 # Python doesn't violate C99 aliasing rules, but older versions of
6377 # GCC produce warnings for legal Python code. Enable
6378 # -fno-strict-aliasing on versions of GCC that support but produce
6379 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6381$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006382 ac_save_cc="$CC"
6383 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006384 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006385 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006386 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006387else
Matthias Kloseb9621712010-04-24 17:59:49 +00006388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006389/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006390
Matthias Kloseb159a552010-04-25 21:00:44 +00006391
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006392int
6393main ()
6394{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006395
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006396 ;
6397 return 0;
6398}
Matthias Kloseb159a552010-04-25 21:00:44 +00006399
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006401if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006402
6403 CC="$ac_save_cc -fstrict-aliasing"
6404 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006406/* end confdefs.h. */
6407
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006408 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006409int
6410main ()
6411{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006412double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006413 ;
6414 return 0;
6415}
Matthias Kloseb159a552010-04-25 21:00:44 +00006416
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006418if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006419
6420 ac_cv_no_strict_aliasing=no
6421
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006422else
Matthias Kloseb159a552010-04-25 21:00:44 +00006423
6424 ac_cv_no_strict_aliasing=yes
6425
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006426fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006428
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006429else
Matthias Kloseb159a552010-04-25 21:00:44 +00006430
6431 ac_cv_no_strict_aliasing=no
6432
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006433fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006435fi
6436
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006437 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006438 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6440$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006441 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006442 then
6443 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6444 fi
6445
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6447$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6448 ac_save_cc="$CC"
6449 CC="$CC -Wunused-result -Werror"
6450 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006451 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006452 $as_echo_n "(cached) " >&6
6453else
6454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6455/* end confdefs.h. */
6456
6457
6458int
6459main ()
6460{
6461
6462 ;
6463 return 0;
6464}
6465
6466_ACEOF
6467if ac_fn_c_try_compile "$LINENO"; then :
6468
6469 ac_cv_disable_unused_result_warning=yes
6470
6471else
6472
6473 ac_cv_disable_unused_result_warning=no
6474
6475fi
6476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6477fi
6478
6479 CFLAGS="$save_CFLAGS"
6480 CC="$ac_save_cc"
6481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6482$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6483
6484 if test $ac_cv_disable_unused_result_warning = yes
6485 then
6486 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6487 fi
6488
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6490$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6491 ac_save_cc="$CC"
6492 CC="$CC -Werror=declaration-after-statement"
6493 save_CFLAGS="$CFLAGS"
6494 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6495 $as_echo_n "(cached) " >&6
6496else
6497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6498/* end confdefs.h. */
6499
6500
6501int
6502main ()
6503{
6504
6505 ;
6506 return 0;
6507}
6508
6509_ACEOF
6510if ac_fn_c_try_compile "$LINENO"; then :
6511
6512 ac_cv_declaration_after_statement_warning=yes
6513
6514else
6515
6516 ac_cv_declaration_after_statement_warning=no
6517
6518fi
6519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6520fi
6521
6522 CFLAGS="$save_CFLAGS"
6523 CC="$ac_save_cc"
6524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6525$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6526
6527 if test $ac_cv_declaration_after_statement_warning = yes
6528 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006529 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006530 fi
6531
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6533$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6534 ac_save_cc="$CC"
6535 CC="$CC -Wsign-compare"
6536 save_CFLAGS="$CFLAGS"
6537 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6538 $as_echo_n "(cached) " >&6
6539else
6540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6541/* end confdefs.h. */
6542
6543
6544int
6545main ()
6546{
6547
6548 ;
6549 return 0;
6550}
6551
6552_ACEOF
6553if ac_fn_c_try_compile "$LINENO"; then :
6554
6555 ac_cv_enable_sign_compare_warning=yes
6556
6557else
6558
6559 ac_cv_enable_sign_compare_warning=no
6560
6561fi
6562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6563fi
6564
6565 CFLAGS="$save_CFLAGS"
6566 CC="$ac_save_cc"
6567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6568$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6569
6570 if test $ac_cv_enable_sign_compare_warning = yes
6571 then
6572 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6573 fi
6574
6575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6576$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6577 ac_save_cc="$CC"
6578 CC="$CC -Wunreachable-code"
6579 save_CFLAGS="$CFLAGS"
6580 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6581 $as_echo_n "(cached) " >&6
6582else
6583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6584/* end confdefs.h. */
6585
6586
6587int
6588main ()
6589{
6590
6591 ;
6592 return 0;
6593}
6594
6595_ACEOF
6596if ac_fn_c_try_compile "$LINENO"; then :
6597
6598 ac_cv_enable_unreachable_code_warning=yes
6599
6600else
6601
6602 ac_cv_enable_unreachable_code_warning=no
6603
6604fi
6605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6606fi
6607
6608 CFLAGS="$save_CFLAGS"
6609 CC="$ac_save_cc"
6610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6611$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
6612
6613 # Don't enable unreachable code warning in debug mode, since it usually
6614 # results in non-standard code paths.
6615 if test $ac_cv_enable_unreachable_code_warning = yes && test "$Py_DEBUG" != "true"
6616 then
6617 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
6618 fi
6619
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006620 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6621 # support. Without this, treatment of subnormals doesn't follow
6622 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006623 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006624 alpha*)
6625 BASECFLAGS="$BASECFLAGS -mieee"
6626 ;;
6627 esac
6628
6629 case $ac_sys_system in
6630 SCO_SV*)
6631 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6632 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006633
6634 # is there any other compiler on Darwin besides gcc?
6635 Darwin*)
6636 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6637 # used to be here, but non-Apple gcc doesn't accept them.
6638 if test "${CC}" = gcc
6639 then
6640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006641$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006642 case "${UNIVERSALSDK}" in
6643 */MacOSX10.4u.sdk)
6644 # Build using 10.4 SDK, force usage of gcc when the
6645 # compiler is gcc, otherwise the user will get very
6646 # confusing error messages when building on OSX 10.6
6647 CC=gcc-4.0
6648 CPP=cpp-4.0
6649 ;;
6650 esac
6651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006652$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006653 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006654
Ned Deily87adb6e2013-10-18 21:09:56 -07006655 if test "${enable_universalsdk}"
6656 then
6657 case "$UNIVERSAL_ARCHS" in
6658 32-bit)
6659 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6660 LIPO_32BIT_FLAGS=""
6661 ARCH_RUN_32BIT=""
6662 ;;
6663 64-bit)
6664 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6665 LIPO_32BIT_FLAGS=""
6666 ARCH_RUN_32BIT="true"
6667 ;;
6668 all)
6669 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6670 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6671 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6672 ;;
6673 intel)
6674 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6675 LIPO_32BIT_FLAGS="-extract i386"
6676 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6677 ;;
6678 intel-32)
6679 UNIVERSAL_ARCH_FLAGS="-arch i386"
6680 LIPO_32BIT_FLAGS=""
6681 ARCH_RUN_32BIT=""
6682 ;;
6683 3-way)
6684 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6685 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6686 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6687 ;;
6688 *)
6689 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6690 ;;
6691 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006692
Ned Deily87adb6e2013-10-18 21:09:56 -07006693 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6694 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6695 if test "${UNIVERSALSDK}" != "/"
6696 then
6697 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6698 fi
6699 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006700
Ned Deily87adb6e2013-10-18 21:09:56 -07006701 # Calculate an appropriate deployment target for this build:
6702 # The deployment target value is used explicitly to enable certain
6703 # features are enabled (such as builtin libedit support for readline)
6704 # through the use of Apple's Availabiliy Macros and is used as a
6705 # component of the string returned by distutils.get_platform().
6706 #
6707 # Use the value from:
6708 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6709 # 2. the operating system version of the build machine if >= 10.6
6710 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6711 # below to pick either 10.3, 10.4, or 10.5 as the target.
6712 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006713
Ned Deily87adb6e2013-10-18 21:09:56 -07006714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6715$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006716 cur_target_major=`sw_vers -productVersion | \
6717 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6718 cur_target_minor=`sw_vers -productVersion | \
6719 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6720 cur_target="${cur_target_major}.${cur_target_minor}"
6721 if test ${cur_target_major} -eq 10 && \
6722 test ${cur_target_minor} -ge 3 && \
6723 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006724 then
Ned Deily36820b62014-06-25 13:44:22 -07006725 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006726 cur_target=10.3
6727 if test ${enable_universalsdk}
6728 then
6729 case "$UNIVERSAL_ARCHS" in
6730 all|3-way|intel|64-bit)
6731 # These configurations were first supported in 10.5
6732 cur_target='10.5'
6733 ;;
6734 esac
6735 else
6736 if test `/usr/bin/arch` = "i386"
6737 then
6738 # 10.4 was the first release to support Intel archs
6739 cur_target="10.4"
6740 fi
6741 fi
6742 fi
6743 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006744
Ned Deily87adb6e2013-10-18 21:09:56 -07006745 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6746 # environment with a value that is the same as what we'll use
6747 # in the Makefile to ensure that we'll get the same compiler
6748 # environment during configure and build time.
6749 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6750 export MACOSX_DEPLOYMENT_TARGET
6751 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6753$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006754
Ned Deily87adb6e2013-10-18 21:09:56 -07006755 # end of Darwin* tests
6756 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006757 esac
6758 ;;
6759
6760*)
6761 case $ac_sys_system in
6762 OpenUNIX*|UnixWare*)
6763 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6764 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006765 SCO_SV*)
6766 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6767 ;;
6768 esac
6769 ;;
6770esac
6771
6772if test "$Py_DEBUG" = 'true'; then
6773 :
6774else
6775 OPT="-DNDEBUG $OPT"
6776fi
6777
6778if test "$ac_arch_flags"
6779then
6780 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6781fi
6782
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006783# On some compilers, pthreads are available without further options
6784# (e.g. MacOS X). On some of these systems, the compiler will not
6785# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6786# So we have to see first whether pthreads are available without
6787# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6789$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006790if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006791 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006792else
Matthias Kloseb9621712010-04-24 17:59:49 +00006793 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006794 ac_cv_pthread_is_default=no
6795else
Matthias Kloseb9621712010-04-24 17:59:49 +00006796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006797/* end confdefs.h. */
6798
Stefan Krah7dba5942012-11-22 22:49:11 +01006799#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006800#include <pthread.h>
6801
6802void* routine(void* p){return NULL;}
6803
6804int main(){
6805 pthread_t p;
6806 if(pthread_create(&p,NULL,routine,NULL)!=0)
6807 return 1;
6808 (void)pthread_detach(p);
6809 return 0;
6810}
6811
6812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006813if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006814
6815 ac_cv_pthread_is_default=yes
6816 ac_cv_kthread=no
6817 ac_cv_pthread=no
6818
6819else
Matthias Kloseb9621712010-04-24 17:59:49 +00006820 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6823 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006824fi
6825
6826
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006827fi
6828
Matthias Kloseb9621712010-04-24 17:59:49 +00006829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6830$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006831
6832
6833if test $ac_cv_pthread_is_default = yes
6834then
6835 ac_cv_kpthread=no
6836else
6837# -Kpthread, if available, provides the right #defines
6838# and linker options to make pthread_create available
6839# Some compilers won't report that they do not support -Kpthread,
6840# so we need to run a program to see whether it really made the
6841# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6843$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006844if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006845 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006846else
6847 ac_save_cc="$CC"
6848CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006849if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006850 ac_cv_kpthread=no
6851else
Matthias Kloseb9621712010-04-24 17:59:49 +00006852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006853/* end confdefs.h. */
6854
Stefan Krah7dba5942012-11-22 22:49:11 +01006855#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006856#include <pthread.h>
6857
6858void* routine(void* p){return NULL;}
6859
6860int main(){
6861 pthread_t p;
6862 if(pthread_create(&p,NULL,routine,NULL)!=0)
6863 return 1;
6864 (void)pthread_detach(p);
6865 return 0;
6866}
6867
6868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006869if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006870 ac_cv_kpthread=yes
6871else
Matthias Kloseb9621712010-04-24 17:59:49 +00006872 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006874rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6875 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006876fi
6877
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006878CC="$ac_save_cc"
6879fi
6880
Matthias Kloseb9621712010-04-24 17:59:49 +00006881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6882$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006883fi
6884
6885if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6886then
6887# -Kthread, if available, provides the right #defines
6888# and linker options to make pthread_create available
6889# Some compilers won't report that they do not support -Kthread,
6890# so we need to run a program to see whether it really made the
6891# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6893$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006894if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006895 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006896else
6897 ac_save_cc="$CC"
6898CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006899if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006900 ac_cv_kthread=no
6901else
Matthias Kloseb9621712010-04-24 17:59:49 +00006902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006903/* end confdefs.h. */
6904
Stefan Krah7dba5942012-11-22 22:49:11 +01006905#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006906#include <pthread.h>
6907
6908void* routine(void* p){return NULL;}
6909
6910int main(){
6911 pthread_t p;
6912 if(pthread_create(&p,NULL,routine,NULL)!=0)
6913 return 1;
6914 (void)pthread_detach(p);
6915 return 0;
6916}
6917
6918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006919if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006920 ac_cv_kthread=yes
6921else
Matthias Kloseb9621712010-04-24 17:59:49 +00006922 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6925 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006926fi
6927
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006928CC="$ac_save_cc"
6929fi
6930
Matthias Kloseb9621712010-04-24 17:59:49 +00006931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6932$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006933fi
6934
6935if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6936then
6937# -pthread, if available, provides the right #defines
6938# and linker options to make pthread_create available
6939# Some compilers won't report that they do not support -pthread,
6940# so we need to run a program to see whether it really made the
6941# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6943$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006944if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006945 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006946else
6947 ac_save_cc="$CC"
6948CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006949if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006950 ac_cv_pthread=no
6951else
Matthias Kloseb9621712010-04-24 17:59:49 +00006952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006953/* end confdefs.h. */
6954
Stefan Krah7dba5942012-11-22 22:49:11 +01006955#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006956#include <pthread.h>
6957
6958void* routine(void* p){return NULL;}
6959
6960int main(){
6961 pthread_t p;
6962 if(pthread_create(&p,NULL,routine,NULL)!=0)
6963 return 1;
6964 (void)pthread_detach(p);
6965 return 0;
6966}
6967
6968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006969if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006970 ac_cv_pthread=yes
6971else
Matthias Kloseb9621712010-04-24 17:59:49 +00006972 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006974rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6975 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006976fi
6977
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006978CC="$ac_save_cc"
6979fi
6980
Matthias Kloseb9621712010-04-24 17:59:49 +00006981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6982$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006983fi
6984
6985# If we have set a CC compiler flag for thread support then
6986# check if it works for CXX, too.
6987ac_cv_cxx_thread=no
6988if test ! -z "$CXX"
6989then
Matthias Kloseb9621712010-04-24 17:59:49 +00006990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6991$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006992ac_save_cxx="$CXX"
6993
6994if test "$ac_cv_kpthread" = "yes"
6995then
6996 CXX="$CXX -Kpthread"
6997 ac_cv_cxx_thread=yes
6998elif test "$ac_cv_kthread" = "yes"
6999then
7000 CXX="$CXX -Kthread"
7001 ac_cv_cxx_thread=yes
7002elif test "$ac_cv_pthread" = "yes"
7003then
7004 CXX="$CXX -pthread"
7005 ac_cv_cxx_thread=yes
7006fi
7007
7008if test $ac_cv_cxx_thread = yes
7009then
7010 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7011 $CXX -c conftest.$ac_ext 2>&5
7012 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7013 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7014 then
7015 ac_cv_cxx_thread=yes
7016 else
7017 ac_cv_cxx_thread=no
7018 fi
7019 rm -fr conftest*
7020fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7022$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007023fi
7024CXX="$ac_save_cxx"
7025
7026
7027# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7029$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007030if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007031 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007032else
Matthias Kloseb9621712010-04-24 17:59:49 +00007033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007034/* end confdefs.h. */
7035#include <stdlib.h>
7036#include <stdarg.h>
7037#include <string.h>
7038#include <float.h>
7039
7040int
7041main ()
7042{
7043
7044 ;
7045 return 0;
7046}
7047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007048if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007049 ac_cv_header_stdc=yes
7050else
Matthias Kloseb9621712010-04-24 17:59:49 +00007051 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007052fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7054
7055if test $ac_cv_header_stdc = yes; then
7056 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007058/* end confdefs.h. */
7059#include <string.h>
7060
7061_ACEOF
7062if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007063 $EGREP "memchr" >/dev/null 2>&1; then :
7064
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007065else
7066 ac_cv_header_stdc=no
7067fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007068rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007069
7070fi
7071
7072if test $ac_cv_header_stdc = yes; then
7073 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007075/* end confdefs.h. */
7076#include <stdlib.h>
7077
7078_ACEOF
7079if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007080 $EGREP "free" >/dev/null 2>&1; then :
7081
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007082else
7083 ac_cv_header_stdc=no
7084fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007085rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007086
7087fi
7088
7089if test $ac_cv_header_stdc = yes; then
7090 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007091 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007092 :
7093else
Matthias Kloseb9621712010-04-24 17:59:49 +00007094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007095/* end confdefs.h. */
7096#include <ctype.h>
7097#include <stdlib.h>
7098#if ((' ' & 0x0FF) == 0x020)
7099# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7100# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7101#else
7102# define ISLOWER(c) \
7103 (('a' <= (c) && (c) <= 'i') \
7104 || ('j' <= (c) && (c) <= 'r') \
7105 || ('s' <= (c) && (c) <= 'z'))
7106# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7107#endif
7108
7109#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7110int
7111main ()
7112{
7113 int i;
7114 for (i = 0; i < 256; i++)
7115 if (XOR (islower (i), ISLOWER (i))
7116 || toupper (i) != TOUPPER (i))
7117 return 2;
7118 return 0;
7119}
7120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007121if ac_fn_c_try_run "$LINENO"; then :
7122
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007123else
Matthias Kloseb9621712010-04-24 17:59:49 +00007124 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007125fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007126rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7127 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007128fi
7129
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007130fi
7131fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7133$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007134if test $ac_cv_header_stdc = yes; then
7135
Matthias Kloseb9621712010-04-24 17:59:49 +00007136$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007137
7138fi
7139
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007140for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007141fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007142ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007143sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007144unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007145poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007146sys/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 +01007147sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007148sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007149sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007150sys/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 -07007151libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007152bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7153sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007154do :
7155 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7156ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007157if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007158 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007159#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007160_ACEOF
7161
7162fi
7163
Guido van Rossum627b2d71993-12-24 10:39:16 +00007164done
7165
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007166ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007167for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007168 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7170$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007171if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007172 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007173else
Matthias Kloseb9621712010-04-24 17:59:49 +00007174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007175/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007176#include <sys/types.h>
7177#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007178
Martin v. Löwis11437992002-04-12 09:54:03 +00007179int
7180main ()
7181{
7182if ((DIR *) 0)
7183return 0;
7184 ;
7185 return 0;
7186}
7187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007188if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007189 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007190else
Matthias Kloseb9621712010-04-24 17:59:49 +00007191 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007194fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007195eval ac_res=\$$as_ac_Header
7196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7197$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007198if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007199 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007200#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007201_ACEOF
7202
7203ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007204fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007205
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007206done
7207# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7208if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7210$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007211if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007212 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007213else
Martin v. Löwis11437992002-04-12 09:54:03 +00007214 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007216/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007218/* Override any GCC internal prototype to avoid an error.
7219 Use char because int might match the return type of a GCC
7220 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007221#ifdef __cplusplus
7222extern "C"
7223#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007224char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007225int
7226main ()
7227{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007228return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007229 ;
7230 return 0;
7231}
7232_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007233for ac_lib in '' dir; do
7234 if test -z "$ac_lib"; then
7235 ac_res="none required"
7236 else
7237 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007238 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007239 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007240 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007241 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007243rm -f core conftest.err conftest.$ac_objext \
7244 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007245 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007246 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007248done
Victor Stinnere0be4232011-10-25 13:06:09 +02007249if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007251else
7252 ac_cv_search_opendir=no
7253fi
7254rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007255LIBS=$ac_func_search_save_LIBS
7256fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7258$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007259ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007260if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007261 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007262
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007263fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007264
Michael W. Hudson54241132001-12-07 15:38:26 +00007265else
Matthias Kloseb9621712010-04-24 17:59:49 +00007266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7267$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007268if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007269 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007270else
7271 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007273/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007274
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007275/* Override any GCC internal prototype to avoid an error.
7276 Use char because int might match the return type of a GCC
7277 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007278#ifdef __cplusplus
7279extern "C"
7280#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007281char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007282int
7283main ()
7284{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007285return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007286 ;
7287 return 0;
7288}
7289_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007290for ac_lib in '' x; do
7291 if test -z "$ac_lib"; then
7292 ac_res="none required"
7293 else
7294 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007295 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007296 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007297 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007298 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007300rm -f core conftest.err conftest.$ac_objext \
7301 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007302 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007303 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007305done
Victor Stinnere0be4232011-10-25 13:06:09 +02007306if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007307
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007308else
7309 ac_cv_search_opendir=no
7310fi
7311rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007312LIBS=$ac_func_search_save_LIBS
7313fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7315$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007316ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007317if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007318 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007319
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007320fi
7321
7322fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007323
Matthias Kloseb9621712010-04-24 17:59:49 +00007324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7325$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007326if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007327 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007328else
Matthias Kloseb9621712010-04-24 17:59:49 +00007329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007330/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007331#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007332int
7333main ()
7334{
7335return makedev(0, 0);
7336 ;
7337 return 0;
7338}
7339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007340if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007341 ac_cv_header_sys_types_h_makedev=yes
7342else
Matthias Kloseb9621712010-04-24 17:59:49 +00007343 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007344fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007345rm -f core conftest.err conftest.$ac_objext \
7346 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007347
7348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7350$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007351
7352if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007353ac_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 +02007354if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007355
Matthias Kloseb9621712010-04-24 17:59:49 +00007356$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007357
7358fi
7359
7360
7361
7362 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007363 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 +02007364if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007365
Matthias Kloseb9621712010-04-24 17:59:49 +00007366$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007367
7368fi
7369
7370
7371 fi
7372fi
7373
Michael W. Hudson54241132001-12-07 15:38:26 +00007374
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007375# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7376for ac_header in net/if.h
7377do :
7378 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7379#ifdef STDC_HEADERS
7380# include <stdlib.h>
7381# include <stddef.h>
7382#else
7383# ifdef HAVE_STDLIB_H
7384# include <stdlib.h>
7385# endif
7386#endif
7387#ifdef HAVE_SYS_SOCKET_H
7388# include <sys/socket.h>
7389#endif
7390
7391"
Victor Stinnere0be4232011-10-25 13:06:09 +02007392if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007393 cat >>confdefs.h <<_ACEOF
7394#define HAVE_NET_IF_H 1
7395_ACEOF
7396
7397fi
7398
7399done
7400
7401
Martin v. Löwis11017b12006-01-14 18:12:57 +00007402# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007403for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007404do :
7405 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 +00007406#ifdef HAVE_ASM_TYPES_H
7407#include <asm/types.h>
7408#endif
7409#ifdef HAVE_SYS_SOCKET_H
7410#include <sys/socket.h>
7411#endif
7412
Matthias Kloseb9621712010-04-24 17:59:49 +00007413"
Victor Stinnere0be4232011-10-25 13:06:09 +02007414if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007415 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007416#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007417_ACEOF
7418
7419fi
7420
7421done
7422
7423
Charles-François Natali47413c12011-10-06 19:47:44 +02007424# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007425for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007426do :
7427 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7428ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7429#ifdef HAVE_SYS_SOCKET_H
7430#include <sys/socket.h>
7431#endif
7432
7433"
7434if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7435 cat >>confdefs.h <<_ACEOF
7436#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7437_ACEOF
7438
7439fi
7440
7441done
7442
7443
Guido van Rossum627b2d71993-12-24 10:39:16 +00007444# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007445was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7447$as_echo_n "checking for clock_t in time.h... " >&6; }
7448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007449/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007450#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007451
7452_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007453if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007454 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007455 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007456else
Martin v. Löwis11437992002-04-12 09:54:03 +00007457
7458
Matthias Kloseb9621712010-04-24 17:59:49 +00007459$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007460
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007461
Guido van Rossum627b2d71993-12-24 10:39:16 +00007462fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007463rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007464
Matthias Kloseb9621712010-04-24 17:59:49 +00007465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7466$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007467
Matthias Kloseb9621712010-04-24 17:59:49 +00007468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7469$as_echo_n "checking for makedev... " >&6; }
7470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007471/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007472
Jesus Cea740f53a2010-04-28 11:35:30 +00007473#if defined(MAJOR_IN_MKDEV)
7474#include <sys/mkdev.h>
7475#elif defined(MAJOR_IN_SYSMACROS)
7476#include <sys/sysmacros.h>
7477#else
7478#include <sys/types.h>
7479#endif
7480
Neal Norwitz11690112002-07-30 01:08:28 +00007481int
7482main ()
7483{
Jesus Cea740f53a2010-04-28 11:35:30 +00007484
7485 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007486 ;
7487 return 0;
7488}
Matthias Kloseb159a552010-04-25 21:00:44 +00007489
Neal Norwitz11690112002-07-30 01:08:28 +00007490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007491if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007492 ac_cv_has_makedev=yes
7493else
Matthias Kloseb9621712010-04-24 17:59:49 +00007494 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007496rm -f core conftest.err conftest.$ac_objext \
7497 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7499$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007500if test "$ac_cv_has_makedev" = "yes"; then
7501
Matthias Kloseb9621712010-04-24 17:59:49 +00007502$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007503
7504fi
7505
Christian Heimes985ecdc2013-11-20 11:46:18 +01007506# byte swapping
7507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7508$as_echo_n "checking for le64toh... " >&6; }
7509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7510/* end confdefs.h. */
7511
7512#ifdef HAVE_ENDIAN_H
7513#include <endian.h>
7514#elif defined(HAVE_SYS_ENDIAN_H)
7515#include <sys/endian.h>
7516#endif
7517
7518int
7519main ()
7520{
7521
7522 le64toh(1)
7523 ;
7524 return 0;
7525}
7526
7527_ACEOF
7528if ac_fn_c_try_link "$LINENO"; then :
7529 ac_cv_has_le64toh=yes
7530else
7531 ac_cv_has_le64toh=no
7532fi
7533rm -f core conftest.err conftest.$ac_objext \
7534 conftest$ac_exeext conftest.$ac_ext
7535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7536$as_echo "$ac_cv_has_le64toh" >&6; }
7537if test "$ac_cv_has_le64toh" = "yes"; then
7538
7539$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7540
7541fi
7542
Martin v. Löwis399a6892002-10-04 10:22:02 +00007543# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7544# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7545# defined, but the compiler does not support pragma redefine_extname,
7546# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7547# structures (such as rlimit64) without declaring them. As a
7548# work-around, disable LFS on such configurations
7549
7550use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7552$as_echo_n "checking Solaris LFS bug... " >&6; }
7553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007554/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007555
7556#define _LARGEFILE_SOURCE 1
7557#define _FILE_OFFSET_BITS 64
7558#include <sys/resource.h>
7559
Martin v. Löwis399a6892002-10-04 10:22:02 +00007560int
7561main ()
7562{
7563struct rlimit foo;
7564 ;
7565 return 0;
7566}
7567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007568if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007569 sol_lfs_bug=no
7570else
Matthias Kloseb9621712010-04-24 17:59:49 +00007571 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7575$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007576if test "$sol_lfs_bug" = "yes"; then
7577 use_lfs=no
7578fi
7579
7580if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007581# Two defines needed to enable largefile support on various platforms
7582# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007583case $ac_sys_system/$ac_sys_release in
7584AIX*)
7585
7586$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7587
7588 ;;
7589esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007590
Matthias Kloseb9621712010-04-24 17:59:49 +00007591$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007592
7593
Matthias Kloseb9621712010-04-24 17:59:49 +00007594$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007595
Martin v. Löwis399a6892002-10-04 10:22:02 +00007596fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007597
Guido van Rossum84e7b241996-08-19 21:59:00 +00007598# Add some code to confdefs.h so that the test for off_t works on SCO
7599cat >> confdefs.h <<\EOF
7600#if defined(SCO_DS)
7601#undef _OFF_T
7602#endif
7603EOF
7604
Guido van Rossumef2255b2000-03-10 22:30:29 +00007605# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007606ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007607if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007608
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007609else
Martin v. Löwis11437992002-04-12 09:54:03 +00007610
7611cat >>confdefs.h <<_ACEOF
7612#define mode_t int
7613_ACEOF
7614
7615fi
7616
Matthias Kloseb9621712010-04-24 17:59:49 +00007617ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007618if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007619
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007620else
Martin v. Löwis11437992002-04-12 09:54:03 +00007621
7622cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007623#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007624_ACEOF
7625
7626fi
7627
Matthias Kloseb9621712010-04-24 17:59:49 +00007628ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007629if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007630
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007631else
Martin v. Löwis11437992002-04-12 09:54:03 +00007632
7633cat >>confdefs.h <<_ACEOF
7634#define pid_t int
7635_ACEOF
7636
7637fi
7638
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007639
Martin v. Löwis11437992002-04-12 09:54:03 +00007640cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007641#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007642_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007643
Matthias Kloseb9621712010-04-24 17:59:49 +00007644ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007645if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007646
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007647else
Martin v. Löwis11437992002-04-12 09:54:03 +00007648
7649cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007650#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007651_ACEOF
7652
7653fi
7654
Matthias Kloseb9621712010-04-24 17:59:49 +00007655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7656$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007657if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007658 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007659else
Matthias Kloseb9621712010-04-24 17:59:49 +00007660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007661/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007662#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007663
7664_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007665if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007666 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007667 ac_cv_type_uid_t=yes
7668else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007669 ac_cv_type_uid_t=no
7670fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007671rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007672
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7675$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007676if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007677
Matthias Kloseb9621712010-04-24 17:59:49 +00007678$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007679
7680
Matthias Kloseb9621712010-04-24 17:59:49 +00007681$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007682
7683fi
7684
Mark Dickinson983bc162012-12-02 12:11:38 +00007685
7686# There are two separate checks for each of the exact-width integer types we
7687# need. First we check whether the type is available using the usual
7688# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7689# and <stdint.h> where available). We then also use the special type checks of
7690# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7691# directly, #define's uint32_t to be a suitable type.
7692
7693ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7694if test "x$ac_cv_type_uint32_t" = xyes; then :
7695
7696$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7697
7698fi
7699
Matthias Kloseb9621712010-04-24 17:59:49 +00007700ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7701case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007702 no|yes) ;; #(
7703 *)
7704
Matthias Kloseb9621712010-04-24 17:59:49 +00007705$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007706
7707
7708cat >>confdefs.h <<_ACEOF
7709#define uint32_t $ac_cv_c_uint32_t
7710_ACEOF
7711;;
7712 esac
7713
Mark Dickinson983bc162012-12-02 12:11:38 +00007714
7715ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7716if test "x$ac_cv_type_uint64_t" = xyes; then :
7717
7718$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7719
7720fi
7721
Matthias Kloseb9621712010-04-24 17:59:49 +00007722ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7723case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007724 no|yes) ;; #(
7725 *)
7726
Matthias Kloseb9621712010-04-24 17:59:49 +00007727$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007728
7729
7730cat >>confdefs.h <<_ACEOF
7731#define uint64_t $ac_cv_c_uint64_t
7732_ACEOF
7733;;
7734 esac
7735
Mark Dickinson983bc162012-12-02 12:11:38 +00007736
7737ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7738if test "x$ac_cv_type_int32_t" = xyes; then :
7739
7740$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7741
7742fi
7743
Matthias Kloseb9621712010-04-24 17:59:49 +00007744ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7745case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007746 no|yes) ;; #(
7747 *)
7748
7749cat >>confdefs.h <<_ACEOF
7750#define int32_t $ac_cv_c_int32_t
7751_ACEOF
7752;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007753esac
7754
Mark Dickinson983bc162012-12-02 12:11:38 +00007755
7756ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7757if test "x$ac_cv_type_int64_t" = xyes; then :
7758
7759$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7760
7761fi
7762
Matthias Kloseb9621712010-04-24 17:59:49 +00007763ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7764case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007765 no|yes) ;; #(
7766 *)
7767
7768cat >>confdefs.h <<_ACEOF
7769#define int64_t $ac_cv_c_int64_t
7770_ACEOF
7771;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007772esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007773
Mark Dickinson983bc162012-12-02 12:11:38 +00007774
Matthias Kloseb9621712010-04-24 17:59:49 +00007775ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007776if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007777
Matthias Kloseb9621712010-04-24 17:59:49 +00007778$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007779
7780fi
7781
Stefan Krah1919b7e2012-03-21 18:25:23 +01007782ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7783if test "x$ac_cv_type___uint128_t" = xyes; then :
7784
7785$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7786
7787fi
7788
Jack Jansendd19cf82001-12-06 22:36:17 +00007789
Michael W. Hudson54241132001-12-07 15:38:26 +00007790# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007791# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007792# The cast to long int works around a bug in the HP C Compiler
7793# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7794# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7795# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7797$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007798if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007799 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007800else
Matthias Kloseb9621712010-04-24 17:59:49 +00007801 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 +00007802
Martin v. Löwis11437992002-04-12 09:54:03 +00007803else
Matthias Kloseb9621712010-04-24 17:59:49 +00007804 if test "$ac_cv_type_int" = yes; then
7805 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7806$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007807as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007808See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007809 else
7810 ac_cv_sizeof_int=0
7811 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007813
Martin v. Löwis11437992002-04-12 09:54:03 +00007814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7816$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817
7818
7819
Martin v. Löwis11437992002-04-12 09:54:03 +00007820cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007821#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007822_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007823
7824
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007825# The cast to long int works around a bug in the HP C Compiler
7826# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7827# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7828# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7830$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007831if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007832 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007833else
Matthias Kloseb9621712010-04-24 17:59:49 +00007834 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 +00007835
Martin v. Löwis11437992002-04-12 09:54:03 +00007836else
Matthias Kloseb9621712010-04-24 17:59:49 +00007837 if test "$ac_cv_type_long" = yes; then
7838 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7839$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007840as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007841See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007842 else
7843 ac_cv_sizeof_long=0
7844 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007846
Martin v. Löwis11437992002-04-12 09:54:03 +00007847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7849$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007850
7851
7852
Martin v. Löwis11437992002-04-12 09:54:03 +00007853cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007854#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007855_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007856
7857
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007858# The cast to long int works around a bug in the HP C Compiler
7859# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7860# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7861# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7863$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007864if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007865 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007866else
Matthias Kloseb9621712010-04-24 17:59:49 +00007867 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 +00007868
Martin v. Löwis11437992002-04-12 09:54:03 +00007869else
Matthias Kloseb9621712010-04-24 17:59:49 +00007870 if test "$ac_cv_type_void_p" = yes; then
7871 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7872$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007873as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007874See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007875 else
7876 ac_cv_sizeof_void_p=0
7877 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007878fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007879
Martin v. Löwis11437992002-04-12 09:54:03 +00007880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7882$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007883
7884
7885
Martin v. Löwis11437992002-04-12 09:54:03 +00007886cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007887#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007888_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007889
7890
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007891# The cast to long int works around a bug in the HP C Compiler
7892# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7893# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7894# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7896$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007897if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007898 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007899else
Matthias Kloseb9621712010-04-24 17:59:49 +00007900 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 +00007901
Martin v. Löwis11437992002-04-12 09:54:03 +00007902else
Matthias Kloseb9621712010-04-24 17:59:49 +00007903 if test "$ac_cv_type_short" = yes; then
7904 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7905$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007906as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007907See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007908 else
7909 ac_cv_sizeof_short=0
7910 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007912
Martin v. Löwis11437992002-04-12 09:54:03 +00007913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7915$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007916
7917
7918
Martin v. Löwis11437992002-04-12 09:54:03 +00007919cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007920#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007921_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007922
7923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007924# The cast to long int works around a bug in the HP C Compiler
7925# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7926# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7927# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7929$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007930if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007931 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007932else
Matthias Kloseb9621712010-04-24 17:59:49 +00007933 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 +00007934
Martin v. Löwis11437992002-04-12 09:54:03 +00007935else
Matthias Kloseb9621712010-04-24 17:59:49 +00007936 if test "$ac_cv_type_float" = yes; then
7937 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7938$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007939as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007940See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007941 else
7942 ac_cv_sizeof_float=0
7943 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007945
Martin v. Löwis11437992002-04-12 09:54:03 +00007946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7948$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007949
7950
7951
Martin v. Löwis11437992002-04-12 09:54:03 +00007952cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007953#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007954_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007955
7956
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007957# The cast to long int works around a bug in the HP C Compiler
7958# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7959# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7960# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7962$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007963if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007964 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007965else
Matthias Kloseb9621712010-04-24 17:59:49 +00007966 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 +00007967
Martin v. Löwis11437992002-04-12 09:54:03 +00007968else
Matthias Kloseb9621712010-04-24 17:59:49 +00007969 if test "$ac_cv_type_double" = yes; then
7970 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7971$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007972as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007973See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007974 else
7975 ac_cv_sizeof_double=0
7976 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007978
Martin v. Löwis11437992002-04-12 09:54:03 +00007979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7981$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007982
7983
7984
Martin v. Löwis11437992002-04-12 09:54:03 +00007985cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007986#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007987_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007988
7989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990# The cast to long int works around a bug in the HP C Compiler
7991# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7992# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7993# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7995$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007996if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007997 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007998else
Matthias Kloseb9621712010-04-24 17:59:49 +00007999 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 +00008000
Martin v. Löwis11437992002-04-12 09:54:03 +00008001else
Matthias Kloseb9621712010-04-24 17:59:49 +00008002 if test "$ac_cv_type_fpos_t" = yes; then
8003 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8004$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008005as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008006See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008007 else
8008 ac_cv_sizeof_fpos_t=0
8009 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008011
Martin v. Löwis11437992002-04-12 09:54:03 +00008012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8014$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008015
8016
8017
Martin v. Löwis11437992002-04-12 09:54:03 +00008018cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008019#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008020_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008021
Michael W. Hudson54241132001-12-07 15:38:26 +00008022
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008023# The cast to long int works around a bug in the HP C Compiler
8024# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8025# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8026# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8028$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008029if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008030 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008031else
Matthias Kloseb9621712010-04-24 17:59:49 +00008032 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 +00008033
Martin v. Löwis18e16552006-02-15 17:27:45 +00008034else
Matthias Kloseb9621712010-04-24 17:59:49 +00008035 if test "$ac_cv_type_size_t" = yes; then
8036 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8037$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008038as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008039See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008040 else
8041 ac_cv_sizeof_size_t=0
8042 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008044
Martin v. Löwis18e16552006-02-15 17:27:45 +00008045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8047$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008048
8049
8050
Martin v. Löwis18e16552006-02-15 17:27:45 +00008051cat >>confdefs.h <<_ACEOF
8052#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8053_ACEOF
8054
8055
Christian Heimes400adb02008-02-01 08:12:03 +00008056# The cast to long int works around a bug in the HP C Compiler
8057# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8058# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8059# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8061$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008062if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008063 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008064else
Matthias Kloseb9621712010-04-24 17:59:49 +00008065 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 +00008066
Christian Heimes400adb02008-02-01 08:12:03 +00008067else
Matthias Kloseb9621712010-04-24 17:59:49 +00008068 if test "$ac_cv_type_pid_t" = yes; then
8069 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8070$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008071as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008072See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008073 else
8074 ac_cv_sizeof_pid_t=0
8075 fi
8076fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008077
Christian Heimes400adb02008-02-01 08:12:03 +00008078fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8080$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008081
8082
8083
8084cat >>confdefs.h <<_ACEOF
8085#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8086_ACEOF
8087
8088
Michael W. Hudson54241132001-12-07 15:38:26 +00008089
Matthias Kloseb9621712010-04-24 17:59:49 +00008090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8091$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008092have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008094/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008095
Martin v. Löwis11437992002-04-12 09:54:03 +00008096int
8097main ()
8098{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008099long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008100 ;
8101 return 0;
8102}
8103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008104if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008105
8106
Matthias Kloseb9621712010-04-24 17:59:49 +00008107$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008108
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008109 have_long_long=yes
8110
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8114$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008115if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008116# The cast to long int works around a bug in the HP C Compiler
8117# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8118# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8119# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8121$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008122if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008123 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008124else
Matthias Kloseb9621712010-04-24 17:59:49 +00008125 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 +00008126
Martin v. Löwis11437992002-04-12 09:54:03 +00008127else
Matthias Kloseb9621712010-04-24 17:59:49 +00008128 if test "$ac_cv_type_long_long" = yes; then
8129 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8130$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008131as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008132See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008133 else
8134 ac_cv_sizeof_long_long=0
8135 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008136fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008137
Martin v. Löwis11437992002-04-12 09:54:03 +00008138fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8140$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008141
8142
8143
Martin v. Löwis11437992002-04-12 09:54:03 +00008144cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008145#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008146_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008147
Michael W. Hudson54241132001-12-07 15:38:26 +00008148
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008149fi
8150
Matthias Kloseb9621712010-04-24 17:59:49 +00008151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8152$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008153have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008155/* end confdefs.h. */
8156
8157int
8158main ()
8159{
8160long double x; x = (long double)0;
8161 ;
8162 return 0;
8163}
8164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008165if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008166
8167
Matthias Kloseb9621712010-04-24 17:59:49 +00008168$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008169
8170 have_long_double=yes
8171
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008172fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8175$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008176if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008177# The cast to long int works around a bug in the HP C Compiler
8178# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8179# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8180# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8182$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008183if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008184 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008185else
Matthias Kloseb9621712010-04-24 17:59:49 +00008186 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 +00008187
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008188else
Matthias Kloseb9621712010-04-24 17:59:49 +00008189 if test "$ac_cv_type_long_double" = yes; then
8190 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8191$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008192as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008193See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008194 else
8195 ac_cv_sizeof_long_double=0
8196 fi
8197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008198
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008199fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8201$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008202
8203
8204
8205cat >>confdefs.h <<_ACEOF
8206#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8207_ACEOF
8208
8209
8210fi
8211
8212
Matthias Kloseb9621712010-04-24 17:59:49 +00008213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8214$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008215have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008217/* end confdefs.h. */
8218
8219int
8220main ()
8221{
8222_Bool x; x = (_Bool)0;
8223 ;
8224 return 0;
8225}
8226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008227if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008228
8229
Matthias Kloseb9621712010-04-24 17:59:49 +00008230$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008231
8232 have_c99_bool=yes
8233
Thomas Woutersb2137042007-02-01 18:02:27 +00008234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8237$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008238if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008239# The cast to long int works around a bug in the HP C Compiler
8240# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8241# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8242# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8244$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008245if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008246 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008247else
Matthias Kloseb9621712010-04-24 17:59:49 +00008248 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 +00008249
Thomas Woutersb2137042007-02-01 18:02:27 +00008250else
Matthias Kloseb9621712010-04-24 17:59:49 +00008251 if test "$ac_cv_type__Bool" = yes; then
8252 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8253$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008254as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008255See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008256 else
8257 ac_cv_sizeof__Bool=0
8258 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008259fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008260
Thomas Woutersb2137042007-02-01 18:02:27 +00008261fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8263$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008264
8265
8266
Thomas Woutersb2137042007-02-01 18:02:27 +00008267cat >>confdefs.h <<_ACEOF
8268#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8269_ACEOF
8270
8271
8272fi
8273
Matthias Kloseb9621712010-04-24 17:59:49 +00008274ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008275 #include <stdint.h>
8276 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008277 #ifdef HAVE_INTTYPES_H
8278 #include <inttypes.h>
8279 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008280"
Victor Stinnere0be4232011-10-25 13:06:09 +02008281if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008282
8283cat >>confdefs.h <<_ACEOF
8284#define HAVE_UINTPTR_T 1
8285_ACEOF
8286
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008287# The cast to long int works around a bug in the HP C Compiler
8288# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8289# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8290# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8292$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008293if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008294 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008295else
Matthias Kloseb9621712010-04-24 17:59:49 +00008296 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 +00008297
Martin v. Löwis11437992002-04-12 09:54:03 +00008298else
Matthias Kloseb9621712010-04-24 17:59:49 +00008299 if test "$ac_cv_type_uintptr_t" = yes; then
8300 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8301$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008302as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008303See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008304 else
8305 ac_cv_sizeof_uintptr_t=0
8306 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008307fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008308
Martin v. Löwis11437992002-04-12 09:54:03 +00008309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8311$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008312
8313
8314
Martin v. Löwis11437992002-04-12 09:54:03 +00008315cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008316#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008317_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008318
Michael W. Hudson54241132001-12-07 15:38:26 +00008319
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008320fi
8321
Thomas Wouters89f507f2006-12-13 04:49:30 +00008322
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008323# The cast to long int works around a bug in the HP C Compiler
8324# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8325# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8326# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8328$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008329if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008330 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008331else
Matthias Kloseb9621712010-04-24 17:59:49 +00008332 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008333#ifdef HAVE_SYS_TYPES_H
8334#include <sys/types.h>
8335#endif
8336
Matthias Kloseb9621712010-04-24 17:59:49 +00008337"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008338
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008339else
Matthias Kloseb9621712010-04-24 17:59:49 +00008340 if test "$ac_cv_type_off_t" = yes; then
8341 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8342$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008343as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008344See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008345 else
8346 ac_cv_sizeof_off_t=0
8347 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008349
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008350fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8352$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008353
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008354
8355
Martin v. Löwis11437992002-04-12 09:54:03 +00008356cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008357#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008358_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008359
Michael W. Hudson54241132001-12-07 15:38:26 +00008360
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008361
Matthias Kloseb9621712010-04-24 17:59:49 +00008362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8363$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008364if test "$have_long_long" = yes
8365then
8366if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008367 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008368
Matthias Kloseb9621712010-04-24 17:59:49 +00008369$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008370
Matthias Kloseb9621712010-04-24 17:59:49 +00008371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8372$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008373else
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8375$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008376fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008377else
Matthias Kloseb9621712010-04-24 17:59:49 +00008378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8379$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008380fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008381
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008382# The cast to long int works around a bug in the HP C Compiler
8383# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8384# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8385# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8387$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008388if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008390else
Matthias Kloseb9621712010-04-24 17:59:49 +00008391 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008392#ifdef HAVE_SYS_TYPES_H
8393#include <sys/types.h>
8394#endif
8395#ifdef HAVE_TIME_H
8396#include <time.h>
8397#endif
8398
Matthias Kloseb9621712010-04-24 17:59:49 +00008399"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008400
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008401else
Matthias Kloseb9621712010-04-24 17:59:49 +00008402 if test "$ac_cv_type_time_t" = yes; then
8403 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8404$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008405as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008406See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008407 else
8408 ac_cv_sizeof_time_t=0
8409 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008410fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008411
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8414$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008415
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008416
8417
Martin v. Löwis11437992002-04-12 09:54:03 +00008418cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008419#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008420_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008421
Michael W. Hudson54241132001-12-07 15:38:26 +00008422
8423
Trent Mick635f6fb2000-08-23 21:33:05 +00008424# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008425ac_save_cc="$CC"
8426if test "$ac_cv_kpthread" = "yes"
8427then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008428elif test "$ac_cv_kthread" = "yes"
8429then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008430elif test "$ac_cv_pthread" = "yes"
8431then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008432fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008433
Matthias Kloseb9621712010-04-24 17:59:49 +00008434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8435$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008436have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008438/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008439
8440 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008441int
8442main ()
8443{
Guido van Rossum12580492000-09-24 16:47:19 +00008444pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008445 ;
8446 return 0;
8447}
Matthias Kloseb159a552010-04-25 21:00:44 +00008448
Martin v. Löwis11437992002-04-12 09:54:03 +00008449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008450if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008451 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8455$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008456if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008457 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008458# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8459# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8460# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8462$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008463if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008464 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008465else
Matthias Kloseb9621712010-04-24 17:59:49 +00008466 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008467#ifdef HAVE_PTHREAD_H
8468#include <pthread.h>
8469#endif
8470
Matthias Kloseb9621712010-04-24 17:59:49 +00008471"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008472
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008473else
Matthias Kloseb9621712010-04-24 17:59:49 +00008474 if test "$ac_cv_type_pthread_t" = yes; then
8475 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8476$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008477as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008478See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008479 else
8480 ac_cv_sizeof_pthread_t=0
8481 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008483
Trent Mick635f6fb2000-08-23 21:33:05 +00008484fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8486$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008487
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008488
8489
Martin v. Löwis11437992002-04-12 09:54:03 +00008490cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008491#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008492_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008493
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008494
Trent Mick635f6fb2000-08-23 21:33:05 +00008495fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008496CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008497
Michael W. Hudson54241132001-12-07 15:38:26 +00008498
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008499case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008500 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008501 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8502 ;;
8503 Darwin/*)
8504 OTHER_LIBTOOL_OPT=""
8505 ;;
8506esac
8507
8508
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008509
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008510case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008511 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008512 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8513 if test "${enable_universalsdk}"; then
8514 :
8515 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008516 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008517 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008518 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008519 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008520 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008521 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008522 if test ${gcc_version} '<' 4.0
8523 then
8524 LIBTOOL_CRUFT="-lcc_dynamic"
8525 else
8526 LIBTOOL_CRUFT=""
8527 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008528 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008529 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008530else
Matthias Kloseb9621712010-04-24 17:59:49 +00008531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008532/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008533
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008534 #include <unistd.h>
8535 int main(int argc, char*argv[])
8536 {
8537 if (sizeof(long) == 4) {
8538 return 0;
8539 } else {
8540 return 1;
8541 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008542 }
8543
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008545if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008546 ac_osx_32bit=yes
8547else
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008550rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8551 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008552fi
8553
8554
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008555 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008556 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008557 i386)
8558 MACOSX_DEFAULT_ARCH="i386"
8559 ;;
8560 ppc)
8561 MACOSX_DEFAULT_ARCH="ppc"
8562 ;;
8563 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008564 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008565 ;;
8566 esac
8567 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008568 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008569 i386)
8570 MACOSX_DEFAULT_ARCH="x86_64"
8571 ;;
8572 ppc)
8573 MACOSX_DEFAULT_ARCH="ppc64"
8574 ;;
8575 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008576 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008577 ;;
8578 esac
8579
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008580 fi
8581
8582 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008583 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008584 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008585esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8587$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008588if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008589then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008590 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008591 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008592 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008593
Matthias Kloseb9621712010-04-24 17:59:49 +00008594$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008595
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8597$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008598 if test $enable_shared = "yes"
8599 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008600 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 +00008601 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008602else
Matthias Kloseb9621712010-04-24 17:59:49 +00008603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8604$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008605fi
8606
Matthias Kloseb9621712010-04-24 17:59:49 +00008607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8608$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008609case $ac_sys_system/$ac_sys_release in
8610 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008611
Matthias Kloseb9621712010-04-24 17:59:49 +00008612$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008613
Matthias Kloseb9621712010-04-24 17:59:49 +00008614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8615$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008616 ;;
8617 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8619$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008620 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008621esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008622
Guido van Rossum0a516c91994-09-12 10:58:40 +00008623# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008624
Michael W. Hudson54241132001-12-07 15:38:26 +00008625
8626
8627
8628
Benjamin Peterson99f03762010-04-11 22:15:28 +00008629
Thomas Wouters477c8d52006-05-27 19:21:47 +00008630
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008631# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8632# -- usually .so, .sl on HP-UX, .dll on Cygwin
8633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8634$as_echo_n "checking the extension of shared libraries... " >&6; }
8635if test -z "$SHLIB_SUFFIX"; then
8636 case $ac_sys_system in
8637 hp*|HP*)
8638 case `uname -m` in
8639 ia64) SHLIB_SUFFIX=.so;;
8640 *) SHLIB_SUFFIX=.sl;;
8641 esac
8642 ;;
8643 CYGWIN*) SHLIB_SUFFIX=.dll;;
8644 *) SHLIB_SUFFIX=.so;;
8645 esac
8646fi
8647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8648$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008649
Guido van Rossum0a516c91994-09-12 10:58:40 +00008650# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008651# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008652# (Shared libraries in this instance are shared modules to be loaded into
8653# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8655$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008656if test -z "$LDSHARED"
8657then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008658 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008659 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008660 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008661 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008662 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008663 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008664 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008665 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008666 if test "$GCC" = "yes" ; then
8667 LDSHARED='$(CC) -shared'
8668 LDCXXSHARED='$(CXX) -shared'
8669 else
8670 LDSHARED='$(CC) -G'
8671 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008672 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008673 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008674 if test "$GCC" = "yes" ; then
8675 LDSHARED='$(CC) -shared'
8676 LDCXXSHARED='$(CXX) -shared'
8677 else
8678 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008679 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008680 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008681 LDSHARED='$(CC) -bundle'
8682 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008683 if test "$enable_framework" ; then
8684 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008685 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8686 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008687 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008688 else
8689 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008690 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008691 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008692 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008693 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008694 LDSHARED='$(CC) -bundle'
8695 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008696 if test "$enable_framework" ; then
8697 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008698 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8699 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008700 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008701 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008702 # No framework, use the Python app as bundle-loader
8703 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008704 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008705 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008706 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008707 Darwin/*)
8708 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8709 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008710
Ned Deily36820b62014-06-25 13:44:22 -07008711 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8712 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8713 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8714 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8715 if test ${dep_target_major} -eq 10 && \
8716 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008717 then
Ned Deily36820b62014-06-25 13:44:22 -07008718 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008719 LDSHARED='$(CC) -bundle'
8720 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008721 if test "$enable_framework" ; then
8722 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008723 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8724 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008725 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008726 else
8727 # No framework, use the Python app as bundle-loader
8728 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8729 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008730 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008731 fi
Ned Deily36820b62014-06-25 13:44:22 -07008732 else
8733 # building for OS X 10.3 and later
8734 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8735 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8736 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008737 fi
8738 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008739 Linux*|GNU*|QNX*)
8740 LDSHARED='$(CC) -shared'
8741 LDCXXSHARED='$(CXX) -shared';;
8742 BSD/OS*/4*)
8743 LDSHARED="gcc -shared"
8744 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008745 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008746 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008747 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008748 LDSHARED='$(CC) -shared'
8749 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008750 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008751 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008752 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008753 OpenBSD*)
8754 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8755 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008756 LDSHARED='$(CC) -shared $(CCSHARED)'
8757 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008758 else
8759 case `uname -r` in
8760 [01].* | 2.[0-7] | 2.[0-7].*)
8761 LDSHARED="ld -Bshareable ${LDFLAGS}"
8762 ;;
8763 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008764 LDSHARED='$(CC) -shared $(CCSHARED)'
8765 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008766 ;;
8767 esac
8768 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008769 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008770 LDSHARED='$(CC) -shared'
8771 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008772 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008773 if test "$GCC" = "yes" ; then
8774 LDSHARED='$(CC) -shared'
8775 LDCXXSHARED='$(CXX) -shared'
8776 else
8777 LDSHARED='$(CC) -G'
8778 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008779 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008780 SCO_SV*)
8781 LDSHARED='$(CC) -Wl,-G,-Bexport'
8782 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8783 CYGWIN*)
8784 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8785 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008786 *) LDSHARED="ld";;
8787 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8790$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008791LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008792BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008793# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008794# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8796$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008797if test -z "$CCSHARED"
8798then
Guido van Rossum07397971997-04-29 21:49:50 +00008799 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008800 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008801 then CCSHARED="-fPIC";
8802 elif test `uname -p` = sparc;
8803 then CCSHARED="-xcode=pic32";
8804 else CCSHARED="-Kpic";
8805 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008806 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008807 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008808 else CCSHARED="+z";
8809 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008810 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008811 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008812 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008813 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008814 if test "$GCC" = "yes"
8815 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008816 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008817 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008818 SCO_SV*)
8819 if test "$GCC" = "yes"
8820 then CCSHARED="-fPIC"
8821 else CCSHARED="-Kpic -belf"
8822 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008823 IRIX*/6*) case $CC in
8824 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008825 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008826 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008827 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8830$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008831# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008832# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8834$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008835if test -z "$LINKFORSHARED"
8836then
Guido van Rossum07397971997-04-29 21:49:50 +00008837 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008838 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008839 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008840 LINKFORSHARED="-Wl,-E -Wl,+s";;
8841# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008842 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008843 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008844 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008845 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008846 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008847
8848 # Issue #18075: the default maximum stack size (8MBytes) is too
8849 # small for the default recursion limit. Increase the stack size
8850 # to ensure that tests don't crash
8851 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8852
Jack Jansene578a632001-08-15 01:27:14 +00008853 if test "$enable_framework"
8854 then
Jack Jansenda49e192005-01-07 13:08:22 +00008855 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008856 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008857 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008858 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008859 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008860 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008861 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008862 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8863 then
8864 LINKFORSHARED="-Wl,--export-dynamic"
8865 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008866 SunOS/5*) case $CC in
8867 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008868 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008869 then
8870 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008871 fi;;
8872 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008873 CYGWIN*)
8874 if test $enable_shared = "no"
8875 then
8876 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8877 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008878 QNX*)
8879 # -Wl,-E causes the symbols to be added to the dynamic
8880 # symbol table so that they can be found when a module
8881 # is loaded. -N 2048K causes the stack size to be set
8882 # to 2048 kilobytes so that the stack doesn't overflow
8883 # when running test_compile.py.
8884 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008885 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8888$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008889
Michael W. Hudson54241132001-12-07 15:38:26 +00008890
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008891
Matthias Kloseb9621712010-04-24 17:59:49 +00008892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8893$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008894if test ! "$LIBRARY" = "$LDLIBRARY"
8895then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008896 case $ac_sys_system in
8897 CYGWIN*)
8898 # Cygwin needs CCSHARED when building extension DLLs
8899 # but not when building the interpreter DLL.
8900 CFLAGSFORSHARED='';;
8901 *)
8902 CFLAGSFORSHARED='$(CCSHARED)'
8903 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8906$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008907
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008908# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8909# library (with --enable-shared).
8910# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008911# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8912# if it is not required, since it creates a dependency of the shared library
8913# to LIBS. This, in turn, means that applications linking the shared libpython
8914# don't need to link LIBS explicitly. The default should be only changed
8915# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008916
Matthias Kloseb9621712010-04-24 17:59:49 +00008917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8918$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008919case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008920 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008921 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008922esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8924$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008925
8926
Guido van Rossum627b2d71993-12-24 10:39:16 +00008927# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8929$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008930if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008931 $as_echo_n "(cached) " >&6
8932else
8933 ac_check_lib_save_LIBS=$LIBS
8934LIBS="-lsendfile $LIBS"
8935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8936/* end confdefs.h. */
8937
8938/* Override any GCC internal prototype to avoid an error.
8939 Use char because int might match the return type of a GCC
8940 builtin and then its argument prototype would still apply. */
8941#ifdef __cplusplus
8942extern "C"
8943#endif
8944char sendfile ();
8945int
8946main ()
8947{
8948return sendfile ();
8949 ;
8950 return 0;
8951}
8952_ACEOF
8953if ac_fn_c_try_link "$LINENO"; then :
8954 ac_cv_lib_sendfile_sendfile=yes
8955else
8956 ac_cv_lib_sendfile_sendfile=no
8957fi
8958rm -f core conftest.err conftest.$ac_objext \
8959 conftest$ac_exeext conftest.$ac_ext
8960LIBS=$ac_check_lib_save_LIBS
8961fi
8962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8963$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008964if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008965 cat >>confdefs.h <<_ACEOF
8966#define HAVE_LIBSENDFILE 1
8967_ACEOF
8968
8969 LIBS="-lsendfile $LIBS"
8970
8971fi
8972
Matthias Kloseb9621712010-04-24 17:59:49 +00008973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8974$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008975if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008976 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008977else
Martin v. Löwis11437992002-04-12 09:54:03 +00008978 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008979LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008981/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008982
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008983/* Override any GCC internal prototype to avoid an error.
8984 Use char because int might match the return type of a GCC
8985 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008986#ifdef __cplusplus
8987extern "C"
8988#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008989char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008990int
8991main ()
8992{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008993return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008994 ;
8995 return 0;
8996}
8997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008998if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008999 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009000else
Matthias Kloseb9621712010-04-24 17:59:49 +00009001 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009003rm -f core conftest.err conftest.$ac_objext \
9004 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009005LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9008$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009009if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009010 cat >>confdefs.h <<_ACEOF
9011#define HAVE_LIBDL 1
9012_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009013
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009014 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009015
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009016fi
9017 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9019$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009020if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009021 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009022else
Martin v. Löwis11437992002-04-12 09:54:03 +00009023 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009024LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009026/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009027
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009028/* Override any GCC internal prototype to avoid an error.
9029 Use char because int might match the return type of a GCC
9030 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009031#ifdef __cplusplus
9032extern "C"
9033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009034char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009035int
9036main ()
9037{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009038return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 ;
9040 return 0;
9041}
9042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009043if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009044 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009045else
Matthias Kloseb9621712010-04-24 17:59:49 +00009046 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009048rm -f core conftest.err conftest.$ac_objext \
9049 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009050LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009051fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9053$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009054if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009055 cat >>confdefs.h <<_ACEOF
9056#define HAVE_LIBDLD 1
9057_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009058
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009059 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009060
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009061fi
9062 # Dynamic linking for HP-UX
Victor Stinnerbeeb5122014-11-28 13:28:25 +01009063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
9064$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
9065if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
9066 $as_echo_n "(cached) " >&6
9067else
9068 ac_check_lib_save_LIBS=$LIBS
9069LIBS="-lcrypto $LIBS"
9070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9071/* end confdefs.h. */
9072
9073/* Override any GCC internal prototype to avoid an error.
9074 Use char because int might match the return type of a GCC
9075 builtin and then its argument prototype would still apply. */
9076#ifdef __cplusplus
9077extern "C"
9078#endif
9079char RAND_egd ();
9080int
9081main ()
9082{
9083return RAND_egd ();
9084 ;
9085 return 0;
9086}
9087_ACEOF
9088if ac_fn_c_try_link "$LINENO"; then :
9089 ac_cv_lib_crypto_RAND_egd=yes
9090else
9091 ac_cv_lib_crypto_RAND_egd=no
9092fi
9093rm -f core conftest.err conftest.$ac_objext \
9094 conftest$ac_exeext conftest.$ac_ext
9095LIBS=$ac_check_lib_save_LIBS
9096fi
9097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
9098$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
9099if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
9100
9101$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
9102
9103fi
9104
Martin v. Löwis519adae2003-09-20 10:47:47 +00009105
Georg Brandlb1441c72009-01-03 22:33:39 +00009106# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009107if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9109$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009110if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009111 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009112else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009113 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009116
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009117/* Override any GCC internal prototype to avoid an error.
9118 Use char because int might match the return type of a GCC
9119 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009120#ifdef __cplusplus
9121extern "C"
9122#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009123char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009124int
9125main ()
9126{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009127return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009128 ;
9129 return 0;
9130}
9131_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009132for ac_lib in '' pthread rt posix4; do
9133 if test -z "$ac_lib"; then
9134 ac_res="none required"
9135 else
9136 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009137 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009138 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009139 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009140 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009141fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009142rm -f core conftest.err conftest.$ac_objext \
9143 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009144 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009145 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009147done
Victor Stinnere0be4232011-10-25 13:06:09 +02009148if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009149
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009150else
9151 ac_cv_search_sem_init=no
9152fi
9153rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009154LIBS=$ac_func_search_save_LIBS
9155fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9157$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009158ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009159if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009160 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009161
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009162fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009163 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009164 # posix4 on Solaris 2.6
9165 # pthread (first!) on Linux
9166fi
9167
Martin v. Löwis19d17342003-06-14 21:03:05 +00009168# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9170$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009171if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009172 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009173else
9174 ac_check_lib_save_LIBS=$LIBS
9175LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009177/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009178
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009179/* Override any GCC internal prototype to avoid an error.
9180 Use char because int might match the return type of a GCC
9181 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009182#ifdef __cplusplus
9183extern "C"
9184#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009185char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009186int
9187main ()
9188{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009189return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009190 ;
9191 return 0;
9192}
9193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009194if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009195 ac_cv_lib_intl_textdomain=yes
9196else
Matthias Kloseb9621712010-04-24 17:59:49 +00009197 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009199rm -f core conftest.err conftest.$ac_objext \
9200 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009201LIBS=$ac_check_lib_save_LIBS
9202fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9204$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009205if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009206
Matthias Kloseb9621712010-04-24 17:59:49 +00009207$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009208
Brett Cannonc6d936e2009-06-07 20:09:53 +00009209 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009210fi
9211
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009212
9213# checks for system dependent C++ extensions support
9214case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009215 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9216$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009218/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009219
Georg Brandl59e87bd2011-02-15 19:48:59 +00009220 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009221int
9222main ()
9223{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009224loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009225 ;
9226 return 0;
9227}
Matthias Kloseb159a552010-04-25 21:00:44 +00009228
Martin v. Löwis11437992002-04-12 09:54:03 +00009229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009230if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009231
Matthias Kloseb159a552010-04-25 21:00:44 +00009232
Matthias Kloseb9621712010-04-24 17:59:49 +00009233$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009234
Matthias Kloseb159a552010-04-25 21:00:44 +00009235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009236$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009237
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009238else
Matthias Kloseb159a552010-04-25 21:00:44 +00009239
9240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009241$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009242
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009244rm -f core conftest.err conftest.$ac_objext \
9245 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009246 *) ;;
9247esac
9248
Christian Heimes985ecdc2013-11-20 11:46:18 +01009249# check for systems that require aligned memory access
9250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9251$as_echo_n "checking aligned memory access is required... " >&6; }
9252if test "$cross_compiling" = yes; then :
9253 aligned_required=yes
9254else
9255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9256/* end confdefs.h. */
9257
9258int main()
9259{
9260 char s[16];
9261 int i, *p1, *p2;
9262 for (i=0; i < 16; i++)
9263 s[i] = i;
9264 p1 = (int*)(s+1);
9265 p2 = (int*)(s+2);
9266 if (*p1 == *p2)
9267 return 1;
9268 return 0;
9269}
9270
9271_ACEOF
9272if ac_fn_c_try_run "$LINENO"; then :
9273 aligned_required=no
9274else
9275 aligned_required=yes
9276fi
9277rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9278 conftest.$ac_objext conftest.beam conftest.$ac_ext
9279fi
9280
9281
9282if test "$aligned_required" = yes ; then
9283
9284$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9285
9286fi
9287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9288$as_echo "$aligned_required" >&6; }
9289
9290
9291# str, bytes and memoryview hash algorithm
9292
9293
9294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9295$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9296
9297# Check whether --with-hash_algorithm was given.
9298if test "${with_hash_algorithm+set}" = set; then :
9299 withval=$with_hash_algorithm;
9300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9301$as_echo "$withval" >&6; }
9302case "$withval" in
9303 siphash24)
9304 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9305
9306 ;;
9307 fnv)
9308 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9309
9310 ;;
9311 *)
9312 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9313 ;;
9314esac
9315
9316else
9317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9318$as_echo "default" >&6; }
9319fi
9320
9321
Charles-François Natalid30b0222014-05-08 23:08:51 +01009322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9323$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9324
9325# Check whether --with-address_sanitizer was given.
9326if test "${with_address_sanitizer+set}" = set; then :
9327 withval=$with_address_sanitizer;
9328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9329$as_echo "$withval" >&6; }
9330BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9331LDFLAGS="-fsanitize=address $LDFLAGS"
9332
9333else
9334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9335$as_echo "no" >&6; }
9336fi
9337
9338
Guido van Rossum70c7f481998-03-26 18:44:10 +00009339# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9341$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009342if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009343 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009344else
Martin v. Löwis11437992002-04-12 09:54:03 +00009345 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009346LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009348/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009349
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009350/* Override any GCC internal prototype to avoid an error.
9351 Use char because int might match the return type of a GCC
9352 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009353#ifdef __cplusplus
9354extern "C"
9355#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009356char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009357int
9358main ()
9359{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009360return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009361 ;
9362 return 0;
9363}
9364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009365if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009366 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009367else
Matthias Kloseb9621712010-04-24 17:59:49 +00009368 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009369fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009370rm -f core conftest.err conftest.$ac_objext \
9371 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009372LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9375$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009376if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009377 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009378fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009379 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9381$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009382if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009383 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009384else
Martin v. Löwis11437992002-04-12 09:54:03 +00009385 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009386LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009389
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009390/* Override any GCC internal prototype to avoid an error.
9391 Use char because int might match the return type of a GCC
9392 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009393#ifdef __cplusplus
9394extern "C"
9395#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009396char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009397int
9398main ()
9399{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009400return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009401 ;
9402 return 0;
9403}
9404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009405if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009406 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009407else
Matthias Kloseb9621712010-04-24 17:59:49 +00009408 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009409fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009410rm -f core conftest.err conftest.$ac_objext \
9411 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009412LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9415$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009416if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009417 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009418fi
9419 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009420
Matthias Kloseb9621712010-04-24 17:59:49 +00009421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9422$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009423
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009424# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009425if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009426 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9428$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009429LIBS="$withval $LIBS"
9430
9431else
Matthias Kloseb9621712010-04-24 17:59:49 +00009432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9433$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009434fi
9435
Guido van Rossum7f43da71994-08-01 12:15:30 +00009436
Benjamin Peterson0f3cde12014-12-15 00:00:23 -05009437
9438
9439
9440
9441
9442
9443
9444if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9445 if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009446 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9447set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9449$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009450if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009451 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009452else
9453 case $PKG_CONFIG in
9454 [\\/]* | ?:[\\/]*)
9455 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9456 ;;
9457 *)
9458 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9459for as_dir in $PATH
9460do
9461 IFS=$as_save_IFS
9462 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009463 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009464 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009465 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009466 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009467 break 2
9468 fi
9469done
Matthias Kloseb9621712010-04-24 17:59:49 +00009470 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009471IFS=$as_save_IFS
9472
9473 ;;
9474esac
9475fi
9476PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9477if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9479$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009480else
Matthias Kloseb9621712010-04-24 17:59:49 +00009481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9482$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009483fi
9484
9485
9486fi
9487if test -z "$ac_cv_path_PKG_CONFIG"; then
9488 ac_pt_PKG_CONFIG=$PKG_CONFIG
9489 # Extract the first word of "pkg-config", so it can be a program name with args.
9490set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9492$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009493if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009494 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009495else
9496 case $ac_pt_PKG_CONFIG in
9497 [\\/]* | ?:[\\/]*)
9498 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9499 ;;
9500 *)
9501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9502for as_dir in $PATH
9503do
9504 IFS=$as_save_IFS
9505 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009506 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009507 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009508 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009509 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009510 break 2
9511 fi
9512done
Matthias Kloseb9621712010-04-24 17:59:49 +00009513 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009514IFS=$as_save_IFS
9515
9516 ;;
9517esac
9518fi
9519ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9520if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9522$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009523else
Matthias Kloseb9621712010-04-24 17:59:49 +00009524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9525$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009526fi
9527
9528 if test "x$ac_pt_PKG_CONFIG" = x; then
9529 PKG_CONFIG=""
9530 else
9531 case $cross_compiling:$ac_tool_warned in
9532yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009533{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9534$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009535ac_tool_warned=yes ;;
9536esac
9537 PKG_CONFIG=$ac_pt_PKG_CONFIG
9538 fi
9539else
9540 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9541fi
9542
Benjamin Peterson0f3cde12014-12-15 00:00:23 -05009543fi
9544if test -n "$PKG_CONFIG"; then
9545 _pkg_min_version=0.9.0
9546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9547$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9548 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9550$as_echo "yes" >&6; }
9551 else
9552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9553$as_echo "no" >&6; }
9554 PKG_CONFIG=""
9555 fi
9556fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009557
9558# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9560$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009561
9562# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009563if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009564 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009565else
9566 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009567fi
9568
9569
Matthias Kloseb9621712010-04-24 17:59:49 +00009570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9571$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009572
9573# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9575$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009576
9577# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009578if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009579 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009580else
9581 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009582fi
9583
9584
9585if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009586 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9587else
9588 LIBFFI_INCLUDEDIR=""
9589fi
9590
9591
Matthias Kloseb9621712010-04-24 17:59:49 +00009592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9593$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009594
Stefan Krah60187b52012-03-23 19:06:27 +01009595# Check for use of the system libmpdec library
9596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9597$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9598
9599# Check whether --with-system_libmpdec was given.
9600if test "${with_system_libmpdec+set}" = set; then :
9601 withval=$with_system_libmpdec;
9602else
9603 with_system_libmpdec="no"
9604fi
9605
9606
9607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9608$as_echo "$with_system_libmpdec" >&6; }
9609
Benjamin Peterson076ed002010-10-31 17:11:02 +00009610# Check for support for loadable sqlite extensions
9611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9612$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9613# Check whether --enable-loadable-sqlite-extensions was given.
9614if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9615 enableval=$enable_loadable_sqlite_extensions;
9616else
9617 enable_loadable_sqlite_extensions="no"
9618fi
9619
9620
9621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9622$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9623
Ned Deilyd819b932013-09-06 01:07:05 -07009624# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9625
9626
9627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9628$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9629
9630# Check whether --with-tcltk-includes was given.
9631if test "${with_tcltk_includes+set}" = set; then :
9632 withval=$with_tcltk_includes;
9633else
9634 with_tcltk_includes="default"
9635fi
9636
9637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9638$as_echo "$with_tcltk_includes" >&6; }
9639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9640$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9641
9642# Check whether --with-tcltk-libs was given.
9643if test "${with_tcltk_libs+set}" = set; then :
9644 withval=$with_tcltk_libs;
9645else
9646 with_tcltk_libs="default"
9647fi
9648
9649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9650$as_echo "$with_tcltk_libs" >&6; }
9651if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9652then
9653 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9654 then
9655 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9656 fi
9657 TCLTK_INCLUDES=""
9658 TCLTK_LIBS=""
9659else
9660 TCLTK_INCLUDES="$with_tcltk_includes"
9661 TCLTK_LIBS="$with_tcltk_libs"
9662fi
9663
Matthias Klose55708cc2009-04-30 08:06:49 +00009664# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9666$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009667
9668# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009669if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009670 withval=$with_dbmliborder;
9671if test x$with_dbmliborder = xyes
9672then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009673as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009674else
9675 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9676 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9677 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009678 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009679 fi
9680 done
9681fi
9682fi
9683
Matthias Kloseb9621712010-04-24 17:59:49 +00009684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9685$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009686
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009687# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009688
9689
Matthias Kloseb9621712010-04-24 17:59:49 +00009690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9691$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009692
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009693# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009694if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009695 withval=$with_signal_module;
9696fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009697
9698
9699if test -z "$with_signal_module"
9700then with_signal_module="yes"
9701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9703$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009704
9705if test "${with_signal_module}" = "yes"; then
9706 USE_SIGNAL_MODULE=""
9707 SIGNAL_OBJS=""
9708else
9709 USE_SIGNAL_MODULE="#"
9710 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9711fi
9712
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009713# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009714
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009715USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009717
Martin v. Löwis11437992002-04-12 09:54:03 +00009718
9719# Templates for things AC_DEFINEd more than once.
9720# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009721
9722
Martin v. Löwis11437992002-04-12 09:54:03 +00009723
Matthias Kloseb9621712010-04-24 17:59:49 +00009724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9725$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009726
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009727# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009728if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009729 withval=$with_threads;
9730fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009731
9732
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009733# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009734
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009735# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009736if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009737 withval=$with_thread; with_threads=$with_thread
9738fi
9739
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009740
9741if test -z "$with_threads"
9742then with_threads="yes"
9743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9745$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009746
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009747
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009748if test "$with_threads" = "no"
9749then
9750 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009751elif test "$ac_cv_pthread_is_default" = yes
9752then
Matthias Kloseb9621712010-04-24 17:59:49 +00009753 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009754
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009755 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009756 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009757
9758 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009759 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009760elif test "$ac_cv_kpthread" = "yes"
9761then
9762 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009763 if test "$ac_cv_cxx_thread" = "yes"; then
9764 CXX="$CXX -Kpthread"
9765 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009766 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009767
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009768 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009769 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009770elif test "$ac_cv_kthread" = "yes"
9771then
9772 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009773 if test "$ac_cv_cxx_thread" = "yes"; then
9774 CXX="$CXX -Kthread"
9775 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009776 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009777
9778 posix_threads=yes
9779 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009780elif test "$ac_cv_pthread" = "yes"
9781then
9782 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009783 if test "$ac_cv_cxx_thread" = "yes"; then
9784 CXX="$CXX -pthread"
9785 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009786 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009787
9788 posix_threads=yes
9789 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009790else
9791 if test ! -z "$with_threads" -a -d "$with_threads"
9792 then LDFLAGS="$LDFLAGS -L$with_threads"
9793 fi
9794 if test ! -z "$withval" -a -d "$withval"
9795 then LDFLAGS="$LDFLAGS -L$withval"
9796 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009797
9798 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009799 # define _POSIX_THREADS in unistd.h. Some apparently don't
9800 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9802$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009804/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009805
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009806#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009807#ifdef _POSIX_THREADS
9808yes
9809#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009810
9811_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009812if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009813 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009814 unistd_defines_pthreads=yes
9815else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009816 unistd_defines_pthreads=no
9817fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009818rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009819
Matthias Kloseb9621712010-04-24 17:59:49 +00009820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9821$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009822
Matthias Kloseb9621712010-04-24 17:59:49 +00009823 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009824
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009825 # Just looking for pthread_create in libpthread is not enough:
9826 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9827 # So we really have to include pthread.h, and then link.
9828 _libs=$LIBS
9829 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9831$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009833/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009834
9835#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009836#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009837
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009838void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009839int
9840main ()
9841{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009842
9843pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009844 ;
9845 return 0;
9846}
9847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009848if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009849
Matthias Kloseb9621712010-04-24 17:59:49 +00009850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9851$as_echo "yes" >&6; }
9852 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009853
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009854 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009855 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009856else
Martin v. Löwis11437992002-04-12 09:54:03 +00009857
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009858 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009859 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009860if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009861 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009862
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009863 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009864 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009865else
Guido van Rossumad678af1998-10-02 14:42:15 +00009866
Matthias Kloseb9621712010-04-24 17:59:49 +00009867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9868$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009869if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009870 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009871else
Martin v. Löwis11437992002-04-12 09:54:03 +00009872 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009873LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009877/* Override any GCC internal prototype to avoid an error.
9878 Use char because int might match the return type of a GCC
9879 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009880#ifdef __cplusplus
9881extern "C"
9882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009883char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009884int
9885main ()
9886{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009887return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009888 ;
9889 return 0;
9890}
9891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009892if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009893 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009894else
Matthias Kloseb9621712010-04-24 17:59:49 +00009895 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009897rm -f core conftest.err conftest.$ac_objext \
9898 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009899LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9902$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009903if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009904 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009905
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009906 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009907 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009908 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009909else
Greg Steinadf63d62000-07-05 10:38:09 +00009910
Matthias Kloseb9621712010-04-24 17:59:49 +00009911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9912$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009913if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009914 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009915else
Martin v. Löwis11437992002-04-12 09:54:03 +00009916 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009917LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009919/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009920
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009921/* Override any GCC internal prototype to avoid an error.
9922 Use char because int might match the return type of a GCC
9923 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009924#ifdef __cplusplus
9925extern "C"
9926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009927char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009928int
9929main ()
9930{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009931return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009932 ;
9933 return 0;
9934}
9935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009936if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009937 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009938else
Matthias Kloseb9621712010-04-24 17:59:49 +00009939 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009941rm -f core conftest.err conftest.$ac_objext \
9942 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009943LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9946$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009947if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009948 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009949
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009950 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009951 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009952 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009953else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009954
Matthias Kloseb9621712010-04-24 17:59:49 +00009955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9956$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009957if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009958 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009959else
Martin v. Löwis11437992002-04-12 09:54:03 +00009960 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009961LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009963/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009964
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009965/* Override any GCC internal prototype to avoid an error.
9966 Use char because int might match the return type of a GCC
9967 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009968#ifdef __cplusplus
9969extern "C"
9970#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009971char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009972int
9973main ()
9974{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009975return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009976 ;
9977 return 0;
9978}
9979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009980if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009981 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009982else
Matthias Kloseb9621712010-04-24 17:59:49 +00009983 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009985rm -f core conftest.err conftest.$ac_objext \
9986 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009987LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9990$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009991if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009992 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009993
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009994 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009995 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009996 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009997else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009998
Matthias Kloseb9621712010-04-24 17:59:49 +00009999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10000$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010001if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010002 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010003else
Martin v. Löwis11437992002-04-12 09:54:03 +000010004 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010005LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010007/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010008
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010009/* Override any GCC internal prototype to avoid an error.
10010 Use char because int might match the return type of a GCC
10011 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010012#ifdef __cplusplus
10013extern "C"
10014#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010015char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010016int
10017main ()
10018{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010019return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010020 ;
10021 return 0;
10022}
10023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010024if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010025 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010026else
Matthias Kloseb9621712010-04-24 17:59:49 +000010027 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010029rm -f core conftest.err conftest.$ac_objext \
10030 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010031LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010032fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10034$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010035if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010036 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010037
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010038 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010039 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010040 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010041else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010042
Martin v. Löwis130fb172001-07-19 11:00:41 +000010043 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010044fi
10045
Guido van Rossum627b2d71993-12-24 10:39:16 +000010046
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010047fi
10048
Guido van Rossum0be3e491997-05-22 20:33:33 +000010049fi
10050
Guido van Rossum49545951997-12-02 19:28:29 +000010051fi
10052
Guido van Rossumb93a8621998-05-07 13:27:32 +000010053fi
10054
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010055fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010056rm -f core conftest.err conftest.$ac_objext \
10057 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010058
Matthias Kloseb9621712010-04-24 17:59:49 +000010059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10060$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010061if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010062 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010063else
Martin v. Löwis11437992002-04-12 09:54:03 +000010064 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010065LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010069/* Override any GCC internal prototype to avoid an error.
10070 Use char because int might match the return type of a GCC
10071 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010072#ifdef __cplusplus
10073extern "C"
10074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010075char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010076int
10077main ()
10078{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010079return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010080 ;
10081 return 0;
10082}
10083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010084if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010085 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010086else
Matthias Kloseb9621712010-04-24 17:59:49 +000010087 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010089rm -f core conftest.err conftest.$ac_objext \
10090 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010091LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10094$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010095if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010096 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010097
Martin v. Löwis130fb172001-07-19 11:00:41 +000010098 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010099 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010100 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010101fi
10102
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010103
Neal Norwitza978ab02002-11-02 16:58:05 +000010104 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10106$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010107if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010108 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010109else
Martin v. Löwis11437992002-04-12 09:54:03 +000010110 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010111LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010115/* Override any GCC internal prototype to avoid an error.
10116 Use char because int might match the return type of a GCC
10117 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010118#ifdef __cplusplus
10119extern "C"
10120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010121char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010122int
10123main ()
10124{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010125return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010126 ;
10127 return 0;
10128}
10129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010130if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010131 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010132else
Matthias Kloseb9621712010-04-24 17:59:49 +000010133 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010134fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010135rm -f core conftest.err conftest.$ac_objext \
10136 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010137LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10140$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010141if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010142 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010143
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010144 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010145 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010146 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010147fi
10148
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010149 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010150fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010151
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010152if test "$posix_threads" = "yes"; then
10153 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010154
Matthias Kloseb9621712010-04-24 17:59:49 +000010155$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010156
10157 fi
10158
10159 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10160 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010161 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010162$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010163
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010164 ;;
10165 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010166$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010167
10168 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010169 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010170$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010171
10172 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010173 esac
10174
Matthias Kloseb9621712010-04-24 17:59:49 +000010175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10176$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010177 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010178 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010179else
Matthias Kloseb9621712010-04-24 17:59:49 +000010180 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010181 ac_cv_pthread_system_supported=no
10182else
Matthias Kloseb9621712010-04-24 17:59:49 +000010183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010184/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010185
10186 #include <stdio.h>
10187 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010188 void *foo(void *parm) {
10189 return NULL;
10190 }
10191 main() {
10192 pthread_attr_t attr;
10193 pthread_t id;
10194 if (pthread_attr_init(&attr)) exit(-1);
10195 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10196 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10197 exit(0);
10198 }
10199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010200if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010201 ac_cv_pthread_system_supported=yes
10202else
Matthias Kloseb9621712010-04-24 17:59:49 +000010203 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010205rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10206 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010207fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010208
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010209
Guido van Rossum627b2d71993-12-24 10:39:16 +000010210fi
10211
Matthias Kloseb9621712010-04-24 17:59:49 +000010212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10213$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010214 if test "$ac_cv_pthread_system_supported" = "yes"; then
10215
Matthias Kloseb9621712010-04-24 17:59:49 +000010216$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010217
10218 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010219 for ac_func in pthread_sigmask
10220do :
10221 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010222if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010223 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010224#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010225_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010226 case $ac_sys_system in
10227 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010228
Matthias Kloseb9621712010-04-24 17:59:49 +000010229$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010230
10231 ;;
10232 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010233fi
10234done
10235
Christian Heimesf77b4b22013-08-21 13:26:05 +020010236 for ac_func in pthread_atfork
10237do :
10238 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10239if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10240 cat >>confdefs.h <<_ACEOF
10241#define HAVE_PTHREAD_ATFORK 1
10242_ACEOF
10243
10244fi
10245done
10246
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010247fi
10248
10249
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010250# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010251
Matthias Kloseb9621712010-04-24 17:59:49 +000010252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10253$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010254# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010255if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010256 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010257 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10259$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010260 ipv6=no
10261 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010262 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10263$as_echo "yes" >&6; }
10264 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010265
10266 ipv6=yes
10267 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010268 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010269else
Martin v. Löwis11437992002-04-12 09:54:03 +000010270
Matthias Kloseb9621712010-04-24 17:59:49 +000010271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010272/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010273 /* AF_INET6 available check */
10274#include <sys/types.h>
10275#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010276int
10277main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010278{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010279int domain = AF_INET6;
10280 ;
10281 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010282}
Martin v. Löwis11437992002-04-12 09:54:03 +000010283_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010284if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010285
Matthias Kloseb9621712010-04-24 17:59:49 +000010286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10287$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010288 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010289
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010290else
Matthias Kloseb159a552010-04-25 21:00:44 +000010291
Matthias Kloseb9621712010-04-24 17:59:49 +000010292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10293$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010294 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010295
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010296fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010298
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010299if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10301$as_echo_n "checking if RFC2553 API is available... " >&6; }
10302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010303/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010304
10305 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010306#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010307int
10308main ()
10309{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010310struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010311 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010312 ;
10313 return 0;
10314}
Matthias Kloseb159a552010-04-25 21:00:44 +000010315
Martin v. Löwis11437992002-04-12 09:54:03 +000010316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010317if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010318
10319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010320$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010321 ipv6=yes
10322
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010323else
Matthias Kloseb159a552010-04-25 21:00:44 +000010324
10325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010326$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010327 ipv6=no
10328
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010331fi
10332
10333if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010334 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010335
10336fi
10337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010338fi
10339
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010340
10341ipv6type=unknown
10342ipv6lib=none
10343ipv6trylibc=no
10344
10345if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10347$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010348 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10349 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010350 case $i in
10351 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010353/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010354
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010355#include <netinet/in.h>
10356#ifdef IPV6_INRIA_VERSION
10357yes
10358#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010359_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010360if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010361 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010362 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010363fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010364rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010365
10366 ;;
10367 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010369/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010370
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010371#include <netinet/in.h>
10372#ifdef __KAME__
10373yes
10374#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010375_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010376if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010377 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010378 ipv6type=$i;
10379 ipv6lib=inet6
10380 ipv6libdir=/usr/local/v6/lib
10381 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010382fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010383rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010384
10385 ;;
10386 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010388/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010389
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010390#include <features.h>
10391#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10392yes
10393#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010394_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010395if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010396 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010397 ipv6type=$i;
10398 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010399fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010400rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010401
10402 ;;
10403 linux-inet6)
10404 if test -d /usr/inet6; then
10405 ipv6type=$i
10406 ipv6lib=inet6
10407 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010408 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010409 fi
10410 ;;
10411 solaris)
10412 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010413 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010414 ipv6type=$i
10415 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010416 fi
10417 fi
10418 ;;
10419 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010421/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010422
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010423#include <sys/param.h>
10424#ifdef _TOSHIBA_INET6
10425yes
10426#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010427_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010428if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010429 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010430 ipv6type=$i;
10431 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010432 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010433fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010434rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010435
10436 ;;
10437 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010439/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010440
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010441#include </usr/local/v6/include/sys/v6config.h>
10442#ifdef __V6D__
10443yes
10444#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010445_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010446if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010447 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010448 ipv6type=$i;
10449 ipv6lib=v6;
10450 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010451 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010452fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010453rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010454
10455 ;;
10456 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010458/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010459
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010460#include <sys/param.h>
10461#ifdef _ZETA_MINAMI_INET6
10462yes
10463#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010464_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010465if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010466 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010467 ipv6type=$i;
10468 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010469 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010470fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010471rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010472
10473 ;;
10474 esac
10475 if test "$ipv6type" != "unknown"; then
10476 break
10477 fi
10478 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10480$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010481fi
10482
10483if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10484 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10485 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10486 echo "using lib$ipv6lib"
10487 else
10488 if test $ipv6trylibc = "yes"; then
10489 echo "using libc"
10490 else
10491 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10492 echo "You need to fetch lib$ipv6lib.a from appropriate"
10493 echo 'ipv6 kit and compile beforehand.'
10494 exit 1
10495 fi
10496 fi
10497fi
10498
Matthias Kloseb9621712010-04-24 17:59:49 +000010499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10500$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010502/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010503
10504 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010505int
10506main ()
10507{
10508FSIORefNum fRef = 0
10509 ;
10510 return 0;
10511}
Matthias Kloseb159a552010-04-25 21:00:44 +000010512
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010514if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010515
Matthias Kloseb159a552010-04-25 21:00:44 +000010516
Matthias Kloseb9621712010-04-24 17:59:49 +000010517$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010518
Matthias Kloseb9621712010-04-24 17:59:49 +000010519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10520$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010521
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010522else
Matthias Kloseb159a552010-04-25 21:00:44 +000010523
Matthias Kloseb9621712010-04-24 17:59:49 +000010524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10525$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010526
10527fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10529
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010530# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10532$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010534# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010535if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010536 withval=$with_doc_strings;
10537fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010538
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010539
10540if test -z "$with_doc_strings"
10541then with_doc_strings="yes"
10542fi
10543if test "$with_doc_strings" != "no"
10544then
10545
Matthias Kloseb9621712010-04-24 17:59:49 +000010546$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010547
10548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10550$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010551
Antoine Pitrou042b1282010-08-13 21:15:58 +000010552# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10554$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010555
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010556# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010557if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010558 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010559if test "$withval" != no
10560then
10561
Matthias Kloseb9621712010-04-24 17:59:49 +000010562$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010563
Matthias Kloseb9621712010-04-24 17:59:49 +000010564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10565$as_echo "yes" >&6; }
10566else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10567$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010568fi
10569else
Matthias Kloseb9621712010-04-24 17:59:49 +000010570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10571$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010572fi
10573
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010574
10575# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10577$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010578
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010579# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010580if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010581 withval=$with_pymalloc;
10582fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010583
Neil Schemenauera35c6882001-02-27 04:45:05 +000010584
Neil Schemenauer16c22972002-03-22 15:34:49 +000010585if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010586then
10587 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010588fi
10589if test "$with_pymalloc" != "no"
10590then
Martin v. Löwis11437992002-04-12 09:54:03 +000010591
Matthias Kloseb9621712010-04-24 17:59:49 +000010592$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010593
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010594 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010595fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10597$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010598
Benjamin Peterson05159c42009-12-03 03:01:27 +000010599# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10601$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010602
10603# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010604if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010605 withval=$with_valgrind;
10606else
10607 with_valgrind=no
10608fi
10609
Matthias Kloseb9621712010-04-24 17:59:49 +000010610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10611$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010612if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010613 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 +020010614if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010615
Matthias Kloseb9621712010-04-24 17:59:49 +000010616$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010617
10618else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010619 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010620
10621fi
10622
10623
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010624 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010625fi
10626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010627# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010628
Guido van Rossum98935bf2001-09-05 19:13:16 +000010629DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010630
Guido van Rossume97ee181999-12-20 21:27:22 +000010631# the dlopen() function means we might want to use dynload_shlib.o. some
10632# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010633for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010634do :
10635 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010636if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010637 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010638#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010639_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010640
Guido van Rossume97ee181999-12-20 21:27:22 +000010641fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010642done
Guido van Rossume97ee181999-12-20 21:27:22 +000010643
Michael W. Hudson54241132001-12-07 15:38:26 +000010644
Guido van Rossume97ee181999-12-20 21:27:22 +000010645# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10646# loading of modules.
10647
Matthias Kloseb9621712010-04-24 17:59:49 +000010648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10649$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010650if test -z "$DYNLOADFILE"
10651then
10652 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010653 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10654 if test "$ac_cv_func_dlopen" = yes
10655 then DYNLOADFILE="dynload_shlib.o"
10656 else DYNLOADFILE="dynload_aix.o"
10657 fi
10658 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010659 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010660 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10661 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010662 *)
10663 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10664 # out any dynamic loading
10665 if test "$ac_cv_func_dlopen" = yes
10666 then DYNLOADFILE="dynload_shlib.o"
10667 else DYNLOADFILE="dynload_stub.o"
10668 fi
10669 ;;
10670 esac
10671fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10673$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010674if test "$DYNLOADFILE" != "dynload_stub.o"
10675then
Martin v. Löwis11437992002-04-12 09:54:03 +000010676
Matthias Kloseb9621712010-04-24 17:59:49 +000010677$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010678
10679fi
10680
Neil Schemenauer4e425612001-06-19 15:44:15 +000010681# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10682
Michael W. Hudson54241132001-12-07 15:38:26 +000010683
Matthias Kloseb9621712010-04-24 17:59:49 +000010684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10685$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010686if test -z "$MACHDEP_OBJS"
10687then
Jack Jansene578a632001-08-15 01:27:14 +000010688 MACHDEP_OBJS=$extra_machdep_objs
10689else
10690 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010691fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010692if test -z "$MACHDEP_OBJS"; then
10693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10694$as_echo "none" >&6; }
10695else
10696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10697$as_echo "$MACHDEP_OBJS" >&6; }
10698fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010699
Guido van Rossum627b2d71993-12-24 10:39:16 +000010700# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010701for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010702 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010703 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010010704 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010705 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010706 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010707 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010708 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10709 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010710 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010711 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010712 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010713 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010714 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010715 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010716 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10717 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010718 sigaction sigaltstack siginterrupt sigpending sigrelse \
10719 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010720 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010721 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010722 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010723do :
10724 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10725ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010726if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010727 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010728#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010729_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010730
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010731fi
10732done
10733
Michael W. Hudson54241132001-12-07 15:38:26 +000010734
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010735ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10736 #include <dirent.h>
10737"
10738if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10739
10740$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10741
10742fi
10743
10744
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010745# For some functions, having a definition is not sufficient, since
10746# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10748$as_echo_n "checking for chroot... " >&6; }
10749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010750/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010751#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010752int
10753main ()
10754{
10755void *x=chroot
10756 ;
10757 return 0;
10758}
10759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010760if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010761
Matthias Kloseb9621712010-04-24 17:59:49 +000010762$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010763
Matthias Kloseb159a552010-04-25 21:00:44 +000010764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010765$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010766else
Matthias Kloseb9621712010-04-24 17:59:49 +000010767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10768$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010769
10770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10773$as_echo_n "checking for link... " >&6; }
10774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010775/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010776#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010777int
10778main ()
10779{
10780void *x=link
10781 ;
10782 return 0;
10783}
10784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010785if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010786
Matthias Kloseb9621712010-04-24 17:59:49 +000010787$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010788
Matthias Kloseb159a552010-04-25 21:00:44 +000010789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010790$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010791else
Matthias Kloseb9621712010-04-24 17:59:49 +000010792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10793$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010794
10795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10798$as_echo_n "checking for symlink... " >&6; }
10799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010800/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010801#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010802int
10803main ()
10804{
10805void *x=symlink
10806 ;
10807 return 0;
10808}
10809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010810if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010811
Matthias Kloseb9621712010-04-24 17:59:49 +000010812$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010813
Matthias Kloseb159a552010-04-25 21:00:44 +000010814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010815$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010816else
Matthias Kloseb9621712010-04-24 17:59:49 +000010817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10818$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010819
10820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10823$as_echo_n "checking for fchdir... " >&6; }
10824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010825/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010826#include <unistd.h>
10827int
10828main ()
10829{
10830void *x=fchdir
10831 ;
10832 return 0;
10833}
10834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010835if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010836
Matthias Kloseb9621712010-04-24 17:59:49 +000010837$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010838
Matthias Kloseb159a552010-04-25 21:00:44 +000010839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010840$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010841else
Matthias Kloseb9621712010-04-24 17:59:49 +000010842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10843$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010844
10845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10848$as_echo_n "checking for fsync... " >&6; }
10849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010850/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010851#include <unistd.h>
10852int
10853main ()
10854{
10855void *x=fsync
10856 ;
10857 return 0;
10858}
10859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010860if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010861
Matthias Kloseb9621712010-04-24 17:59:49 +000010862$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010863
Matthias Kloseb159a552010-04-25 21:00:44 +000010864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010865$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010866else
Matthias Kloseb9621712010-04-24 17:59:49 +000010867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10868$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010869
10870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10873$as_echo_n "checking for fdatasync... " >&6; }
10874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010875/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010876#include <unistd.h>
10877int
10878main ()
10879{
10880void *x=fdatasync
10881 ;
10882 return 0;
10883}
10884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010885if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010886
Matthias Kloseb9621712010-04-24 17:59:49 +000010887$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +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; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010891else
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10893$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010894
10895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10898$as_echo_n "checking for epoll... " >&6; }
10899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010900/* end confdefs.h. */
10901#include <sys/epoll.h>
10902int
10903main ()
10904{
10905void *x=epoll_create
10906 ;
10907 return 0;
10908}
10909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010910if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010911
Matthias Kloseb9621712010-04-24 17:59:49 +000010912$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010913
Matthias Kloseb159a552010-04-25 21:00:44 +000010914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010915$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010916else
Matthias Kloseb9621712010-04-24 17:59:49 +000010917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10918$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010919
10920fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10923$as_echo_n "checking for epoll_create1... " >&6; }
10924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10925/* end confdefs.h. */
10926#include <sys/epoll.h>
10927int
10928main ()
10929{
10930void *x=epoll_create1
10931 ;
10932 return 0;
10933}
10934_ACEOF
10935if ac_fn_c_try_compile "$LINENO"; then :
10936
10937$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10938
10939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10940$as_echo "yes" >&6; }
10941else
10942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10943$as_echo "no" >&6; }
10944
10945fi
10946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10948$as_echo_n "checking for kqueue... " >&6; }
10949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010950/* end confdefs.h. */
10951
10952#include <sys/types.h>
10953#include <sys/event.h>
10954
10955int
10956main ()
10957{
10958int x=kqueue()
10959 ;
10960 return 0;
10961}
10962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010963if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010964
Matthias Kloseb9621712010-04-24 17:59:49 +000010965$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010966
Matthias Kloseb159a552010-04-25 21:00:44 +000010967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010968$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010969else
Matthias Kloseb9621712010-04-24 17:59:49 +000010970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10971$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010972
10973fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10976$as_echo_n "checking for prlimit... " >&6; }
10977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10978/* end confdefs.h. */
10979
10980#include <sys/time.h>
10981#include <sys/resource.h>
10982
10983int
10984main ()
10985{
10986void *x=prlimit
10987 ;
10988 return 0;
10989}
10990_ACEOF
10991if ac_fn_c_try_compile "$LINENO"; then :
10992
10993$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10994
10995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10996$as_echo "yes" >&6; }
10997else
10998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10999$as_echo "no" >&6; }
11000
11001fi
11002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11003
Martin v. Löwisd5843682002-11-21 20:41:28 +000011004# On some systems (eg. FreeBSD 5), we would find a definition of the
11005# functions ctermid_r, setgroups in the library, but no prototype
11006# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11007# address to avoid compiler warnings and potential miscompilations
11008# because of the missing prototypes.
11009
Matthias Kloseb9621712010-04-24 17:59:49 +000011010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11011$as_echo_n "checking for ctermid_r... " >&6; }
11012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011013/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011014
Martin v. Löwisd5843682002-11-21 20:41:28 +000011015#include <stdio.h>
11016
Martin v. Löwisd5843682002-11-21 20:41:28 +000011017int
11018main ()
11019{
11020void* p = ctermid_r
11021 ;
11022 return 0;
11023}
11024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011025if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011026
Matthias Kloseb9621712010-04-24 17:59:49 +000011027$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011028
Matthias Kloseb159a552010-04-25 21:00:44 +000011029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011030$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011031else
Matthias Kloseb9621712010-04-24 17:59:49 +000011032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11033$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011034
11035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11037
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11039$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011040if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011041 $as_echo_n "(cached) " >&6
11042else
11043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011044/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011045#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011046int
11047main ()
11048{
11049void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011050
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011051 ;
11052 return 0;
11053}
11054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011055if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011056 ac_cv_flock_decl=yes
11057else
11058 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011059
11060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011062
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011063fi
11064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11065$as_echo "$ac_cv_flock_decl" >&6; }
11066if test "x${ac_cv_flock_decl}" = xyes; then
11067 for ac_func in flock
11068do :
11069 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011070if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011071 cat >>confdefs.h <<_ACEOF
11072#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011073_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011074
Antoine Pitroua3000072010-09-07 14:52:42 +000011075else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011077$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011078if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011079 $as_echo_n "(cached) " >&6
11080else
11081 ac_check_lib_save_LIBS=$LIBS
11082LIBS="-lbsd $LIBS"
11083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11084/* end confdefs.h. */
11085
11086/* Override any GCC internal prototype to avoid an error.
11087 Use char because int might match the return type of a GCC
11088 builtin and then its argument prototype would still apply. */
11089#ifdef __cplusplus
11090extern "C"
11091#endif
11092char flock ();
11093int
11094main ()
11095{
11096return flock ();
11097 ;
11098 return 0;
11099}
11100_ACEOF
11101if ac_fn_c_try_link "$LINENO"; then :
11102 ac_cv_lib_bsd_flock=yes
11103else
11104 ac_cv_lib_bsd_flock=no
11105fi
11106rm -f core conftest.err conftest.$ac_objext \
11107 conftest$ac_exeext conftest.$ac_ext
11108LIBS=$ac_check_lib_save_LIBS
11109fi
11110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11111$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011112if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011113 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011114
11115
11116$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11117
11118
11119fi
11120
11121
11122fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011123done
11124
Antoine Pitroua3000072010-09-07 14:52:42 +000011125fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011126
Matthias Kloseb9621712010-04-24 17:59:49 +000011127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11128$as_echo_n "checking for getpagesize... " >&6; }
11129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011130/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011131
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011132#include <unistd.h>
11133
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011134int
11135main ()
11136{
11137void* p = getpagesize
11138 ;
11139 return 0;
11140}
11141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011142if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011143
Matthias Kloseb9621712010-04-24 17:59:49 +000011144$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011145
Matthias Kloseb159a552010-04-25 21:00:44 +000011146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011147$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011148else
Matthias Kloseb9621712010-04-24 17:59:49 +000011149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11150$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011151
11152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011154
Victor Stinner984890f2011-11-24 13:53:38 +010011155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11156$as_echo_n "checking for broken unsetenv... " >&6; }
11157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11158/* end confdefs.h. */
11159
11160#include <stdlib.h>
11161
11162int
11163main ()
11164{
11165int res = unsetenv("DUMMY")
11166 ;
11167 return 0;
11168}
11169_ACEOF
11170if ac_fn_c_try_compile "$LINENO"; then :
11171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11172$as_echo "no" >&6; }
11173else
11174
11175$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11176
11177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11178$as_echo "yes" >&6; }
11179
11180fi
11181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11182
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011183for ac_prog in true
11184do
11185 # Extract the first word of "$ac_prog", so it can be a program name with args.
11186set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11188$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011189if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011190 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011191else
11192 if test -n "$TRUE"; then
11193 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11194else
11195as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11196for as_dir in $PATH
11197do
11198 IFS=$as_save_IFS
11199 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011200 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011201 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011202 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011203 $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 +000011204 break 2
11205 fi
11206done
Matthias Kloseb9621712010-04-24 17:59:49 +000011207 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011208IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011209
11210fi
11211fi
11212TRUE=$ac_cv_prog_TRUE
11213if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11215$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011216else
Matthias Kloseb9621712010-04-24 17:59:49 +000011217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11218$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011219fi
11220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011221
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011222 test -n "$TRUE" && break
11223done
11224test -n "$TRUE" || TRUE="/bin/true"
11225
11226
Matthias Kloseb9621712010-04-24 17:59:49 +000011227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11228$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011229if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011230 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011231else
11232 ac_check_lib_save_LIBS=$LIBS
11233LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011235/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011237/* Override any GCC internal prototype to avoid an error.
11238 Use char because int might match the return type of a GCC
11239 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011240#ifdef __cplusplus
11241extern "C"
11242#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011243char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011244int
11245main ()
11246{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011247return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011248 ;
11249 return 0;
11250}
11251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011252if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011253 ac_cv_lib_c_inet_aton=yes
11254else
Matthias Kloseb9621712010-04-24 17:59:49 +000011255 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011257rm -f core conftest.err conftest.$ac_objext \
11258 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011259LIBS=$ac_check_lib_save_LIBS
11260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11262$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011263if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011264 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011265else
Matthias Kloseb9621712010-04-24 17:59:49 +000011266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11267$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011268if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011269 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011270else
11271 ac_check_lib_save_LIBS=$LIBS
11272LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011274/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011275
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011276/* Override any GCC internal prototype to avoid an error.
11277 Use char because int might match the return type of a GCC
11278 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011279#ifdef __cplusplus
11280extern "C"
11281#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011282char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011283int
11284main ()
11285{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011286return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011287 ;
11288 return 0;
11289}
11290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011291if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011292 ac_cv_lib_resolv_inet_aton=yes
11293else
Matthias Kloseb9621712010-04-24 17:59:49 +000011294 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011295fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011296rm -f core conftest.err conftest.$ac_objext \
11297 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011298LIBS=$ac_check_lib_save_LIBS
11299fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11301$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011302if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011303 cat >>confdefs.h <<_ACEOF
11304#define HAVE_LIBRESOLV 1
11305_ACEOF
11306
11307 LIBS="-lresolv $LIBS"
11308
11309fi
11310
11311
11312fi
11313
11314
Christian Heimesd0764e22007-12-04 15:00:33 +000011315# On Tru64, chflags seems to be present, but calling it will
11316# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11318$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011319if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011320 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011321else
Matthias Kloseb9621712010-04-24 17:59:49 +000011322 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011323 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011324else
Matthias Kloseb9621712010-04-24 17:59:49 +000011325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011326/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011327
Christian Heimesd0764e22007-12-04 15:00:33 +000011328#include <sys/stat.h>
11329#include <unistd.h>
11330int main(int argc, char*argv[])
11331{
11332 if(chflags(argv[0], 0) != 0)
11333 return 1;
11334 return 0;
11335}
Ned Deily3eb67d52011-06-28 00:00:28 -070011336
Christian Heimesd0764e22007-12-04 15:00:33 +000011337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011338if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011339 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011340else
Matthias Kloseb9621712010-04-24 17:59:49 +000011341 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011342fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011343rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11344 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011345fi
11346
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011347
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011348fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11350$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011351if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011352 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011353if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011354 ac_cv_have_chflags="yes"
11355else
11356 ac_cv_have_chflags="no"
11357fi
11358
11359fi
11360if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011361
Matthias Kloseb9621712010-04-24 17:59:49 +000011362$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011363
11364fi
11365
Matthias Kloseb9621712010-04-24 17:59:49 +000011366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11367$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011368if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011369 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011370else
Matthias Kloseb9621712010-04-24 17:59:49 +000011371 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011372 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011373else
Matthias Kloseb9621712010-04-24 17:59:49 +000011374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011375/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011376
Christian Heimesd0764e22007-12-04 15:00:33 +000011377#include <sys/stat.h>
11378#include <unistd.h>
11379int main(int argc, char*argv[])
11380{
11381 if(lchflags(argv[0], 0) != 0)
11382 return 1;
11383 return 0;
11384}
Ned Deily3eb67d52011-06-28 00:00:28 -070011385
Christian Heimesd0764e22007-12-04 15:00:33 +000011386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011387if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011388 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011389else
Matthias Kloseb9621712010-04-24 17:59:49 +000011390 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011392rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11393 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011394fi
11395
11396
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11399$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011400if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011401 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011402if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011403 ac_cv_have_lchflags="yes"
11404else
11405 ac_cv_have_lchflags="no"
11406fi
11407
11408fi
11409if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011410
Matthias Kloseb9621712010-04-24 17:59:49 +000011411$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011412
11413fi
11414
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011415case $ac_sys_system/$ac_sys_release in
11416Darwin/*)
11417 _CUR_CFLAGS="${CFLAGS}"
11418 _CUR_LDFLAGS="${LDFLAGS}"
11419 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11420 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11421 ;;
11422esac
11423
Matthias Kloseb9621712010-04-24 17:59:49 +000011424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11425$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011426if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011427 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011428else
11429 ac_check_lib_save_LIBS=$LIBS
11430LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011432/* end confdefs.h. */
11433
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011434/* Override any GCC internal prototype to avoid an error.
11435 Use char because int might match the return type of a GCC
11436 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011437#ifdef __cplusplus
11438extern "C"
11439#endif
11440char inflateCopy ();
11441int
11442main ()
11443{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011444return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011445 ;
11446 return 0;
11447}
11448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011449if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011450 ac_cv_lib_z_inflateCopy=yes
11451else
Matthias Kloseb9621712010-04-24 17:59:49 +000011452 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011453fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011454rm -f core conftest.err conftest.$ac_objext \
11455 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011456LIBS=$ac_check_lib_save_LIBS
11457fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11459$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011460if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011461
Matthias Kloseb9621712010-04-24 17:59:49 +000011462$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011463
11464fi
11465
11466
11467case $ac_sys_system/$ac_sys_release in
11468Darwin/*)
11469 CFLAGS="${_CUR_CFLAGS}"
11470 LDFLAGS="${_CUR_LDFLAGS}"
11471 ;;
11472esac
11473
Matthias Kloseb9621712010-04-24 17:59:49 +000011474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11475$as_echo_n "checking for hstrerror... " >&6; }
11476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011477/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011478
Martin v. Löwise9416172003-05-03 10:12:45 +000011479#include <netdb.h>
11480
Martin v. Löwise9416172003-05-03 10:12:45 +000011481int
11482main ()
11483{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011484void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011485 ;
11486 return 0;
11487}
11488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011489if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011490
Matthias Kloseb9621712010-04-24 17:59:49 +000011491$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011492
Matthias Kloseb159a552010-04-25 21:00:44 +000011493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011494$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011495else
Matthias Kloseb9621712010-04-24 17:59:49 +000011496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11497$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011498
11499fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011500rm -f core conftest.err conftest.$ac_objext \
11501 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011502
Matthias Kloseb9621712010-04-24 17:59:49 +000011503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11504$as_echo_n "checking for inet_aton... " >&6; }
11505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011506/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011507
Martin v. Löwis86d66262006-02-17 08:40:11 +000011508#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011509#include <sys/socket.h>
11510#include <netinet/in.h>
11511#include <arpa/inet.h>
11512
Martin v. Löwise9416172003-05-03 10:12:45 +000011513int
11514main ()
11515{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011516void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011517 ;
11518 return 0;
11519}
11520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011521if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011522
Matthias Kloseb9621712010-04-24 17:59:49 +000011523$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011524
Matthias Kloseb159a552010-04-25 21:00:44 +000011525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011526$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011527else
Matthias Kloseb9621712010-04-24 17:59:49 +000011528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11529$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011530
11531fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011532rm -f core conftest.err conftest.$ac_objext \
11533 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011534
Matthias Kloseb9621712010-04-24 17:59:49 +000011535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11536$as_echo_n "checking for inet_pton... " >&6; }
11537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011538/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011539
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011540#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011541#include <sys/socket.h>
11542#include <netinet/in.h>
11543#include <arpa/inet.h>
11544
Martin v. Löwise9416172003-05-03 10:12:45 +000011545int
11546main ()
11547{
11548void* p = inet_pton
11549 ;
11550 return 0;
11551}
11552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011553if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011554
Matthias Kloseb9621712010-04-24 17:59:49 +000011555$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011556
Matthias Kloseb159a552010-04-25 21:00:44 +000011557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011558$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011559else
Matthias Kloseb9621712010-04-24 17:59:49 +000011560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11561$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011562
11563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011565
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011566# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11568$as_echo_n "checking for setgroups... " >&6; }
11569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011570/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011571
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011572#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011573#ifdef HAVE_GRP_H
11574#include <grp.h>
11575#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011576
Martin v. Löwisd5843682002-11-21 20:41:28 +000011577int
11578main ()
11579{
11580void* p = setgroups
11581 ;
11582 return 0;
11583}
11584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011585if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011586
Matthias Kloseb9621712010-04-24 17:59:49 +000011587$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011588
Matthias Kloseb159a552010-04-25 21:00:44 +000011589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011590$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011591else
Matthias Kloseb9621712010-04-24 17:59:49 +000011592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11593$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011594
11595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011597
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011598# check for openpty and forkpty
11599
11600for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011601do :
11602 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011603if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011604 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011605#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011606_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011607
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011608else
Matthias Kloseb9621712010-04-24 17:59:49 +000011609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11610$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011611if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011612 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011613else
Martin v. Löwis11437992002-04-12 09:54:03 +000011614 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011615LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011618
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011619/* Override any GCC internal prototype to avoid an error.
11620 Use char because int might match the return type of a GCC
11621 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011622#ifdef __cplusplus
11623extern "C"
11624#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011625char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011626int
11627main ()
11628{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011629return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011630 ;
11631 return 0;
11632}
11633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011634if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011635 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011636else
Matthias Kloseb9621712010-04-24 17:59:49 +000011637 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011638fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011639rm -f core conftest.err conftest.$ac_objext \
11640 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011641LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11644$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011645if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011646 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011647 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011648else
Matthias Kloseb9621712010-04-24 17:59:49 +000011649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11650$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011651if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011652 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011653else
11654 ac_check_lib_save_LIBS=$LIBS
11655LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011657/* end confdefs.h. */
11658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011659/* Override any GCC internal prototype to avoid an error.
11660 Use char because int might match the return type of a GCC
11661 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011662#ifdef __cplusplus
11663extern "C"
11664#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011665char openpty ();
11666int
11667main ()
11668{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011669return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011670 ;
11671 return 0;
11672}
11673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011674if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011675 ac_cv_lib_bsd_openpty=yes
11676else
Matthias Kloseb9621712010-04-24 17:59:49 +000011677 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011678fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011679rm -f core conftest.err conftest.$ac_objext \
11680 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011681LIBS=$ac_check_lib_save_LIBS
11682fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11684$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011685if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011686 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011687 LIBS="$LIBS -lbsd"
11688fi
11689
11690
11691fi
11692
Fred Drake8cef4cf2000-06-28 16:40:38 +000011693
11694fi
11695done
11696
11697for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011698do :
11699 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011700if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011701 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011702#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011703_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011704
Fred Drake8cef4cf2000-06-28 16:40:38 +000011705else
Matthias Kloseb9621712010-04-24 17:59:49 +000011706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11707$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011708if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011709 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011710else
Martin v. Löwis11437992002-04-12 09:54:03 +000011711 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011712LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011716/* Override any GCC internal prototype to avoid an error.
11717 Use char because int might match the return type of a GCC
11718 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011719#ifdef __cplusplus
11720extern "C"
11721#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011722char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011723int
11724main ()
11725{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011726return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011727 ;
11728 return 0;
11729}
11730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011731if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011732 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011733else
Matthias Kloseb9621712010-04-24 17:59:49 +000011734 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011735fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011736rm -f core conftest.err conftest.$ac_objext \
11737 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011738LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011739fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11741$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011742if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011744 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011745else
Matthias Kloseb9621712010-04-24 17:59:49 +000011746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11747$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011748if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011749 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011750else
11751 ac_check_lib_save_LIBS=$LIBS
11752LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011754/* end confdefs.h. */
11755
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011756/* Override any GCC internal prototype to avoid an error.
11757 Use char because int might match the return type of a GCC
11758 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011759#ifdef __cplusplus
11760extern "C"
11761#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011762char forkpty ();
11763int
11764main ()
11765{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011766return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011767 ;
11768 return 0;
11769}
11770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011771if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011772 ac_cv_lib_bsd_forkpty=yes
11773else
Matthias Kloseb9621712010-04-24 17:59:49 +000011774 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011775fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011776rm -f core conftest.err conftest.$ac_objext \
11777 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011778LIBS=$ac_check_lib_save_LIBS
11779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11781$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011782if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011783 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011784 LIBS="$LIBS -lbsd"
11785fi
11786
11787
11788fi
11789
Fred Drake8cef4cf2000-06-28 16:40:38 +000011790
11791fi
11792done
11793
Jack Jansendd19cf82001-12-06 22:36:17 +000011794
Christian Heimesb186d002008-03-18 15:15:01 +000011795# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011796for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011797do :
11798 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011799if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011800 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011801#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011802_ACEOF
11803
11804fi
11805done
11806
11807
Michael W. Hudson54241132001-12-07 15:38:26 +000011808# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011809for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011810do :
11811 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11812ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011813if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011814 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011815#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011816_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011817
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011818fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011819done
11820
Michael W. Hudson54241132001-12-07 15:38:26 +000011821
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011822ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011823if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011824 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011825
Martin v. Löwis1142de32002-03-29 16:28:31 +000011826else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011827 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011828 *" dup2.$ac_objext "* ) ;;
11829 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011830 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011831esac
11832
Martin v. Löwis1142de32002-03-29 16:28:31 +000011833fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011834
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011835ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011836if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011837 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11838
11839else
11840 case " $LIBOBJS " in
11841 *" strdup.$ac_objext "* ) ;;
11842 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11843 ;;
11844esac
11845
11846fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011847
11848
11849for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011850do :
11851 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011852if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011853 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011854#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011857/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011858#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011859int
11860main ()
11861{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011862getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011863 ;
11864 return 0;
11865}
11866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011867if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011868
Matthias Kloseb9621712010-04-24 17:59:49 +000011869$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011870
Guido van Rossum627b2d71993-12-24 10:39:16 +000011871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011873
Guido van Rossum627b2d71993-12-24 10:39:16 +000011874fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011875done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011876
Jack Jansen150753c2003-03-29 22:07:47 +000011877for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011878do :
11879 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011880if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011881 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011882#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011885/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011886#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011887int
11888main ()
11889{
11890setpgrp(0,0);
11891 ;
11892 return 0;
11893}
11894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011895if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011896
Matthias Kloseb9621712010-04-24 17:59:49 +000011897$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011898
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011899fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011901
11902fi
11903done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011904
Thomas Wouters3a584202000-08-05 23:28:51 +000011905for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011906do :
11907 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011908if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011909 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011910#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011913/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011914#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011915int
11916main ()
11917{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011918gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011919 ;
11920 return 0;
11921}
11922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011923if ac_fn_c_try_compile "$LINENO"; then :
11924
Guido van Rossum627b2d71993-12-24 10:39:16 +000011925else
Skip Montanaro6dead952003-09-25 14:50:04 +000011926
Matthias Kloseb9621712010-04-24 17:59:49 +000011927$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011928
Martin v. Löwis11437992002-04-12 09:54:03 +000011929
Guido van Rossum627b2d71993-12-24 10:39:16 +000011930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011932
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011933fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011934done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011935
Michael W. Hudson54241132001-12-07 15:38:26 +000011936
Victor Stinnere0be4232011-10-25 13:06:09 +020011937for ac_func in clock_gettime
11938do :
11939 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11940if test "x$ac_cv_func_clock_gettime" = xyes; then :
11941 cat >>confdefs.h <<_ACEOF
11942#define HAVE_CLOCK_GETTIME 1
11943_ACEOF
11944
11945else
11946
11947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11948$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11949if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11950 $as_echo_n "(cached) " >&6
11951else
11952 ac_check_lib_save_LIBS=$LIBS
11953LIBS="-lrt $LIBS"
11954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11955/* end confdefs.h. */
11956
11957/* Override any GCC internal prototype to avoid an error.
11958 Use char because int might match the return type of a GCC
11959 builtin and then its argument prototype would still apply. */
11960#ifdef __cplusplus
11961extern "C"
11962#endif
11963char clock_gettime ();
11964int
11965main ()
11966{
11967return clock_gettime ();
11968 ;
11969 return 0;
11970}
11971_ACEOF
11972if ac_fn_c_try_link "$LINENO"; then :
11973 ac_cv_lib_rt_clock_gettime=yes
11974else
11975 ac_cv_lib_rt_clock_gettime=no
11976fi
11977rm -f core conftest.err conftest.$ac_objext \
11978 conftest$ac_exeext conftest.$ac_ext
11979LIBS=$ac_check_lib_save_LIBS
11980fi
11981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11982$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11983if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11984
Victor Stinner7efb8332014-08-29 15:41:08 +020011985 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020011986 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11987
11988
11989$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11990
11991
11992fi
11993
11994
11995fi
11996done
11997
11998
11999for ac_func in clock_getres
12000do :
12001 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12002if test "x$ac_cv_func_clock_getres" = xyes; then :
12003 cat >>confdefs.h <<_ACEOF
12004#define HAVE_CLOCK_GETRES 1
12005_ACEOF
12006
12007else
12008
12009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12010$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12011if ${ac_cv_lib_rt_clock_getres+:} false; then :
12012 $as_echo_n "(cached) " >&6
12013else
12014 ac_check_lib_save_LIBS=$LIBS
12015LIBS="-lrt $LIBS"
12016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12017/* end confdefs.h. */
12018
12019/* Override any GCC internal prototype to avoid an error.
12020 Use char because int might match the return type of a GCC
12021 builtin and then its argument prototype would still apply. */
12022#ifdef __cplusplus
12023extern "C"
12024#endif
12025char clock_getres ();
12026int
12027main ()
12028{
12029return clock_getres ();
12030 ;
12031 return 0;
12032}
12033_ACEOF
12034if ac_fn_c_try_link "$LINENO"; then :
12035 ac_cv_lib_rt_clock_getres=yes
12036else
12037 ac_cv_lib_rt_clock_getres=no
12038fi
12039rm -f core conftest.err conftest.$ac_objext \
12040 conftest$ac_exeext conftest.$ac_ext
12041LIBS=$ac_check_lib_save_LIBS
12042fi
12043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12044$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12045if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12046
12047 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12048
12049
12050fi
12051
12052
12053fi
12054done
12055
12056
Matthias Kloseb9621712010-04-24 17:59:49 +000012057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12058$as_echo_n "checking for major... " >&6; }
12059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012060/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012061
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012062#if defined(MAJOR_IN_MKDEV)
12063#include <sys/mkdev.h>
12064#elif defined(MAJOR_IN_SYSMACROS)
12065#include <sys/sysmacros.h>
12066#else
12067#include <sys/types.h>
12068#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012069
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012070int
12071main ()
12072{
12073
12074 makedev(major(0),minor(0));
12075
12076 ;
12077 return 0;
12078}
12079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012080if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012081
12082
Matthias Kloseb9621712010-04-24 17:59:49 +000012083$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012084
Matthias Kloseb9621712010-04-24 17:59:49 +000012085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12086$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012087
12088else
Skip Montanaro6dead952003-09-25 14:50:04 +000012089
Matthias Kloseb9621712010-04-24 17:59:49 +000012090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12091$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012092
12093fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012094rm -f core conftest.err conftest.$ac_objext \
12095 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012096
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012097# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012098# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12100$as_echo_n "checking for getaddrinfo... " >&6; }
12101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012102/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012103
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012104#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012105#include <sys/socket.h>
12106#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012107#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012108
Martin v. Löwis11437992002-04-12 09:54:03 +000012109int
12110main ()
12111{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012112getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012113 ;
12114 return 0;
12115}
12116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012117if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012118 have_getaddrinfo=yes
12119else
Matthias Kloseb9621712010-04-24 17:59:49 +000012120 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012122rm -f core conftest.err conftest.$ac_objext \
12123 conftest$ac_exeext conftest.$ac_ext
12124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12125$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012126if test $have_getaddrinfo = yes
12127then
Matthias Kloseb9621712010-04-24 17:59:49 +000012128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12129$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012130 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012131 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012132else
Matthias Kloseb9621712010-04-24 17:59:49 +000012133 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012134
12135if test "${enable_ipv6+set}" = set; then
12136 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12137else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012138 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012139fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012140else
Matthias Kloseb9621712010-04-24 17:59:49 +000012141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012142/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012143
Stefan Krah19c21392012-11-22 23:47:32 +010012144#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012145#include <sys/types.h>
12146#include <netdb.h>
12147#include <string.h>
12148#include <sys/socket.h>
12149#include <netinet/in.h>
12150
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012151int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012152{
12153 int passive, gaierr, inet4 = 0, inet6 = 0;
12154 struct addrinfo hints, *ai, *aitop;
12155 char straddr[INET6_ADDRSTRLEN], strport[16];
12156
12157 for (passive = 0; passive <= 1; passive++) {
12158 memset(&hints, 0, sizeof(hints));
12159 hints.ai_family = AF_UNSPEC;
12160 hints.ai_flags = passive ? AI_PASSIVE : 0;
12161 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012162 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012163 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12164 (void)gai_strerror(gaierr);
12165 goto bad;
12166 }
12167 for (ai = aitop; ai; ai = ai->ai_next) {
12168 if (ai->ai_addr == NULL ||
12169 ai->ai_addrlen == 0 ||
12170 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12171 straddr, sizeof(straddr), strport, sizeof(strport),
12172 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12173 goto bad;
12174 }
12175 switch (ai->ai_family) {
12176 case AF_INET:
12177 if (strcmp(strport, "54321") != 0) {
12178 goto bad;
12179 }
12180 if (passive) {
12181 if (strcmp(straddr, "0.0.0.0") != 0) {
12182 goto bad;
12183 }
12184 } else {
12185 if (strcmp(straddr, "127.0.0.1") != 0) {
12186 goto bad;
12187 }
12188 }
12189 inet4++;
12190 break;
12191 case AF_INET6:
12192 if (strcmp(strport, "54321") != 0) {
12193 goto bad;
12194 }
12195 if (passive) {
12196 if (strcmp(straddr, "::") != 0) {
12197 goto bad;
12198 }
12199 } else {
12200 if (strcmp(straddr, "::1") != 0) {
12201 goto bad;
12202 }
12203 }
12204 inet6++;
12205 break;
12206 case AF_UNSPEC:
12207 goto bad;
12208 break;
12209 default:
12210 /* another family support? */
12211 break;
12212 }
12213 }
12214 }
12215
12216 if (!(inet4 == 0 || inet4 == 2))
12217 goto bad;
12218 if (!(inet6 == 0 || inet6 == 2))
12219 goto bad;
12220
12221 if (aitop)
12222 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012223 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012224
12225 bad:
12226 if (aitop)
12227 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012228 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012229}
12230
Martin v. Löwis11437992002-04-12 09:54:03 +000012231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012232if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012233 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012234else
Matthias Kloseb9621712010-04-24 17:59:49 +000012235 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012237rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12238 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012240
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012241fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012242
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012244
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12246$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12247
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012248if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012249then
12250 if test $ipv6 = yes
12251 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012252 echo 'Fatal: You must get working getaddrinfo() function.'
12253 echo ' or you can specify "--disable-ipv6"'.
12254 exit 1
12255 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012256else
Martin v. Löwis11437992002-04-12 09:54:03 +000012257
Matthias Kloseb9621712010-04-24 17:59:49 +000012258$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012259
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012260fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012261
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012262for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012263do :
12264 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012265if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012266 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012267#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012268_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012269
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012270fi
12271done
12272
Michael W. Hudson54241132001-12-07 15:38:26 +000012273
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012274# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12276$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012277if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012278 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012279else
Matthias Kloseb9621712010-04-24 17:59:49 +000012280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012281/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012282#include <sys/types.h>
12283#include <sys/time.h>
12284#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012285
Martin v. Löwis11437992002-04-12 09:54:03 +000012286int
12287main ()
12288{
12289if ((struct tm *) 0)
12290return 0;
12291 ;
12292 return 0;
12293}
12294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012295if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012296 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012297else
Matthias Kloseb9621712010-04-24 17:59:49 +000012298 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012301fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12303$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012304if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012305
Matthias Kloseb9621712010-04-24 17:59:49 +000012306$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012307
12308fi
12309
Matthias Kloseb9621712010-04-24 17:59:49 +000012310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12311$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012312if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012313 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012314else
Matthias Kloseb9621712010-04-24 17:59:49 +000012315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012316/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012317#include <sys/types.h>
12318#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012319
Martin v. Löwis11437992002-04-12 09:54:03 +000012320int
12321main ()
12322{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012323struct tm tm;
12324 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012325 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012326 ;
12327 return 0;
12328}
12329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012330if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012331 ac_cv_struct_tm=time.h
12332else
Matthias Kloseb9621712010-04-24 17:59:49 +000012333 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012336fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12338$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012339if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012340
Matthias Kloseb9621712010-04-24 17:59:49 +000012341$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012342
12343fi
12344
Matthias Kloseb9621712010-04-24 17:59:49 +000012345ac_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 +000012346#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012347
Matthias Kloseb9621712010-04-24 17:59:49 +000012348"
Victor Stinnere0be4232011-10-25 13:06:09 +020012349if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012350
12351cat >>confdefs.h <<_ACEOF
12352#define HAVE_STRUCT_TM_TM_ZONE 1
12353_ACEOF
12354
12355
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012356fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012357
Martin v. Löwis11437992002-04-12 09:54:03 +000012358if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12359
Matthias Kloseb9621712010-04-24 17:59:49 +000012360$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012361
12362else
Matthias Kloseb9621712010-04-24 17:59:49 +000012363 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12364"
Victor Stinnere0be4232011-10-25 13:06:09 +020012365if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012366 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012367else
Matthias Kloseb9621712010-04-24 17:59:49 +000012368 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369fi
12370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012371cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012372#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012373_ACEOF
12374
Matthias Kloseb9621712010-04-24 17:59:49 +000012375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12376$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012377if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012378 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012379else
Matthias Kloseb9621712010-04-24 17:59:49 +000012380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012381/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012382#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012383#if !HAVE_DECL_TZNAME
12384extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012385#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012386
Martin v. Löwis11437992002-04-12 09:54:03 +000012387int
12388main ()
12389{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012390return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012391 ;
12392 return 0;
12393}
12394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012395if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012396 ac_cv_var_tzname=yes
12397else
Matthias Kloseb9621712010-04-24 17:59:49 +000012398 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012399fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012400rm -f core conftest.err conftest.$ac_objext \
12401 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012402fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12404$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012405 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012406
Matthias Kloseb9621712010-04-24 17:59:49 +000012407$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012408
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012409 fi
12410fi
12411
Matthias Kloseb9621712010-04-24 17:59:49 +000012412ac_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 +020012413if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012414
12415cat >>confdefs.h <<_ACEOF
12416#define HAVE_STRUCT_STAT_ST_RDEV 1
12417_ACEOF
12418
12419
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012420fi
12421
Matthias Kloseb9621712010-04-24 17:59:49 +000012422ac_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 +020012423if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012424
Martin v. Löwis11437992002-04-12 09:54:03 +000012425cat >>confdefs.h <<_ACEOF
12426#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12427_ACEOF
12428
12429
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012430fi
12431
Matthias Kloseb9621712010-04-24 17:59:49 +000012432ac_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 +020012433if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012434
12435cat >>confdefs.h <<_ACEOF
12436#define HAVE_STRUCT_STAT_ST_FLAGS 1
12437_ACEOF
12438
12439
12440fi
12441
Matthias Kloseb9621712010-04-24 17:59:49 +000012442ac_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 +020012443if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012444
12445cat >>confdefs.h <<_ACEOF
12446#define HAVE_STRUCT_STAT_ST_GEN 1
12447_ACEOF
12448
12449
12450fi
12451
Matthias Kloseb9621712010-04-24 17:59:49 +000012452ac_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 +020012453if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012454
12455cat >>confdefs.h <<_ACEOF
12456#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12457_ACEOF
12458
12459
12460fi
12461
Matthias Kloseb9621712010-04-24 17:59:49 +000012462ac_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 +020012463if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012464
Martin v. Löwis11437992002-04-12 09:54:03 +000012465cat >>confdefs.h <<_ACEOF
12466#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12467_ACEOF
12468
12469
Matthias Kloseb9621712010-04-24 17:59:49 +000012470$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012471
12472else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012473 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012474 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012475 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12476 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012477esac
12478
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012479fi
12480
Michael W. Hudson54241132001-12-07 15:38:26 +000012481
Martin v. Löwis11437992002-04-12 09:54:03 +000012482
Matthias Kloseb9621712010-04-24 17:59:49 +000012483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12484$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012485if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012486 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012487else
Matthias Kloseb159a552010-04-25 21:00:44 +000012488
Matthias Kloseb9621712010-04-24 17:59:49 +000012489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012490/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012491#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012492int
12493main ()
12494{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012495return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012496 ;
12497 return 0;
12498}
12499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012500if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012501 ac_cv_header_time_altzone=yes
12502else
Matthias Kloseb9621712010-04-24 17:59:49 +000012503 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012506
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012507fi
12508
Matthias Kloseb9621712010-04-24 17:59:49 +000012509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12510$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012511if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012512
Matthias Kloseb9621712010-04-24 17:59:49 +000012513$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012514
12515fi
12516
Guido van Rossumda88dad1995-01-26 00:46:29 +000012517was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12519$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012521/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012522
12523#include <sys/types.h>
12524#include <sys/select.h>
12525#include <sys/time.h>
12526
Martin v. Löwis11437992002-04-12 09:54:03 +000012527int
12528main ()
12529{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012530;
Martin v. Löwis11437992002-04-12 09:54:03 +000012531 ;
12532 return 0;
12533}
12534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012535if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012536
12537
Matthias Kloseb9621712010-04-24 17:59:49 +000012538$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012539
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012540 was_it_defined=yes
12541
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12545$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012546
Matthias Kloseb9621712010-04-24 17:59:49 +000012547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12548$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012549if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012550 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012551else
Matthias Kloseb9621712010-04-24 17:59:49 +000012552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012553/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012554#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012555int
12556main ()
12557{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012558struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012559 ;
12560 return 0;
12561}
12562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012563if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012564 ac_cv_struct_addrinfo=yes
12565else
Matthias Kloseb9621712010-04-24 17:59:49 +000012566 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12569fi
12570
Matthias Kloseb9621712010-04-24 17:59:49 +000012571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12572$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012573if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012574
Matthias Kloseb9621712010-04-24 17:59:49 +000012575$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012576
12577fi
12578
Matthias Kloseb9621712010-04-24 17:59:49 +000012579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12580$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012581if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012582 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012583else
Matthias Kloseb9621712010-04-24 17:59:49 +000012584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012585/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012586
12587# include <sys/types.h>
12588# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012589int
12590main ()
12591{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012592struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012593 ;
12594 return 0;
12595}
12596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012597if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012598 ac_cv_struct_sockaddr_storage=yes
12599else
Matthias Kloseb9621712010-04-24 17:59:49 +000012600 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12603fi
12604
Matthias Kloseb9621712010-04-24 17:59:49 +000012605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12606$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012607if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012608
Matthias Kloseb9621712010-04-24 17:59:49 +000012609$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012610
12611fi
12612
Guido van Rossum627b2d71993-12-24 10:39:16 +000012613# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012614
Matthias Kloseb9621712010-04-24 17:59:49 +000012615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12616$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012617if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012618 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012619else
Matthias Kloseb9621712010-04-24 17:59:49 +000012620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012621/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012622$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012623int
12624main ()
12625{
12626static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012627test_array [0] = 0;
12628return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012629
12630 ;
12631 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012632}
Martin v. Löwis11437992002-04-12 09:54:03 +000012633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012634if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012635 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012636else
Matthias Kloseb9621712010-04-24 17:59:49 +000012637 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012640fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12642$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012643if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012644 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012645
12646fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012647
Matthias Kloseb9621712010-04-24 17:59:49 +000012648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12649$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012650if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012651 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012652else
Matthias Kloseb9621712010-04-24 17:59:49 +000012653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012654/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012655
Martin v. Löwis11437992002-04-12 09:54:03 +000012656int
12657main ()
12658{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012659
Martin v. Löwis11437992002-04-12 09:54:03 +000012660#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012661 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012662 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012663 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012664 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012665 char const *const *pcpcc;
12666 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012667 /* NEC SVR4.0.2 mips cc rejects this. */
12668 struct point {int x, y;};
12669 static struct point const zero = {0,0};
12670 /* AIX XL C 1.02.0.0 rejects this.
12671 It does not let you subtract one const X* pointer from another in
12672 an arm of an if-expression whose if-part is not a constant
12673 expression */
12674 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012675 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012676 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012677 ++pcpcc;
12678 ppc = (char**) pcpcc;
12679 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012680 { /* SCO 3.2v4 cc rejects this sort of thing. */
12681 char tx;
12682 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012683 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012684
Martin v. Löwis11437992002-04-12 09:54:03 +000012685 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012686 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012687 }
12688 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12689 int x[] = {25, 17};
12690 const int *foo = &x[0];
12691 ++foo;
12692 }
12693 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12694 typedef const int *iptr;
12695 iptr p = 0;
12696 ++p;
12697 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012698 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012699 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012700 struct s { int j; const int *ap[3]; } bx;
12701 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012702 }
12703 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12704 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012705 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012706 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012707 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012708#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012709
Martin v. Löwis11437992002-04-12 09:54:03 +000012710 ;
12711 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012712}
Martin v. Löwis11437992002-04-12 09:54:03 +000012713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012714if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012715 ac_cv_c_const=yes
12716else
Matthias Kloseb9621712010-04-24 17:59:49 +000012717 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012720fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12722$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012723if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012724
Matthias Kloseb9621712010-04-24 17:59:49 +000012725$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012726
12727fi
12728
Michael W. Hudson54241132001-12-07 15:38:26 +000012729
Guido van Rossumda88dad1995-01-26 00:46:29 +000012730works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12732$as_echo_n "checking for working volatile... " >&6; }
12733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012734/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012735
Martin v. Löwis11437992002-04-12 09:54:03 +000012736int
12737main ()
12738{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012739volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012740 ;
12741 return 0;
12742}
12743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012744if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012745 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012746else
Skip Montanaro6dead952003-09-25 14:50:04 +000012747
Matthias Kloseb9621712010-04-24 17:59:49 +000012748$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012749
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012750
Guido van Rossum627b2d71993-12-24 10:39:16 +000012751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12754$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012755
Guido van Rossumda88dad1995-01-26 00:46:29 +000012756works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12758$as_echo_n "checking for working signed char... " >&6; }
12759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012760/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012761
Martin v. Löwis11437992002-04-12 09:54:03 +000012762int
12763main ()
12764{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012765signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012766 ;
12767 return 0;
12768}
12769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012770if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012771 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012772else
Skip Montanaro6dead952003-09-25 14:50:04 +000012773
Matthias Kloseb9621712010-04-24 17:59:49 +000012774$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012775
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012776
Guido van Rossum7f43da71994-08-01 12:15:30 +000012777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12780$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012781
Guido van Rossumda88dad1995-01-26 00:46:29 +000012782have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12784$as_echo_n "checking for prototypes... " >&6; }
12785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012786/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012787int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012788int
12789main ()
12790{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012791return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012792 ;
12793 return 0;
12794}
12795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012796if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012797
Matthias Kloseb9621712010-04-24 17:59:49 +000012798$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012799
Matthias Kloseb159a552010-04-25 21:00:44 +000012800 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12804$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012805
Guido van Rossumda88dad1995-01-26 00:46:29 +000012806works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12808$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012810/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012811
12812#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012813int foo(int x, ...) {
12814 va_list va;
12815 va_start(va, x);
12816 va_arg(va, int);
12817 va_arg(va, char *);
12818 va_arg(va, double);
12819 return 0;
12820}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012821
Martin v. Löwis11437992002-04-12 09:54:03 +000012822int
12823main ()
12824{
Guido van Rossum90eea071996-08-30 20:58:57 +000012825return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012826 ;
12827 return 0;
12828}
12829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012830if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012831
12832
Matthias Kloseb9621712010-04-24 17:59:49 +000012833$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012834
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012835 works=yes
12836
Guido van Rossum627b2d71993-12-24 10:39:16 +000012837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12840$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012841
Martin v. Löwisd6320502004-08-12 13:45:08 +000012842# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12844$as_echo_n "checking for socketpair... " >&6; }
12845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012846/* end confdefs.h. */
12847
12848#include <sys/types.h>
12849#include <sys/socket.h>
12850
12851int
12852main ()
12853{
12854void *x=socketpair
12855 ;
12856 return 0;
12857}
12858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012859if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012860
Matthias Kloseb9621712010-04-24 17:59:49 +000012861$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012862
Matthias Kloseb159a552010-04-25 21:00:44 +000012863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012864$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012865else
Matthias Kloseb9621712010-04-24 17:59:49 +000012866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12867$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012868
12869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012871
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012872# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12874$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012876/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012877#include <sys/types.h>
12878#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012879int
12880main ()
12881{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012882struct sockaddr x;
12883x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012884 ;
12885 return 0;
12886}
12887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012888if ac_fn_c_try_compile "$LINENO"; then :
12889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12890$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012891
Matthias Kloseb9621712010-04-24 17:59:49 +000012892$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012893
12894else
Matthias Kloseb9621712010-04-24 17:59:49 +000012895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12896$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012897
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012900
Guido van Rossumda88dad1995-01-26 00:46:29 +000012901va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12903$as_echo_n "checking whether va_list is an array... " >&6; }
12904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012905/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012906
12907#ifdef HAVE_STDARG_PROTOTYPES
12908#include <stdarg.h>
12909#else
12910#include <varargs.h>
12911#endif
12912
Martin v. Löwis11437992002-04-12 09:54:03 +000012913int
12914main ()
12915{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012916va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012917 ;
12918 return 0;
12919}
12920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012921if ac_fn_c_try_compile "$LINENO"; then :
12922
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012923else
Skip Montanaro6dead952003-09-25 14:50:04 +000012924
Martin v. Löwis11437992002-04-12 09:54:03 +000012925
Matthias Kloseb9621712010-04-24 17:59:49 +000012926$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012927
Guido van Rossumda88dad1995-01-26 00:46:29 +000012928 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012929
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12933$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012934
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012935# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012936
12937
Matthias Kloseb9621712010-04-24 17:59:49 +000012938ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012939if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012940
Matthias Kloseb9621712010-04-24 17:59:49 +000012941 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012942
Matthias Kloseb9621712010-04-24 17:59:49 +000012943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12944$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012945 OLD_CFLAGS=$CFLAGS
12946 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012948/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012949
12950# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012951
Martin v. Löwis11437992002-04-12 09:54:03 +000012952int
12953main ()
12954{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012955
12956 char *name;
12957 struct hostent *he, *res;
12958 char buffer[2048];
12959 int buflen = 2048;
12960 int h_errnop;
12961
12962 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012963
12964 ;
12965 return 0;
12966}
12967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012968if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012969
Matthias Kloseb9621712010-04-24 17:59:49 +000012970 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012971
Martin v. Löwis11437992002-04-12 09:54:03 +000012972
Matthias Kloseb9621712010-04-24 17:59:49 +000012973$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012974
Matthias Kloseb9621712010-04-24 17:59:49 +000012975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12976$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012977
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012978else
Skip Montanaro6dead952003-09-25 14:50:04 +000012979
Matthias Kloseb9621712010-04-24 17:59:49 +000012980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12981$as_echo "no" >&6; }
12982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12983$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012985/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012986
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012987# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012988
Martin v. Löwis11437992002-04-12 09:54:03 +000012989int
12990main ()
12991{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012992
12993 char *name;
12994 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012995 char buffer[2048];
12996 int buflen = 2048;
12997 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012998
Matthias Kloseb159a552010-04-25 21:00:44 +000012999 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013000
13001 ;
13002 return 0;
13003}
13004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013005if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013006
Matthias Kloseb9621712010-04-24 17:59:49 +000013007 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013008
Martin v. Löwis11437992002-04-12 09:54:03 +000013009
Matthias Kloseb159a552010-04-25 21:00:44 +000013010$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013011
Matthias Kloseb9621712010-04-24 17:59:49 +000013012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13013$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013014
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013015else
Skip Montanaro6dead952003-09-25 14:50:04 +000013016
Matthias Kloseb9621712010-04-24 17:59:49 +000013017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13018$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13020$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13022/* end confdefs.h. */
13023
13024# include <netdb.h>
13025
13026int
13027main ()
13028{
13029
13030 char *name;
13031 struct hostent *he;
13032 struct hostent_data data;
13033
13034 (void) gethostbyname_r(name, he, &data);
13035
13036 ;
13037 return 0;
13038}
13039_ACEOF
13040if ac_fn_c_try_compile "$LINENO"; then :
13041
13042 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13043
13044
13045$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13046
13047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13048$as_echo "yes" >&6; }
13049
13050else
13051
13052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13053$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013054
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013055fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013057
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013060
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013063 CFLAGS=$OLD_CFLAGS
13064
13065else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013066
Matthias Kloseb9621712010-04-24 17:59:49 +000013067 for ac_func in gethostbyname
13068do :
13069 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013070if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013071 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013072#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013073_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013074
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013075fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013076done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013077
Michael W. Hudson54241132001-12-07 15:38:26 +000013078
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013079fi
13080
Michael W. Hudson54241132001-12-07 15:38:26 +000013081
13082
13083
13084
13085
13086
Guido van Rossum627b2d71993-12-24 10:39:16 +000013087# checks for system services
13088# (none yet)
13089
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013090# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013091ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013092if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013093
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013094else
Matthias Kloseb9621712010-04-24 17:59:49 +000013095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13096$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013097if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013098 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013099else
Martin v. Löwis11437992002-04-12 09:54:03 +000013100 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013101LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013103/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013104
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013105/* Override any GCC internal prototype to avoid an error.
13106 Use char because int might match the return type of a GCC
13107 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013108#ifdef __cplusplus
13109extern "C"
13110#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013111char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013112int
13113main ()
13114{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013115return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013116 ;
13117 return 0;
13118}
13119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013120if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013121 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013122else
Matthias Kloseb9621712010-04-24 17:59:49 +000013123 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013124fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013125rm -f core conftest.err conftest.$ac_objext \
13126 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013127LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013128fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13130$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013131if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013132 cat >>confdefs.h <<_ACEOF
13133#define HAVE_LIBIEEE 1
13134_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013135
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013136 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013137
Guido van Rossum627b2d71993-12-24 10:39:16 +000013138fi
13139
Michael W. Hudson54241132001-12-07 15:38:26 +000013140
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013141fi
13142
Michael W. Hudson54241132001-12-07 15:38:26 +000013143
Guido van Rossum7f253911997-05-09 02:42:48 +000013144# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13146$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013148# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013149if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013150 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013151if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013152then
13153
Matthias Kloseb9621712010-04-24 17:59:49 +000013154$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013155
Matthias Kloseb9621712010-04-24 17:59:49 +000013156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13157$as_echo "yes" >&6; }
13158else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13159$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013160fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013161else
Matthias Kloseb9621712010-04-24 17:59:49 +000013162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13163$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013164fi
13165
Guido van Rossum7f253911997-05-09 02:42:48 +000013166
Guido van Rossum7f43da71994-08-01 12:15:30 +000013167# check for --with-libm=...
13168
Guido van Rossum563e7081996-09-10 18:20:48 +000013169case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013170Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013171*) LIBM=-lm
13172esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13174$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013176# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013177if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013178 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013179if test "$withval" = no
13180then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13182$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013183elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013184then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13186$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013187else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013188fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013189else
Matthias Kloseb9621712010-04-24 17:59:49 +000013190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13191$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013192fi
13193
Guido van Rossum7f43da71994-08-01 12:15:30 +000013194
13195# check for --with-libc=...
13196
Matthias Kloseb9621712010-04-24 17:59:49 +000013197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13198$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013200# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013201if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013202 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013203if test "$withval" = no
13204then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13206$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013207elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013208then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13210$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013211else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013212fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013213else
Matthias Kloseb9621712010-04-24 17:59:49 +000013214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13215$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013216fi
13217
Guido van Rossum7f43da71994-08-01 12:15:30 +000013218
Stefan Krah1919b7e2012-03-21 18:25:23 +010013219# **************************************
13220# * Check for gcc x64 inline assembler *
13221# **************************************
13222
13223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13224$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13226/* end confdefs.h. */
13227
13228int
13229main ()
13230{
13231
13232 __asm__ __volatile__ ("movq %rcx, %rax");
13233
13234 ;
13235 return 0;
13236}
13237_ACEOF
13238if ac_fn_c_try_compile "$LINENO"; then :
13239 have_gcc_asm_for_x64=yes
13240else
13241 have_gcc_asm_for_x64=no
13242fi
13243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13245$as_echo "$have_gcc_asm_for_x64" >&6; }
13246if test "$have_gcc_asm_for_x64" = yes
13247then
13248
13249$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13250
13251fi
13252
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013253# **************************************************
13254# * Check for various properties of floating point *
13255# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013256
Matthias Kloseb9621712010-04-24 17:59:49 +000013257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13258$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013259if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013260 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013261else
13262
Matthias Kloseb9621712010-04-24 17:59:49 +000013263if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013264 ac_cv_little_endian_double=no
13265else
Matthias Kloseb9621712010-04-24 17:59:49 +000013266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013267/* end confdefs.h. */
13268
13269#include <string.h>
13270int main() {
13271 double x = 9006104071832581.0;
13272 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13273 return 0;
13274 else
13275 return 1;
13276}
13277
13278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013279if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013280 ac_cv_little_endian_double=yes
13281else
Matthias Kloseb9621712010-04-24 17:59:49 +000013282 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013283fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013284rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13285 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013286fi
13287
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013288fi
13289
Matthias Kloseb9621712010-04-24 17:59:49 +000013290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13291$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013292if test "$ac_cv_little_endian_double" = yes
13293then
13294
Matthias Kloseb9621712010-04-24 17:59:49 +000013295$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013296
13297fi
13298
Matthias Kloseb9621712010-04-24 17:59:49 +000013299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13300$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013301if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013302 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013303else
13304
Matthias Kloseb9621712010-04-24 17:59:49 +000013305if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013306 ac_cv_big_endian_double=no
13307else
Matthias Kloseb9621712010-04-24 17:59:49 +000013308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013309/* end confdefs.h. */
13310
13311#include <string.h>
13312int main() {
13313 double x = 9006104071832581.0;
13314 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13315 return 0;
13316 else
13317 return 1;
13318}
13319
13320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013321if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013322 ac_cv_big_endian_double=yes
13323else
Matthias Kloseb9621712010-04-24 17:59:49 +000013324 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013325fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13327 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013328fi
13329
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013330fi
13331
Matthias Kloseb9621712010-04-24 17:59:49 +000013332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13333$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013334if test "$ac_cv_big_endian_double" = yes
13335then
13336
Matthias Kloseb9621712010-04-24 17:59:49 +000013337$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013338
13339fi
13340
13341# Some ARM platforms use a mixed-endian representation for doubles.
13342# While Python doesn't currently have full support for these platforms
13343# (see e.g., issue 1762561), we can at least make sure that float <-> string
13344# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13346$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013347if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013348 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013349else
13350
Matthias Kloseb9621712010-04-24 17:59:49 +000013351if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013352 ac_cv_mixed_endian_double=no
13353else
Matthias Kloseb9621712010-04-24 17:59:49 +000013354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013355/* end confdefs.h. */
13356
13357#include <string.h>
13358int main() {
13359 double x = 9006104071832581.0;
13360 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13361 return 0;
13362 else
13363 return 1;
13364}
13365
13366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013367if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013368 ac_cv_mixed_endian_double=yes
13369else
Matthias Kloseb9621712010-04-24 17:59:49 +000013370 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013371fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013372rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13373 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013374fi
13375
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013376fi
13377
Matthias Kloseb9621712010-04-24 17:59:49 +000013378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13379$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013380if test "$ac_cv_mixed_endian_double" = yes
13381then
13382
Matthias Kloseb9621712010-04-24 17:59:49 +000013383$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013384
13385fi
13386
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013387# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013388# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013389# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013390# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013391# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013392# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013393
13394# This inline assembler syntax may also work for suncc and icc,
13395# so we try it on all platforms.
13396
Matthias Kloseb9621712010-04-24 17:59:49 +000013397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13398$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013400/* end confdefs.h. */
13401
13402int
13403main ()
13404{
13405
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013406 unsigned short cw;
13407 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13408 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013409
13410 ;
13411 return 0;
13412}
13413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013414if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013415 have_gcc_asm_for_x87=yes
13416else
Matthias Kloseb9621712010-04-24 17:59:49 +000013417 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013418fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13421$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013422if test "$have_gcc_asm_for_x87" = yes
13423then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013424
Matthias Kloseb9621712010-04-24 17:59:49 +000013425$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013426
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013427fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013428
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13430$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13432/* end confdefs.h. */
13433
13434int
13435main ()
13436{
13437
13438 unsigned int fpcr;
13439 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13440 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13441
13442 ;
13443 return 0;
13444}
13445_ACEOF
13446if ac_fn_c_try_compile "$LINENO"; then :
13447 have_gcc_asm_for_mc68881=yes
13448else
13449 have_gcc_asm_for_mc68881=no
13450fi
13451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13453$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13454if test "$have_gcc_asm_for_mc68881" = yes
13455then
13456
13457$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13458
13459fi
13460
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013461# Detect whether system arithmetic is subject to x87-style double
13462# rounding issues. The result of this test has little meaning on non
13463# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13464# mode is round-to-nearest and double rounding issues are present, and
13465# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13467$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013468# $BASECFLAGS may affect the result
13469ac_save_cc="$CC"
13470CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013471if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013472 ac_cv_x87_double_rounding=no
13473else
Matthias Kloseb9621712010-04-24 17:59:49 +000013474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013475/* end confdefs.h. */
13476
13477#include <stdlib.h>
13478#include <math.h>
13479int main() {
13480 volatile double x, y, z;
13481 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13482 x = 0.99999999999999989; /* 1-2**-53 */
13483 y = 1./x;
13484 if (y != 1.)
13485 exit(0);
13486 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13487 x = 1e16;
13488 y = 2.99999;
13489 z = x + y;
13490 if (z != 1e16+4.)
13491 exit(0);
13492 /* both tests show evidence of double rounding */
13493 exit(1);
13494}
13495
13496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013497if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013498 ac_cv_x87_double_rounding=no
13499else
Matthias Kloseb9621712010-04-24 17:59:49 +000013500 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013501fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013502rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13503 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013504fi
13505
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013506CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13508$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013509if test "$ac_cv_x87_double_rounding" = yes
13510then
13511
Matthias Kloseb9621712010-04-24 17:59:49 +000013512$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013513
13514fi
13515
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013516# ************************************
13517# * Check for mathematical functions *
13518# ************************************
13519
13520LIBS_SAVE=$LIBS
13521LIBS="$LIBS $LIBM"
13522
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013523for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13524do :
13525 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13526ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013527if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013528 cat >>confdefs.h <<_ACEOF
13529#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13530_ACEOF
13531
13532fi
13533done
13534
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013535for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013536do :
13537 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13538ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013539if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013540 cat >>confdefs.h <<_ACEOF
13541#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13542_ACEOF
13543
13544fi
13545done
13546
13547ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13548"
Victor Stinnere0be4232011-10-25 13:06:09 +020013549if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013550 ac_have_decl=1
13551else
13552 ac_have_decl=0
13553fi
13554
13555cat >>confdefs.h <<_ACEOF
13556#define HAVE_DECL_ISINF $ac_have_decl
13557_ACEOF
13558ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13559"
Victor Stinnere0be4232011-10-25 13:06:09 +020013560if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013561 ac_have_decl=1
13562else
13563 ac_have_decl=0
13564fi
13565
13566cat >>confdefs.h <<_ACEOF
13567#define HAVE_DECL_ISNAN $ac_have_decl
13568_ACEOF
13569ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13570"
Victor Stinnere0be4232011-10-25 13:06:09 +020013571if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013572 ac_have_decl=1
13573else
13574 ac_have_decl=0
13575fi
13576
13577cat >>confdefs.h <<_ACEOF
13578#define HAVE_DECL_ISFINITE $ac_have_decl
13579_ACEOF
13580
13581
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013582# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13583# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13585$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013586if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013587 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013588else
13589
Matthias Kloseb9621712010-04-24 17:59:49 +000013590if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013591 ac_cv_tanh_preserves_zero_sign=no
13592else
Matthias Kloseb9621712010-04-24 17:59:49 +000013593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013594/* end confdefs.h. */
13595
13596#include <math.h>
13597#include <stdlib.h>
13598int main() {
13599 /* return 0 if either negative zeros don't exist
13600 on this platform or if negative zeros exist
13601 and tanh(-0.) == -0. */
13602 if (atan2(0., -1.) == atan2(-0., -1.) ||
13603 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13604 else exit(1);
13605}
13606
13607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013608if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013609 ac_cv_tanh_preserves_zero_sign=yes
13610else
Matthias Kloseb9621712010-04-24 17:59:49 +000013611 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013612fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013613rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13614 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013615fi
13616
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013617fi
13618
Matthias Kloseb9621712010-04-24 17:59:49 +000013619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13620$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013621if test "$ac_cv_tanh_preserves_zero_sign" = yes
13622then
13623
Matthias Kloseb9621712010-04-24 17:59:49 +000013624$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013625
13626fi
13627
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013628if test "$ac_cv_func_log1p" = yes
13629then
13630 # On some versions of AIX, log1p(-0.) returns 0. instead of
13631 # -0. See issue #9920.
13632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13633$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013634 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013635 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013636else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013637
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013638 if test "$cross_compiling" = yes; then :
13639 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013640else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13642/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013643
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013644 #include <math.h>
13645 #include <stdlib.h>
13646 int main() {
13647 /* Fail if the signs of log1p(-0.) and -0. can be
13648 distinguished. */
13649 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13650 return 0;
13651 else
13652 return 1;
13653 }
13654
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013655_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013656if ac_fn_c_try_run "$LINENO"; then :
13657 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013658else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013659 ac_cv_log1p_drops_zero_sign=yes
13660fi
13661rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13662 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013663fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013664
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013665fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013666
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13668$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13669fi
13670if test "$ac_cv_log1p_drops_zero_sign" = yes
13671then
13672
13673$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13674
13675fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013676
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013677LIBS=$LIBS_SAVE
13678
Mark Dickinsona614f042009-11-28 12:48:43 +000013679# For multiprocessing module, check that sem_open
13680# actually works. For FreeBSD versions <= 7.2,
13681# the kernel module that provides POSIX semaphores
13682# isn't loaded by default, so an attempt to call
13683# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13685$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013686if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013687 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013688else
Matthias Kloseb9621712010-04-24 17:59:49 +000013689 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013690 ac_cv_posix_semaphores_enabled=yes
13691else
Matthias Kloseb9621712010-04-24 17:59:49 +000013692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013693/* end confdefs.h. */
13694
13695#include <unistd.h>
13696#include <fcntl.h>
13697#include <stdio.h>
13698#include <semaphore.h>
13699#include <sys/stat.h>
13700
13701int main(void) {
13702 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13703 if (a == SEM_FAILED) {
13704 perror("sem_open");
13705 return 1;
13706 }
13707 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013708 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013709 return 0;
13710}
13711
13712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013713if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013714 ac_cv_posix_semaphores_enabled=yes
13715else
Matthias Kloseb9621712010-04-24 17:59:49 +000013716 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013717fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013718rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13719 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013720fi
13721
13722
Mark Dickinsona614f042009-11-28 12:48:43 +000013723fi
13724
Matthias Kloseb9621712010-04-24 17:59:49 +000013725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13726$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013727if test $ac_cv_posix_semaphores_enabled = no
13728then
13729
Matthias Kloseb9621712010-04-24 17:59:49 +000013730$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013731
13732fi
13733
Mark Dickinson10683072009-04-18 21:18:19 +000013734# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13736$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013737if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013738 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013739else
Matthias Kloseb9621712010-04-24 17:59:49 +000013740 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013741 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013742else
Matthias Kloseb9621712010-04-24 17:59:49 +000013743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013744/* end confdefs.h. */
13745
13746#include <unistd.h>
13747#include <fcntl.h>
13748#include <stdio.h>
13749#include <semaphore.h>
13750#include <sys/stat.h>
13751
13752int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013753 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013754 int count;
13755 int res;
13756 if(a==SEM_FAILED){
13757 perror("sem_open");
13758 return 1;
13759
13760 }
13761 res = sem_getvalue(a, &count);
13762 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013763 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013764 return res==-1 ? 1 : 0;
13765}
13766
Mark Dickinson10683072009-04-18 21:18:19 +000013767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013768if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013769 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013770else
Matthias Kloseb9621712010-04-24 17:59:49 +000013771 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013772fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013773rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13774 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013775fi
13776
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013777
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013778fi
13779
Matthias Kloseb9621712010-04-24 17:59:49 +000013780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13781$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013782if test $ac_cv_broken_sem_getvalue = yes
13783then
13784
Matthias Kloseb9621712010-04-24 17:59:49 +000013785$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013786
13787fi
13788
Mark Dickinsonbd792642009-03-18 20:06:12 +000013789# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13791$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013792# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013793if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013794 enableval=$enable_big_digits; case $enable_big_digits in
13795yes)
13796 enable_big_digits=30 ;;
13797no)
13798 enable_big_digits=15 ;;
1379915|30)
13800 ;;
13801*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013802 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 +000013803esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13805$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013806
13807cat >>confdefs.h <<_ACEOF
13808#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13809_ACEOF
13810
13811
13812else
Matthias Kloseb9621712010-04-24 17:59:49 +000013813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13814$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013815fi
13816
13817
Guido van Rossumef2255b2000-03-10 22:30:29 +000013818# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013819ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013820if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013821
13822
Matthias Kloseb9621712010-04-24 17:59:49 +000013823$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013824
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013825 wchar_h="yes"
13826
Guido van Rossumef2255b2000-03-10 22:30:29 +000013827else
Martin v. Löwis11437992002-04-12 09:54:03 +000013828 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013829
13830fi
13831
Michael W. Hudson54241132001-12-07 15:38:26 +000013832
Martin v. Löwis11437992002-04-12 09:54:03 +000013833
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013834# determine wchar_t size
13835if test "$wchar_h" = yes
13836then
Matthias Kloseb9621712010-04-24 17:59:49 +000013837 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013838# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13839# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13840# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13842$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013843if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013844 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013845else
Matthias Kloseb9621712010-04-24 17:59:49 +000013846 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13847"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013848
Martin v. Löwis11437992002-04-12 09:54:03 +000013849else
Matthias Kloseb9621712010-04-24 17:59:49 +000013850 if test "$ac_cv_type_wchar_t" = yes; then
13851 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13852$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013853as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013854See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013855 else
13856 ac_cv_sizeof_wchar_t=0
13857 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013858fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013859
Martin v. Löwis11437992002-04-12 09:54:03 +000013860fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13862$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013863
13864
13865
Martin v. Löwis11437992002-04-12 09:54:03 +000013866cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013867#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013868_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013869
Michael W. Hudson54241132001-12-07 15:38:26 +000013870
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013871fi
13872
Matthias Kloseb9621712010-04-24 17:59:49 +000013873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13874$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013875have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013877/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013878
13879#include <tcl.h>
13880#if TCL_UTF_MAX != 6
13881# error "NOT UCS4_TCL"
13882#endif
13883int
13884main ()
13885{
13886
13887 ;
13888 return 0;
13889}
13890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013891if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013892
13893
Matthias Kloseb9621712010-04-24 17:59:49 +000013894$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013895
13896 have_ucs4_tcl=yes
13897
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13901$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013902
Skip Montanaro6dead952003-09-25 14:50:04 +000013903# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013904if test "$wchar_h" = yes
13905then
13906 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13908$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013909 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013910 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013911else
13912
Matthias Kloseb9621712010-04-24 17:59:49 +000013913 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013914 ac_cv_wchar_t_signed=yes
13915else
Matthias Kloseb9621712010-04-24 17:59:49 +000013916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013917/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013918
13919 #include <wchar.h>
13920 int main()
13921 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013922 /* Success: exit code 0 */
13923 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013924 }
13925
13926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013927if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013928 ac_cv_wchar_t_signed=yes
13929else
Matthias Kloseb9621712010-04-24 17:59:49 +000013930 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013931fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13933 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013934fi
13935
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013936fi
13937
Matthias Kloseb9621712010-04-24 17:59:49 +000013938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13939$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013940fi
13941
Georg Brandl52d168a2008-01-07 18:10:24 +000013942# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013943if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013944 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013945then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013946 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013947
Matthias Kloseb9621712010-04-24 17:59:49 +000013948$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013949
Georg Brandl52d168a2008-01-07 18:10:24 +000013950else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013951 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013952fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13954$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013955
13956# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13958$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013959if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013960 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013961else
Matthias Kloseb9621712010-04-24 17:59:49 +000013962 ac_cv_c_bigendian=unknown
13963 # See if we're dealing with a universal compiler.
13964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13965/* end confdefs.h. */
13966#ifndef __APPLE_CC__
13967 not a universal capable compiler
13968 #endif
13969 typedef int dummy;
13970
Skip Montanaro6dead952003-09-25 14:50:04 +000013971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013972if ac_fn_c_try_compile "$LINENO"; then :
13973
13974 # Check for potential -arch flags. It is not universal unless
13975 # there are at least two -arch flags with different values.
13976 ac_arch=
13977 ac_prev=
13978 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13979 if test -n "$ac_prev"; then
13980 case $ac_word in
13981 i?86 | x86_64 | ppc | ppc64)
13982 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13983 ac_arch=$ac_word
13984 else
13985 ac_cv_c_bigendian=universal
13986 break
13987 fi
13988 ;;
13989 esac
13990 ac_prev=
13991 elif test "x$ac_word" = "x-arch"; then
13992 ac_prev=arch
13993 fi
13994 done
13995fi
13996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13997 if test $ac_cv_c_bigendian = unknown; then
13998 # See if sys/param.h defines the BYTE_ORDER macro.
13999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014000/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014001#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014002 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014003
Martin v. Löwis11437992002-04-12 09:54:03 +000014004int
14005main ()
14006{
Matthias Kloseb9621712010-04-24 17:59:49 +000014007#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14008 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14009 && LITTLE_ENDIAN)
14010 bogus endian macros
14011 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014012
14013 ;
14014 return 0;
14015}
14016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014017if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014018 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014020/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014021#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014022 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014023
Martin v. Löwis11437992002-04-12 09:54:03 +000014024int
14025main ()
14026{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014027#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014028 not big endian
14029 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014030
14031 ;
14032 return 0;
14033}
14034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014035if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014036 ac_cv_c_bigendian=yes
14037else
Matthias Kloseb9621712010-04-24 17:59:49 +000014038 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014041fi
14042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14043 fi
14044 if test $ac_cv_c_bigendian = unknown; then
14045 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014047/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014048#include <limits.h>
14049
Martin v. Löwis11437992002-04-12 09:54:03 +000014050int
14051main ()
14052{
Matthias Kloseb9621712010-04-24 17:59:49 +000014053#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14054 bogus endian macros
14055 #endif
14056
Martin v. Löwis11437992002-04-12 09:54:03 +000014057 ;
14058 return 0;
14059}
14060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014061if ac_fn_c_try_compile "$LINENO"; then :
14062 # It does; now see whether it defined to _BIG_ENDIAN or not.
14063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14064/* end confdefs.h. */
14065#include <limits.h>
14066
14067int
14068main ()
14069{
14070#ifndef _BIG_ENDIAN
14071 not big endian
14072 #endif
14073
14074 ;
14075 return 0;
14076}
14077_ACEOF
14078if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014079 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014080else
Matthias Kloseb9621712010-04-24 17:59:49 +000014081 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14084fi
14085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14086 fi
14087 if test $ac_cv_c_bigendian = unknown; then
14088 # Compile a test program.
14089 if test "$cross_compiling" = yes; then :
14090 # Try to guess by grepping values from an object file.
14091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14092/* end confdefs.h. */
14093short int ascii_mm[] =
14094 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14095 short int ascii_ii[] =
14096 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14097 int use_ascii (int i) {
14098 return ascii_mm[i] + ascii_ii[i];
14099 }
14100 short int ebcdic_ii[] =
14101 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14102 short int ebcdic_mm[] =
14103 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14104 int use_ebcdic (int i) {
14105 return ebcdic_mm[i] + ebcdic_ii[i];
14106 }
14107 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014108
Matthias Kloseb9621712010-04-24 17:59:49 +000014109int
14110main ()
14111{
14112return use_ascii (foo) == use_ebcdic (foo);
14113 ;
14114 return 0;
14115}
14116_ACEOF
14117if ac_fn_c_try_compile "$LINENO"; then :
14118 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14119 ac_cv_c_bigendian=yes
14120 fi
14121 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14122 if test "$ac_cv_c_bigendian" = unknown; then
14123 ac_cv_c_bigendian=no
14124 else
14125 # finding both strings is unlikely to happen, but who knows?
14126 ac_cv_c_bigendian=unknown
14127 fi
14128 fi
14129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014131else
Matthias Kloseb9621712010-04-24 17:59:49 +000014132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014133/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014134$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014135int
14136main ()
14137{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014138
Matthias Kloseb9621712010-04-24 17:59:49 +000014139 /* Are we little or big endian? From Harbison&Steele. */
14140 union
14141 {
14142 long int l;
14143 char c[sizeof (long int)];
14144 } u;
14145 u.l = 1;
14146 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014147
14148 ;
14149 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014150}
Martin v. Löwis11437992002-04-12 09:54:03 +000014151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014152if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014153 ac_cv_c_bigendian=no
14154else
Matthias Kloseb9621712010-04-24 17:59:49 +000014155 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014156fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14158 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014160
Matthias Kloseb9621712010-04-24 17:59:49 +000014161 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014162fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14164$as_echo "$ac_cv_c_bigendian" >&6; }
14165 case $ac_cv_c_bigendian in #(
14166 yes)
14167 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14168;; #(
14169 no)
14170 ;; #(
14171 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014172
Matthias Kloseb9621712010-04-24 17:59:49 +000014173$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014174
Matthias Kloseb9621712010-04-24 17:59:49 +000014175 ;; #(
14176 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014177 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014178 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014179 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014180
Michael W. Hudson54241132001-12-07 15:38:26 +000014181
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014182# ABI version string for Python extension modules. This appears between the
14183# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14184# from the following attributes which affect the ABI of this Python build (in
14185# this order):
14186#
14187# * The Python implementation (always 'cpython-' for us)
14188# * The major and minor version numbers
14189# * --with-pydebug (adds a 'd')
14190# * --with-pymalloc (adds a 'm')
14191# * --with-wide-unicode (adds a 'u')
14192#
14193# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014194# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14195# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014196
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14198$as_echo_n "checking ABIFLAGS... " >&6; }
14199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14200$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14202$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014203SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14205$as_echo "$SOABI" >&6; }
14206
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014207
14208case $ac_sys_system in
14209 Linux*|GNU*)
14210 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14211 *)
14212 EXT_SUFFIX=${SHLIB_SUFFIX};;
14213esac
14214
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14216$as_echo_n "checking LDVERSION... " >&6; }
14217LDVERSION='$(VERSION)$(ABIFLAGS)'
14218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14219$as_echo "$LDVERSION" >&6; }
14220
doko@python.org87421192013-01-26 11:39:31 +010014221
14222LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
14223
14224
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014225# Check whether right shifting a negative integer extends the sign bit
14226# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14228$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014229if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014230 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014231else
Martin v. Löwis11437992002-04-12 09:54:03 +000014232
Matthias Kloseb9621712010-04-24 17:59:49 +000014233if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014234 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014235else
Matthias Kloseb9621712010-04-24 17:59:49 +000014236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014237/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014238
14239int main()
14240{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014241 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014242}
14243
Martin v. Löwis11437992002-04-12 09:54:03 +000014244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014245if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014246 ac_cv_rshift_extends_sign=yes
14247else
Matthias Kloseb9621712010-04-24 17:59:49 +000014248 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014249fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14251 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014252fi
14253
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014254fi
14255
Matthias Kloseb9621712010-04-24 17:59:49 +000014256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14257$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014258if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014259then
Martin v. Löwis11437992002-04-12 09:54:03 +000014260
Matthias Kloseb9621712010-04-24 17:59:49 +000014261$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014262
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014263fi
14264
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014265# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14267$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014268if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014269 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014270else
Martin v. Löwis11437992002-04-12 09:54:03 +000014271
Matthias Kloseb9621712010-04-24 17:59:49 +000014272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014273/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014274#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014275int
14276main ()
14277{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014278
14279 FILE *f = fopen("/dev/null", "r");
14280 flockfile(f);
14281 getc_unlocked(f);
14282 funlockfile(f);
14283
Martin v. Löwis11437992002-04-12 09:54:03 +000014284 ;
14285 return 0;
14286}
14287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014288if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014289 ac_cv_have_getc_unlocked=yes
14290else
Matthias Kloseb9621712010-04-24 17:59:49 +000014291 ac_cv_have_getc_unlocked=no
14292fi
14293rm -f core conftest.err conftest.$ac_objext \
14294 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014296
Matthias Kloseb9621712010-04-24 17:59:49 +000014297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14298$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014299if test "$ac_cv_have_getc_unlocked" = yes
14300then
Martin v. Löwis11437992002-04-12 09:54:03 +000014301
Matthias Kloseb9621712010-04-24 17:59:49 +000014302$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014303
14304fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014305
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014306# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014307# save the value of LIBS so we don't actually link Python with readline
14308LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014309
Gregory P. Smith18820942008-09-07 06:24:49 +000014310# On some systems we need to link readline to a termcap compatible
14311# library. NOTE: Keep the precedence of listed libraries synchronised
14312# with setup.py.
14313py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14315$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014316for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014317 if test -z "$py_libtermcap"; then
14318 READLINE_LIBS="-lreadline"
14319 else
14320 READLINE_LIBS="-lreadline -l$py_libtermcap"
14321 fi
14322 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014324/* end confdefs.h. */
14325
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014326/* Override any GCC internal prototype to avoid an error.
14327 Use char because int might match the return type of a GCC
14328 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014329#ifdef __cplusplus
14330extern "C"
14331#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014332char readline ();
14333int
14334main ()
14335{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014336return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014337 ;
14338 return 0;
14339}
14340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014341if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014342 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014343fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014344rm -f core conftest.err conftest.$ac_objext \
14345 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014346 if test $py_cv_lib_readline = yes; then
14347 break
14348 fi
14349done
14350# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14351#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014352if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14354$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014355else
Matthias Kloseb9621712010-04-24 17:59:49 +000014356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14357$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014358
Matthias Kloseb9621712010-04-24 17:59:49 +000014359$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014360
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014361fi
14362
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014363# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14365$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014366if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014367 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014368else
14369 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014370LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014372/* end confdefs.h. */
14373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014374/* Override any GCC internal prototype to avoid an error.
14375 Use char because int might match the return type of a GCC
14376 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014377#ifdef __cplusplus
14378extern "C"
14379#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014380char rl_callback_handler_install ();
14381int
14382main ()
14383{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014384return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014385 ;
14386 return 0;
14387}
14388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014389if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014390 ac_cv_lib_readline_rl_callback_handler_install=yes
14391else
Matthias Kloseb9621712010-04-24 17:59:49 +000014392 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014393fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014394rm -f core conftest.err conftest.$ac_objext \
14395 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014396LIBS=$ac_check_lib_save_LIBS
14397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14399$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014400if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014401
Matthias Kloseb9621712010-04-24 17:59:49 +000014402$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014403
14404fi
14405
14406
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014407# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014409/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014410#include <readline/readline.h>
14411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014412if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014413 have_readline=yes
14414else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014415 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014416
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014417fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014418rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014419if test $have_readline = yes
14420then
Matthias Kloseb9621712010-04-24 17:59:49 +000014421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014422/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014423#include <readline/readline.h>
14424
14425_ACEOF
14426if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014427 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014428
Matthias Kloseb9621712010-04-24 17:59:49 +000014429$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014430
14431fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014432rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014433
Matthias Kloseb9621712010-04-24 17:59:49 +000014434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014435/* end confdefs.h. */
14436#include <readline/readline.h>
14437
14438_ACEOF
14439if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014440 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014441
Matthias Kloseb9621712010-04-24 17:59:49 +000014442$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014443
14444fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014445rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014446
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014447fi
14448
Martin v. Löwis0daad592001-09-30 21:09:59 +000014449# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14451$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014452if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014453 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014454else
Martin v. Löwis11437992002-04-12 09:54:03 +000014455 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014456LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014458/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014459
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014460/* Override any GCC internal prototype to avoid an error.
14461 Use char because int might match the return type of a GCC
14462 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014463#ifdef __cplusplus
14464extern "C"
14465#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014466char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014467int
14468main ()
14469{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014470return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014471 ;
14472 return 0;
14473}
14474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014475if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014476 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014477else
Matthias Kloseb9621712010-04-24 17:59:49 +000014478 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014479fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014480rm -f core conftest.err conftest.$ac_objext \
14481 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014482LIBS=$ac_check_lib_save_LIBS
14483fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14485$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014486if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014487
Matthias Kloseb9621712010-04-24 17:59:49 +000014488$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014489
Martin v. Löwis0daad592001-09-30 21:09:59 +000014490fi
14491
Michael W. Hudson54241132001-12-07 15:38:26 +000014492
Thomas Wouters89d996e2007-09-08 17:39:28 +000014493# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14495$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014496if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014497 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014498else
14499 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014500LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014502/* end confdefs.h. */
14503
14504/* Override any GCC internal prototype to avoid an error.
14505 Use char because int might match the return type of a GCC
14506 builtin and then its argument prototype would still apply. */
14507#ifdef __cplusplus
14508extern "C"
14509#endif
14510char rl_completion_display_matches_hook ();
14511int
14512main ()
14513{
14514return rl_completion_display_matches_hook ();
14515 ;
14516 return 0;
14517}
14518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014519if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014520 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14521else
Matthias Kloseb9621712010-04-24 17:59:49 +000014522 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014524rm -f core conftest.err conftest.$ac_objext \
14525 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014526LIBS=$ac_check_lib_save_LIBS
14527fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14529$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014530if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014531
Matthias Kloseb9621712010-04-24 17:59:49 +000014532$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014533
14534fi
14535
14536
Martin v. Löwis0daad592001-09-30 21:09:59 +000014537# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14539$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014540if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014541 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014542else
Martin v. Löwis11437992002-04-12 09:54:03 +000014543 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014544LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014547
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014548/* Override any GCC internal prototype to avoid an error.
14549 Use char because int might match the return type of a GCC
14550 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014551#ifdef __cplusplus
14552extern "C"
14553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014554char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014555int
14556main ()
14557{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014558return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014559 ;
14560 return 0;
14561}
14562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014563if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014564 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014565else
Matthias Kloseb9621712010-04-24 17:59:49 +000014566 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014567fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014568rm -f core conftest.err conftest.$ac_objext \
14569 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014570LIBS=$ac_check_lib_save_LIBS
14571fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14573$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014574if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014575
Matthias Kloseb9621712010-04-24 17:59:49 +000014576$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014577
Guido van Rossum353ae582001-07-10 16:45:32 +000014578fi
14579
Jack Jansendd19cf82001-12-06 22:36:17 +000014580
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014581# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014583/* end confdefs.h. */
14584#include <readline/readline.h>
14585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014586if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014587 have_readline=yes
14588else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014589 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014590
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014591fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014592rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014593if test $have_readline = yes
14594then
Matthias Kloseb9621712010-04-24 17:59:49 +000014595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014596/* end confdefs.h. */
14597#include <readline/readline.h>
14598
14599_ACEOF
14600if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014601 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014602
Matthias Kloseb9621712010-04-24 17:59:49 +000014603$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014604
14605fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014606rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014607
14608fi
14609
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060014610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
14611$as_echo_n "checking for append_history in -lreadline... " >&6; }
14612if ${ac_cv_lib_readline_append_history+:} false; then :
14613 $as_echo_n "(cached) " >&6
14614else
14615 ac_check_lib_save_LIBS=$LIBS
14616LIBS="-lreadline $READLINE_LIBS $LIBS"
14617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14618/* end confdefs.h. */
14619
14620/* Override any GCC internal prototype to avoid an error.
14621 Use char because int might match the return type of a GCC
14622 builtin and then its argument prototype would still apply. */
14623#ifdef __cplusplus
14624extern "C"
14625#endif
14626char append_history ();
14627int
14628main ()
14629{
14630return append_history ();
14631 ;
14632 return 0;
14633}
14634_ACEOF
14635if ac_fn_c_try_link "$LINENO"; then :
14636 ac_cv_lib_readline_append_history=yes
14637else
14638 ac_cv_lib_readline_append_history=no
14639fi
14640rm -f core conftest.err conftest.$ac_objext \
14641 conftest$ac_exeext conftest.$ac_ext
14642LIBS=$ac_check_lib_save_LIBS
14643fi
14644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
14645$as_echo "$ac_cv_lib_readline_append_history" >&6; }
14646if test "x$ac_cv_lib_readline_append_history" = xyes; then :
14647
14648$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
14649
14650fi
14651
14652
Martin v. Löwis82bca632006-02-10 20:49:30 +000014653# End of readline checks: restore LIBS
14654LIBS=$LIBS_no_readline
14655
Matthias Kloseb9621712010-04-24 17:59:49 +000014656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14657$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014658if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014659 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014660else
Martin v. Löwis11437992002-04-12 09:54:03 +000014661
Matthias Kloseb9621712010-04-24 17:59:49 +000014662if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014663 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014664else
Matthias Kloseb9621712010-04-24 17:59:49 +000014665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014666/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014667
14668int main()
14669{
14670 int val1 = nice(1);
14671 if (val1 != -1 && val1 == nice(2))
14672 exit(0);
14673 exit(1);
14674}
14675
Martin v. Löwis11437992002-04-12 09:54:03 +000014676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014677if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014678 ac_cv_broken_nice=yes
14679else
Matthias Kloseb9621712010-04-24 17:59:49 +000014680 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014681fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014682rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14683 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014684fi
14685
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014686fi
14687
Matthias Kloseb9621712010-04-24 17:59:49 +000014688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14689$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014690if test "$ac_cv_broken_nice" = yes
14691then
Martin v. Löwis11437992002-04-12 09:54:03 +000014692
Matthias Kloseb9621712010-04-24 17:59:49 +000014693$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014694
14695fi
14696
Matthias Kloseb9621712010-04-24 17:59:49 +000014697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14698$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014699if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014700 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014701else
Matthias Kloseb9621712010-04-24 17:59:49 +000014702 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014703 ac_cv_broken_poll=no
14704else
Matthias Kloseb9621712010-04-24 17:59:49 +000014705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014706/* end confdefs.h. */
14707
14708#include <poll.h>
14709
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014710int main()
14711{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014712 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014713 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014714
14715 close (42);
14716
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014717 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014718 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014719 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014720 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014721 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014722 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014723 return 1;
14724}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014725
14726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014727if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014728 ac_cv_broken_poll=yes
14729else
Matthias Kloseb9621712010-04-24 17:59:49 +000014730 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14733 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014735
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014736fi
14737
Matthias Kloseb9621712010-04-24 17:59:49 +000014738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14739$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014740if test "$ac_cv_broken_poll" = yes
14741then
14742
Matthias Kloseb9621712010-04-24 17:59:49 +000014743$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014744
14745fi
14746
Brett Cannon43802422005-02-10 20:48:03 +000014747# 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 +000014748# (which is not required by ISO C or UNIX spec) and/or if we support
14749# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014750ac_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 +000014751#include <$ac_cv_struct_tm>
14752
Matthias Kloseb9621712010-04-24 17:59:49 +000014753"
Victor Stinnere0be4232011-10-25 13:06:09 +020014754if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014755
14756cat >>confdefs.h <<_ACEOF
14757#define HAVE_STRUCT_TM_TM_ZONE 1
14758_ACEOF
14759
14760
14761fi
14762
14763if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14764
Matthias Kloseb9621712010-04-24 17:59:49 +000014765$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014766
14767else
Matthias Kloseb9621712010-04-24 17:59:49 +000014768 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14769"
Victor Stinnere0be4232011-10-25 13:06:09 +020014770if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014771 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014772else
Matthias Kloseb9621712010-04-24 17:59:49 +000014773 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014774fi
14775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014776cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014777#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014778_ACEOF
14779
Matthias Kloseb9621712010-04-24 17:59:49 +000014780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14781$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014782if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014783 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014784else
Matthias Kloseb9621712010-04-24 17:59:49 +000014785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014786/* end confdefs.h. */
14787#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014788#if !HAVE_DECL_TZNAME
14789extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014790#endif
14791
14792int
14793main ()
14794{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014795return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014796 ;
14797 return 0;
14798}
14799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014800if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014801 ac_cv_var_tzname=yes
14802else
Matthias Kloseb9621712010-04-24 17:59:49 +000014803 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014805rm -f core conftest.err conftest.$ac_objext \
14806 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014807fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14809$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014810 if test $ac_cv_var_tzname = yes; then
14811
Matthias Kloseb9621712010-04-24 17:59:49 +000014812$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014813
14814 fi
14815fi
14816
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014817
Martin v. Löwis1d459062005-03-14 21:23:33 +000014818# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14820$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014821if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014822 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014823else
14824
Matthias Kloseb9621712010-04-24 17:59:49 +000014825if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014826 ac_cv_working_tzset=no
14827else
Matthias Kloseb9621712010-04-24 17:59:49 +000014828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014829/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014830
14831#include <stdlib.h>
14832#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014833#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014834
14835#if HAVE_TZNAME
14836extern char *tzname[];
14837#endif
14838
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014839int main()
14840{
Brett Cannon18367812003-09-19 00:59:16 +000014841 /* Note that we need to ensure that not only does tzset(3)
14842 do 'something' with localtime, but it works as documented
14843 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014844 This includes making sure that tzname is set properly if
14845 tm->tm_zone does not exist since it is the alternative way
14846 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014847
14848 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014849 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014850 */
14851
Martin v. Löwis1d459062005-03-14 21:23:33 +000014852 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014853 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14854
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014855 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014856 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014857 if (localtime(&groundhogday)->tm_hour != 0)
14858 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014859#if HAVE_TZNAME
14860 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14861 if (strcmp(tzname[0], "UTC") ||
14862 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14863 exit(1);
14864#endif
Brett Cannon18367812003-09-19 00:59:16 +000014865
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014866 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014867 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014868 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014869 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014870#if HAVE_TZNAME
14871 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14872 exit(1);
14873#endif
Brett Cannon18367812003-09-19 00:59:16 +000014874
14875 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14876 tzset();
14877 if (localtime(&groundhogday)->tm_hour != 11)
14878 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014879#if HAVE_TZNAME
14880 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14881 exit(1);
14882#endif
14883
14884#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014885 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14886 exit(1);
14887 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14888 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014889#endif
Brett Cannon18367812003-09-19 00:59:16 +000014890
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014891 exit(0);
14892}
14893
14894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014895if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014896 ac_cv_working_tzset=yes
14897else
Matthias Kloseb9621712010-04-24 17:59:49 +000014898 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14901 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014902fi
14903
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014904fi
14905
Matthias Kloseb9621712010-04-24 17:59:49 +000014906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14907$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014908if test "$ac_cv_working_tzset" = yes
14909then
14910
Matthias Kloseb9621712010-04-24 17:59:49 +000014911$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014912
14913fi
14914
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014915# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14917$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014918if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014919 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014920else
Matthias Kloseb9621712010-04-24 17:59:49 +000014921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014922/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014923#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014924int
14925main ()
14926{
14927
14928struct stat st;
14929st.st_mtim.tv_nsec = 1;
14930
14931 ;
14932 return 0;
14933}
14934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014935if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014936 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014937else
Matthias Kloseb9621712010-04-24 17:59:49 +000014938 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14941fi
14942
Matthias Kloseb9621712010-04-24 17:59:49 +000014943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14944$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014945if test "$ac_cv_stat_tv_nsec" = yes
14946then
14947
Matthias Kloseb9621712010-04-24 17:59:49 +000014948$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014949
14950fi
14951
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014952# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14954$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014955if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014956 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014957else
Matthias Kloseb9621712010-04-24 17:59:49 +000014958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014959/* end confdefs.h. */
14960#include <sys/stat.h>
14961int
14962main ()
14963{
14964
14965struct stat st;
14966st.st_mtimespec.tv_nsec = 1;
14967
14968 ;
14969 return 0;
14970}
14971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014972if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014973 ac_cv_stat_tv_nsec2=yes
14974else
Matthias Kloseb9621712010-04-24 17:59:49 +000014975 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14978fi
14979
Matthias Kloseb9621712010-04-24 17:59:49 +000014980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14981$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014982if test "$ac_cv_stat_tv_nsec2" = yes
14983then
14984
Matthias Kloseb9621712010-04-24 17:59:49 +000014985$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014986
14987fi
14988
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014989# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014990ac_save_cppflags="$CPPFLAGS"
14991CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014992
14993for ac_header in curses.h ncurses.h
14994do :
14995 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14996ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14997if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14998 cat >>confdefs.h <<_ACEOF
14999#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15000_ACEOF
15001
15002fi
15003
15004done
15005
15006
15007# On Solaris, term.h requires curses.h
15008for ac_header in term.h
15009do :
15010 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15011#ifdef HAVE_CURSES_H
15012#include <curses.h>
15013#endif
15014
15015"
15016if test "x$ac_cv_header_term_h" = xyes; then :
15017 cat >>confdefs.h <<_ACEOF
15018#define HAVE_TERM_H 1
15019_ACEOF
15020
15021fi
15022
15023done
15024
15025
Jack Jansen666b1e72001-10-31 12:11:48 +000015026# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15028$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015029if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015030 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015031else
Matthias Kloseb9621712010-04-24 17:59:49 +000015032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015033/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015034#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015035int
15036main ()
15037{
Jack Jansen666b1e72001-10-31 12:11:48 +000015038
15039 int rtn;
15040 rtn = mvwdelch(0,0,0);
15041
Martin v. Löwis11437992002-04-12 09:54:03 +000015042 ;
15043 return 0;
15044}
15045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015046if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015047 ac_cv_mvwdelch_is_expression=yes
15048else
Matthias Kloseb9621712010-04-24 17:59:49 +000015049 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15052fi
15053
Matthias Kloseb9621712010-04-24 17:59:49 +000015054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15055$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015056
15057if test "$ac_cv_mvwdelch_is_expression" = yes
15058then
Martin v. Löwis11437992002-04-12 09:54:03 +000015059
Matthias Kloseb9621712010-04-24 17:59:49 +000015060$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015061
15062fi
15063
Matthias Kloseb9621712010-04-24 17:59:49 +000015064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15065$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015066if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015067 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015068else
Matthias Kloseb9621712010-04-24 17:59:49 +000015069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015070/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015071#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015072int
15073main ()
15074{
Jack Jansen666b1e72001-10-31 12:11:48 +000015075
15076 WINDOW *w;
15077 w->_flags = 0;
15078
Martin v. Löwis11437992002-04-12 09:54:03 +000015079 ;
15080 return 0;
15081}
15082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015083if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015084 ac_cv_window_has_flags=yes
15085else
Matthias Kloseb9621712010-04-24 17:59:49 +000015086 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15089fi
15090
Matthias Kloseb9621712010-04-24 17:59:49 +000015091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15092$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015093
Jack Jansen666b1e72001-10-31 12:11:48 +000015094
15095if test "$ac_cv_window_has_flags" = yes
15096then
Martin v. Löwis11437992002-04-12 09:54:03 +000015097
Matthias Kloseb9621712010-04-24 17:59:49 +000015098$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015099
15100fi
15101
Matthias Kloseb9621712010-04-24 17:59:49 +000015102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15103$as_echo_n "checking for is_term_resized... " >&6; }
15104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015105/* end confdefs.h. */
15106#include <curses.h>
15107int
15108main ()
15109{
15110void *x=is_term_resized
15111 ;
15112 return 0;
15113}
15114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015115if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015116
Matthias Kloseb9621712010-04-24 17:59:49 +000015117$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015118
Matthias Kloseb159a552010-04-25 21:00:44 +000015119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015120$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015121else
Matthias Kloseb9621712010-04-24 17:59:49 +000015122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15123$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015124
15125fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15127
Matthias Kloseb9621712010-04-24 17:59:49 +000015128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15129$as_echo_n "checking for resize_term... " >&6; }
15130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015131/* end confdefs.h. */
15132#include <curses.h>
15133int
15134main ()
15135{
15136void *x=resize_term
15137 ;
15138 return 0;
15139}
15140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015141if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015142
Matthias Kloseb9621712010-04-24 17:59:49 +000015143$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015144
Matthias Kloseb159a552010-04-25 21:00:44 +000015145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015146$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015147else
Matthias Kloseb9621712010-04-24 17:59:49 +000015148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15149$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015150
15151fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15153
Matthias Kloseb9621712010-04-24 17:59:49 +000015154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15155$as_echo_n "checking for resizeterm... " >&6; }
15156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015157/* end confdefs.h. */
15158#include <curses.h>
15159int
15160main ()
15161{
15162void *x=resizeterm
15163 ;
15164 return 0;
15165}
15166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015167if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015168
Matthias Kloseb9621712010-04-24 17:59:49 +000015169$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015170
Matthias Kloseb159a552010-04-25 21:00:44 +000015171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015172$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015173else
Matthias Kloseb9621712010-04-24 17:59:49 +000015174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15175$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015176
15177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015179# last curses configure check
15180CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015181
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15183$as_echo "$as_me: checking for device files" >&6;}
15184
15185if test "x$cross_compiling" = xyes; then
15186 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15188$as_echo_n "checking for /dev/ptmx... " >&6; }
15189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15190$as_echo "not set" >&6; }
15191 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15192 fi
15193 if test "${ac_cv_file__dev_ptc+set}" != set; then
15194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15195$as_echo_n "checking for /dev/ptc... " >&6; }
15196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15197$as_echo "not set" >&6; }
15198 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15199 fi
15200fi
15201
Matthias Kloseb9621712010-04-24 17:59:49 +000015202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15203$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015204if ${ac_cv_file__dev_ptmx+:} false; then :
15205 $as_echo_n "(cached) " >&6
15206else
15207 test "$cross_compiling" = yes &&
15208 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15209if test -r "/dev/ptmx"; then
15210 ac_cv_file__dev_ptmx=yes
15211else
15212 ac_cv_file__dev_ptmx=no
15213fi
15214fi
15215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15216$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15217if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015218
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015219fi
15220
15221if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015222
Matthias Kloseb9621712010-04-24 17:59:49 +000015223$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015224
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015225fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15227$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015228if ${ac_cv_file__dev_ptc+:} false; then :
15229 $as_echo_n "(cached) " >&6
15230else
15231 test "$cross_compiling" = yes &&
15232 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15233if test -r "/dev/ptc"; then
15234 ac_cv_file__dev_ptc=yes
15235else
15236 ac_cv_file__dev_ptc=no
15237fi
15238fi
15239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15240$as_echo "$ac_cv_file__dev_ptc" >&6; }
15241if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015242
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015243fi
15244
15245if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015246
Matthias Kloseb9621712010-04-24 17:59:49 +000015247$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015248
Neal Norwitz865400f2003-03-21 01:42:58 +000015249fi
15250
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015251if test "$have_long_long" = yes
15252then
Matthias Kloseb9621712010-04-24 17:59:49 +000015253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15254$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015255 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015256 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015257else
Matthias Kloseb9621712010-04-24 17:59:49 +000015258 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015259 ac_cv_have_long_long_format="cross -- assuming no"
15260 if test x$GCC = xyes; then
15261 save_CFLAGS=$CFLAGS
15262 CFLAGS="$CFLAGS -Werror -Wformat"
15263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15264/* end confdefs.h. */
15265
15266 #include <stdio.h>
15267 #include <stddef.h>
15268
15269int
15270main ()
15271{
15272
15273 char *buffer;
15274 sprintf(buffer, "%lld", (long long)123);
15275 sprintf(buffer, "%lld", (long long)-123);
15276 sprintf(buffer, "%llu", (unsigned long long)123);
15277
15278 ;
15279 return 0;
15280}
15281_ACEOF
15282if ac_fn_c_try_compile "$LINENO"; then :
15283 ac_cv_have_long_long_format=yes
15284
15285fi
15286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15287 CFLAGS=$save_CFLAGS
15288 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015289else
Matthias Kloseb9621712010-04-24 17:59:49 +000015290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015291/* end confdefs.h. */
15292
15293 #include <stdio.h>
15294 #include <stddef.h>
15295 #include <string.h>
15296
15297 #ifdef HAVE_SYS_TYPES_H
15298 #include <sys/types.h>
15299 #endif
15300
15301 int main()
15302 {
15303 char buffer[256];
15304
15305 if (sprintf(buffer, "%lld", (long long)123) < 0)
15306 return 1;
15307 if (strcmp(buffer, "123"))
15308 return 1;
15309
15310 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15311 return 1;
15312 if (strcmp(buffer, "-123"))
15313 return 1;
15314
15315 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15316 return 1;
15317 if (strcmp(buffer, "123"))
15318 return 1;
15319
15320 return 0;
15321 }
15322
15323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015324if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015325 ac_cv_have_long_long_format=yes
15326else
Matthias Kloseb9621712010-04-24 17:59:49 +000015327 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015329rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15330 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015331fi
15332
15333
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015334fi
15335
Matthias Kloseb9621712010-04-24 17:59:49 +000015336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15337$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015338fi
15339
Mark Dickinson89d7d412009-12-31 20:50:59 +000015340if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015341then
15342
Matthias Kloseb9621712010-04-24 17:59:49 +000015343$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015344
15345fi
15346
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015347if test $ac_sys_system = Darwin
15348then
15349 LIBS="$LIBS -framework CoreFoundation"
15350fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015351
Matthias Kloseb9621712010-04-24 17:59:49 +000015352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15353$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015354if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015355 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015356else
Matthias Kloseb9621712010-04-24 17:59:49 +000015357 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015358 ac_cv_have_size_t_format="cross -- assuming yes"
15359
Thomas Wouters477c8d52006-05-27 19:21:47 +000015360else
Matthias Kloseb9621712010-04-24 17:59:49 +000015361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015362/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015363
Thomas Wouters477c8d52006-05-27 19:21:47 +000015364#include <stdio.h>
15365#include <stddef.h>
15366#include <string.h>
15367
Christian Heimes2c181612007-12-17 20:04:13 +000015368#ifdef HAVE_SYS_TYPES_H
15369#include <sys/types.h>
15370#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015371
15372#ifdef HAVE_SSIZE_T
15373typedef ssize_t Py_ssize_t;
15374#elif SIZEOF_VOID_P == SIZEOF_LONG
15375typedef long Py_ssize_t;
15376#else
15377typedef int Py_ssize_t;
15378#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015379
Christian Heimes2c181612007-12-17 20:04:13 +000015380int main()
15381{
15382 char buffer[256];
15383
Thomas Wouters477c8d52006-05-27 19:21:47 +000015384 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15385 return 1;
15386
Thomas Wouters89f507f2006-12-13 04:49:30 +000015387 if (strcmp(buffer, "123"))
15388 return 1;
15389
15390 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15391 return 1;
15392
15393 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015394 return 1;
15395
15396 return 0;
15397}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015398
Thomas Wouters477c8d52006-05-27 19:21:47 +000015399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015400if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015401 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015402else
Matthias Kloseb9621712010-04-24 17:59:49 +000015403 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015405rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15406 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015407fi
15408
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015409fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15411$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015412if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015413
Matthias Kloseb9621712010-04-24 17:59:49 +000015414$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015415
15416fi
15417
Matthias Kloseb9621712010-04-24 17:59:49 +000015418ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015419#ifdef HAVE_SYS_TYPES_H
15420#include <sys/types.h>
15421#endif
15422#ifdef HAVE_SYS_SOCKET_H
15423#include <sys/socket.h>
15424#endif
15425
Matthias Kloseb9621712010-04-24 17:59:49 +000015426"
Victor Stinnere0be4232011-10-25 13:06:09 +020015427if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015428
Martin v. Löwis11437992002-04-12 09:54:03 +000015429else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015430
Matthias Kloseb9621712010-04-24 17:59:49 +000015431$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015432
15433fi
15434
Michael W. Hudson54241132001-12-07 15:38:26 +000015435
Matthias Kloseb9621712010-04-24 17:59:49 +000015436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15437$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015438if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015439 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015440else
Matthias Kloseb9621712010-04-24 17:59:49 +000015441 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015442 ac_cv_broken_mbstowcs=no
15443else
Matthias Kloseb9621712010-04-24 17:59:49 +000015444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015445/* end confdefs.h. */
15446
Stefan Krah19c21392012-11-22 23:47:32 +010015447#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015448#include<stdlib.h>
15449int main() {
15450 size_t len = -1;
15451 const char *str = "text";
15452 len = mbstowcs(NULL, str, 0);
15453 return (len != 4);
15454}
15455
15456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015457if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015458 ac_cv_broken_mbstowcs=no
15459else
Matthias Kloseb9621712010-04-24 17:59:49 +000015460 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015462rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15463 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015464fi
15465
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015466fi
15467
Matthias Kloseb9621712010-04-24 17:59:49 +000015468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15469$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015470if test "$ac_cv_broken_mbstowcs" = yes
15471then
15472
Matthias Kloseb9621712010-04-24 17:59:49 +000015473$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015474
15475fi
15476
Antoine Pitroub52ec782009-01-25 16:34:23 +000015477# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15479$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015480
15481# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015482if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015483 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015484if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015485then
15486
Matthias Kloseb9621712010-04-24 17:59:49 +000015487$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015488
Matthias Kloseb9621712010-04-24 17:59:49 +000015489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15490$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015491fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015492if test "$withval" = no
15493then
15494
15495$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15496
Matthias Kloseb9621712010-04-24 17:59:49 +000015497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15498$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015499fi
15500
Antoine Pitrou042b1282010-08-13 21:15:58 +000015501else
15502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15503$as_echo "no value specified" >&6; }
15504fi
15505
Antoine Pitroub52ec782009-01-25 16:34:23 +000015506
Matthias Kloseb17289e2012-03-15 19:51:34 +010015507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15508$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15509if ${ac_cv_computed_gotos+:} false; then :
15510 $as_echo_n "(cached) " >&6
15511else
15512 if test "$cross_compiling" = yes; then :
15513 if test "${with_computed_gotos+set}" = set; then
15514 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15515 else
15516 ac_cv_computed_gotos=no
15517 fi
15518else
15519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15520/* end confdefs.h. */
15521
15522int main(int argc, char **argv)
15523{
15524 static void *targets[1] = { &&LABEL1 };
15525 goto LABEL2;
15526LABEL1:
15527 return 0;
15528LABEL2:
15529 goto *targets[0];
15530 return 1;
15531}
15532
15533_ACEOF
15534if ac_fn_c_try_run "$LINENO"; then :
15535 ac_cv_computed_gotos=yes
15536else
15537 ac_cv_computed_gotos=no
15538fi
15539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15540 conftest.$ac_objext conftest.beam conftest.$ac_ext
15541fi
15542
15543fi
15544
15545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15546$as_echo "$ac_cv_computed_gotos" >&6; }
15547case "$ac_cv_computed_gotos" in yes*)
15548
15549$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15550
15551esac
15552
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015553case $ac_sys_system in
15554AIX*)
15555
15556$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15557 ;;
15558esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015559
Michael W. Hudson54241132001-12-07 15:38:26 +000015560
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015561
15562
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015563for h in `(cd $srcdir;echo Python/thread_*.h)`
15564do
15565 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15566done
15567
Michael W. Hudson54241132001-12-07 15:38:26 +000015568
Ned Deily0db50cf2014-07-25 12:41:31 -070015569SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15571$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015572for dir in $SRCDIRS; do
15573 if test ! -d $dir; then
15574 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015575 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015576done
Matthias Kloseb9621712010-04-24 17:59:49 +000015577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15578$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015579
Stefan Krah1919b7e2012-03-21 18:25:23 +010015580# Availability of -O2:
15581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15582$as_echo_n "checking for -O2... " >&6; }
15583saved_cflags="$CFLAGS"
15584CFLAGS="-O2"
15585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15586/* end confdefs.h. */
15587
15588int
15589main ()
15590{
15591
15592
15593 ;
15594 return 0;
15595}
15596_ACEOF
15597if ac_fn_c_try_compile "$LINENO"; then :
15598 have_O2=yes
15599else
15600 have_O2=no
15601fi
15602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15604$as_echo "$have_O2" >&6; }
15605CFLAGS="$saved_cflags"
15606
15607# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15608# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15610$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15611saved_cflags="$CFLAGS"
15612CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15613if test "$have_O2" = no; then
15614 CFLAGS=""
15615fi
15616if test "$cross_compiling" = yes; then :
15617 have_glibc_memmove_bug=undefined
15618else
15619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15620/* end confdefs.h. */
15621
15622#include <stdio.h>
15623#include <stdlib.h>
15624#include <string.h>
15625void foo(void *p, void *q) { memmove(p, q, 19); }
15626int main() {
15627 char a[32] = "123456789000000000";
15628 foo(&a[9], a);
15629 if (strcmp(a, "123456789123456789000000000") != 0)
15630 return 1;
15631 foo(a, &a[9]);
15632 if (strcmp(a, "123456789000000000") != 0)
15633 return 1;
15634 return 0;
15635}
15636
15637_ACEOF
15638if ac_fn_c_try_run "$LINENO"; then :
15639 have_glibc_memmove_bug=no
15640else
15641 have_glibc_memmove_bug=yes
15642fi
15643rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15644 conftest.$ac_objext conftest.beam conftest.$ac_ext
15645fi
15646
15647CFLAGS="$saved_cflags"
15648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15649$as_echo "$have_glibc_memmove_bug" >&6; }
15650if test "$have_glibc_memmove_bug" = yes; then
15651
15652$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15653
15654fi
15655
15656if test "$have_gcc_asm_for_x87" = yes; then
15657 # Some versions of gcc miscompile inline asm:
15658 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15659 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15660 case $CC in
15661 *gcc*)
15662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15663$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15664 saved_cflags="$CFLAGS"
15665 CFLAGS="-O2"
15666 if test "$cross_compiling" = yes; then :
15667 have_ipa_pure_const_bug=undefined
15668else
15669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15670/* end confdefs.h. */
15671
15672 __attribute__((noinline)) int
15673 foo(int *p) {
15674 int r;
15675 asm ( "movl \$6, (%1)\n\t"
15676 "xorl %0, %0\n\t"
15677 : "=r" (r) : "r" (p) : "memory"
15678 );
15679 return r;
15680 }
15681 int main() {
15682 int p = 8;
15683 if ((foo(&p) ? : p) != 6)
15684 return 1;
15685 return 0;
15686 }
15687
15688_ACEOF
15689if ac_fn_c_try_run "$LINENO"; then :
15690 have_ipa_pure_const_bug=no
15691else
15692 have_ipa_pure_const_bug=yes
15693fi
15694rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15695 conftest.$ac_objext conftest.beam conftest.$ac_ext
15696fi
15697
15698 CFLAGS="$saved_cflags"
15699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15700$as_echo "$have_ipa_pure_const_bug" >&6; }
15701 if test "$have_ipa_pure_const_bug" = yes; then
15702
15703$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15704
15705 fi
15706 ;;
15707 esac
15708fi
15709
Victor Stinner4f5366e2015-01-09 02:13:19 +010015710# Check for stdatomic.h
15711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
15712$as_echo_n "checking for stdatomic.h... " >&6; }
15713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15714/* end confdefs.h. */
15715
15716
15717 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010015718 atomic_int value = ATOMIC_VAR_INIT(1);
15719 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010015720 int main() {
15721 int loaded_value = atomic_load(&value);
15722 return 0;
15723 }
15724
15725
15726_ACEOF
15727if ac_fn_c_try_link "$LINENO"; then :
15728 have_stdatomic_h=yes
15729else
15730 have_stdatomic_h=no
15731fi
15732rm -f core conftest.err conftest.$ac_objext \
15733 conftest$ac_exeext conftest.$ac_ext
15734
15735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
15736$as_echo "$have_stdatomic_h" >&6; }
15737
15738if test "$have_stdatomic_h" = yes; then
15739
15740$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
15741
15742fi
15743
15744# Check for GCC >= 4.7 __atomic builtins
15745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
15746$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
15747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15748/* end confdefs.h. */
15749
15750
15751 volatile int val = 1;
15752 int main() {
15753 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
15754 return 0;
15755 }
15756
15757
15758_ACEOF
15759if ac_fn_c_try_link "$LINENO"; then :
15760 have_builtin_atomic=yes
15761else
15762 have_builtin_atomic=no
15763fi
15764rm -f core conftest.err conftest.$ac_objext \
15765 conftest$ac_exeext conftest.$ac_ext
15766
15767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
15768$as_echo "$have_builtin_atomic" >&6; }
15769
15770if test "$have_builtin_atomic" = yes; then
15771
15772$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
15773
15774fi
15775
Ned Deily322f5ba2013-11-21 23:01:59 -080015776# ensurepip option
15777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15778$as_echo_n "checking for ensurepip... " >&6; }
15779
15780# Check whether --with-ensurepip was given.
15781if test "${with_ensurepip+set}" = set; then :
15782 withval=$with_ensurepip;
15783else
15784 with_ensurepip=upgrade
15785fi
15786
15787case $with_ensurepip in #(
15788 yes|upgrade) :
15789 ENSUREPIP=upgrade ;; #(
15790 install) :
15791 ENSUREPIP=install ;; #(
15792 no) :
15793 ENSUREPIP=no ;; #(
15794 *) :
15795 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15796esac
15797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15798$as_echo "$ENSUREPIP" >&6; }
15799
15800
Victor Stinner35a97c02015-03-08 02:59:09 +010015801# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
15802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
15803$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
15804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15805/* end confdefs.h. */
15806
15807
15808 #include <dirent.h>
15809
15810 int main() {
15811 struct dirent entry;
15812 return entry.d_type == DT_UNKNOWN;
15813 }
15814
15815
15816_ACEOF
15817if ac_fn_c_try_link "$LINENO"; then :
15818 have_dirent_d_type=yes
15819else
15820 have_dirent_d_type=no
15821fi
15822rm -f core conftest.err conftest.$ac_objext \
15823 conftest$ac_exeext conftest.$ac_ext
15824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
15825$as_echo "$have_dirent_d_type" >&6; }
15826
15827if test "$have_dirent_d_type" = yes; then
15828
15829$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
15830
15831fi
15832
Guido van Rossum627b2d71993-12-24 10:39:16 +000015833# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015834ac_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 +000015835
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015836ac_config_files="$ac_config_files Modules/ld_so_aix"
15837
Martin v. Löwis11437992002-04-12 09:54:03 +000015838cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015839# This file is a shell script that caches the results of configure
15840# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015841# scripts and configure runs, see configure's option --config-cache.
15842# It is not useful on other systems. If it contains results you don't
15843# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015844#
Martin v. Löwis11437992002-04-12 09:54:03 +000015845# config.status only pays attention to the cache file if you give it
15846# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015847#
Skip Montanaro6dead952003-09-25 14:50:04 +000015848# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015849# loading this file, other *unset* `ac_cv_foo' will be assigned the
15850# following values.
15851
15852_ACEOF
15853
Guido van Rossumf78abae1997-01-21 22:02:36 +000015854# The following way of writing the cache mishandles newlines in values,
15855# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015856# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015857# Ultrix sh set writes to stderr and can't be redirected directly,
15858# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015859(
15860 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15861 eval ac_val=\$$ac_var
15862 case $ac_val in #(
15863 *${as_nl}*)
15864 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015865 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15866$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015867 esac
15868 case $ac_var in #(
15869 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015870 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15871 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015872 esac ;;
15873 esac
15874 done
15875
Martin v. Löwis11437992002-04-12 09:54:03 +000015876 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015877 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15878 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015879 # `set' does not quote correctly, so add quotes: double-quote
15880 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015881 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015882 "s/'/'\\\\''/g;
15883 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015884 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015885 *)
15886 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015887 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015888 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015889 esac |
15890 sort
15891) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015892 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015893 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015894 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015895 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015896 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15897 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015898 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15899 :end' >>confcache
15900if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15901 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015902 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015903 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15904$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015905 if test ! -f "$cache_file" || test -h "$cache_file"; then
15906 cat confcache >"$cache_file"
15907 else
15908 case $cache_file in #(
15909 */* | ?:*)
15910 mv -f confcache "$cache_file"$$ &&
15911 mv -f "$cache_file"$$ "$cache_file" ;; #(
15912 *)
15913 mv -f confcache "$cache_file" ;;
15914 esac
15915 fi
15916 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015917 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015918 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15919$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015920 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015921fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015922rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015923
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015924test "x$prefix" = xNONE && prefix=$ac_default_prefix
15925# Let make expand exec_prefix.
15926test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015927
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015928DEFS=-DHAVE_CONFIG_H
15929
Skip Montanaro6dead952003-09-25 14:50:04 +000015930ac_libobjs=
15931ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015932U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015933for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15934 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015935 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015936 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015937 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15938 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015939 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15940 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015941done
15942LIBOBJS=$ac_libobjs
15943
15944LTLIBOBJS=$ac_ltlibobjs
15945
15946
Martin v. Löwis11437992002-04-12 09:54:03 +000015947
Matthias Kloseb9621712010-04-24 17:59:49 +000015948
Victor Stinnere0be4232011-10-25 13:06:09 +020015949: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015950ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015951ac_clean_files_save=$ac_clean_files
15952ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015953{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15954$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15955as_write_fail=0
15956cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015957#! $SHELL
15958# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015959# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015960# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015961# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015962
Martin v. Löwis11437992002-04-12 09:54:03 +000015963debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015964ac_cs_recheck=false
15965ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015966
Matthias Kloseb9621712010-04-24 17:59:49 +000015967SHELL=\${CONFIG_SHELL-$SHELL}
15968export SHELL
15969_ASEOF
15970cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15971## -------------------- ##
15972## M4sh Initialization. ##
15973## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015975# Be more Bourne compatible
15976DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015977if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015978 emulate sh
15979 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015980 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015981 # is contrary to our usage. Disable this feature.
15982 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015983 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015984else
Matthias Kloseb9621712010-04-24 17:59:49 +000015985 case `(set -o) 2>/dev/null` in #(
15986 *posix*) :
15987 set -o posix ;; #(
15988 *) :
15989 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015990esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015991fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015992
15993
Matthias Kloseb9621712010-04-24 17:59:49 +000015994as_nl='
15995'
15996export as_nl
15997# Printing a long string crashes Solaris 7 /usr/bin/printf.
15998as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15999as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16000as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16001# Prefer a ksh shell builtin over an external printf program on Solaris,
16002# but without wasting forks for bash or zsh.
16003if test -z "$BASH_VERSION$ZSH_VERSION" \
16004 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16005 as_echo='print -r --'
16006 as_echo_n='print -rn --'
16007elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16008 as_echo='printf %s\n'
16009 as_echo_n='printf %s'
16010else
16011 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16012 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16013 as_echo_n='/usr/ucb/echo -n'
16014 else
16015 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16016 as_echo_n_body='eval
16017 arg=$1;
16018 case $arg in #(
16019 *"$as_nl"*)
16020 expr "X$arg" : "X\\(.*\\)$as_nl";
16021 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16022 esac;
16023 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16024 '
16025 export as_echo_n_body
16026 as_echo_n='sh -c $as_echo_n_body as_echo'
16027 fi
16028 export as_echo_body
16029 as_echo='sh -c $as_echo_body as_echo'
16030fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016031
16032# The user is always right.
16033if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016034 PATH_SEPARATOR=:
16035 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16036 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16037 PATH_SEPARATOR=';'
16038 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016039fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016041
16042# IFS
16043# We need space, tab and new line, in precisely that order. Quoting is
16044# there to prevent editors from complaining about space-tab.
16045# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16046# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016047IFS=" "" $as_nl"
16048
16049# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016050as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016051case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016052 *[\\/]* ) as_myself=$0 ;;
16053 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016054for as_dir in $PATH
16055do
16056 IFS=$as_save_IFS
16057 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016058 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16059 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016060IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016061
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016062 ;;
16063esac
16064# We did not find ourselves, most probably we were run as `sh COMMAND'
16065# in which case we are not to be found in the path.
16066if test "x$as_myself" = x; then
16067 as_myself=$0
16068fi
16069if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016070 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16071 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016072fi
16073
Matthias Kloseb9621712010-04-24 17:59:49 +000016074# Unset variables that we do not need and which cause bugs (e.g. in
16075# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16076# suppresses any "Segmentation fault" message there. '((' could
16077# trigger a bug in pdksh 5.2.14.
16078for as_var in BASH_ENV ENV MAIL MAILPATH
16079do eval test x\${$as_var+set} = xset \
16080 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016081done
16082PS1='$ '
16083PS2='> '
16084PS4='+ '
16085
16086# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016087LC_ALL=C
16088export LC_ALL
16089LANGUAGE=C
16090export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016091
Matthias Kloseb9621712010-04-24 17:59:49 +000016092# CDPATH.
16093(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16094
16095
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016096# as_fn_error STATUS ERROR [LINENO LOG_FD]
16097# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016098# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16099# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016100# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016101as_fn_error ()
16102{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016103 as_status=$1; test $as_status -eq 0 && as_status=1
16104 if test "$4"; then
16105 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16106 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016107 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016108 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016109 as_fn_exit $as_status
16110} # as_fn_error
16111
16112
16113# as_fn_set_status STATUS
16114# -----------------------
16115# Set $? to STATUS, without forking.
16116as_fn_set_status ()
16117{
16118 return $1
16119} # as_fn_set_status
16120
16121# as_fn_exit STATUS
16122# -----------------
16123# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16124as_fn_exit ()
16125{
16126 set +e
16127 as_fn_set_status $1
16128 exit $1
16129} # as_fn_exit
16130
16131# as_fn_unset VAR
16132# ---------------
16133# Portably unset VAR.
16134as_fn_unset ()
16135{
16136 { eval $1=; unset $1;}
16137}
16138as_unset=as_fn_unset
16139# as_fn_append VAR VALUE
16140# ----------------------
16141# Append the text in VALUE to the end of the definition contained in VAR. Take
16142# advantage of any shell optimizations that allow amortized linear growth over
16143# repeated appends, instead of the typical quadratic growth present in naive
16144# implementations.
16145if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16146 eval 'as_fn_append ()
16147 {
16148 eval $1+=\$2
16149 }'
16150else
16151 as_fn_append ()
16152 {
16153 eval $1=\$$1\$2
16154 }
16155fi # as_fn_append
16156
16157# as_fn_arith ARG...
16158# ------------------
16159# Perform arithmetic evaluation on the ARGs, and store the result in the
16160# global $as_val. Take advantage of shells that can avoid forks. The arguments
16161# must be portable across $(()) and expr.
16162if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16163 eval 'as_fn_arith ()
16164 {
16165 as_val=$(( $* ))
16166 }'
16167else
16168 as_fn_arith ()
16169 {
16170 as_val=`expr "$@" || test $? -eq 1`
16171 }
16172fi # as_fn_arith
16173
16174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016175if expr a : '\(a\)' >/dev/null 2>&1 &&
16176 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16177 as_expr=expr
16178else
16179 as_expr=false
16180fi
16181
16182if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16183 as_basename=basename
16184else
16185 as_basename=false
16186fi
16187
Matthias Kloseb9621712010-04-24 17:59:49 +000016188if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16189 as_dirname=dirname
16190else
16191 as_dirname=false
16192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016194as_me=`$as_basename -- "$0" ||
16195$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16196 X"$0" : 'X\(//\)$' \| \
16197 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016198$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016199 sed '/^.*\/\([^/][^/]*\)\/*$/{
16200 s//\1/
16201 q
16202 }
16203 /^X\/\(\/\/\)$/{
16204 s//\1/
16205 q
16206 }
16207 /^X\/\(\/\).*/{
16208 s//\1/
16209 q
16210 }
16211 s/.*/./; q'`
16212
Matthias Kloseb9621712010-04-24 17:59:49 +000016213# Avoid depending upon Character Ranges.
16214as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16215as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16216as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16217as_cr_digits='0123456789'
16218as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016219
16220ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016221case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016222-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016223 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016224 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016225 xy) ECHO_C='\c';;
16226 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16227 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016228 esac;;
16229*)
16230 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016231esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016232
Martin v. Löwis11437992002-04-12 09:54:03 +000016233rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016234if test -d conf$$.dir; then
16235 rm -f conf$$.dir/conf$$.file
16236else
16237 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016238 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016239fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016240if (echo >conf$$.file) 2>/dev/null; then
16241 if ln -s conf$$.file conf$$ 2>/dev/null; then
16242 as_ln_s='ln -s'
16243 # ... but there are two gotchas:
16244 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16245 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016246 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016247 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016248 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016249 elif ln conf$$.file conf$$ 2>/dev/null; then
16250 as_ln_s=ln
16251 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016252 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016253 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016254else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016255 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016257rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16258rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016259
Matthias Kloseb9621712010-04-24 17:59:49 +000016260
16261# as_fn_mkdir_p
16262# -------------
16263# Create "$as_dir" as a directory, including parents if necessary.
16264as_fn_mkdir_p ()
16265{
16266
16267 case $as_dir in #(
16268 -*) as_dir=./$as_dir;;
16269 esac
16270 test -d "$as_dir" || eval $as_mkdir_p || {
16271 as_dirs=
16272 while :; do
16273 case $as_dir in #(
16274 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16275 *) as_qdir=$as_dir;;
16276 esac
16277 as_dirs="'$as_qdir' $as_dirs"
16278 as_dir=`$as_dirname -- "$as_dir" ||
16279$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16280 X"$as_dir" : 'X\(//\)[^/]' \| \
16281 X"$as_dir" : 'X\(//\)$' \| \
16282 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16283$as_echo X"$as_dir" |
16284 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16285 s//\1/
16286 q
16287 }
16288 /^X\(\/\/\)[^/].*/{
16289 s//\1/
16290 q
16291 }
16292 /^X\(\/\/\)$/{
16293 s//\1/
16294 q
16295 }
16296 /^X\(\/\).*/{
16297 s//\1/
16298 q
16299 }
16300 s/.*/./; q'`
16301 test -d "$as_dir" && break
16302 done
16303 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016304 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016305
16306
16307} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016308if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016309 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016310else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016311 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016312 as_mkdir_p=false
16313fi
16314
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016315
16316# as_fn_executable_p FILE
16317# -----------------------
16318# Test if FILE is an executable regular file.
16319as_fn_executable_p ()
16320{
16321 test -f "$1" && test -x "$1"
16322} # as_fn_executable_p
16323as_test_x='test -x'
16324as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016325
16326# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016327as_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 +000016328
16329# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016330as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016331
16332
Martin v. Löwis11437992002-04-12 09:54:03 +000016333exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016334## ----------------------------------- ##
16335## Main body of $CONFIG_STATUS script. ##
16336## ----------------------------------- ##
16337_ASEOF
16338test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016339
Matthias Kloseb9621712010-04-24 17:59:49 +000016340cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16341# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016342# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016343# values after options handling.
16344ac_log="
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016345This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016346generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016347
16348 CONFIG_FILES = $CONFIG_FILES
16349 CONFIG_HEADERS = $CONFIG_HEADERS
16350 CONFIG_LINKS = $CONFIG_LINKS
16351 CONFIG_COMMANDS = $CONFIG_COMMANDS
16352 $ $0 $@
16353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016354on `(hostname || uname -n) 2>/dev/null | sed 1q`
16355"
16356
Martin v. Löwis11437992002-04-12 09:54:03 +000016357_ACEOF
16358
Matthias Kloseb9621712010-04-24 17:59:49 +000016359case $ac_config_files in *"
16360"*) set x $ac_config_files; shift; ac_config_files=$*;;
16361esac
16362
16363case $ac_config_headers in *"
16364"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16365esac
16366
16367
16368cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016369# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016370config_files="$ac_config_files"
16371config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016373_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016374
Matthias Kloseb9621712010-04-24 17:59:49 +000016375cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016376ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016377\`$as_me' instantiates files and other configuration actions
16378from templates according to the current configuration. Unless the files
16379and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016380
Matthias Kloseb9621712010-04-24 17:59:49 +000016381Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016382
16383 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016384 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016385 --config print configuration, then exit
16386 -q, --quiet, --silent
16387 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016388 -d, --debug don't remove temporary files
16389 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016390 --file=FILE[:TEMPLATE]
16391 instantiate the configuration file FILE
16392 --header=FILE[:TEMPLATE]
16393 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016394
16395Configuration files:
16396$config_files
16397
16398Configuration headers:
16399$config_headers
16400
Matthias Kloseb9621712010-04-24 17:59:49 +000016401Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016402
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016404cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16405ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016406ac_cs_version="\\
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016407python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016408configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016409 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016410
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016411Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016412This config.status script is free software; the Free Software Foundation
16413gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016414
16415ac_pwd='$ac_pwd'
16416srcdir='$srcdir'
16417INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016418MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016419test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016420_ACEOF
16421
Matthias Kloseb9621712010-04-24 17:59:49 +000016422cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16423# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016424ac_need_defaults=:
16425while test $# != 0
16426do
16427 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016428 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016429 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16430 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016431 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016432 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016433 --*=)
16434 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16435 ac_optarg=
16436 ac_shift=:
16437 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016438 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016439 ac_option=$1
16440 ac_optarg=$2
16441 ac_shift=shift
16442 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016443 esac
16444
Skip Montanaro6dead952003-09-25 14:50:04 +000016445 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016446 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016447 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16448 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016449 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016450 $as_echo "$ac_cs_version"; exit ;;
16451 --config | --confi | --conf | --con | --co | --c )
16452 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016453 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016454 debug=: ;;
16455 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016456 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016457 case $ac_optarg in
16458 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016459 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016460 esac
16461 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016462 ac_need_defaults=false;;
16463 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016464 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016465 case $ac_optarg in
16466 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16467 esac
16468 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016469 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016470 --he | --h)
16471 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016472 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016473Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016474 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016475 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016476 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16477 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16478 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016479
16480 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016481 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016482Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016483
Matthias Kloseb9621712010-04-24 17:59:49 +000016484 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016485 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016486
16487 esac
16488 shift
16489done
16490
Skip Montanaro6dead952003-09-25 14:50:04 +000016491ac_configure_extra_args=
16492
16493if $ac_cs_silent; then
16494 exec 6>/dev/null
16495 ac_configure_extra_args="$ac_configure_extra_args --silent"
16496fi
16497
16498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016499cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016500if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016501 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016502 shift
16503 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16504 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016505 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016506 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016507fi
16508
Martin v. Löwis11437992002-04-12 09:54:03 +000016509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016510cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016511exec 5>>config.log
16512{
16513 echo
16514 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16515## Running $as_me. ##
16516_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016517 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016518} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016521cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016523
Matthias Kloseb9621712010-04-24 17:59:49 +000016524cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016525
16526# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016527for ac_config_target in $ac_config_targets
16528do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016529 case $ac_config_target in
16530 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16531 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16532 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016533 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16534 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016535 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16536 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016537 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016538 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016539 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016540
Victor Stinnere0be4232011-10-25 13:06:09 +020016541 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016542 esac
16543done
16544
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016545
Martin v. Löwis11437992002-04-12 09:54:03 +000016546# If the user did not use the arguments to specify the items to instantiate,
16547# then the envvar interface is used. Set only those that are not.
16548# We use the long form for the default assignment because of an extremely
16549# bizarre bug on SunOS 4.1.3.
16550if $ac_need_defaults; then
16551 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16552 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16553fi
16554
Skip Montanaro6dead952003-09-25 14:50:04 +000016555# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016556# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016557# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016558# Hook for its removal unless debugging.
16559# Note that there is a small window in which the directory will not be cleaned:
16560# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016561$debug ||
16562{
Victor Stinnere0be4232011-10-25 13:06:09 +020016563 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016564 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016565 : "${ac_tmp:=$tmp}"
16566 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016567' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016568 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016569}
Martin v. Löwis11437992002-04-12 09:54:03 +000016570# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016571
Martin v. Löwis11437992002-04-12 09:54:03 +000016572{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016573 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016574 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016575} ||
16576{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016577 tmp=./conf$$-$RANDOM
16578 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016579} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016580ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016581
Matthias Kloseb9621712010-04-24 17:59:49 +000016582# Set up the scripts for CONFIG_FILES section.
16583# No need to generate them if there are no CONFIG_FILES.
16584# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016585if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016586
Matthias Kloseb9621712010-04-24 17:59:49 +000016587
16588ac_cr=`echo X | tr X '\015'`
16589# On cygwin, bash can eat \r inside `` if the user requested igncr.
16590# But we know of no other shell where ac_cr would be empty at this
16591# point, so we can use a bashism as a fallback.
16592if test "x$ac_cr" = x; then
16593 eval ac_cr=\$\'\\r\'
16594fi
16595ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16596if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016597 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016598else
16599 ac_cs_awk_cr=$ac_cr
16600fi
16601
Victor Stinnere0be4232011-10-25 13:06:09 +020016602echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016603_ACEOF
16604
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016605
Matthias Kloseb9621712010-04-24 17:59:49 +000016606{
16607 echo "cat >conf$$subs.awk <<_ACEOF" &&
16608 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16609 echo "_ACEOF"
16610} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016611 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16612ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016613ac_delim='%!_!# '
16614for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016615 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016616 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016617
Matthias Kloseb9621712010-04-24 17:59:49 +000016618 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16619 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016620 break
16621 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016622 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016623 else
16624 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016625 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016626done
Matthias Kloseb9621712010-04-24 17:59:49 +000016627rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016628
Matthias Kloseb9621712010-04-24 17:59:49 +000016629cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016630cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016632sed -n '
16633h
16634s/^/S["/; s/!.*/"]=/
16635p
16636g
16637s/^[^!]*!//
16638:repl
16639t repl
16640s/'"$ac_delim"'$//
16641t delim
16642:nl
16643h
16644s/\(.\{148\}\)..*/\1/
16645t more1
16646s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16647p
16648n
16649b repl
16650:more1
16651s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16652p
16653g
16654s/.\{148\}//
16655t nl
16656:delim
16657h
16658s/\(.\{148\}\)..*/\1/
16659t more2
16660s/["\\]/\\&/g; s/^/"/; s/$/"/
16661p
16662b
16663:more2
16664s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16665p
16666g
16667s/.\{148\}//
16668t delim
16669' <conf$$subs.awk | sed '
16670/^[^""]/{
16671 N
16672 s/\n//
16673}
16674' >>$CONFIG_STATUS || ac_write_fail=1
16675rm -f conf$$subs.awk
16676cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16677_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016678cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016679 for (key in S) S_is_set[key] = 1
16680 FS = ""
16681
16682}
16683{
16684 line = $ 0
16685 nfields = split(line, field, "@")
16686 substed = 0
16687 len = length(field[1])
16688 for (i = 2; i < nfields; i++) {
16689 key = field[i]
16690 keylen = length(key)
16691 if (S_is_set[key]) {
16692 value = S[key]
16693 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16694 len += length(value) + length(field[++i])
16695 substed = 1
16696 } else
16697 len += 1 + keylen
16698 }
16699
16700 print line
16701}
16702
16703_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016705cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16706if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16707 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16708else
16709 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016710fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016711 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016712_ACEOF
16713
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016714# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16715# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016716# trailing colons and then remove the whole line if VPATH becomes empty
16717# (actually we leave an empty line to preserve line numbers).
16718if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016719 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16720h
16721s///
16722s/^/:/
16723s/[ ]*$/:/
16724s/:\$(srcdir):/:/g
16725s/:\${srcdir}:/:/g
16726s/:@srcdir@:/:/g
16727s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016728s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016729x
16730s/\(=[ ]*\).*/\1/
16731G
16732s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016733s/^[^=]*=[ ]*$//
16734}'
16735fi
16736
Matthias Kloseb9621712010-04-24 17:59:49 +000016737cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016738fi # test -n "$CONFIG_FILES"
16739
Matthias Kloseb9621712010-04-24 17:59:49 +000016740# Set up the scripts for CONFIG_HEADERS section.
16741# No need to generate them if there are no CONFIG_HEADERS.
16742# This happens for instance with `./config.status Makefile'.
16743if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016744cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016745BEGIN {
16746_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016747
Matthias Kloseb9621712010-04-24 17:59:49 +000016748# Transform confdefs.h into an awk script `defines.awk', embedded as
16749# here-document in config.status, that substitutes the proper values into
16750# config.h.in to produce config.h.
16751
16752# Create a delimiter string that does not exist in confdefs.h, to ease
16753# handling of long lines.
16754ac_delim='%!_!# '
16755for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016756 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16757 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016758 break
16759 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016760 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016761 else
16762 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16763 fi
16764done
16765
16766# For the awk script, D is an array of macro values keyed by name,
16767# likewise P contains macro parameters if any. Preserve backslash
16768# newline sequences.
16769
16770ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16771sed -n '
16772s/.\{148\}/&'"$ac_delim"'/g
16773t rset
16774:rset
16775s/^[ ]*#[ ]*define[ ][ ]*/ /
16776t def
16777d
16778:def
16779s/\\$//
16780t bsnl
16781s/["\\]/\\&/g
16782s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16783D["\1"]=" \3"/p
16784s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16785d
16786:bsnl
16787s/["\\]/\\&/g
16788s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16789D["\1"]=" \3\\\\\\n"\\/p
16790t cont
16791s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16792t cont
16793d
16794:cont
16795n
16796s/.\{148\}/&'"$ac_delim"'/g
16797t clear
16798:clear
16799s/\\$//
16800t bsnlc
16801s/["\\]/\\&/g; s/^/"/; s/$/"/p
16802d
16803:bsnlc
16804s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16805b cont
16806' <confdefs.h | sed '
16807s/'"$ac_delim"'/"\\\
16808"/g' >>$CONFIG_STATUS || ac_write_fail=1
16809
16810cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16811 for (key in D) D_is_set[key] = 1
16812 FS = ""
16813}
16814/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16815 line = \$ 0
16816 split(line, arg, " ")
16817 if (arg[1] == "#") {
16818 defundef = arg[2]
16819 mac1 = arg[3]
16820 } else {
16821 defundef = substr(arg[1], 2)
16822 mac1 = arg[2]
16823 }
16824 split(mac1, mac2, "(") #)
16825 macro = mac2[1]
16826 prefix = substr(line, 1, index(line, defundef) - 1)
16827 if (D_is_set[macro]) {
16828 # Preserve the white space surrounding the "#".
16829 print prefix "define", macro P[macro] D[macro]
16830 next
16831 } else {
16832 # Replace #undef with comments. This is necessary, for example,
16833 # in the case of _POSIX_SOURCE, which is predefined and required
16834 # on some systems where configure will not decide to define it.
16835 if (defundef == "undef") {
16836 print "/*", prefix defundef, macro, "*/"
16837 next
16838 }
16839 }
16840}
16841{ print }
16842_ACAWK
16843_ACEOF
16844cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016845 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016846fi # test -n "$CONFIG_HEADERS"
16847
16848
16849eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16850shift
16851for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016852do
16853 case $ac_tag in
16854 :[FHLC]) ac_mode=$ac_tag; continue;;
16855 esac
16856 case $ac_mode$ac_tag in
16857 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016858 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016859 :[FH]-) ac_tag=-:-;;
16860 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16861 esac
16862 ac_save_IFS=$IFS
16863 IFS=:
16864 set x $ac_tag
16865 IFS=$ac_save_IFS
16866 shift
16867 ac_file=$1
16868 shift
16869
16870 case $ac_mode in
16871 :L) ac_source=$1;;
16872 :[FH])
16873 ac_file_inputs=
16874 for ac_f
16875 do
16876 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016877 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016878 *) # Look for the file first in the build tree, then in the source tree
16879 # (if the path is not absolute). The absolute path cannot be DOS-style,
16880 # because $ac_f cannot contain `:'.
16881 test -f "$ac_f" ||
16882 case $ac_f in
16883 [\\/$]*) false;;
16884 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16885 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016886 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016887 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016888 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16889 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016890 done
16891
16892 # Let's still pretend it is `configure' which instantiates (i.e., don't
16893 # use $as_me), people would be surprised to read:
16894 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016895 configure_input='Generated from '`
16896 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16897 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016898 if test x"$ac_file" != x-; then
16899 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016900 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16901$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016902 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016903 # Neutralize special characters interpreted by sed in replacement strings.
16904 case $configure_input in #(
16905 *\&* | *\|* | *\\* )
16906 ac_sed_conf_input=`$as_echo "$configure_input" |
16907 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16908 *) ac_sed_conf_input=$configure_input;;
16909 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016910
16911 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016912 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16913 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016914 esac
16915 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016916 esac
16917
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016918 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016919$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016920 X"$ac_file" : 'X\(//\)[^/]' \| \
16921 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016922 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016923$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016924 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16925 s//\1/
16926 q
16927 }
16928 /^X\(\/\/\)[^/].*/{
16929 s//\1/
16930 q
16931 }
16932 /^X\(\/\/\)$/{
16933 s//\1/
16934 q
16935 }
16936 /^X\(\/\).*/{
16937 s//\1/
16938 q
16939 }
16940 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016941 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016942 ac_builddir=.
16943
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016944case "$ac_dir" in
16945.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16946*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016947 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016948 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016949 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016950 case $ac_top_builddir_sub in
16951 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16952 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16953 esac ;;
16954esac
16955ac_abs_top_builddir=$ac_pwd
16956ac_abs_builddir=$ac_pwd$ac_dir_suffix
16957# for backward compatibility:
16958ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016959
16960case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016961 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016962 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016963 ac_top_srcdir=$ac_top_builddir_sub
16964 ac_abs_top_srcdir=$ac_pwd ;;
16965 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016966 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016967 ac_top_srcdir=$srcdir
16968 ac_abs_top_srcdir=$srcdir ;;
16969 *) # Relative name.
16970 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16971 ac_top_srcdir=$ac_top_build_prefix$srcdir
16972 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016973esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016974ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016975
Martin v. Löwis11437992002-04-12 09:54:03 +000016976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016977 case $ac_mode in
16978 :F)
16979 #
16980 # CONFIG_FILE
16981 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016982
16983 case $INSTALL in
16984 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016985 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016986 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016987 ac_MKDIR_P=$MKDIR_P
16988 case $MKDIR_P in
16989 [\\/$]* | ?:[\\/]* ) ;;
16990 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16991 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016992_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016993
Matthias Kloseb9621712010-04-24 17:59:49 +000016994cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016995# If the template does not know about datarootdir, expand it.
16996# FIXME: This hack should be removed a few years after 2.60.
16997ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016998ac_sed_dataroot='
16999/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017000 p
17001 q
17002}
17003/@datadir@/p
17004/@docdir@/p
17005/@infodir@/p
17006/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017007/@mandir@/p'
17008case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017009*datarootdir*) ac_datarootdir_seen=yes;;
17010*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017011 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17012$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017014cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017015 ac_datarootdir_hack='
17016 s&@datadir@&$datadir&g
17017 s&@docdir@&$docdir&g
17018 s&@infodir@&$infodir&g
17019 s&@localedir@&$localedir&g
17020 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017021 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017022esac
17023_ACEOF
17024
17025# Neutralize VPATH when `$srcdir' = `.'.
17026# Shell code in configure.ac might set extrasub.
17027# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017028cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17029ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017030$extrasub
17031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017032cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017033:t
17034/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017035s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017036s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017037s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017038s&@srcdir@&$ac_srcdir&;t t
17039s&@abs_srcdir@&$ac_abs_srcdir&;t t
17040s&@top_srcdir@&$ac_top_srcdir&;t t
17041s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17042s&@builddir@&$ac_builddir&;t t
17043s&@abs_builddir@&$ac_abs_builddir&;t t
17044s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17045s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017046s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017047$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017048"
Victor Stinnere0be4232011-10-25 13:06:09 +020017049eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17050 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017051
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017052test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017053 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17054 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17055 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017056 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017057which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017058$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017059which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017060
Victor Stinnere0be4232011-10-25 13:06:09 +020017061 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017062 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017063 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17064 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017065 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017066 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017067 ;;
17068 :H)
17069 #
17070 # CONFIG_HEADER
17071 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017072 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017073 {
17074 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017075 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17076 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017077 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017078 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017079 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17080$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017081 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017082 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017083 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017084 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017085 fi
17086 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017087 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017088 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017089 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017090 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017091 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017093
17094 esac
17095
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017096
17097 case $ac_file$ac_mode in
17098 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17099
17100 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017101done # for ac_tag
17102
Guido van Rossum627b2d71993-12-24 10:39:16 +000017103
Matthias Kloseb9621712010-04-24 17:59:49 +000017104as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017105_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017106ac_clean_files=$ac_clean_files_save
17107
Matthias Kloseb9621712010-04-24 17:59:49 +000017108test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017109 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017110
Martin v. Löwis11437992002-04-12 09:54:03 +000017111
17112# configure is writing to config.log, and then calls config.status.
17113# config.status does its own redirection, appending to config.log.
17114# Unfortunately, on DOS this fails, as config.log is still kept open
17115# by configure, so config.status won't be able to write to it; its
17116# output is simply discarded. So we exec the FD to /dev/null,
17117# effectively closing config.log, so it can be properly (re)opened and
17118# appended to by config.status. When coming back to configure, we
17119# need to make the FD available again.
17120if test "$no_create" != yes; then
17121 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017122 ac_config_status_args=
17123 test "$silent" = yes &&
17124 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017125 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017126 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017127 exec 5>>config.log
17128 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17129 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017130 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017131fi
17132if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17133 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17134$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017135fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017136
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017137
Christian Heimes75ed8902013-11-20 01:11:18 +010017138echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017139if test ! -f Modules/Setup
17140then
17141 cp $srcdir/Modules/Setup.dist Modules/Setup
17142fi
17143
Christian Heimes75ed8902013-11-20 01:11:18 +010017144echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017145if test ! -f Modules/Setup.local
17146then
17147 echo "# Edit this file for local setup changes" >Modules/Setup.local
17148fi
17149
Christian Heimes75ed8902013-11-20 01:11:18 +010017150echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017151$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17152 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017153 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017154mv config.c Modules