blob: a49ba69549cbba258473b2f3b639b7fa84431bcb [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
Matthias Kloseb9621712010-04-24 17:59:49 +0000653SHLIBS
654CFLAGSFORSHARED
655LINKFORSHARED
656CCSHARED
657BLDSHARED
658LDCXXSHARED
659LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700660SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000661LIBTOOL_CRUFT
662OTHER_LIBTOOL_OPT
663UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700664CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000665BASECFLAGS
666OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000667ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000668LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100669MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000670INSTALL_DATA
671INSTALL_SCRIPT
672INSTALL_PROGRAM
Kushal Das02d23a22014-04-15 23:50:06 +0530673OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200674PYTHON
675ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200676ac_ct_READELF
677READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000678ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200679ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000680AR
681RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000682USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000683GNULD
684LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000685LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000686RUNSHARED
687INSTSONAME
688LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000689PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000690BLDLIBRARY
691DLLLIBRARY
692LDLIBRARY
693LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100694MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000695BUILDEXEEXT
696EGREP
697GREP
698CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200699NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200700ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000701MAINCC
702CXX
703OBJEXT
704EXEEXT
705ac_ct_CC
706CPPFLAGS
707LDFLAGS
708CFLAGS
709CC
710EXPORT_MACOSX_DEPLOYMENT_TARGET
711CONFIGURE_MACOSX_DEPLOYMENT_TARGET
712SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200713_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000714MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000715FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000716FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800717FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000718FRAMEWORKALTINSTALLLAST
719FRAMEWORKALTINSTALLFIRST
720FRAMEWORKINSTALLLAST
721FRAMEWORKINSTALLFIRST
722PYTHONFRAMEWORKINSTALLDIR
723PYTHONFRAMEWORKPREFIX
724PYTHONFRAMEWORKDIR
725PYTHONFRAMEWORKIDENTIFIER
726PYTHONFRAMEWORK
727LIPO_32BIT_FLAGS
728ARCH_RUN_32BIT
729UNIVERSALSDK
730CONFIG_ARGS
731SOVERSION
732VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200733PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100734host_os
735host_vendor
736host_cpu
737host
738build_os
739build_vendor
740build_cpu
741build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500742HAS_HG
743HGBRANCH
744HGTAG
745HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400746BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000747target_alias
748host_alias
749build_alias
750LIBS
751ECHO_T
752ECHO_N
753ECHO_C
754DEFS
755mandir
756localedir
757libdir
758psdir
759pdfdir
760dvidir
761htmldir
762infodir
763docdir
764oldincludedir
765includedir
766localstatedir
767sharedstatedir
768sysconfdir
769datadir
770datarootdir
771libexecdir
772sbindir
773bindir
774program_transform_name
775prefix
776exec_prefix
777PACKAGE_URL
778PACKAGE_BUGREPORT
779PACKAGE_STRING
780PACKAGE_VERSION
781PACKAGE_TARNAME
782PACKAGE_NAME
783PATH_SEPARATOR
784SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000785ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000786ac_user_opts='
787enable_option_checking
788enable_universalsdk
789with_universal_archs
790with_framework_name
791enable_framework
792with_gcc
793with_cxx_main
794with_suffix
795enable_shared
796enable_profiling
797with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100798with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100799with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000800with_libs
801with_system_expat
802with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100803with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000804enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700805with_tcltk_includes
806with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000807with_dbmliborder
808with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000809with_threads
810with_thread
811enable_ipv6
812with_doc_strings
813with_tsc
814with_pymalloc
815with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000816with_fpectl
817with_libm
818with_libc
819enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000820with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800821with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000822'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000823 ac_precious_vars='build_alias
824host_alias
825target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100826MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000827CC
828CFLAGS
829LDFLAGS
830LIBS
831CPPFLAGS
Victor Stinner9eb57c52015-03-19 22:21:49 +0100832CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833
Guido van Rossum627b2d71993-12-24 10:39:16 +0000834
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000836ac_init_help=
837ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000838ac_unrecognized_opts=
839ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840# The variables have the same names as the options, with
841# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000842cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000843exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000844no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000845no_recursion=
846prefix=NONE
847program_prefix=NONE
848program_suffix=NONE
849program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854x_includes=NONE
855x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000856
857# Installation directory options.
858# These are left unexpanded so users can "make install exec_prefix=/foo"
859# and all the variables that are supposed to be based on exec_prefix
860# by default will actually change.
861# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000863bindir='${exec_prefix}/bin'
864sbindir='${exec_prefix}/sbin'
865libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000866datarootdir='${prefix}/share'
867datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000868sysconfdir='${prefix}/etc'
869sharedstatedir='${prefix}/com'
870localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871includedir='${prefix}/include'
872oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000873docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
874infodir='${datarootdir}/info'
875htmldir='${docdir}'
876dvidir='${docdir}'
877pdfdir='${docdir}'
878psdir='${docdir}'
879libdir='${exec_prefix}/lib'
880localedir='${datarootdir}/locale'
881mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000886do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887 # If the previous option needs an argument, assign it.
888 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890 ac_prev=
891 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000892 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200895 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
896 *=) ac_optarg= ;;
897 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000898 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000900 # Accept the important Cygnus configure options, so we can diagnose typos.
901
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 case $ac_dashdash$ac_option in
903 --)
904 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000906 -bindir | --bindir | --bindi | --bind | --bin | --bi)
907 ac_prev=bindir ;;
908 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000909 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000910
911 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000912 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000913 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000914 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000916 -cache-file | --cache-file | --cache-fil | --cache-fi \
917 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
918 ac_prev=cache_file ;;
919 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
920 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 cache_file=$ac_optarg ;;
922
923 --config-cache | -C)
924 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000925
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
932 | --dataroo | --dataro | --datar)
933 ac_prev=datarootdir ;;
934 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
935 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
936 datarootdir=$ac_optarg ;;
937
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000939 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000940 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000941 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200942 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000943 ac_useropt_orig=$ac_useropt
944 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
945 case $ac_user_opts in
946 *"
947"enable_$ac_useropt"
948"*) ;;
949 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
950 ac_unrecognized_sep=', ';;
951 esac
952 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953
954 -docdir | --docdir | --docdi | --doc | --do)
955 ac_prev=docdir ;;
956 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
957 docdir=$ac_optarg ;;
958
959 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
960 ac_prev=dvidir ;;
961 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
962 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
964 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000966 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200968 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt_orig=$ac_useropt
970 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
971 case $ac_user_opts in
972 *"
973"enable_$ac_useropt"
974"*) ;;
975 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
976 ac_unrecognized_sep=', ';;
977 esac
978 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
981 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
982 | --exec | --exe | --ex)
983 ac_prev=exec_prefix ;;
984 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
985 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
986 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000990 # Obsolete; use --with-gas.
991 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 -help | --help | --hel | --he | -h)
994 ac_init_help=long ;;
995 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
996 ac_init_help=recursive ;;
997 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
998 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999
1000 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001005 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1006 ac_prev=htmldir ;;
1007 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1008 | --ht=*)
1009 htmldir=$ac_optarg ;;
1010
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011 -includedir | --includedir | --includedi | --included | --include \
1012 | --includ | --inclu | --incl | --inc)
1013 ac_prev=includedir ;;
1014 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1015 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001017
1018 -infodir | --infodir | --infodi | --infod | --info | --inf)
1019 ac_prev=infodir ;;
1020 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022
1023 -libdir | --libdir | --libdi | --libd)
1024 ac_prev=libdir ;;
1025 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027
1028 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1029 | --libexe | --libex | --libe)
1030 ac_prev=libexecdir ;;
1031 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1032 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001035 -localedir | --localedir | --localedi | --localed | --locale)
1036 ac_prev=localedir ;;
1037 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1038 localedir=$ac_optarg ;;
1039
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001041 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042 ac_prev=localstatedir ;;
1043 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001044 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1048 ac_prev=mandir ;;
1049 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001053 # Obsolete; use --without-fp.
1054 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055
1056 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 no_create=yes ;;
1059
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001060 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1061 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1062 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1065 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1066 | --oldin | --oldi | --old | --ol | --o)
1067 ac_prev=oldincludedir ;;
1068 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1069 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1070 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1074 ac_prev=prefix ;;
1075 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077
1078 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1079 | --program-pre | --program-pr | --program-p)
1080 ac_prev=program_prefix ;;
1081 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1082 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1086 | --program-suf | --program-su | --program-s)
1087 ac_prev=program_suffix ;;
1088 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1089 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
1092 -program-transform-name | --program-transform-name \
1093 | --program-transform-nam | --program-transform-na \
1094 | --program-transform-n | --program-transform- \
1095 | --program-transform | --program-transfor \
1096 | --program-transfo | --program-transf \
1097 | --program-trans | --program-tran \
1098 | --progr-tra | --program-tr | --program-t)
1099 ac_prev=program_transform_name ;;
1100 -program-transform-name=* | --program-transform-name=* \
1101 | --program-transform-nam=* | --program-transform-na=* \
1102 | --program-transform-n=* | --program-transform-=* \
1103 | --program-transform=* | --program-transfor=* \
1104 | --program-transfo=* | --program-transf=* \
1105 | --program-trans=* | --program-tran=* \
1106 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001109 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1110 ac_prev=pdfdir ;;
1111 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1112 pdfdir=$ac_optarg ;;
1113
1114 -psdir | --psdir | --psdi | --psd | --ps)
1115 ac_prev=psdir ;;
1116 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1117 psdir=$ac_optarg ;;
1118
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1120 | -silent | --silent | --silen | --sile | --sil)
1121 silent=yes ;;
1122
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001123 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1124 ac_prev=sbindir ;;
1125 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1126 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001128
1129 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1130 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1131 | --sharedst | --shareds | --shared | --share | --shar \
1132 | --sha | --sh)
1133 ac_prev=sharedstatedir ;;
1134 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1135 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1136 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1137 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001139
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140 -site | --site | --sit)
1141 ac_prev=site ;;
1142 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1146 ac_prev=srcdir ;;
1147 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001148 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001150 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1151 | --syscon | --sysco | --sysc | --sys | --sy)
1152 ac_prev=sysconfdir ;;
1153 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1154 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
1162 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1163 verbose=yes ;;
1164
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 -version | --version | --versio | --versi | --vers | -V)
1166 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167
1168 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001169 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001170 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001171 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001172 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001173 ac_useropt_orig=$ac_useropt
1174 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1175 case $ac_user_opts in
1176 *"
1177"with_$ac_useropt"
1178"*) ;;
1179 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1180 ac_unrecognized_sep=', ';;
1181 esac
1182 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183
1184 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001185 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001186 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001187 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001188 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001189 ac_useropt_orig=$ac_useropt
1190 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1191 case $ac_user_opts in
1192 *"
1193"with_$ac_useropt"
1194"*) ;;
1195 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1196 ac_unrecognized_sep=', ';;
1197 esac
1198 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200 --x)
1201 # Obsolete; use --with-x.
1202 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
1204 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1205 | --x-incl | --x-inc | --x-in | --x-i)
1206 ac_prev=x_includes ;;
1207 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1208 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001209 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210
1211 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1212 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1213 ac_prev=x_libraries ;;
1214 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1215 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001218 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1219Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220 ;;
1221
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 *=*)
1223 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1224 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 case $ac_envvar in #(
1226 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001227 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001228 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001229 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 export $ac_envvar ;;
1231
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001232 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001233 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001234 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001235 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001236 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001237 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238 ;;
1239
1240 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001241done
1242
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246fi
1247
Matthias Kloseb9621712010-04-24 17:59:49 +00001248if test -n "$ac_unrecognized_opts"; then
1249 case $enable_option_checking in
1250 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001251 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1253 esac
1254fi
1255
1256# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1258 datadir sysconfdir sharedstatedir localstatedir includedir \
1259 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1260 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001261do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001262 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 # Remove trailing slashes.
1264 case $ac_val in
1265 */ )
1266 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1267 eval $ac_var=\$ac_val;;
1268 esac
1269 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001271 [\\/$]* | ?:[\\/]* ) continue;;
1272 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001274 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001275done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001276
Martin v. Löwis11437992002-04-12 09:54:03 +00001277# There might be people who depend on the old broken behavior: `$host'
1278# used to hold the argument of --host etc.
1279# FIXME: To remove some day.
1280build=$build_alias
1281host=$host_alias
1282target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283
Martin v. Löwis11437992002-04-12 09:54:03 +00001284# FIXME: To remove some day.
1285if test "x$host_alias" != x; then
1286 if test "x$build_alias" = x; then
1287 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001288 elif test "x$build_alias" != "x$host_alias"; then
1289 cross_compiling=yes
1290 fi
1291fi
1292
1293ac_tool_prefix=
1294test -n "$host_alias" && ac_tool_prefix=$host_alias-
1295
1296test "$silent" = yes && exec 6>/dev/null
1297
Guido van Rossum627b2d71993-12-24 10:39:16 +00001298
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299ac_pwd=`pwd` && test -n "$ac_pwd" &&
1300ac_ls_di=`ls -di .` &&
1301ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001302 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001303test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001304 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001305
1306
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307# Find the source files, if location was not specified.
1308if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001309 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001310 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001311 ac_confdir=`$as_dirname -- "$as_myself" ||
1312$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1313 X"$as_myself" : 'X\(//\)[^/]' \| \
1314 X"$as_myself" : 'X\(//\)$' \| \
1315 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1316$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001317 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1318 s//\1/
1319 q
1320 }
1321 /^X\(\/\/\)[^/].*/{
1322 s//\1/
1323 q
1324 }
1325 /^X\(\/\/\)$/{
1326 s//\1/
1327 q
1328 }
1329 /^X\(\/\).*/{
1330 s//\1/
1331 q
1332 }
1333 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001334 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336 srcdir=..
1337 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001338else
1339 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341if test ! -r "$srcdir/$ac_unique_file"; then
1342 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001343 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1346ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001347 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001348 pwd)`
1349# When building in place, set srcdir=.
1350if test "$ac_abs_confdir" = "$ac_pwd"; then
1351 srcdir=.
1352fi
1353# Remove unnecessary trailing slashes from srcdir.
1354# Double slashes in file names in object file debugging info
1355# mess up M-x gdb in Emacs.
1356case $srcdir in
1357*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1358esac
1359for ac_var in $ac_precious_vars; do
1360 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1361 eval ac_env_${ac_var}_value=\$${ac_var}
1362 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1363 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1364done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001365
Martin v. Löwis11437992002-04-12 09:54:03 +00001366#
1367# Report the --help message.
1368#
1369if test "$ac_init_help" = "long"; then
1370 # Omit some internal or obsolete options to make the list less imposing.
1371 # This message is too long to be a string in the A/UX 3.1 sh.
1372 cat <<_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001373\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001374
1375Usage: $0 [OPTION]... [VAR=VALUE]...
1376
1377To assign environment variables (e.g., CC, CFLAGS...), specify them as
1378VAR=VALUE. See below for descriptions of some of the useful variables.
1379
1380Defaults for the options are specified in brackets.
1381
1382Configuration:
1383 -h, --help display this help and exit
1384 --help=short display options specific to this package
1385 --help=recursive display the short help of all the included packages
1386 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001387 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001388 --cache-file=FILE cache test results in FILE [disabled]
1389 -C, --config-cache alias for \`--cache-file=config.cache'
1390 -n, --no-create do not create output files
1391 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1392
Martin v. Löwis11437992002-04-12 09:54:03 +00001393Installation directories:
1394 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001395 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001396 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001397 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001398
1399By default, \`make install' will install all the files in
1400\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1401an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1402for instance \`--prefix=\$HOME'.
1403
1404For better control, use the options below.
1405
1406Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001407 --bindir=DIR user executables [EPREFIX/bin]
1408 --sbindir=DIR system admin executables [EPREFIX/sbin]
1409 --libexecdir=DIR program executables [EPREFIX/libexec]
1410 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1411 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1412 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1413 --libdir=DIR object code libraries [EPREFIX/lib]
1414 --includedir=DIR C header files [PREFIX/include]
1415 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1416 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1417 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1418 --infodir=DIR info documentation [DATAROOTDIR/info]
1419 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1420 --mandir=DIR man documentation [DATAROOTDIR/man]
1421 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1422 --htmldir=DIR html documentation [DOCDIR]
1423 --dvidir=DIR dvi documentation [DOCDIR]
1424 --pdfdir=DIR pdf documentation [DOCDIR]
1425 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001426_ACEOF
1427
1428 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001429
1430System types:
1431 --build=BUILD configure for building on BUILD [guessed]
1432 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001433_ACEOF
1434fi
1435
1436if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001437 case $ac_init_help in
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001438 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001439 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 cat <<\_ACEOF
1441
1442Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001443 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001444 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1445 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001446 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001447 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001448 --enable-framework[=INSTALLDIR]
1449 Build (MacOSX|Darwin) framework
1450 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001451 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001452 --enable-loadable-sqlite-extensions
1453 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001454 --enable-ipv6 Enable ipv6 (with ipv4) support
1455 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001456 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001457 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001458
1459Optional Packages:
1460 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1461 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001462 --with-universal-archs=ARCH
1463 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001464 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001465 --with-framework-name=FRAMEWORK
1466 specify an alternate name of the framework built
1467 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001468 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001469 --with-cxx-main=<compiler>
1470 compile main() and link python executable with C++
1471 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001472 --with-suffix=.exe set executable suffix
1473 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001474 --with-hash-algorithm=[fnv|siphash24]
1475 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001476 --with-address-sanitizer
1477 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001479 --with-system-expat build pyexpat module using an installed expat
1480 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001481 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001482 --with-system-libmpdec build _decimal module using an installed libmpdec
1483 library
Ned Deilyd819b932013-09-06 01:07:05 -07001484 --with-tcltk-includes='-I...'
1485 override search for Tcl and Tk include files
1486 --with-tcltk-libs='-L...'
1487 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001488 --with-dbmliborder=db1:db2:...
1489 order to check db backends for dbm. Valid value is a
1490 colon separated string with the backend names
1491 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001492 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --with(out)-threads[=DIRECTORY]
1494 disable/enable thread support
1495 --with(out)-thread[=DIRECTORY]
1496 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001498 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001499 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001500 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with-fpectl enable SIGFPE catching
1502 --with-libm=STRING math library
1503 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001504 --with(out)-computed-gotos
1505 Use computed gotos in evaluation loop (enabled by
1506 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001507 --with(out)-ensurepip=[=upgrade]
1508 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001509
1510Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001511 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001512 CC C compiler command
1513 CFLAGS C compiler flags
1514 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1515 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001516 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001517 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001519 CPP C preprocessor
1520
1521Use these variables to override the choices made by `configure' or to help
1522it to find libraries and programs with nonstandard names/locations.
1523
Georg Brandle2e15612009-05-20 18:25:10 +00001524Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001525_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001527fi
1528
1529if test "$ac_init_help" = "recursive"; then
1530 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001531 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001532 test -d "$ac_dir" ||
1533 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1534 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001535 ac_builddir=.
1536
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001537case "$ac_dir" in
1538.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1539*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001540 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001541 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001542 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001543 case $ac_top_builddir_sub in
1544 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1545 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1546 esac ;;
1547esac
1548ac_abs_top_builddir=$ac_pwd
1549ac_abs_builddir=$ac_pwd$ac_dir_suffix
1550# for backward compatibility:
1551ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001552
1553case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001554 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001555 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556 ac_top_srcdir=$ac_top_builddir_sub
1557 ac_abs_top_srcdir=$ac_pwd ;;
1558 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001559 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560 ac_top_srcdir=$srcdir
1561 ac_abs_top_srcdir=$srcdir ;;
1562 *) # Relative name.
1563 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1564 ac_top_srcdir=$ac_top_build_prefix$srcdir
1565 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001566esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001568
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569 cd "$ac_dir" || { ac_status=$?; continue; }
1570 # Check for guested configure.
1571 if test -f "$ac_srcdir/configure.gnu"; then
1572 echo &&
1573 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1574 elif test -f "$ac_srcdir/configure"; then
1575 echo &&
1576 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001578 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579 fi || ac_status=$?
1580 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 done
1582fi
1583
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001585if $ac_init_version; then
1586 cat <<\_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001587python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001588generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001589
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001590Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001591This configure script is free software; the Free Software Foundation
1592gives unlimited permission to copy, distribute and modify it.
1593_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001595fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001596
1597## ------------------------ ##
1598## Autoconf initialization. ##
1599## ------------------------ ##
1600
1601# ac_fn_c_try_compile LINENO
1602# --------------------------
1603# Try to compile conftest.$ac_ext, and return whether this succeeded.
1604ac_fn_c_try_compile ()
1605{
1606 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1607 rm -f conftest.$ac_objext
1608 if { { ac_try="$ac_compile"
1609case "(($ac_try" in
1610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1611 *) ac_try_echo=$ac_try;;
1612esac
1613eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1614$as_echo "$ac_try_echo"; } >&5
1615 (eval "$ac_compile") 2>conftest.err
1616 ac_status=$?
1617 if test -s conftest.err; then
1618 grep -v '^ *+' conftest.err >conftest.er1
1619 cat conftest.er1 >&5
1620 mv -f conftest.er1 conftest.err
1621 fi
1622 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1623 test $ac_status = 0; } && {
1624 test -z "$ac_c_werror_flag" ||
1625 test ! -s conftest.err
1626 } && test -s conftest.$ac_objext; then :
1627 ac_retval=0
1628else
1629 $as_echo "$as_me: failed program was:" >&5
1630sed 's/^/| /' conftest.$ac_ext >&5
1631
1632 ac_retval=1
1633fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001634 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001635 as_fn_set_status $ac_retval
1636
1637} # ac_fn_c_try_compile
1638
Matthias Kloseb9621712010-04-24 17:59:49 +00001639# ac_fn_c_try_link LINENO
1640# -----------------------
1641# Try to link conftest.$ac_ext, and return whether this succeeded.
1642ac_fn_c_try_link ()
1643{
1644 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1645 rm -f conftest.$ac_objext conftest$ac_exeext
1646 if { { ac_try="$ac_link"
1647case "(($ac_try" in
1648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1649 *) ac_try_echo=$ac_try;;
1650esac
1651eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1652$as_echo "$ac_try_echo"; } >&5
1653 (eval "$ac_link") 2>conftest.err
1654 ac_status=$?
1655 if test -s conftest.err; then
1656 grep -v '^ *+' conftest.err >conftest.er1
1657 cat conftest.er1 >&5
1658 mv -f conftest.er1 conftest.err
1659 fi
1660 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1661 test $ac_status = 0; } && {
1662 test -z "$ac_c_werror_flag" ||
1663 test ! -s conftest.err
1664 } && test -s conftest$ac_exeext && {
1665 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001666 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001667 }; then :
1668 ac_retval=0
1669else
1670 $as_echo "$as_me: failed program was:" >&5
1671sed 's/^/| /' conftest.$ac_ext >&5
1672
1673 ac_retval=1
1674fi
1675 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1676 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1677 # interfere with the next link command; also delete a directory that is
1678 # left behind by Apple's compiler. We do this before executing the actions.
1679 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001680 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001681 as_fn_set_status $ac_retval
1682
1683} # ac_fn_c_try_link
1684
Matthias Kloseb9621712010-04-24 17:59:49 +00001685# ac_fn_c_try_cpp LINENO
1686# ----------------------
1687# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1688ac_fn_c_try_cpp ()
1689{
1690 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691 if { { ac_try="$ac_cpp conftest.$ac_ext"
1692case "(($ac_try" in
1693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1694 *) ac_try_echo=$ac_try;;
1695esac
1696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1697$as_echo "$ac_try_echo"; } >&5
1698 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1699 ac_status=$?
1700 if test -s conftest.err; then
1701 grep -v '^ *+' conftest.err >conftest.er1
1702 cat conftest.er1 >&5
1703 mv -f conftest.er1 conftest.err
1704 fi
1705 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001706 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001707 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1708 test ! -s conftest.err
1709 }; then :
1710 ac_retval=0
1711else
1712 $as_echo "$as_me: failed program was:" >&5
1713sed 's/^/| /' conftest.$ac_ext >&5
1714
1715 ac_retval=1
1716fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001717 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001718 as_fn_set_status $ac_retval
1719
1720} # ac_fn_c_try_cpp
1721
1722# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1723# -------------------------------------------------------
1724# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1725# the include files in INCLUDES and setting the cache variable VAR
1726# accordingly.
1727ac_fn_c_check_header_mongrel ()
1728{
1729 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001730 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1732$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001733if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001734 $as_echo_n "(cached) " >&6
1735fi
1736eval ac_res=\$$3
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1738$as_echo "$ac_res" >&6; }
1739else
1740 # Is the header compilable?
1741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1742$as_echo_n "checking $2 usability... " >&6; }
1743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1744/* end confdefs.h. */
1745$4
1746#include <$2>
1747_ACEOF
1748if ac_fn_c_try_compile "$LINENO"; then :
1749 ac_header_compiler=yes
1750else
1751 ac_header_compiler=no
1752fi
1753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1755$as_echo "$ac_header_compiler" >&6; }
1756
1757# Is the header present?
1758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1759$as_echo_n "checking $2 presence... " >&6; }
1760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1761/* end confdefs.h. */
1762#include <$2>
1763_ACEOF
1764if ac_fn_c_try_cpp "$LINENO"; then :
1765 ac_header_preproc=yes
1766else
1767 ac_header_preproc=no
1768fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001769rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1771$as_echo "$ac_header_preproc" >&6; }
1772
1773# So? What about this header?
1774case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1775 yes:no: )
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1777$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1778 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1779$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1780 ;;
1781 no:yes:* )
1782 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1783$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1785$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1787$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1789$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1791$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001792( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001793## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001794## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001795 ) | sed "s/^/$as_me: WARNING: /" >&2
1796 ;;
1797esac
1798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1799$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001800if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001801 $as_echo_n "(cached) " >&6
1802else
1803 eval "$3=\$ac_header_compiler"
1804fi
1805eval ac_res=\$$3
1806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1807$as_echo "$ac_res" >&6; }
1808fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001809 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001810
1811} # ac_fn_c_check_header_mongrel
1812
1813# ac_fn_c_try_run LINENO
1814# ----------------------
1815# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1816# that executables *can* be run.
1817ac_fn_c_try_run ()
1818{
1819 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1820 if { { ac_try="$ac_link"
1821case "(($ac_try" in
1822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1823 *) ac_try_echo=$ac_try;;
1824esac
1825eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1826$as_echo "$ac_try_echo"; } >&5
1827 (eval "$ac_link") 2>&5
1828 ac_status=$?
1829 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1830 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1831 { { case "(($ac_try" in
1832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1833 *) ac_try_echo=$ac_try;;
1834esac
1835eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1836$as_echo "$ac_try_echo"; } >&5
1837 (eval "$ac_try") 2>&5
1838 ac_status=$?
1839 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1840 test $ac_status = 0; }; }; then :
1841 ac_retval=0
1842else
1843 $as_echo "$as_me: program exited with status $ac_status" >&5
1844 $as_echo "$as_me: failed program was:" >&5
1845sed 's/^/| /' conftest.$ac_ext >&5
1846
1847 ac_retval=$ac_status
1848fi
1849 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001850 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001851 as_fn_set_status $ac_retval
1852
1853} # ac_fn_c_try_run
1854
1855# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1856# -------------------------------------------------------
1857# Tests whether HEADER exists and can be compiled using the include files in
1858# INCLUDES, setting the cache variable VAR accordingly.
1859ac_fn_c_check_header_compile ()
1860{
1861 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1863$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001864if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001865 $as_echo_n "(cached) " >&6
1866else
1867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1868/* end confdefs.h. */
1869$4
1870#include <$2>
1871_ACEOF
1872if ac_fn_c_try_compile "$LINENO"; then :
1873 eval "$3=yes"
1874else
1875 eval "$3=no"
1876fi
1877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1878fi
1879eval ac_res=\$$3
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1881$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001882 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001883
1884} # ac_fn_c_check_header_compile
1885
Matthias Kloseb9621712010-04-24 17:59:49 +00001886# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1887# -------------------------------------------
1888# Tests whether TYPE exists after having included INCLUDES, setting cache
1889# variable VAR accordingly.
1890ac_fn_c_check_type ()
1891{
1892 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1894$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001895if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001896 $as_echo_n "(cached) " >&6
1897else
1898 eval "$3=no"
1899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1900/* end confdefs.h. */
1901$4
1902int
1903main ()
1904{
1905if (sizeof ($2))
1906 return 0;
1907 ;
1908 return 0;
1909}
1910_ACEOF
1911if ac_fn_c_try_compile "$LINENO"; then :
1912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1913/* end confdefs.h. */
1914$4
1915int
1916main ()
1917{
1918if (sizeof (($2)))
1919 return 0;
1920 ;
1921 return 0;
1922}
1923_ACEOF
1924if ac_fn_c_try_compile "$LINENO"; then :
1925
1926else
1927 eval "$3=yes"
1928fi
1929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1930fi
1931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1932fi
1933eval ac_res=\$$3
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1935$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001936 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001937
1938} # ac_fn_c_check_type
1939
1940# ac_fn_c_find_uintX_t LINENO BITS VAR
1941# ------------------------------------
1942# Finds an unsigned integer type with width BITS, setting cache variable VAR
1943# accordingly.
1944ac_fn_c_find_uintX_t ()
1945{
1946 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1948$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001949if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001950 $as_echo_n "(cached) " >&6
1951else
1952 eval "$3=no"
1953 # Order is important - never check a type that is potentially smaller
1954 # than half of the expected target width.
1955 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1956 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1958/* end confdefs.h. */
1959$ac_includes_default
1960int
1961main ()
1962{
1963static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001964test_array [0] = 0;
1965return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001966
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971if ac_fn_c_try_compile "$LINENO"; then :
1972 case $ac_type in #(
1973 uint$2_t) :
1974 eval "$3=yes" ;; #(
1975 *) :
1976 eval "$3=\$ac_type" ;;
1977esac
1978fi
1979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001980 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001981
1982else
1983 break
1984fi
1985 done
1986fi
1987eval ac_res=\$$3
1988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1989$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001990 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001991
1992} # ac_fn_c_find_uintX_t
1993
1994# ac_fn_c_find_intX_t LINENO BITS VAR
1995# -----------------------------------
1996# Finds a signed integer type with width BITS, setting cache variable VAR
1997# accordingly.
1998ac_fn_c_find_intX_t ()
1999{
2000 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2002$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002003if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002004 $as_echo_n "(cached) " >&6
2005else
2006 eval "$3=no"
2007 # Order is important - never check a type that is potentially smaller
2008 # than half of the expected target width.
2009 for ac_type in int$2_t 'int' 'long int' \
2010 'long long int' 'short int' 'signed char'; do
2011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012/* end confdefs.h. */
2013$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002014 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002015int
2016main ()
2017{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002018static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002019test_array [0] = 0;
2020return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002021
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2028/* end confdefs.h. */
2029$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002030 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002031int
2032main ()
2033{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002034static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002035 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002036test_array [0] = 0;
2037return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002038
2039 ;
2040 return 0;
2041}
2042_ACEOF
2043if ac_fn_c_try_compile "$LINENO"; then :
2044
2045else
2046 case $ac_type in #(
2047 int$2_t) :
2048 eval "$3=yes" ;; #(
2049 *) :
2050 eval "$3=\$ac_type" ;;
2051esac
2052fi
2053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2054fi
2055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002056 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002057
2058else
2059 break
2060fi
2061 done
2062fi
2063eval ac_res=\$$3
2064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2065$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002066 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002067
2068} # ac_fn_c_find_intX_t
2069
2070# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2071# --------------------------------------------
2072# Tries to find the compile-time value of EXPR in a program that includes
2073# INCLUDES, setting VAR accordingly. Returns whether the value could be
2074# computed
2075ac_fn_c_compute_int ()
2076{
2077 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2078 if test "$cross_compiling" = yes; then
2079 # Depending upon the size, compute the lo and hi bounds.
2080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2081/* end confdefs.h. */
2082$4
2083int
2084main ()
2085{
2086static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002087test_array [0] = 0;
2088return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002089
2090 ;
2091 return 0;
2092}
2093_ACEOF
2094if ac_fn_c_try_compile "$LINENO"; then :
2095 ac_lo=0 ac_mid=0
2096 while :; do
2097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2098/* end confdefs.h. */
2099$4
2100int
2101main ()
2102{
2103static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002104test_array [0] = 0;
2105return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002106
2107 ;
2108 return 0;
2109}
2110_ACEOF
2111if ac_fn_c_try_compile "$LINENO"; then :
2112 ac_hi=$ac_mid; break
2113else
2114 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2115 if test $ac_lo -le $ac_mid; then
2116 ac_lo= ac_hi=
2117 break
2118 fi
2119 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2120fi
2121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2122 done
2123else
2124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125/* end confdefs.h. */
2126$4
2127int
2128main ()
2129{
2130static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002131test_array [0] = 0;
2132return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002133
2134 ;
2135 return 0;
2136}
2137_ACEOF
2138if ac_fn_c_try_compile "$LINENO"; then :
2139 ac_hi=-1 ac_mid=-1
2140 while :; do
2141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2142/* end confdefs.h. */
2143$4
2144int
2145main ()
2146{
2147static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002148test_array [0] = 0;
2149return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002150
2151 ;
2152 return 0;
2153}
2154_ACEOF
2155if ac_fn_c_try_compile "$LINENO"; then :
2156 ac_lo=$ac_mid; break
2157else
2158 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2159 if test $ac_mid -le $ac_hi; then
2160 ac_lo= ac_hi=
2161 break
2162 fi
2163 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2164fi
2165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2166 done
2167else
2168 ac_lo= ac_hi=
2169fi
2170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2171fi
2172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2173# Binary search between lo and hi bounds.
2174while test "x$ac_lo" != "x$ac_hi"; do
2175 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178$4
2179int
2180main ()
2181{
2182static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002183test_array [0] = 0;
2184return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002185
2186 ;
2187 return 0;
2188}
2189_ACEOF
2190if ac_fn_c_try_compile "$LINENO"; then :
2191 ac_hi=$ac_mid
2192else
2193 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2194fi
2195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2196done
2197case $ac_lo in #((
2198?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2199'') ac_retval=1 ;;
2200esac
2201 else
2202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2203/* end confdefs.h. */
2204$4
2205static long int longval () { return $2; }
2206static unsigned long int ulongval () { return $2; }
2207#include <stdio.h>
2208#include <stdlib.h>
2209int
2210main ()
2211{
2212
2213 FILE *f = fopen ("conftest.val", "w");
2214 if (! f)
2215 return 1;
2216 if (($2) < 0)
2217 {
2218 long int i = longval ();
2219 if (i != ($2))
2220 return 1;
2221 fprintf (f, "%ld", i);
2222 }
2223 else
2224 {
2225 unsigned long int i = ulongval ();
2226 if (i != ($2))
2227 return 1;
2228 fprintf (f, "%lu", i);
2229 }
2230 /* Do not output a trailing newline, as this causes \r\n confusion
2231 on some platforms. */
2232 return ferror (f) || fclose (f) != 0;
2233
2234 ;
2235 return 0;
2236}
2237_ACEOF
2238if ac_fn_c_try_run "$LINENO"; then :
2239 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2240else
2241 ac_retval=1
2242fi
2243rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2244 conftest.$ac_objext conftest.beam conftest.$ac_ext
2245rm -f conftest.val
2246
2247 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002248 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002249 as_fn_set_status $ac_retval
2250
2251} # ac_fn_c_compute_int
2252
2253# ac_fn_c_check_func LINENO FUNC VAR
2254# ----------------------------------
2255# Tests whether FUNC exists, setting the cache variable VAR accordingly
2256ac_fn_c_check_func ()
2257{
2258 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2260$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002261if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002262 $as_echo_n "(cached) " >&6
2263else
2264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2265/* end confdefs.h. */
2266/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2267 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2268#define $2 innocuous_$2
2269
2270/* System header to define __stub macros and hopefully few prototypes,
2271 which can conflict with char $2 (); below.
2272 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2273 <limits.h> exists even on freestanding compilers. */
2274
2275#ifdef __STDC__
2276# include <limits.h>
2277#else
2278# include <assert.h>
2279#endif
2280
2281#undef $2
2282
2283/* Override any GCC internal prototype to avoid an error.
2284 Use char because int might match the return type of a GCC
2285 builtin and then its argument prototype would still apply. */
2286#ifdef __cplusplus
2287extern "C"
2288#endif
2289char $2 ();
2290/* The GNU C library defines this for functions which it implements
2291 to always fail with ENOSYS. Some functions are actually named
2292 something starting with __ and the normal name is an alias. */
2293#if defined __stub_$2 || defined __stub___$2
2294choke me
2295#endif
2296
2297int
2298main ()
2299{
2300return $2 ();
2301 ;
2302 return 0;
2303}
2304_ACEOF
2305if ac_fn_c_try_link "$LINENO"; then :
2306 eval "$3=yes"
2307else
2308 eval "$3=no"
2309fi
2310rm -f core conftest.err conftest.$ac_objext \
2311 conftest$ac_exeext conftest.$ac_ext
2312fi
2313eval ac_res=\$$3
2314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2315$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002316 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002317
2318} # ac_fn_c_check_func
2319
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002320# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2321# ---------------------------------------------
2322# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2323# accordingly.
2324ac_fn_c_check_decl ()
2325{
2326 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2327 as_decl_name=`echo $2|sed 's/ *(.*//'`
2328 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2330$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2331if eval \${$3+:} false; then :
2332 $as_echo_n "(cached) " >&6
2333else
2334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2335/* end confdefs.h. */
2336$4
2337int
2338main ()
2339{
2340#ifndef $as_decl_name
2341#ifdef __cplusplus
2342 (void) $as_decl_use;
2343#else
2344 (void) $as_decl_name;
2345#endif
2346#endif
2347
2348 ;
2349 return 0;
2350}
2351_ACEOF
2352if ac_fn_c_try_compile "$LINENO"; then :
2353 eval "$3=yes"
2354else
2355 eval "$3=no"
2356fi
2357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2358fi
2359eval ac_res=\$$3
2360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2361$as_echo "$ac_res" >&6; }
2362 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2363
2364} # ac_fn_c_check_decl
2365
Matthias Kloseb9621712010-04-24 17:59:49 +00002366# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2367# ----------------------------------------------------
2368# Tries to find if the field MEMBER exists in type AGGR, after including
2369# INCLUDES, setting cache variable VAR accordingly.
2370ac_fn_c_check_member ()
2371{
2372 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2374$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002375if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002376 $as_echo_n "(cached) " >&6
2377else
2378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2379/* end confdefs.h. */
2380$5
2381int
2382main ()
2383{
2384static $2 ac_aggr;
2385if (ac_aggr.$3)
2386return 0;
2387 ;
2388 return 0;
2389}
2390_ACEOF
2391if ac_fn_c_try_compile "$LINENO"; then :
2392 eval "$4=yes"
2393else
2394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2395/* end confdefs.h. */
2396$5
2397int
2398main ()
2399{
2400static $2 ac_aggr;
2401if (sizeof ac_aggr.$3)
2402return 0;
2403 ;
2404 return 0;
2405}
2406_ACEOF
2407if ac_fn_c_try_compile "$LINENO"; then :
2408 eval "$4=yes"
2409else
2410 eval "$4=no"
2411fi
2412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2413fi
2414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2415fi
2416eval ac_res=\$$4
2417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2418$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002419 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002420
2421} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002422cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002423This file contains any messages produced by compilers while
2424running configure, to aid debugging if configure makes a mistake.
2425
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002426It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002427generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002428
2429 $ $0 $@
2430
2431_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002432exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002433{
2434cat <<_ASUNAME
2435## --------- ##
2436## Platform. ##
2437## --------- ##
2438
2439hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2440uname -m = `(uname -m) 2>/dev/null || echo unknown`
2441uname -r = `(uname -r) 2>/dev/null || echo unknown`
2442uname -s = `(uname -s) 2>/dev/null || echo unknown`
2443uname -v = `(uname -v) 2>/dev/null || echo unknown`
2444
2445/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2446/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2447
2448/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2449/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2450/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002451/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002452/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2453/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2454/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2455
2456_ASUNAME
2457
2458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2459for as_dir in $PATH
2460do
2461 IFS=$as_save_IFS
2462 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002463 $as_echo "PATH: $as_dir"
2464 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002466
2467} >&5
2468
2469cat >&5 <<_ACEOF
2470
2471
2472## ----------- ##
2473## Core tests. ##
2474## ----------- ##
2475
2476_ACEOF
2477
2478
2479# Keep a trace of the command line.
2480# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002481# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002482# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002483# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002484ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002485ac_configure_args0=
2486ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002487ac_must_keep_next=false
2488for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002489do
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 for ac_arg
2491 do
2492 case $ac_arg in
2493 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2494 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2495 | -silent | --silent | --silen | --sile | --sil)
2496 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 esac
2500 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002501 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002503 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002505 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002507 case $ac_arg in
2508 *=* | --config-cache | -C | -disable-* | --disable-* \
2509 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2510 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2511 | -with-* | --with-* | -without-* | --without-* | --x)
2512 case "$ac_configure_args0 " in
2513 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2514 esac
2515 ;;
2516 -* ) ac_must_keep_next=true ;;
2517 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002519 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002520 ;;
2521 esac
2522 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002523done
Matthias Kloseb9621712010-04-24 17:59:49 +00002524{ ac_configure_args0=; unset ac_configure_args0;}
2525{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002526
2527# When interrupted or exit'd, cleanup temporary files, and complete
2528# config.log. We remove comments because anyway the quotes in there
2529# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530# WARNING: Use '\'' to represent an apostrophe within the trap.
2531# 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 +00002532trap 'exit_status=$?
2533 # Save into config.log some information that might help in debugging.
2534 {
2535 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002536
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002537 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002538## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002539## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 echo
2541 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542(
2543 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2544 eval ac_val=\$$ac_var
2545 case $ac_val in #(
2546 *${as_nl}*)
2547 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002548 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2549$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550 esac
2551 case $ac_var in #(
2552 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002553 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2554 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555 esac ;;
2556 esac
2557 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002558 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002559 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2560 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002561 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562 "s/'\''/'\''\\\\'\'''\''/g;
2563 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2564 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002565 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002567 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568 esac |
2569 sort
2570)
Martin v. Löwis11437992002-04-12 09:54:03 +00002571 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002572
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002573 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002574## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002575## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002576 echo
2577 for ac_var in $ac_subst_vars
2578 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579 eval ac_val=\$$ac_var
2580 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002581 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002584 done | sort
2585 echo
2586
2587 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002590## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002591 echo
2592 for ac_var in $ac_subst_files
2593 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594 eval ac_val=\$$ac_var
2595 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002598 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002599 done | sort
2600 echo
2601 fi
2602
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002604 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002605## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002606## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 echo
2610 fi
2611 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002612 $as_echo "$as_me: caught signal $ac_signal"
2613 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615 rm -f core *.core core.conftest.* &&
2616 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002619for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002621done
2622ac_signal=0
2623
2624# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002626
Matthias Kloseb9621712010-04-24 17:59:49 +00002627$as_echo "/* confdefs.h */" > confdefs.h
2628
Martin v. Löwis11437992002-04-12 09:54:03 +00002629# Predefined preprocessor variables.
2630
2631cat >>confdefs.h <<_ACEOF
2632#define PACKAGE_NAME "$PACKAGE_NAME"
2633_ACEOF
2634
Martin v. Löwis11437992002-04-12 09:54:03 +00002635cat >>confdefs.h <<_ACEOF
2636#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2637_ACEOF
2638
Martin v. Löwis11437992002-04-12 09:54:03 +00002639cat >>confdefs.h <<_ACEOF
2640#define PACKAGE_VERSION "$PACKAGE_VERSION"
2641_ACEOF
2642
Martin v. Löwis11437992002-04-12 09:54:03 +00002643cat >>confdefs.h <<_ACEOF
2644#define PACKAGE_STRING "$PACKAGE_STRING"
2645_ACEOF
2646
Martin v. Löwis11437992002-04-12 09:54:03 +00002647cat >>confdefs.h <<_ACEOF
2648#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2649_ACEOF
2650
Matthias Kloseb9621712010-04-24 17:59:49 +00002651cat >>confdefs.h <<_ACEOF
2652#define PACKAGE_URL "$PACKAGE_URL"
2653_ACEOF
2654
Martin v. Löwis11437992002-04-12 09:54:03 +00002655
2656# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002657# Prefer an explicitly selected file to automatically selected ones.
2658ac_site_file1=NONE
2659ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002660if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002661 # We do not want a PATH search for config.site.
2662 case $CONFIG_SITE in #((
2663 -*) ac_site_file1=./$CONFIG_SITE;;
2664 */*) ac_site_file1=$CONFIG_SITE;;
2665 *) ac_site_file1=./$CONFIG_SITE;;
2666 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002667elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 ac_site_file1=$prefix/share/config.site
2669 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002670else
Matthias Kloseb9621712010-04-24 17:59:49 +00002671 ac_site_file1=$ac_default_prefix/share/config.site
2672 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002674for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002675do
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 test "x$ac_site_file" = xNONE && continue
2677 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2678 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2679$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002681 . "$ac_site_file" \
2682 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2683$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2684as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002685See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686 fi
2687done
2688
2689if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002690 # Some versions of bash will fail to source /dev/null (special files
2691 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2692 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2693 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2694$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002695 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002696 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2697 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002698 esac
2699 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002700else
Matthias Kloseb9621712010-04-24 17:59:49 +00002701 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2702$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002703 >$cache_file
2704fi
2705
2706# Check that the precious variables saved in the cache have kept the same
2707# value.
2708ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002709for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002710 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2711 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002712 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2713 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002714 case $ac_old_set,$ac_new_set in
2715 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002716 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2717$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 +00002718 ac_cache_corrupted=: ;;
2719 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002720 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2721$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 ac_cache_corrupted=: ;;
2723 ,);;
2724 *)
2725 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002726 # differences in whitespace do not lead to failure.
2727 ac_old_val_w=`echo x $ac_old_val`
2728 ac_new_val_w=`echo x $ac_new_val`
2729 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2731$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2732 ac_cache_corrupted=:
2733 else
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2735$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2736 eval $ac_var=\$ac_old_val
2737 fi
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2739$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2741$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002742 fi;;
2743 esac
2744 # Pass precious variables to config.status.
2745 if test "$ac_new_set" = set; then
2746 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002747 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002748 *) ac_arg=$ac_var=$ac_new_val ;;
2749 esac
2750 case " $ac_configure_args " in
2751 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002752 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 esac
2754 fi
2755done
2756if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002757 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2758$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2760$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002761 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002763## -------------------- ##
2764## Main body of script. ##
2765## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002766
Guido van Rossum7f43da71994-08-01 12:15:30 +00002767ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002768ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002769ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2770ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2771ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002772
Guido van Rossum627b2d71993-12-24 10:39:16 +00002773
Michael W. Hudson54241132001-12-07 15:38:26 +00002774
Trent Nelson4d4ec652012-10-16 08:51:24 -04002775
Trent Nelson5595ab52012-10-17 04:47:31 -04002776if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002777 # If we're building out-of-tree, we need to make sure the following
2778 # resources get picked up before their $srcdir counterparts.
2779 # Objects/ -> typeslots.inc
2780 # Include/ -> Python-ast.h, graminit.h
2781 # Python/ -> importlib.h
2782 # (A side effect of this is that these resources will automatically be
2783 # regenerated when building out-of-tree, regardless of whether or not
2784 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2785 # off.)
2786 BASECPPFLAGS="-IObjects -IInclude -IPython"
2787else
2788 BASECPPFLAGS=""
2789fi
2790
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002791
2792
2793
2794
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002795if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002796then
2797# Extract the first word of "hg", so it can be a program name with args.
2798set dummy hg; ac_word=$2
2799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2800$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002801if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002802 $as_echo_n "(cached) " >&6
2803else
2804 if test -n "$HAS_HG"; then
2805 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2806else
2807as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2808for as_dir in $PATH
2809do
2810 IFS=$as_save_IFS
2811 test -z "$as_dir" && as_dir=.
2812 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002813 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002814 ac_cv_prog_HAS_HG="found"
2815 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2816 break 2
2817 fi
2818done
2819 done
2820IFS=$as_save_IFS
2821
2822 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2823fi
2824fi
2825HAS_HG=$ac_cv_prog_HAS_HG
2826if test -n "$HAS_HG"; then
2827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2828$as_echo "$HAS_HG" >&6; }
2829else
2830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2831$as_echo "no" >&6; }
2832fi
2833
2834
2835else
2836HAS_HG=no-repository
2837fi
2838if test $HAS_HG = found
2839then
2840 HGVERSION="hg id -i \$(srcdir)"
2841 HGTAG="hg id -t \$(srcdir)"
2842 HGBRANCH="hg id -b \$(srcdir)"
2843else
2844 HGVERSION=""
2845 HGTAG=""
2846 HGBRANCH=""
2847fi
2848
2849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002850ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002851
2852
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002853ac_aux_dir=
2854for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2855 if test -f "$ac_dir/install-sh"; then
2856 ac_aux_dir=$ac_dir
2857 ac_install_sh="$ac_aux_dir/install-sh -c"
2858 break
2859 elif test -f "$ac_dir/install.sh"; then
2860 ac_aux_dir=$ac_dir
2861 ac_install_sh="$ac_aux_dir/install.sh -c"
2862 break
2863 elif test -f "$ac_dir/shtool"; then
2864 ac_aux_dir=$ac_dir
2865 ac_install_sh="$ac_aux_dir/shtool install -c"
2866 break
2867 fi
2868done
2869if test -z "$ac_aux_dir"; then
2870 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2871fi
2872
2873# These three variables are undocumented and unsupported,
2874# and are intended to be withdrawn in a future Autoconf release.
2875# They can cause serious problems if a builder's source tree is in a directory
2876# whose full name contains unusual characters.
2877ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2878ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2879ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2880
2881
2882# Make sure we can run config.sub.
2883$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2884 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2885
2886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2887$as_echo_n "checking build system type... " >&6; }
2888if ${ac_cv_build+:} false; then :
2889 $as_echo_n "(cached) " >&6
2890else
2891 ac_build_alias=$build_alias
2892test "x$ac_build_alias" = x &&
2893 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2894test "x$ac_build_alias" = x &&
2895 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2896ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2897 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2898
2899fi
2900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2901$as_echo "$ac_cv_build" >&6; }
2902case $ac_cv_build in
2903*-*-*) ;;
2904*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2905esac
2906build=$ac_cv_build
2907ac_save_IFS=$IFS; IFS='-'
2908set x $ac_cv_build
2909shift
2910build_cpu=$1
2911build_vendor=$2
2912shift; shift
2913# Remember, the first character of IFS is used to create $*,
2914# except with old shells:
2915build_os=$*
2916IFS=$ac_save_IFS
2917case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2918
2919
2920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2921$as_echo_n "checking host system type... " >&6; }
2922if ${ac_cv_host+:} false; then :
2923 $as_echo_n "(cached) " >&6
2924else
2925 if test "x$host_alias" = x; then
2926 ac_cv_host=$ac_cv_build
2927else
2928 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2929 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2930fi
2931
2932fi
2933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2934$as_echo "$ac_cv_host" >&6; }
2935case $ac_cv_host in
2936*-*-*) ;;
2937*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2938esac
2939host=$ac_cv_host
2940ac_save_IFS=$IFS; IFS='-'
2941set x $ac_cv_host
2942shift
2943host_cpu=$1
2944host_vendor=$2
2945shift; shift
2946# Remember, the first character of IFS is used to create $*,
2947# except with old shells:
2948host_os=$*
2949IFS=$ac_save_IFS
2950case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2951
2952
2953
doko@python.orga10e4a92013-01-25 18:45:12 +01002954
2955
Ned Deilyfcbc2462014-08-22 13:32:49 -07002956# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2957rm -f pybuilddir.txt
2958
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002959if test "$cross_compiling" = yes; then
2960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2961$as_echo_n "checking for python interpreter for cross build... " >&6; }
2962 if test -z "$PYTHON_FOR_BUILD"; then
2963 for interp in python$PACKAGE_VERSION python3 python; do
2964 which $interp >/dev/null 2>&1 || continue
2965 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2966 break
2967 fi
2968 interp=
2969 done
2970 if test x$interp = x; then
2971 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2972 fi
2973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2974$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002975 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 +02002976 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002977elif test "$cross_compiling" = maybe; then
2978 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002979else
2980 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2981fi
2982
2983
Martin v. Löwis11437992002-04-12 09:54:03 +00002984
Benjamin Petersond23f8222009-04-05 19:13:16 +00002985if test "$prefix" != "/"; then
2986 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2987fi
2988
2989
Martin v. Löwis11437992002-04-12 09:54:03 +00002990
2991
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002992# We don't use PACKAGE_ variables, and they cause conflicts
2993# with other autoconf-based packages that include Python.h
2994grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2995rm confdefs.h
2996mv confdefs.h.new confdefs.h
2997
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002998
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002999VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003000
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003001# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003002
3003SOVERSION=1.0
3004
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003005# The later defininition of _XOPEN_SOURCE disables certain features
3006# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3007
Matthias Kloseb9621712010-04-24 17:59:49 +00003008$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003009
3010
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003011# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3012# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3013# them.
3014
Matthias Kloseb9621712010-04-24 17:59:49 +00003015$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003016
3017
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003018# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3019# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3020# them.
3021
Matthias Kloseb9621712010-04-24 17:59:49 +00003022$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003023
3024
Martin v. Löwisd6320502004-08-12 13:45:08 +00003025# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3026# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3027
Matthias Kloseb9621712010-04-24 17:59:49 +00003028$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003029
3030
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003031# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3032# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3033# them.
3034
Matthias Kloseb9621712010-04-24 17:59:49 +00003035$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003036
3037
3038
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003039define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003040
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003041# Arguments passed to configure.
3042
3043CONFIG_ARGS="$ac_configure_args"
3044
Matthias Kloseb9621712010-04-24 17:59:49 +00003045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3046$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003047# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003048if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003049 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003050 case $enableval in
3051 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003052 # Locate the best usable SDK, see Mac/README.txt for more
3053 # information
3054 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003055 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003056 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003057 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3058 if test ! -d "${enableval}"
3059 then
3060 enableval=/
3061 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003062 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003063 ;;
3064 esac
3065 case $enableval in
3066 no)
3067 UNIVERSALSDK=
3068 enable_universalsdk=
3069 ;;
3070 *)
3071 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003072 if test ! -d "${UNIVERSALSDK}"
3073 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003074 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003075 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003076 ;;
3077 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003078
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003079
Thomas Wouters477c8d52006-05-27 19:21:47 +00003080else
3081
3082 UNIVERSALSDK=
3083 enable_universalsdk=
3084
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003085fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003086
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003087if test -n "${UNIVERSALSDK}"
3088then
Matthias Kloseb9621712010-04-24 17:59:49 +00003089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3090$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003091else
Matthias Kloseb9621712010-04-24 17:59:49 +00003092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3093$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003094fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003095
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003096
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003097
Ned Deily87adb6e2013-10-18 21:09:56 -07003098ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003099
Ned Deilycbfb9a52012-06-23 16:02:19 -07003100# For backward compatibility reasons we prefer to select '32-bit' if available,
3101# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003102UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003103if test "`uname -s`" = "Darwin"
3104then
3105 if test -n "${UNIVERSALSDK}"
3106 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003107 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003108 then
3109 UNIVERSAL_ARCHS="intel"
3110 fi
3111 fi
3112fi
3113
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003114
Matthias Kloseb9621712010-04-24 17:59:49 +00003115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3116$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003117
3118# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003119if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003120 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003121 UNIVERSAL_ARCHS="$withval"
3122
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003123fi
3124
Ned Deily87adb6e2013-10-18 21:09:56 -07003125if test -n "${UNIVERSALSDK}"
3126then
3127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3128$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3129else
3130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3131$as_echo "no" >&6; }
3132fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003133
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003134
3135# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003136if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003137 withval=$with_framework_name;
3138 PYTHONFRAMEWORK=${withval}
3139 PYTHONFRAMEWORKDIR=${withval}.framework
3140 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3141
3142else
3143
3144 PYTHONFRAMEWORK=Python
3145 PYTHONFRAMEWORKDIR=Python.framework
3146 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3147
3148fi
3149
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003150# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003151if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003152 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003153 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003154 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003155 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003156 esac
3157 case $enableval in
3158 no)
3159 PYTHONFRAMEWORK=
3160 PYTHONFRAMEWORKDIR=no-framework
3161 PYTHONFRAMEWORKPREFIX=
3162 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003163 FRAMEWORKINSTALLFIRST=
3164 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003165 FRAMEWORKALTINSTALLFIRST=
3166 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003167 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003168 if test "x${prefix}" = "xNONE"; then
3169 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3170 else
3171 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3172 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003173 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003174 ;;
3175 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003176 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003177 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003178 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003179 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003180 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3181 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003182 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003183 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003184
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003185 if test "x${prefix}" = "xNONE" ; then
3186 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003187
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003188 else
3189 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3190 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003191
3192 case "${enableval}" in
3193 /System*)
3194 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3195 if test "${prefix}" = "NONE" ; then
3196 # See below
3197 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3198 fi
3199 ;;
3200
3201 /Library*)
3202 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3203 ;;
3204
3205 */Library/Frameworks)
3206 MDIR="`dirname "${enableval}"`"
3207 MDIR="`dirname "${MDIR}"`"
3208 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3209
3210 if test "${prefix}" = "NONE"; then
3211 # User hasn't specified the
3212 # --prefix option, but wants to install
3213 # the framework in a non-default location,
3214 # ensure that the compatibility links get
3215 # installed relative to that prefix as well
3216 # instead of in /usr/local.
3217 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3218 fi
3219 ;;
3220
3221 *)
3222 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3223 ;;
3224 esac
3225
Jack Jansen127e56e2001-09-11 14:41:54 +00003226 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003227
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003228 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003229 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003230 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003231
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003232 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003233
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003234 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3235
3236 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3237
Jack Jansene578a632001-08-15 01:27:14 +00003238 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003239
Guido van Rossum563e7081996-09-10 18:20:48 +00003240else
Martin v. Löwis11437992002-04-12 09:54:03 +00003241
Jack Jansene578a632001-08-15 01:27:14 +00003242 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003243 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003244 PYTHONFRAMEWORKPREFIX=
3245 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003246 FRAMEWORKINSTALLFIRST=
3247 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003248 FRAMEWORKALTINSTALLFIRST=
3249 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003250 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003251 if test "x${prefix}" = "xNONE" ; then
3252 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3253 else
3254 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3255 fi
Jack Jansene578a632001-08-15 01:27:14 +00003256 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003257
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003258
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003259fi
3260
Thomas Wouters477c8d52006-05-27 19:21:47 +00003261
3262
Michael W. Hudson54241132001-12-07 15:38:26 +00003263
3264
3265
3266
Jack Jansene578a632001-08-15 01:27:14 +00003267
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003268
3269
3270
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003271
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003272
Ned Deilyb8f944f2013-11-21 22:42:25 -08003273
Jack Jansene578a632001-08-15 01:27:14 +00003274##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003275## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003276## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003277##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003278# Set name for machine-dependent library files
3279
Matthias Kloseb9621712010-04-24 17:59:49 +00003280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3281$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003282if test -z "$MACHDEP"
3283then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003284 # avoid using uname for cross builds
3285 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003286 # ac_sys_system and ac_sys_release are used for setting
3287 # a lot of different things including 'define_xopen_source'
3288 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003289 case "$host" in
3290 *-*-linux*)
3291 ac_sys_system=Linux
3292 ;;
3293 *-*-cygwin*)
3294 ac_sys_system=Cygwin
3295 ;;
3296 *)
3297 # for now, limit cross builds to known configurations
3298 MACHDEP="unknown"
3299 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3300 esac
3301 ac_sys_release=
3302 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003303 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003304 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003305 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003306 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003307 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003308 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003309 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003310 fi
3311 ac_md_system=`echo $ac_sys_system |
3312 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3313 ac_md_release=`echo $ac_sys_release |
3314 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3315 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003316
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003317 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003318 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003319 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003320 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003321 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003322 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003323 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003324fi
Guido van Rossum91922671997-10-09 20:24:13 +00003325
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003326
3327if test "$cross_compiling" = yes; then
3328 case "$host" in
3329 *-*-linux*)
3330 case "$host_cpu" in
3331 arm*)
3332 _host_cpu=arm
3333 ;;
3334 *)
3335 _host_cpu=$host_cpu
3336 esac
3337 ;;
3338 *-*-cygwin*)
3339 _host_cpu=
3340 ;;
3341 *)
3342 # for now, limit cross builds to known configurations
3343 MACHDEP="unknown"
3344 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3345 esac
3346 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3347fi
3348
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003349# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3350# disable features if it is defined, without any means to access these
3351# features as extensions. For these systems, we skip the definition of
3352# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3353# some feature, make sure there is no alternative way to access this
3354# feature. Also, when using wildcards, make sure you have verified the
3355# need for not defining _XOPEN_SOURCE on all systems matching the
3356# wildcard, and that the wildcard does not include future systems
3357# (which may remove their limitations).
3358case $ac_sys_system/$ac_sys_release in
3359 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3360 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003361 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003362 # In addition, Stefan Krah confirms that issue #1244610 exists through
3363 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003364 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003365 define_xopen_source=no
3366 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3367 # also defined. This can be overridden by defining _BSD_SOURCE
3368 # As this has a different meaning on Linux, only define it on OpenBSD
3369
Matthias Kloseb9621712010-04-24 17:59:49 +00003370$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003371
3372 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003373 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003374 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3375 # also defined. This can be overridden by defining _BSD_SOURCE
3376 # As this has a different meaning on Linux, only define it on OpenBSD
3377
Matthias Kloseb9621712010-04-24 17:59:49 +00003378$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003379
3380 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003381 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3382 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3383 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003384 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 +00003385 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003386 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3387 # request to enable features supported by the standard as a request
3388 # to disable features not supported by the standard. The best way
3389 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3390 # entirely and define __EXTENSIONS__ instead.
3391 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003392 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003393 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3394 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003395 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003396 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003397 define_xopen_source=no;;
3398 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003399 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003400 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003401 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003402 # On FreeBSD 4, the math functions C89 does not cover are never defined
3403 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3404 FreeBSD/4.*)
3405 define_xopen_source=no;;
3406 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3407 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3408 # identifies itself as Darwin/7.*
3409 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3410 # disables platform specific features beyond repair.
3411 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3412 # has no effect, don't bother defining them
3413 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003414 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003415 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003416 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003417 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3418 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3419 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003420 AIX/4)
3421 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003422 AIX/5)
3423 if test `uname -r` -eq 1; then
3424 define_xopen_source=no
3425 fi
3426 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003427 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3428 # defining NI_NUMERICHOST.
3429 QNX/6.3.2)
3430 define_xopen_source=no
3431 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003432
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003433esac
3434
3435if test $define_xopen_source = yes
3436then
Victor Stinner14d098d2011-09-07 22:29:43 +02003437 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003438
Victor Stinner14d098d2011-09-07 22:29:43 +02003439$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003440
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003441
3442 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3443 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3444 # several APIs are not declared. Since this is also needed in some
3445 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003446
Matthias Kloseb9621712010-04-24 17:59:49 +00003447$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003448
3449
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003450
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003451$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003452
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003453fi
3454
Christian Heimes647cd872013-12-07 23:39:33 +01003455# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3456case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003457 hp*|HP*)
3458 define_stdc_a1=yes;;
3459 *)
3460 define_stdc_a1=no;;
3461esac
3462
3463if test $define_stdc_a1 = yes
3464then
Christian Heimes647cd872013-12-07 23:39:33 +01003465
3466$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3467
Christian Heimesb02bcae2013-12-08 15:21:08 +01003468fi
Christian Heimes647cd872013-12-07 23:39:33 +01003469
Guido van Rossum91922671997-10-09 20:24:13 +00003470#
3471# SGI compilers allow the specification of the both the ABI and the
3472# ISA on the command line. Depending on the values of these switches,
3473# different and often incompatable code will be generated.
3474#
3475# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3476# thus supply support for various ABI/ISA combinations. The MACHDEP
3477# variable is also adjusted.
3478#
3479
3480if test ! -z "$SGI_ABI"
3481then
3482 CC="cc $SGI_ABI"
3483 LDFLAGS="$SGI_ABI $LDFLAGS"
3484 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3485fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3487$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003488
Jack Jansen6b08a402004-06-03 12:41:45 +00003489# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3490# it may influence the way we can build extensions, so distutils
3491# needs to check it
3492
Thomas Wouters477c8d52006-05-27 19:21:47 +00003493
Jack Jansen6b08a402004-06-03 12:41:45 +00003494CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003495EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003496
Guido van Rossum627b2d71993-12-24 10:39:16 +00003497# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003498
3499# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3500# for debug/optimization stuff. BASECFLAGS is for flags that are required
3501# just to get things to compile and link. Users are free to override OPT
3502# when running configure or make. The build should not break if they do.
3503# BASECFLAGS should generally not be messed with, however.
3504
3505# XXX shouldn't some/most/all of this code be merged with the stuff later
3506# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3508$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003509
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003510# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003511if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003512 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003513 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003514 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003515 without_gcc=yes;;
3516 yes) CC=gcc
3517 without_gcc=no;;
3518 *) CC=$withval
3519 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003520 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003521else
Martin v. Löwis11437992002-04-12 09:54:03 +00003522
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003523 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003524 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003525 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003526 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003527 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003528fi
3529
Matthias Kloseb9621712010-04-24 17:59:49 +00003530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3531$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003532
Guido van Rossum8b131c51995-03-09 14:10:13 +00003533# If the user switches compilers, we can't believe the cache
3534if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3535then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003536 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003537(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003538fi
3539
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003540# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3541# when the compiler supports them, but we don't always want -O2, and
3542# we set -g later.
3543if test -z "$CFLAGS"; then
3544 CFLAGS=
3545fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003546
3547if test "$ac_sys_system" = "Darwin"
3548then
3549 # Compiler selection on MacOSX is more complicated than
3550 # AC_PROG_CC can handle, see Mac/README.txt for more
3551 # information
3552 if test -z "${CC}"
3553 then
3554 found_gcc=
3555 found_clang=
3556 as_save_IFS=$IFS; IFS=:
3557 for as_dir in $PATH
3558 do
3559 IFS=$as_save_IFS
3560 if test -x $as_dir/gcc; then
3561 if test -z "${found_gcc}"; then
3562 found_gcc=$as_dir/gcc
3563 fi
3564 fi
3565 if test -x $as_dir/clang; then
3566 if test -z "${found_clang}"; then
3567 found_clang=$as_dir/clang
3568 fi
3569 fi
3570 done
3571 IFS=$as_save_IFS
3572
3573 if test -n "$found_gcc" -a -n "$found_clang"
3574 then
3575 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3576 then
3577 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3578$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3579 CC="$found_clang"
3580 CXX="$found_clang++"
3581 fi
3582
3583
3584 elif test -z "$found_gcc" -a -n "$found_clang"
3585 then
3586 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3587$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3588 CC="$found_clang"
3589 CXX="$found_clang++"
3590
3591 elif test -z "$found_gcc" -a -z "$found_clang"
3592 then
3593 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3594 if test -n "${found_clang}"
3595 then
3596 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3597$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3598 CC="${found_clang}"
3599 CXX="`/usr/bin/xcrun -find clang++`"
3600
3601 # else: use default behaviour
3602 fi
3603 fi
3604 fi
3605fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003606ac_ext=c
3607ac_cpp='$CPP $CPPFLAGS'
3608ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3609ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3610ac_compiler_gnu=$ac_cv_c_compiler_gnu
3611if test -n "$ac_tool_prefix"; then
3612 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3613set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3615$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003616if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003617 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003618else
3619 if test -n "$CC"; then
3620 ac_cv_prog_CC="$CC" # Let the user override the test.
3621else
Martin v. Löwis11437992002-04-12 09:54:03 +00003622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3623for as_dir in $PATH
3624do
3625 IFS=$as_save_IFS
3626 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003628 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003629 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 $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 +00003631 break 2
3632 fi
3633done
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003635IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003636
Jack Jansendd19cf82001-12-06 22:36:17 +00003637fi
3638fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003639CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003640if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3642$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003643else
Matthias Kloseb9621712010-04-24 17:59:49 +00003644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3645$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003646fi
3647
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003648
Martin v. Löwis11437992002-04-12 09:54:03 +00003649fi
3650if test -z "$ac_cv_prog_CC"; then
3651 ac_ct_CC=$CC
3652 # Extract the first word of "gcc", so it can be a program name with args.
3653set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3655$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003656if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003657 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003658else
3659 if test -n "$ac_ct_CC"; then
3660 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3661else
3662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3663for as_dir in $PATH
3664do
3665 IFS=$as_save_IFS
3666 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003668 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003669 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 $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 +00003671 break 2
3672 fi
3673done
Matthias Kloseb9621712010-04-24 17:59:49 +00003674 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003675IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003676
3677fi
3678fi
3679ac_ct_CC=$ac_cv_prog_ac_ct_CC
3680if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3682$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003683else
Matthias Kloseb9621712010-04-24 17:59:49 +00003684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3685$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003686fi
3687
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688 if test "x$ac_ct_CC" = x; then
3689 CC=""
3690 else
3691 case $cross_compiling:$ac_tool_warned in
3692yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003693{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3694$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003695ac_tool_warned=yes ;;
3696esac
3697 CC=$ac_ct_CC
3698 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003699else
3700 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003701fi
3702
Jack Jansendd19cf82001-12-06 22:36:17 +00003703if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003704 if test -n "$ac_tool_prefix"; then
3705 # 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 +00003706set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3708$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003709if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003710 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003711else
3712 if test -n "$CC"; then
3713 ac_cv_prog_CC="$CC" # Let the user override the test.
3714else
Martin v. Löwis11437992002-04-12 09:54:03 +00003715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3716for as_dir in $PATH
3717do
3718 IFS=$as_save_IFS
3719 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003721 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003722 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 $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 +00003724 break 2
3725 fi
3726done
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003728IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003729
3730fi
3731fi
3732CC=$ac_cv_prog_CC
3733if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3735$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003736else
Matthias Kloseb9621712010-04-24 17:59:49 +00003737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3738$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003739fi
3740
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003741
Martin v. Löwis11437992002-04-12 09:54:03 +00003742 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003743fi
3744if test -z "$CC"; then
3745 # Extract the first word of "cc", so it can be a program name with args.
3746set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3748$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003749if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003751else
3752 if test -n "$CC"; then
3753 ac_cv_prog_CC="$CC" # Let the user override the test.
3754else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003755 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3757for as_dir in $PATH
3758do
3759 IFS=$as_save_IFS
3760 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003762 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003763 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3764 ac_prog_rejected=yes
3765 continue
3766 fi
3767 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 $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 +00003769 break 2
3770 fi
3771done
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003773IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003774
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003775if test $ac_prog_rejected = yes; then
3776 # We found a bogon in the path, so make sure we never use it.
3777 set dummy $ac_cv_prog_CC
3778 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003779 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003780 # We chose a different compiler from the bogus one.
3781 # However, it has the same basename, so the bogon will be chosen
3782 # first if we set CC to just the basename; use the full file name.
3783 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003784 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003785 fi
3786fi
3787fi
3788fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003789CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003790if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3792$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003793else
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3795$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003796fi
3797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003798
Martin v. Löwis11437992002-04-12 09:54:03 +00003799fi
3800if test -z "$CC"; then
3801 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003803 do
3804 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3805set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3807$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003808if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003809 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003810else
3811 if test -n "$CC"; then
3812 ac_cv_prog_CC="$CC" # Let the user override the test.
3813else
Martin v. Löwis11437992002-04-12 09:54:03 +00003814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3815for as_dir in $PATH
3816do
3817 IFS=$as_save_IFS
3818 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003820 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003821 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 $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 +00003823 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003824 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003825done
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003827IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003828
3829fi
3830fi
3831CC=$ac_cv_prog_CC
3832if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3834$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003835else
Matthias Kloseb9621712010-04-24 17:59:49 +00003836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3837$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003838fi
3839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840
Martin v. Löwis11437992002-04-12 09:54:03 +00003841 test -n "$CC" && break
3842 done
3843fi
3844if test -z "$CC"; then
3845 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003846 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003847do
3848 # Extract the first word of "$ac_prog", so it can be a program name with args.
3849set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3851$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003852if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003853 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003854else
3855 if test -n "$ac_ct_CC"; then
3856 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3857else
3858as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3859for as_dir in $PATH
3860do
3861 IFS=$as_save_IFS
3862 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003864 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003865 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003866 $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 +00003867 break 2
3868 fi
3869done
Matthias Kloseb9621712010-04-24 17:59:49 +00003870 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003871IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003872
Martin v. Löwis11437992002-04-12 09:54:03 +00003873fi
3874fi
3875ac_ct_CC=$ac_cv_prog_ac_ct_CC
3876if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3878$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003879else
Matthias Kloseb9621712010-04-24 17:59:49 +00003880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3881$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003882fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884
Martin v. Löwis11437992002-04-12 09:54:03 +00003885 test -n "$ac_ct_CC" && break
3886done
Michael W. Hudson54241132001-12-07 15:38:26 +00003887
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003888 if test "x$ac_ct_CC" = x; then
3889 CC=""
3890 else
3891 case $cross_compiling:$ac_tool_warned in
3892yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003893{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3894$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895ac_tool_warned=yes ;;
3896esac
3897 CC=$ac_ct_CC
3898 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003899fi
3900
3901fi
3902
3903
Matthias Kloseb9621712010-04-24 17:59:49 +00003904test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3905$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003906as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003907See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003908
3909# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003910$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3911set X $ac_compile
3912ac_compiler=$2
3913for ac_option in --version -v -V -qversion; do
3914 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003915case "(($ac_try" in
3916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3917 *) ac_try_echo=$ac_try;;
3918esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003919eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3920$as_echo "$ac_try_echo"; } >&5
3921 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003922 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003923 if test -s conftest.err; then
3924 sed '10a\
3925... rest of stderr output deleted ...
3926 10q' conftest.err >conftest.er1
3927 cat conftest.er1 >&5
3928 fi
3929 rm -f conftest.er1 conftest.err
3930 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3931 test $ac_status = 0; }
3932done
Martin v. Löwis11437992002-04-12 09:54:03 +00003933
Matthias Kloseb9621712010-04-24 17:59:49 +00003934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003935/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003936
Martin v. Löwis11437992002-04-12 09:54:03 +00003937int
3938main ()
3939{
3940
3941 ;
3942 return 0;
3943}
3944_ACEOF
3945ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003946ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003947# Try to create an executable without -o first, disregard a.out.
3948# It will help us diagnose broken compilers, and finding out an intuition
3949# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3951$as_echo_n "checking whether the C compiler works... " >&6; }
3952ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3953
3954# The possible output files:
3955ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3956
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003957ac_rmfiles=
3958for ac_file in $ac_files
3959do
3960 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003961 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003962 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3963 esac
3964done
3965rm -f $ac_rmfiles
3966
Matthias Kloseb9621712010-04-24 17:59:49 +00003967if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968case "(($ac_try" in
3969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3970 *) ac_try_echo=$ac_try;;
3971esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003972eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3973$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003974 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003975 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003976 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3977 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3979# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3980# in a Makefile. We should not override ac_cv_exeext if it was cached,
3981# so that the user can short-circuit this test for compilers unknown to
3982# Autoconf.
3983for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003984do
3985 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003986 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003987 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003988 ;;
3989 [ab].out )
3990 # We found the default executable, but exeext='' is most
3991 # certainly right.
3992 break;;
3993 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003994 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003995 then :; else
3996 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3997 fi
3998 # We set ac_cv_exeext here because the later test for it is not
3999 # safe: cross compilers may not add the suffix if given an `-o'
4000 # argument, so we may need to know it at that point already.
4001 # Even if this section looks crufty: it has the advantage of
4002 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004003 break;;
4004 * )
4005 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004006 esac
4007done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008test "$ac_cv_exeext" = no && ac_cv_exeext=
4009
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004010else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004011 ac_file=''
4012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004013if test -z "$ac_file"; then :
4014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4015$as_echo "no" >&6; }
4016$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004017sed 's/^/| /' conftest.$ac_ext >&5
4018
Matthias Kloseb9621712010-04-24 17:59:49 +00004019{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4020$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004021as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004022See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004023else
4024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4025$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004026fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4028$as_echo_n "checking for C compiler default output file name... " >&6; }
4029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4030$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004031ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004032
Matthias Kloseb9621712010-04-24 17:59:49 +00004033rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004034ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4036$as_echo_n "checking for suffix of executables... " >&6; }
4037if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004038case "(($ac_try" in
4039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4040 *) ac_try_echo=$ac_try;;
4041esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004042eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4043$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004044 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004045 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004046 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4047 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004048 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4049# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4050# work properly (i.e., refer to `conftest.exe'), while it won't with
4051# `rm'.
4052for ac_file in conftest.exe conftest conftest.*; do
4053 test -f "$ac_file" || continue
4054 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004055 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004056 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4057 break;;
4058 * ) break;;
4059 esac
4060done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004061else
Matthias Kloseb9621712010-04-24 17:59:49 +00004062 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4063$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004064as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004065See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004067rm -f conftest conftest$ac_cv_exeext
4068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4069$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004070
4071rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004072EXEEXT=$ac_cv_exeext
4073ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4075/* end confdefs.h. */
4076#include <stdio.h>
4077int
4078main ()
4079{
4080FILE *f = fopen ("conftest.out", "w");
4081 return ferror (f) || fclose (f) != 0;
4082
4083 ;
4084 return 0;
4085}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004087ac_clean_files="$ac_clean_files conftest.out"
4088# Check that the compiler produces executables we can run. If not, either
4089# the compiler is broken, or we cross compile.
4090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4091$as_echo_n "checking whether we are cross compiling... " >&6; }
4092if test "$cross_compiling" != yes; then
4093 { { ac_try="$ac_link"
4094case "(($ac_try" in
4095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4096 *) ac_try_echo=$ac_try;;
4097esac
4098eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4099$as_echo "$ac_try_echo"; } >&5
4100 (eval "$ac_link") 2>&5
4101 ac_status=$?
4102 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4103 test $ac_status = 0; }
4104 if { ac_try='./conftest$ac_cv_exeext'
4105 { { case "(($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_try") 2>&5
4112 ac_status=$?
4113 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4114 test $ac_status = 0; }; }; then
4115 cross_compiling=no
4116 else
4117 if test "$cross_compiling" = maybe; then
4118 cross_compiling=yes
4119 else
4120 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4121$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004122as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004123If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004124See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 fi
4126 fi
4127fi
4128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4129$as_echo "$cross_compiling" >&6; }
4130
4131rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4132ac_clean_files=$ac_clean_files_save
4133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4134$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004135if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 $as_echo_n "(cached) " >&6
4137else
4138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004139/* end confdefs.h. */
4140
4141int
4142main ()
4143{
4144
4145 ;
4146 return 0;
4147}
4148_ACEOF
4149rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004150if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004151case "(($ac_try" in
4152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4153 *) ac_try_echo=$ac_try;;
4154esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004155eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4156$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004157 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004158 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004159 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4160 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004161 for ac_file in conftest.o conftest.obj conftest.*; do
4162 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004163 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004164 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004165 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4166 break;;
4167 esac
4168done
4169else
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004171sed 's/^/| /' conftest.$ac_ext >&5
4172
Matthias Kloseb9621712010-04-24 17:59:49 +00004173{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4174$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004175as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004176See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004177fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004178rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4181$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004182OBJEXT=$ac_cv_objext
4183ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4185$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004186if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004187 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004188else
Matthias Kloseb9621712010-04-24 17:59:49 +00004189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004191
Martin v. Löwis11437992002-04-12 09:54:03 +00004192int
4193main ()
4194{
4195#ifndef __GNUC__
4196 choke me
4197#endif
4198
4199 ;
4200 return 0;
4201}
4202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004203if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004204 ac_compiler_gnu=yes
4205else
Matthias Kloseb9621712010-04-24 17:59:49 +00004206 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004209ac_cv_c_compiler_gnu=$ac_compiler_gnu
4210
4211fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4213$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4214if test $ac_compiler_gnu = yes; then
4215 GCC=yes
4216else
4217 GCC=
4218fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004219ac_test_CFLAGS=${CFLAGS+set}
4220ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4222$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004223if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004224 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004225else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004226 ac_save_c_werror_flag=$ac_c_werror_flag
4227 ac_c_werror_flag=yes
4228 ac_cv_prog_cc_g=no
4229 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004231/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004232
Martin v. Löwis11437992002-04-12 09:54:03 +00004233int
4234main ()
4235{
4236
4237 ;
4238 return 0;
4239}
4240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004241if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004242 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004243else
Matthias Kloseb9621712010-04-24 17:59:49 +00004244 CFLAGS=""
4245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004246/* end confdefs.h. */
4247
4248int
4249main ()
4250{
4251
4252 ;
4253 return 0;
4254}
4255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004256if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257
Matthias Kloseb9621712010-04-24 17:59:49 +00004258else
4259 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004262/* end confdefs.h. */
4263
4264int
4265main ()
4266{
4267
4268 ;
4269 return 0;
4270}
4271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004272if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4280 ac_c_werror_flag=$ac_save_c_werror_flag
4281fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4283$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004284if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004285 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004286elif test $ac_cv_prog_cc_g = yes; then
4287 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004288 CFLAGS="-g -O2"
4289 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004290 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004291 fi
4292else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004293 if test "$GCC" = yes; then
4294 CFLAGS="-O2"
4295 else
4296 CFLAGS=
4297 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004298fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4300$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004301if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004302 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004303else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004305ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004307/* end confdefs.h. */
4308#include <stdarg.h>
4309#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004310struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004311/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4312struct buf { int x; };
4313FILE * (*rcsopen) (struct buf *, struct stat *, int);
4314static char *e (p, i)
4315 char **p;
4316 int i;
4317{
4318 return p[i];
4319}
4320static char *f (char * (*g) (char **, int), char **p, ...)
4321{
4322 char *s;
4323 va_list v;
4324 va_start (v,p);
4325 s = g (p, va_arg (v,int));
4326 va_end (v);
4327 return s;
4328}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004329
4330/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4331 function prototypes and stuff, but not '\xHH' hex character constants.
4332 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004334 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4335 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004337int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4338
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004339/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4340 inside strings and character constants. */
4341#define FOO(x) 'x'
4342int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4343
Skip Montanaro6dead952003-09-25 14:50:04 +00004344int test (int i, double x);
4345struct s1 {int (*f) (int a);};
4346struct s2 {int (*f) (double a);};
4347int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4348int argc;
4349char **argv;
4350int
4351main ()
4352{
4353return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4354 ;
4355 return 0;
4356}
4357_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4359 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004360do
4361 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004362 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365rm -f core conftest.err conftest.$ac_objext
4366 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004367done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004368rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004369CC=$ac_save_CC
4370
4371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004372# AC_CACHE_VAL
4373case "x$ac_cv_prog_cc_c89" in
4374 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4376$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004377 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4379$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004380 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004381 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4383$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004384esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004385if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004386
Matthias Kloseb9621712010-04-24 17:59:49 +00004387fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004388
Martin v. Löwis11437992002-04-12 09:54:03 +00004389ac_ext=c
4390ac_cpp='$CPP $CPPFLAGS'
4391ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4392ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4393ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004394
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004395
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004396
4397
Matthias Kloseb9621712010-04-24 17:59:49 +00004398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4399$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004400
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004401# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004402if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004403 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004404
4405 case $withval in
4406 no) with_cxx_main=no
4407 MAINCC='$(CC)';;
4408 yes) with_cxx_main=yes
4409 MAINCC='$(CXX)';;
4410 *) with_cxx_main=yes
4411 MAINCC=$withval
4412 if test -z "$CXX"
4413 then
4414 CXX=$withval
4415 fi;;
4416 esac
4417else
4418
4419 with_cxx_main=no
4420 MAINCC='$(CC)'
4421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004422fi
4423
Matthias Kloseb9621712010-04-24 17:59:49 +00004424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4425$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004426
4427preset_cxx="$CXX"
4428if test -z "$CXX"
4429then
4430 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004431 gcc) if test -n "$ac_tool_prefix"; then
4432 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4433set dummy ${ac_tool_prefix}g++; ac_word=$2
4434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4435$as_echo_n "checking for $ac_word... " >&6; }
4436if ${ac_cv_path_CXX+:} false; then :
4437 $as_echo_n "(cached) " >&6
4438else
4439 case $CXX in
4440 [\\/]* | ?:[\\/]*)
4441 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4442 ;;
4443 *)
4444 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4445for as_dir in notfound
4446do
4447 IFS=$as_save_IFS
4448 test -z "$as_dir" && as_dir=.
4449 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004450 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004451 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4452 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4453 break 2
4454 fi
4455done
4456 done
4457IFS=$as_save_IFS
4458
4459 ;;
4460esac
4461fi
4462CXX=$ac_cv_path_CXX
4463if test -n "$CXX"; then
4464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4465$as_echo "$CXX" >&6; }
4466else
4467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4468$as_echo "no" >&6; }
4469fi
4470
4471
4472fi
4473if test -z "$ac_cv_path_CXX"; then
4474 ac_pt_CXX=$CXX
4475 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004476set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4478$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004479if ${ac_cv_path_ac_pt_CXX+:} false; then :
4480 $as_echo_n "(cached) " >&6
4481else
4482 case $ac_pt_CXX in
4483 [\\/]* | ?:[\\/]*)
4484 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4485 ;;
4486 *)
4487 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4488for as_dir in notfound
4489do
4490 IFS=$as_save_IFS
4491 test -z "$as_dir" && as_dir=.
4492 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004493 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004494 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4495 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4496 break 2
4497 fi
4498done
4499 done
4500IFS=$as_save_IFS
4501
4502 ;;
4503esac
4504fi
4505ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4506if test -n "$ac_pt_CXX"; then
4507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4508$as_echo "$ac_pt_CXX" >&6; }
4509else
4510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4511$as_echo "no" >&6; }
4512fi
4513
4514 if test "x$ac_pt_CXX" = x; then
4515 CXX="g++"
4516 else
4517 case $cross_compiling:$ac_tool_warned in
4518yes:)
4519{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4520$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4521ac_tool_warned=yes ;;
4522esac
4523 CXX=$ac_pt_CXX
4524 fi
4525else
4526 CXX="$ac_cv_path_CXX"
4527fi
4528 ;;
4529 cc) if test -n "$ac_tool_prefix"; then
4530 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4531set dummy ${ac_tool_prefix}c++; ac_word=$2
4532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4533$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004534if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004535 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004536else
4537 case $CXX in
4538 [\\/]* | ?:[\\/]*)
4539 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4540 ;;
4541 *)
4542 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4543for as_dir in notfound
4544do
4545 IFS=$as_save_IFS
4546 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004547 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004548 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004549 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004550 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004551 break 2
4552 fi
4553done
Matthias Kloseb9621712010-04-24 17:59:49 +00004554 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004555IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004556
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004557 ;;
4558esac
4559fi
4560CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004561if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4563$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004564else
Matthias Kloseb9621712010-04-24 17:59:49 +00004565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4566$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004568
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004569
4570fi
4571if test -z "$ac_cv_path_CXX"; then
4572 ac_pt_CXX=$CXX
4573 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004574set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4576$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004577if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004578 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004579else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004580 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004581 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004582 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 +00004583 ;;
4584 *)
4585 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4586for as_dir in notfound
4587do
4588 IFS=$as_save_IFS
4589 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004590 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004591 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004592 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004593 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004594 break 2
4595 fi
4596done
Matthias Kloseb9621712010-04-24 17:59:49 +00004597 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004598IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004599
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004600 ;;
4601esac
4602fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004603ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4604if test -n "$ac_pt_CXX"; then
4605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4606$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004607else
Matthias Kloseb9621712010-04-24 17:59:49 +00004608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4609$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004611
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004612 if test "x$ac_pt_CXX" = x; then
4613 CXX="c++"
4614 else
4615 case $cross_compiling:$ac_tool_warned in
4616yes:)
4617{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4618$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4619ac_tool_warned=yes ;;
4620esac
4621 CXX=$ac_pt_CXX
4622 fi
4623else
4624 CXX="$ac_cv_path_CXX"
4625fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004626 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004627 clang|*/clang) if test -n "$ac_tool_prefix"; then
4628 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4629set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4631$as_echo_n "checking for $ac_word... " >&6; }
4632if ${ac_cv_path_CXX+:} false; then :
4633 $as_echo_n "(cached) " >&6
4634else
4635 case $CXX in
4636 [\\/]* | ?:[\\/]*)
4637 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4638 ;;
4639 *)
4640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4641for as_dir in notfound
4642do
4643 IFS=$as_save_IFS
4644 test -z "$as_dir" && as_dir=.
4645 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004646 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004647 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4648 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4649 break 2
4650 fi
4651done
4652 done
4653IFS=$as_save_IFS
4654
Ned Deilycbfb9a52012-06-23 16:02:19 -07004655 ;;
4656esac
4657fi
4658CXX=$ac_cv_path_CXX
4659if test -n "$CXX"; then
4660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4661$as_echo "$CXX" >&6; }
4662else
4663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4664$as_echo "no" >&6; }
4665fi
4666
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004667
4668fi
4669if test -z "$ac_cv_path_CXX"; then
4670 ac_pt_CXX=$CXX
4671 # Extract the first word of "clang++", so it can be a program name with args.
4672set dummy clang++; ac_word=$2
4673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4674$as_echo_n "checking for $ac_word... " >&6; }
4675if ${ac_cv_path_ac_pt_CXX+:} false; then :
4676 $as_echo_n "(cached) " >&6
4677else
4678 case $ac_pt_CXX in
4679 [\\/]* | ?:[\\/]*)
4680 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4681 ;;
4682 *)
4683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4684for as_dir in notfound
4685do
4686 IFS=$as_save_IFS
4687 test -z "$as_dir" && as_dir=.
4688 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004690 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4692 break 2
4693 fi
4694done
4695 done
4696IFS=$as_save_IFS
4697
4698 ;;
4699esac
4700fi
4701ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4702if test -n "$ac_pt_CXX"; then
4703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4704$as_echo "$ac_pt_CXX" >&6; }
4705else
4706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4707$as_echo "no" >&6; }
4708fi
4709
4710 if test "x$ac_pt_CXX" = x; then
4711 CXX="clang++"
4712 else
4713 case $cross_compiling:$ac_tool_warned in
4714yes:)
4715{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4716$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4717ac_tool_warned=yes ;;
4718esac
4719 CXX=$ac_pt_CXX
4720 fi
4721else
4722 CXX="$ac_cv_path_CXX"
4723fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004724 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004725 esac
4726 if test "$CXX" = "notfound"
4727 then
4728 CXX=""
4729 fi
4730fi
4731if test -z "$CXX"
4732then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004733 if test -n "$ac_tool_prefix"; then
4734 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4735 do
4736 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4737set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4739$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004740if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004741 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004742else
4743 if test -n "$CXX"; then
4744 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4745else
4746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4747for as_dir in $PATH
4748do
4749 IFS=$as_save_IFS
4750 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004751 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004752 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004753 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004754 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004755 break 2
4756 fi
4757done
Matthias Kloseb9621712010-04-24 17:59:49 +00004758 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004759IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004760
4761fi
4762fi
4763CXX=$ac_cv_prog_CXX
4764if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4766$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004767else
Matthias Kloseb9621712010-04-24 17:59:49 +00004768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4769$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770fi
4771
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004772
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004773 test -n "$CXX" && break
4774 done
4775fi
4776if test -z "$CXX"; then
4777 ac_ct_CXX=$CXX
4778 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4779do
4780 # Extract the first word of "$ac_prog", so it can be a program name with args.
4781set dummy $ac_prog; ac_word=$2
4782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4783$as_echo_n "checking for $ac_word... " >&6; }
4784if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4785 $as_echo_n "(cached) " >&6
4786else
4787 if test -n "$ac_ct_CXX"; then
4788 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4789else
4790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4791for as_dir in $PATH
4792do
4793 IFS=$as_save_IFS
4794 test -z "$as_dir" && as_dir=.
4795 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004796 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004797 ac_cv_prog_ac_ct_CXX="$ac_prog"
4798 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4799 break 2
4800 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004801done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004802 done
4803IFS=$as_save_IFS
4804
4805fi
4806fi
4807ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4808if test -n "$ac_ct_CXX"; then
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4810$as_echo "$ac_ct_CXX" >&6; }
4811else
4812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4813$as_echo "no" >&6; }
4814fi
4815
4816
4817 test -n "$ac_ct_CXX" && break
4818done
4819
4820 if test "x$ac_ct_CXX" = x; then
4821 CXX="notfound"
4822 else
4823 case $cross_compiling:$ac_tool_warned in
4824yes:)
4825{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4826$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4827ac_tool_warned=yes ;;
4828esac
4829 CXX=$ac_ct_CXX
4830 fi
4831fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004832
4833 if test "$CXX" = "notfound"
4834 then
4835 CXX=""
4836 fi
4837fi
4838if test "$preset_cxx" != "$CXX"
4839then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004840 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004841
4842 By default, distutils will build C++ extension modules with \"$CXX\".
4843 If this is not intended, then set CXX on the configure command line.
4844 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004845$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004846
4847 By default, distutils will build C++ extension modules with \"$CXX\".
4848 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004849 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004850fi
4851
4852
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4854$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4855save_LDFLAGS="$LDFLAGS"
4856LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004857
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4859/* end confdefs.h. */
4860
4861int
4862main ()
4863{
4864
4865 ;
4866 return 0;
4867}
4868_ACEOF
4869if ac_fn_c_try_link "$LINENO"; then :
4870 NO_AS_NEEDED="-Wl,--no-as-needed"
4871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4872$as_echo "yes" >&6; }
4873else
4874 NO_AS_NEEDED=""
4875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4876$as_echo "no" >&6; }
4877fi
4878rm -f core conftest.err conftest.$ac_objext \
4879 conftest$ac_exeext conftest.$ac_ext
4880LDFLAGS="$save_LDFLAGS"
4881
4882
4883
4884# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004885ac_ext=c
4886ac_cpp='$CPP $CPPFLAGS'
4887ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4888ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4889ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4891$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004892# On Suns, sometimes $CPP names a directory.
4893if test -n "$CPP" && test -d "$CPP"; then
4894 CPP=
4895fi
4896if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004897 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004898 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004899else
Martin v. Löwis11437992002-04-12 09:54:03 +00004900 # Double quotes because CPP needs to be expanded
4901 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4902 do
4903 ac_preproc_ok=false
4904for ac_c_preproc_warn_flag in '' yes
4905do
4906 # Use a header file that comes with gcc, so configuring glibc
4907 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004908 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4909 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004910 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004911 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004913/* end confdefs.h. */
4914#ifdef __STDC__
4915# include <limits.h>
4916#else
4917# include <assert.h>
4918#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004919 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004921if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004922
Matthias Kloseb9621712010-04-24 17:59:49 +00004923else
Martin v. Löwis11437992002-04-12 09:54:03 +00004924 # Broken: fails on valid input.
4925continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004926fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004927rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004928
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004929 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004930 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004933#include <ac_nonexistent.h>
4934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004935if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004936 # Broken: success on invalid input.
4937continue
4938else
Martin v. Löwis11437992002-04-12 09:54:03 +00004939 # Passes both tests.
4940ac_preproc_ok=:
4941break
4942fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004943rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004944
4945done
4946# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004947rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004948if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004949 break
4950fi
4951
4952 done
4953 ac_cv_prog_CPP=$CPP
4954
4955fi
4956 CPP=$ac_cv_prog_CPP
4957else
4958 ac_cv_prog_CPP=$CPP
4959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4961$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004962ac_preproc_ok=false
4963for ac_c_preproc_warn_flag in '' yes
4964do
4965 # Use a header file that comes with gcc, so configuring glibc
4966 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004967 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4968 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004969 # On the NeXT, cc -E runs the code through the compiler's parser,
4970 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004972/* end confdefs.h. */
4973#ifdef __STDC__
4974# include <limits.h>
4975#else
4976# include <assert.h>
4977#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004978 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004980if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004981
Matthias Kloseb9621712010-04-24 17:59:49 +00004982else
Martin v. Löwis11437992002-04-12 09:54:03 +00004983 # Broken: fails on valid input.
4984continue
4985fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004986rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004987
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004988 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004989 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004991/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004992#include <ac_nonexistent.h>
4993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004994if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004995 # Broken: success on invalid input.
4996continue
4997else
Martin v. Löwis11437992002-04-12 09:54:03 +00004998 # Passes both tests.
4999ac_preproc_ok=:
5000break
5001fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005002rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005003
5004done
5005# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005006rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005007if $ac_preproc_ok; then :
5008
Martin v. Löwis11437992002-04-12 09:54:03 +00005009else
Matthias Kloseb9621712010-04-24 17:59:49 +00005010 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5011$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005012as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02005013See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005014fi
5015
5016ac_ext=c
5017ac_cpp='$CPP $CPPFLAGS'
5018ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5019ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5020ac_compiler_gnu=$ac_cv_c_compiler_gnu
5021
5022
Matthias Kloseb9621712010-04-24 17:59:49 +00005023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5024$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005025if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005026 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00005027else
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005029 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005030 # Loop through the user's path and test for each of PROGNAME-LIST
5031 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005032for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5033do
5034 IFS=$as_save_IFS
5035 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005036 for ac_prog in grep ggrep; do
5037 for ac_exec_ext in '' $ac_executable_extensions; do
5038 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005039 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005040# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005041 # Check for GNU $ac_path_GREP
5042case `"$ac_path_GREP" --version 2>&1` in
5043*GNU*)
5044 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5045*)
5046 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005048 while :
5049 do
5050 cat "conftest.in" "conftest.in" >"conftest.tmp"
5051 mv "conftest.tmp" "conftest.in"
5052 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005053 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005054 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5055 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005056 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005057 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5058 # Best one so far, save it but keep looking for a better one
5059 ac_cv_path_GREP="$ac_path_GREP"
5060 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005061 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005062 # 10*(2^10) chars as input seems more than enough
5063 test $ac_count -gt 10 && break
5064 done
5065 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5066esac
5067
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 $ac_path_GREP_found && break 3
5069 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005070 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005072IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005073 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005074 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 +00005075 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005076else
5077 ac_cv_path_GREP=$GREP
5078fi
5079
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005080fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5082$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005083 GREP="$ac_cv_path_GREP"
5084
5085
Matthias Kloseb9621712010-04-24 17:59:49 +00005086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5087$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005088if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005090else
5091 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5092 then ac_cv_path_EGREP="$GREP -E"
5093 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005094 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005095 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 # Loop through the user's path and test for each of PROGNAME-LIST
5097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005098for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5099do
5100 IFS=$as_save_IFS
5101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005102 for ac_prog in egrep; do
5103 for ac_exec_ext in '' $ac_executable_extensions; do
5104 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005105 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005106# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005107 # Check for GNU $ac_path_EGREP
5108case `"$ac_path_EGREP" --version 2>&1` in
5109*GNU*)
5110 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5111*)
5112 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005114 while :
5115 do
5116 cat "conftest.in" "conftest.in" >"conftest.tmp"
5117 mv "conftest.tmp" "conftest.in"
5118 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005120 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5121 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005123 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5124 # Best one so far, save it but keep looking for a better one
5125 ac_cv_path_EGREP="$ac_path_EGREP"
5126 ac_path_EGREP_max=$ac_count
5127 fi
5128 # 10*(2^10) chars as input seems more than enough
5129 test $ac_count -gt 10 && break
5130 done
5131 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5132esac
5133
Matthias Kloseb9621712010-04-24 17:59:49 +00005134 $ac_path_EGREP_found && break 3
5135 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005136 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005137 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005138IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005139 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005140 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 +00005141 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005142else
5143 ac_cv_path_EGREP=$EGREP
5144fi
5145
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005146 fi
5147fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5149$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005150 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005151
5152
Matthias Kloseb9621712010-04-24 17:59:49 +00005153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5154$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005155if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005156 $as_echo_n "(cached) " >&6
5157else
5158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005159/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005160#include <stdlib.h>
5161#include <stdarg.h>
5162#include <string.h>
5163#include <float.h>
5164
5165int
5166main ()
5167{
5168
5169 ;
5170 return 0;
5171}
5172_ACEOF
5173if ac_fn_c_try_compile "$LINENO"; then :
5174 ac_cv_header_stdc=yes
5175else
5176 ac_cv_header_stdc=no
5177fi
5178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5179
5180if test $ac_cv_header_stdc = yes; then
5181 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5183/* end confdefs.h. */
5184#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005185
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005186_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005187if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005188 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005189
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005190else
Matthias Kloseb9621712010-04-24 17:59:49 +00005191 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005192fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005193rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005194
Matthias Kloseb9621712010-04-24 17:59:49 +00005195fi
5196
5197if test $ac_cv_header_stdc = yes; then
5198 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5200/* end confdefs.h. */
5201#include <stdlib.h>
5202
5203_ACEOF
5204if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5205 $EGREP "free" >/dev/null 2>&1; then :
5206
5207else
5208 ac_cv_header_stdc=no
5209fi
5210rm -f conftest*
5211
5212fi
5213
5214if test $ac_cv_header_stdc = yes; then
5215 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5216 if test "$cross_compiling" = yes; then :
5217 :
5218else
5219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5220/* end confdefs.h. */
5221#include <ctype.h>
5222#include <stdlib.h>
5223#if ((' ' & 0x0FF) == 0x020)
5224# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5225# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5226#else
5227# define ISLOWER(c) \
5228 (('a' <= (c) && (c) <= 'i') \
5229 || ('j' <= (c) && (c) <= 'r') \
5230 || ('s' <= (c) && (c) <= 'z'))
5231# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5232#endif
5233
5234#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5235int
5236main ()
5237{
5238 int i;
5239 for (i = 0; i < 256; i++)
5240 if (XOR (islower (i), ISLOWER (i))
5241 || toupper (i) != TOUPPER (i))
5242 return 2;
5243 return 0;
5244}
5245_ACEOF
5246if ac_fn_c_try_run "$LINENO"; then :
5247
5248else
5249 ac_cv_header_stdc=no
5250fi
5251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5252 conftest.$ac_objext conftest.beam conftest.$ac_ext
5253fi
5254
5255fi
5256fi
5257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5258$as_echo "$ac_cv_header_stdc" >&6; }
5259if test $ac_cv_header_stdc = yes; then
5260
5261$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5262
5263fi
5264
5265# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5266for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5267 inttypes.h stdint.h unistd.h
5268do :
5269 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5270ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5271"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005272if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005273 cat >>confdefs.h <<_ACEOF
5274#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5275_ACEOF
5276
5277fi
5278
5279done
5280
5281
5282
5283 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 +02005284if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005285 MINIX=yes
5286else
5287 MINIX=
5288fi
5289
5290
5291 if test "$MINIX" = yes; then
5292
5293$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5294
5295
5296$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5297
5298
5299$as_echo "#define _MINIX 1" >>confdefs.h
5300
5301 fi
5302
5303
5304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5305$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005306if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005307 $as_echo_n "(cached) " >&6
5308else
5309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5310/* end confdefs.h. */
5311
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005312# define __EXTENSIONS__ 1
5313 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005314int
5315main ()
5316{
5317
5318 ;
5319 return 0;
5320}
5321_ACEOF
5322if ac_fn_c_try_compile "$LINENO"; then :
5323 ac_cv_safe_to_define___extensions__=yes
5324else
5325 ac_cv_safe_to_define___extensions__=no
5326fi
5327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5328fi
5329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5330$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5331 test $ac_cv_safe_to_define___extensions__ = yes &&
5332 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5333
5334 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5335
5336 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5337
5338 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5339
5340 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5341
5342
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005343
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005344# Check for unsupported systems
5345case $ac_sys_system/$ac_sys_release in
5346atheos*|Linux*/1*)
5347 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5348 echo See README for details.
5349 exit 1;;
5350esac
5351
5352
Matthias Kloseb9621712010-04-24 17:59:49 +00005353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5354$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005355
5356# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005357if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005358 withval=$with_suffix;
5359 case $withval in
5360 no) EXEEXT=;;
5361 yes) EXEEXT=.exe;;
5362 *) EXEEXT=$withval;;
5363 esac
5364fi
5365
Matthias Kloseb9621712010-04-24 17:59:49 +00005366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5367$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368
5369# Test whether we're running on a non-case-sensitive system, in which
5370# case we give a warning if no ext is given
5371
Matthias Kloseb9621712010-04-24 17:59:49 +00005372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5373$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005374if test ! -d CaseSensitiveTestDir; then
5375mkdir CaseSensitiveTestDir
5376fi
5377
5378if test -d casesensitivetestdir
5379then
Matthias Kloseb9621712010-04-24 17:59:49 +00005380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5381$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005382 BUILDEXEEXT=.exe
5383else
Matthias Kloseb9621712010-04-24 17:59:49 +00005384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5385$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005386 BUILDEXEEXT=$EXEEXT
5387fi
5388rmdir CaseSensitiveTestDir
5389
5390case $MACHDEP in
5391bsdos*)
5392 case $CC in
5393 gcc) CC="$CC -D_HAVE_BSDI";;
5394 esac;;
5395esac
5396
5397case $ac_sys_system in
5398hp*|HP*)
5399 case $CC in
5400 cc|*/cc) CC="$CC -Ae";;
5401 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005402esac
5403
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005404MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5405
5406
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407
5408
Matthias Kloseb9621712010-04-24 17:59:49 +00005409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5410$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005411if test -z "$LIBRARY"
5412then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005413 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005414fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5416$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005417
5418# LDLIBRARY is the name of the library to link against (as opposed to the
5419# name of the library into which to insert object files). BLDLIBRARY is also
5420# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5421# is blank as the main program is not linked directly against LDLIBRARY.
5422# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5423# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5424# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5425# DLLLIBRARY is the shared (i.e., DLL) library.
5426#
5427# RUNSHARED is used to run shared python without installed libraries
5428#
5429# INSTSONAME is the name of the shared library that will be use to install
5430# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005431#
5432# LDVERSION is the shared library version number, normally the Python version
5433# with the ABI build flags appended.
5434
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005435
5436
5437
5438
5439
5440
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005441
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005442LDLIBRARY="$LIBRARY"
5443BLDLIBRARY='$(LDLIBRARY)'
5444INSTSONAME='$(LDLIBRARY)'
5445DLLLIBRARY=''
5446LDLIBRARYDIR=''
5447RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005448LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005449
5450# LINKCC is the command that links the python executable -- default is $(CC).
5451# If CXX is set, and if it is needed to link a main function that was
5452# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5453# python might then depend on the C++ runtime
5454# This is altered for AIX in order to build the export list before
5455# linking.
5456
Matthias Kloseb9621712010-04-24 17:59:49 +00005457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5458$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005459if test -z "$LINKCC"
5460then
5461 LINKCC='$(PURIFY) $(MAINCC)'
5462 case $ac_sys_system in
5463 AIX*)
5464 exp_extra="\"\""
5465 if test $ac_sys_release -ge 5 -o \
5466 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5467 exp_extra="."
5468 fi
5469 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005470 QNX*)
5471 # qcc must be used because the other compilers do not
5472 # support -N.
5473 LINKCC=qcc;;
5474 esac
5475fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5477$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005478
5479# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5480# make sure we default having it set to "no": this is used by
5481# distutils.unixccompiler to know if it should add --enable-new-dtags
5482# to linker command lines, and failing to detect GNU ld simply results
5483# in the same bahaviour as before.
5484
Matthias Kloseb9621712010-04-24 17:59:49 +00005485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5486$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005487ac_prog=ld
5488if test "$GCC" = yes; then
5489 ac_prog=`$CC -print-prog-name=ld`
5490fi
5491case `"$ac_prog" -V 2>&1 < /dev/null` in
5492 *GNU*)
5493 GNULD=yes;;
5494 *)
5495 GNULD=no;;
5496esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5498$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005499
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5501$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005502if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005503 $as_echo_n "(cached) " >&6
5504else
5505 ac_cv_c_inline=no
5506for ac_kw in inline __inline__ __inline; do
5507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5508/* end confdefs.h. */
5509#ifndef __cplusplus
5510typedef int foo_t;
5511static $ac_kw foo_t static_foo () {return 0; }
5512$ac_kw foo_t foo () {return 0; }
5513#endif
5514
5515_ACEOF
5516if ac_fn_c_try_compile "$LINENO"; then :
5517 ac_cv_c_inline=$ac_kw
5518fi
5519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5520 test "$ac_cv_c_inline" != no && break
5521done
5522
5523fi
5524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5525$as_echo "$ac_cv_c_inline" >&6; }
5526
5527case $ac_cv_c_inline in
5528 inline | yes) ;;
5529 *)
5530 case $ac_cv_c_inline in
5531 no) ac_val=;;
5532 *) ac_val=$ac_cv_c_inline;;
5533 esac
5534 cat >>confdefs.h <<_ACEOF
5535#ifndef __cplusplus
5536#define inline $ac_val
5537#endif
5538_ACEOF
5539 ;;
5540esac
5541
5542if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005543
5544$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005545
5546
5547fi
5548
5549
Matthias Kloseb9621712010-04-24 17:59:49 +00005550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5551$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005552# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005553if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005554 enableval=$enable_shared;
5555fi
5556
5557
5558if test -z "$enable_shared"
5559then
5560 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005561 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005562 enable_shared="yes";;
5563 *)
5564 enable_shared="no";;
5565 esac
5566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5568$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005569
Matthias Kloseb9621712010-04-24 17:59:49 +00005570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5571$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005572# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005573if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005574 enableval=$enable_profiling;
5575fi
5576
5577if test "x$enable_profiling" = xyes; then
5578 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005579 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005581/* end confdefs.h. */
5582int main() { return 0; }
5583_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005584if ac_fn_c_try_link "$LINENO"; then :
5585
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005586else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005587 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005588fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005589rm -f core conftest.err conftest.$ac_objext \
5590 conftest$ac_exeext conftest.$ac_ext
5591 CC="$ac_save_cc"
5592else
5593 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005594fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5596$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597
doko@ubuntu.comba015832012-06-30 16:52:05 +02005598if test "x$enable_profiling" = xyes; then
5599 BASECFLAGS="-pg $BASECFLAGS"
5600 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601fi
5602
Matthias Kloseb9621712010-04-24 17:59:49 +00005603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5604$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005605
5606# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5607# library that we build, but we do not want to link against it (we
5608# will find it with a -framework option). For this reason there is an
5609# extra variable BLDLIBRARY against which Python and the extension
5610# modules are linked, BLDLIBRARY. This is normally the same as
5611# LDLIBRARY, but empty for MacOSX framework builds.
5612if test "$enable_framework"
5613then
5614 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005615 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616 BLDLIBRARY=''
5617else
5618 BLDLIBRARY='$(LDLIBRARY)'
5619fi
5620
5621# Other platforms follow
5622if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005623 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624
Matthias Kloseb9621712010-04-24 17:59:49 +00005625$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005626
5627 case $ac_sys_system in
5628 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005629 LDLIBRARY='libpython$(LDVERSION).dll.a'
5630 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005631 ;;
5632 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005633 LDLIBRARY='libpython$(LDVERSION).so'
5634 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005635 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005636 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005637 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005638 then
5639 PY3LIBRARY=libpython3.so
5640 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005641 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005642 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005643 LDLIBRARY='libpython$(LDVERSION).so'
5644 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005645 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005646 case $ac_sys_system in
5647 FreeBSD*)
5648 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5649 ;;
5650 esac
5651 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005652 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005653 then
5654 PY3LIBRARY=libpython3.so
5655 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005656 ;;
5657 hp*|HP*)
5658 case `uname -m` in
5659 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005660 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661 ;;
5662 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005663 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664 ;;
5665 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005666 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005667 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005670 LDLIBRARY='libpython$(LDVERSION).dylib'
5671 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005672 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005674 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005675 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005676 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005677 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678
5679 esac
5680else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005681 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682 case $ac_sys_system in
5683 CYGWIN*)
5684 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005685 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686 ;;
5687 esac
5688fi
5689
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005690if test "$cross_compiling" = yes; then
5691 RUNSHARED=
5692fi
5693
Matthias Kloseb9621712010-04-24 17:59:49 +00005694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5695$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696
5697if test -n "$ac_tool_prefix"; then
5698 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5699set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5701$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005702if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005703 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704else
5705 if test -n "$RANLIB"; then
5706 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5707else
5708as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5709for as_dir in $PATH
5710do
5711 IFS=$as_save_IFS
5712 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005713 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005714 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005716 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717 break 2
5718 fi
5719done
Matthias Kloseb9621712010-04-24 17:59:49 +00005720 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721IFS=$as_save_IFS
5722
5723fi
5724fi
5725RANLIB=$ac_cv_prog_RANLIB
5726if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5728$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729else
Matthias Kloseb9621712010-04-24 17:59:49 +00005730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5731$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732fi
5733
5734
5735fi
5736if test -z "$ac_cv_prog_RANLIB"; then
5737 ac_ct_RANLIB=$RANLIB
5738 # Extract the first word of "ranlib", so it can be a program name with args.
5739set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5741$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005742if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005743 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744else
5745 if test -n "$ac_ct_RANLIB"; then
5746 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5747else
5748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5749for as_dir in $PATH
5750do
5751 IFS=$as_save_IFS
5752 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005753 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005754 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005756 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757 break 2
5758 fi
5759done
Matthias Kloseb9621712010-04-24 17:59:49 +00005760 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761IFS=$as_save_IFS
5762
5763fi
5764fi
5765ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5766if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5768$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769else
Matthias Kloseb9621712010-04-24 17:59:49 +00005770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5771$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772fi
5773
5774 if test "x$ac_ct_RANLIB" = x; then
5775 RANLIB=":"
5776 else
5777 case $cross_compiling:$ac_tool_warned in
5778yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005779{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5780$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781ac_tool_warned=yes ;;
5782esac
5783 RANLIB=$ac_ct_RANLIB
5784 fi
5785else
5786 RANLIB="$ac_cv_prog_RANLIB"
5787fi
5788
5789
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005790if test -n "$ac_tool_prefix"; then
5791 for ac_prog in ar aal
5792 do
5793 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5794set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5796$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005797if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005798 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799else
5800 if test -n "$AR"; then
5801 ac_cv_prog_AR="$AR" # Let the user override the test.
5802else
5803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5804for as_dir in $PATH
5805do
5806 IFS=$as_save_IFS
5807 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005808 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005809 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005810 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005811 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812 break 2
5813 fi
5814done
Matthias Kloseb9621712010-04-24 17:59:49 +00005815 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816IFS=$as_save_IFS
5817
5818fi
5819fi
5820AR=$ac_cv_prog_AR
5821if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5823$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824else
Matthias Kloseb9621712010-04-24 17:59:49 +00005825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5826$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827fi
5828
5829
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005830 test -n "$AR" && break
5831 done
5832fi
5833if test -z "$AR"; then
5834 ac_ct_AR=$AR
5835 for ac_prog in ar aal
5836do
5837 # Extract the first word of "$ac_prog", so it can be a program name with args.
5838set dummy $ac_prog; ac_word=$2
5839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5840$as_echo_n "checking for $ac_word... " >&6; }
5841if ${ac_cv_prog_ac_ct_AR+:} false; then :
5842 $as_echo_n "(cached) " >&6
5843else
5844 if test -n "$ac_ct_AR"; then
5845 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5846else
5847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5848for as_dir in $PATH
5849do
5850 IFS=$as_save_IFS
5851 test -z "$as_dir" && as_dir=.
5852 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005853 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005854 ac_cv_prog_ac_ct_AR="$ac_prog"
5855 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5856 break 2
5857 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005859 done
5860IFS=$as_save_IFS
5861
5862fi
5863fi
5864ac_ct_AR=$ac_cv_prog_ac_ct_AR
5865if test -n "$ac_ct_AR"; then
5866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5867$as_echo "$ac_ct_AR" >&6; }
5868else
5869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5870$as_echo "no" >&6; }
5871fi
5872
5873
5874 test -n "$ac_ct_AR" && break
5875done
5876
5877 if test "x$ac_ct_AR" = x; then
5878 AR="ar"
5879 else
5880 case $cross_compiling:$ac_tool_warned in
5881yes:)
5882{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5883$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5884ac_tool_warned=yes ;;
5885esac
5886 AR=$ac_ct_AR
5887 fi
5888fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889
5890
5891# tweak ARFLAGS only if the user didn't set it on the command line
5892
5893if test -z "$ARFLAGS"
5894then
5895 ARFLAGS="rc"
5896fi
5897
doko@ubuntu.com58844492012-06-30 18:25:32 +02005898if test -n "$ac_tool_prefix"; then
5899 for ac_prog in readelf
5900 do
5901 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5902set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5904$as_echo_n "checking for $ac_word... " >&6; }
5905if ${ac_cv_prog_READELF+:} false; then :
5906 $as_echo_n "(cached) " >&6
5907else
5908 if test -n "$READELF"; then
5909 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5910else
5911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5912for as_dir in $PATH
5913do
5914 IFS=$as_save_IFS
5915 test -z "$as_dir" && as_dir=.
5916 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005917 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005918 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5919 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5920 break 2
5921 fi
5922done
5923 done
5924IFS=$as_save_IFS
5925
5926fi
5927fi
5928READELF=$ac_cv_prog_READELF
5929if test -n "$READELF"; then
5930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5931$as_echo "$READELF" >&6; }
5932else
5933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5934$as_echo "no" >&6; }
5935fi
5936
5937
5938 test -n "$READELF" && break
5939 done
5940fi
5941if test -z "$READELF"; then
5942 ac_ct_READELF=$READELF
5943 for ac_prog in readelf
5944do
5945 # Extract the first word of "$ac_prog", so it can be a program name with args.
5946set dummy $ac_prog; ac_word=$2
5947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5948$as_echo_n "checking for $ac_word... " >&6; }
5949if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5950 $as_echo_n "(cached) " >&6
5951else
5952 if test -n "$ac_ct_READELF"; then
5953 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5954else
5955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5956for as_dir in $PATH
5957do
5958 IFS=$as_save_IFS
5959 test -z "$as_dir" && as_dir=.
5960 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005961 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005962 ac_cv_prog_ac_ct_READELF="$ac_prog"
5963 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5964 break 2
5965 fi
5966done
5967 done
5968IFS=$as_save_IFS
5969
5970fi
5971fi
5972ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5973if test -n "$ac_ct_READELF"; then
5974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5975$as_echo "$ac_ct_READELF" >&6; }
5976else
5977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5978$as_echo "no" >&6; }
5979fi
5980
5981
5982 test -n "$ac_ct_READELF" && break
5983done
5984
5985 if test "x$ac_ct_READELF" = x; then
5986 READELF=":"
5987 else
5988 case $cross_compiling:$ac_tool_warned in
5989yes:)
5990{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5991$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5992ac_tool_warned=yes ;;
5993esac
5994 READELF=$ac_ct_READELF
5995 fi
5996fi
5997
5998if test "$cross_compiling" = yes; then
5999 case "$READELF" in
6000 readelf|:)
6001 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6002 ;;
6003 esac
6004fi
6005
6006
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007
Matthias Klosec4c48422012-10-21 23:05:35 +02006008for ac_prog in python$PACKAGE_VERSION python3 python
6009do
6010 # Extract the first word of "$ac_prog", so it can be a program name with args.
6011set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6013$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006014if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006015 $as_echo_n "(cached) " >&6
6016else
Matthias Klosec4c48422012-10-21 23:05:35 +02006017 if test -n "$PYTHON"; then
6018 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006019else
6020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6021for as_dir in $PATH
6022do
6023 IFS=$as_save_IFS
6024 test -z "$as_dir" && as_dir=.
6025 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006026 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006027 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006028 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6029 break 2
6030 fi
6031done
6032 done
6033IFS=$as_save_IFS
6034
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006035fi
6036fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006037PYTHON=$ac_cv_prog_PYTHON
6038if test -n "$PYTHON"; then
6039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6040$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006041else
6042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6043$as_echo "no" >&6; }
6044fi
6045
6046
Matthias Klosec4c48422012-10-21 23:05:35 +02006047 test -n "$PYTHON" && break
6048done
6049test -n "$PYTHON" || PYTHON="not-found"
6050
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006051if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006052 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6053else
6054 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006055fi
6056
6057
Kushal Das02d23a22014-04-15 23:50:06 +05306058for ac_prog in python$PACKAGE_VERSION python3 python
6059do
6060 # Extract the first word of "$ac_prog", so it can be a program name with args.
6061set dummy $ac_prog; ac_word=$2
6062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6063$as_echo_n "checking for $ac_word... " >&6; }
6064if ${ac_cv_prog_PYTHON+:} false; then :
6065 $as_echo_n "(cached) " >&6
6066else
6067 if test -n "$PYTHON"; then
6068 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6069else
6070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6071for as_dir in $PATH
6072do
6073 IFS=$as_save_IFS
6074 test -z "$as_dir" && as_dir=.
6075 for ac_exec_ext in '' $ac_executable_extensions; do
6076 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6077 ac_cv_prog_PYTHON="$ac_prog"
6078 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6079 break 2
6080 fi
6081done
6082 done
6083IFS=$as_save_IFS
6084
6085fi
6086fi
6087PYTHON=$ac_cv_prog_PYTHON
6088if test -n "$PYTHON"; then
6089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6090$as_echo "$PYTHON" >&6; }
6091else
6092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6093$as_echo "no" >&6; }
6094fi
6095
6096
6097 test -n "$PYTHON" && break
6098done
6099test -n "$PYTHON" || PYTHON="not-found"
6100
6101if test "$PYTHON" = not-found; then
6102 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6103else
6104 OPCODEHGEN="$PYTHON"
6105fi
6106
6107
6108
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006109case $MACHDEP in
6110bsdos*|hp*|HP*)
6111 # install -d does not work on BSDI or HP-UX
6112 if test -z "$INSTALL"
6113 then
6114 INSTALL="${srcdir}/install-sh -c"
6115 fi
6116esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006117# Find a good install program. We prefer a C program (faster),
6118# so one script is as good as another. But avoid the broken or
6119# incompatible versions:
6120# SysV /etc/install, /usr/sbin/install
6121# SunOS /usr/etc/install
6122# IRIX /sbin/install
6123# AIX /bin/install
6124# AmigaOS /C/install, which installs bootblocks on floppy discs
6125# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6126# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6127# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6128# OS/2's system install, which has a completely different semantic
6129# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006130# Reject install programs that cannot install multiple files.
6131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6132$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006133if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006134if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006135 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006136else
6137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6138for as_dir in $PATH
6139do
6140 IFS=$as_save_IFS
6141 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006142 # Account for people who put trailing slashes in PATH elements.
6143case $as_dir/ in #((
6144 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006145 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006146 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006147 /usr/ucb/* ) ;;
6148 *)
6149 # OSF1 and SCO ODT 3.0 have their own names for install.
6150 # Don't use installbsd from OSF since it installs stuff as root
6151 # by default.
6152 for ac_prog in ginstall scoinst install; do
6153 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006154 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006155 if test $ac_prog = install &&
6156 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6157 # AIX install. It has an incompatible calling convention.
6158 :
6159 elif test $ac_prog = install &&
6160 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6161 # program-specific install script used by HP pwplus--don't use.
6162 :
6163 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006164 rm -rf conftest.one conftest.two conftest.dir
6165 echo one > conftest.one
6166 echo two > conftest.two
6167 mkdir conftest.dir
6168 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6169 test -s conftest.one && test -s conftest.two &&
6170 test -s conftest.dir/conftest.one &&
6171 test -s conftest.dir/conftest.two
6172 then
6173 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6174 break 3
6175 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006176 fi
6177 fi
6178 done
6179 done
6180 ;;
6181esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006182
6183 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006184IFS=$as_save_IFS
6185
Matthias Kloseb9621712010-04-24 17:59:49 +00006186rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006187
6188fi
6189 if test "${ac_cv_path_install+set}" = set; then
6190 INSTALL=$ac_cv_path_install
6191 else
6192 # As a last resort, use the slow shell script. Don't cache a
6193 # value for INSTALL within a source directory, because that will
6194 # break other packages using the cache if that directory is
6195 # removed, or if the value is a relative name.
6196 INSTALL=$ac_install_sh
6197 fi
6198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6200$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006201
6202# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6203# It thinks the first close brace ends the variable substitution.
6204test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6205
6206test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6207
6208test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6209
Matthias Klose93a0ef12012-03-15 18:08:34 +01006210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6211$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6212if test -z "$MKDIR_P"; then
6213 if ${ac_cv_path_mkdir+:} false; then :
6214 $as_echo_n "(cached) " >&6
6215else
6216 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6217for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6218do
6219 IFS=$as_save_IFS
6220 test -z "$as_dir" && as_dir=.
6221 for ac_prog in mkdir gmkdir; do
6222 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006223 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006224 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6225 'mkdir (GNU coreutils) '* | \
6226 'mkdir (coreutils) '* | \
6227 'mkdir (fileutils) '4.1*)
6228 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6229 break 3;;
6230 esac
6231 done
6232 done
6233 done
6234IFS=$as_save_IFS
6235
6236fi
6237
6238 test -d ./--version && rmdir ./--version
6239 if test "${ac_cv_path_mkdir+set}" = set; then
6240 MKDIR_P="$ac_cv_path_mkdir -p"
6241 else
6242 # As a last resort, use the slow shell script. Don't cache a
6243 # value for MKDIR_P within a source directory, because that will
6244 # break other packages using the cache if that directory is
6245 # removed, or if the value is a relative name.
6246 MKDIR_P="$ac_install_sh -d"
6247 fi
6248fi
6249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6250$as_echo "$MKDIR_P" >&6; }
6251
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006252
6253# Not every filesystem supports hard links
6254
6255if test -z "$LN" ; then
6256 case $ac_sys_system in
6257 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006258 *) LN=ln;;
6259 esac
6260fi
6261
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006262# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006263
6264ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006265
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006266# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6268$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006269
6270# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006271if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006272 withval=$with_pydebug;
6273if test "$withval" != no
6274then
6275
Matthias Kloseb9621712010-04-24 17:59:49 +00006276$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006277
Matthias Kloseb9621712010-04-24 17:59:49 +00006278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6279$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006280 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006281 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006282else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6283$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006284fi
6285else
Matthias Kloseb9621712010-04-24 17:59:49 +00006286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6287$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006288fi
6289
6290
6291# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6292# merged with this chunk of code?
6293
6294# Optimizer/debugger flags
6295# ------------------------
6296# (The following bit of code is complicated enough - please keep things
6297# indented properly. Just pretend you're editing Python code. ;-)
6298
6299# There are two parallel sets of case statements below, one that checks to
6300# see if OPT was set and one that does BASECFLAGS setting based upon
6301# compiler and platform. BASECFLAGS tweaks need to be made even if the
6302# user set OPT.
6303
6304# tweak OPT based on compiler and platform, only if the user didn't set
6305# it on the command line
6306
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006307if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308then
6309 case $GCC in
6310 yes)
6311 if test "$CC" != 'g++' ; then
6312 STRICT_PROTO="-Wstrict-prototypes"
6313 fi
6314 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6315 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6316 WRAP="-fwrapv"
6317 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006318
6319 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006320 case $CC in
6321 *clang*) WRAP="-fwrapv"
6322 ;;
6323 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006324
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325 case $ac_cv_prog_cc_g in
6326 yes)
6327 if test "$Py_DEBUG" = 'true' ; then
6328 # Optimization messes up debuggers, so turn it off for
6329 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006330 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6331 OPT="-g -Og -Wall $STRICT_PROTO"
6332 else
6333 OPT="-g -O0 -Wall $STRICT_PROTO"
6334 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006335 else
6336 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6337 fi
6338 ;;
6339 *)
6340 OPT="-O3 -Wall $STRICT_PROTO"
6341 ;;
6342 esac
6343 case $ac_sys_system in
6344 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6345 ;;
6346 esac
6347 ;;
6348
6349 *)
6350 OPT="-O"
6351 ;;
6352 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006353fi
6354
6355
6356
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006357
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006358# The -arch flags for universal builds on OSX
6359UNIVERSAL_ARCH_FLAGS=
6360
6361
6362# tweak BASECFLAGS based on compiler and platform
6363case $GCC in
6364yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006365 # Python doesn't violate C99 aliasing rules, but older versions of
6366 # GCC produce warnings for legal Python code. Enable
6367 # -fno-strict-aliasing on versions of GCC that support but produce
6368 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6370$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371 ac_save_cc="$CC"
6372 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006373 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006374 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006375 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006376else
Matthias Kloseb9621712010-04-24 17:59:49 +00006377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006378/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006379
Matthias Kloseb159a552010-04-25 21:00:44 +00006380
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006381int
6382main ()
6383{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006384
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006385 ;
6386 return 0;
6387}
Matthias Kloseb159a552010-04-25 21:00:44 +00006388
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006390if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006391
6392 CC="$ac_save_cc -fstrict-aliasing"
6393 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006395/* end confdefs.h. */
6396
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006397 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006398int
6399main ()
6400{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006401double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006402 ;
6403 return 0;
6404}
Matthias Kloseb159a552010-04-25 21:00:44 +00006405
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006407if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006408
6409 ac_cv_no_strict_aliasing=no
6410
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006411else
Matthias Kloseb159a552010-04-25 21:00:44 +00006412
6413 ac_cv_no_strict_aliasing=yes
6414
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006415fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006417
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006418else
Matthias Kloseb159a552010-04-25 21:00:44 +00006419
6420 ac_cv_no_strict_aliasing=no
6421
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006422fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006424fi
6425
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006426 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006427 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6429$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006430 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006431 then
6432 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6433 fi
6434
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6436$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6437 ac_save_cc="$CC"
6438 CC="$CC -Wunused-result -Werror"
6439 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006440 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006441 $as_echo_n "(cached) " >&6
6442else
6443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6444/* end confdefs.h. */
6445
6446
6447int
6448main ()
6449{
6450
6451 ;
6452 return 0;
6453}
6454
6455_ACEOF
6456if ac_fn_c_try_compile "$LINENO"; then :
6457
6458 ac_cv_disable_unused_result_warning=yes
6459
6460else
6461
6462 ac_cv_disable_unused_result_warning=no
6463
6464fi
6465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6466fi
6467
6468 CFLAGS="$save_CFLAGS"
6469 CC="$ac_save_cc"
6470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6471$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6472
6473 if test $ac_cv_disable_unused_result_warning = yes
6474 then
6475 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6476 fi
6477
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6479$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6480 ac_save_cc="$CC"
6481 CC="$CC -Werror=declaration-after-statement"
6482 save_CFLAGS="$CFLAGS"
6483 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6484 $as_echo_n "(cached) " >&6
6485else
6486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6487/* end confdefs.h. */
6488
6489
6490int
6491main ()
6492{
6493
6494 ;
6495 return 0;
6496}
6497
6498_ACEOF
6499if ac_fn_c_try_compile "$LINENO"; then :
6500
6501 ac_cv_declaration_after_statement_warning=yes
6502
6503else
6504
6505 ac_cv_declaration_after_statement_warning=no
6506
6507fi
6508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6509fi
6510
6511 CFLAGS="$save_CFLAGS"
6512 CC="$ac_save_cc"
6513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6514$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6515
6516 if test $ac_cv_declaration_after_statement_warning = yes
6517 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006518 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006519 fi
6520
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6522$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6523 ac_save_cc="$CC"
6524 CC="$CC -Wsign-compare"
6525 save_CFLAGS="$CFLAGS"
6526 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6527 $as_echo_n "(cached) " >&6
6528else
6529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6530/* end confdefs.h. */
6531
6532
6533int
6534main ()
6535{
6536
6537 ;
6538 return 0;
6539}
6540
6541_ACEOF
6542if ac_fn_c_try_compile "$LINENO"; then :
6543
6544 ac_cv_enable_sign_compare_warning=yes
6545
6546else
6547
6548 ac_cv_enable_sign_compare_warning=no
6549
6550fi
6551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6552fi
6553
6554 CFLAGS="$save_CFLAGS"
6555 CC="$ac_save_cc"
6556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6557$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6558
6559 if test $ac_cv_enable_sign_compare_warning = yes
6560 then
6561 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6562 fi
6563
6564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6565$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6566 ac_save_cc="$CC"
6567 CC="$CC -Wunreachable-code"
6568 save_CFLAGS="$CFLAGS"
6569 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6570 $as_echo_n "(cached) " >&6
6571else
6572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6573/* end confdefs.h. */
6574
6575
6576int
6577main ()
6578{
6579
6580 ;
6581 return 0;
6582}
6583
6584_ACEOF
6585if ac_fn_c_try_compile "$LINENO"; then :
6586
6587 ac_cv_enable_unreachable_code_warning=yes
6588
6589else
6590
6591 ac_cv_enable_unreachable_code_warning=no
6592
6593fi
6594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6595fi
6596
6597 CFLAGS="$save_CFLAGS"
6598 CC="$ac_save_cc"
6599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6600$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
6601
6602 # Don't enable unreachable code warning in debug mode, since it usually
6603 # results in non-standard code paths.
6604 if test $ac_cv_enable_unreachable_code_warning = yes && test "$Py_DEBUG" != "true"
6605 then
6606 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
6607 fi
6608
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006609 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6610 # support. Without this, treatment of subnormals doesn't follow
6611 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006612 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006613 alpha*)
6614 BASECFLAGS="$BASECFLAGS -mieee"
6615 ;;
6616 esac
6617
6618 case $ac_sys_system in
6619 SCO_SV*)
6620 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6621 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006622
6623 # is there any other compiler on Darwin besides gcc?
6624 Darwin*)
6625 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6626 # used to be here, but non-Apple gcc doesn't accept them.
6627 if test "${CC}" = gcc
6628 then
6629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006630$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006631 case "${UNIVERSALSDK}" in
6632 */MacOSX10.4u.sdk)
6633 # Build using 10.4 SDK, force usage of gcc when the
6634 # compiler is gcc, otherwise the user will get very
6635 # confusing error messages when building on OSX 10.6
6636 CC=gcc-4.0
6637 CPP=cpp-4.0
6638 ;;
6639 esac
6640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006641$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006642 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006643
Ned Deily87adb6e2013-10-18 21:09:56 -07006644 if test "${enable_universalsdk}"
6645 then
6646 case "$UNIVERSAL_ARCHS" in
6647 32-bit)
6648 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6649 LIPO_32BIT_FLAGS=""
6650 ARCH_RUN_32BIT=""
6651 ;;
6652 64-bit)
6653 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6654 LIPO_32BIT_FLAGS=""
6655 ARCH_RUN_32BIT="true"
6656 ;;
6657 all)
6658 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6659 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6660 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6661 ;;
6662 intel)
6663 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6664 LIPO_32BIT_FLAGS="-extract i386"
6665 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6666 ;;
6667 intel-32)
6668 UNIVERSAL_ARCH_FLAGS="-arch i386"
6669 LIPO_32BIT_FLAGS=""
6670 ARCH_RUN_32BIT=""
6671 ;;
6672 3-way)
6673 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6674 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6675 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6676 ;;
6677 *)
6678 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6679 ;;
6680 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006681
Ned Deily87adb6e2013-10-18 21:09:56 -07006682 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6683 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6684 if test "${UNIVERSALSDK}" != "/"
6685 then
6686 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6687 fi
6688 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006689
Ned Deily87adb6e2013-10-18 21:09:56 -07006690 # Calculate an appropriate deployment target for this build:
6691 # The deployment target value is used explicitly to enable certain
6692 # features are enabled (such as builtin libedit support for readline)
6693 # through the use of Apple's Availabiliy Macros and is used as a
6694 # component of the string returned by distutils.get_platform().
6695 #
6696 # Use the value from:
6697 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6698 # 2. the operating system version of the build machine if >= 10.6
6699 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6700 # below to pick either 10.3, 10.4, or 10.5 as the target.
6701 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006702
Ned Deily87adb6e2013-10-18 21:09:56 -07006703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6704$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006705 cur_target_major=`sw_vers -productVersion | \
6706 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6707 cur_target_minor=`sw_vers -productVersion | \
6708 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6709 cur_target="${cur_target_major}.${cur_target_minor}"
6710 if test ${cur_target_major} -eq 10 && \
6711 test ${cur_target_minor} -ge 3 && \
6712 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006713 then
Ned Deily36820b62014-06-25 13:44:22 -07006714 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006715 cur_target=10.3
6716 if test ${enable_universalsdk}
6717 then
6718 case "$UNIVERSAL_ARCHS" in
6719 all|3-way|intel|64-bit)
6720 # These configurations were first supported in 10.5
6721 cur_target='10.5'
6722 ;;
6723 esac
6724 else
6725 if test `/usr/bin/arch` = "i386"
6726 then
6727 # 10.4 was the first release to support Intel archs
6728 cur_target="10.4"
6729 fi
6730 fi
6731 fi
6732 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006733
Ned Deily87adb6e2013-10-18 21:09:56 -07006734 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6735 # environment with a value that is the same as what we'll use
6736 # in the Makefile to ensure that we'll get the same compiler
6737 # environment during configure and build time.
6738 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6739 export MACOSX_DEPLOYMENT_TARGET
6740 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6742$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006743
Ned Deily87adb6e2013-10-18 21:09:56 -07006744 # end of Darwin* tests
6745 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006746 esac
6747 ;;
6748
6749*)
6750 case $ac_sys_system in
6751 OpenUNIX*|UnixWare*)
6752 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6753 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006754 SCO_SV*)
6755 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6756 ;;
6757 esac
6758 ;;
6759esac
6760
6761if test "$Py_DEBUG" = 'true'; then
6762 :
6763else
6764 OPT="-DNDEBUG $OPT"
6765fi
6766
6767if test "$ac_arch_flags"
6768then
6769 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6770fi
6771
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006772# On some compilers, pthreads are available without further options
6773# (e.g. MacOS X). On some of these systems, the compiler will not
6774# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6775# So we have to see first whether pthreads are available without
6776# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6778$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006779if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006780 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006781else
Matthias Kloseb9621712010-04-24 17:59:49 +00006782 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006783 ac_cv_pthread_is_default=no
6784else
Matthias Kloseb9621712010-04-24 17:59:49 +00006785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006786/* end confdefs.h. */
6787
Stefan Krah7dba5942012-11-22 22:49:11 +01006788#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006789#include <pthread.h>
6790
6791void* routine(void* p){return NULL;}
6792
6793int main(){
6794 pthread_t p;
6795 if(pthread_create(&p,NULL,routine,NULL)!=0)
6796 return 1;
6797 (void)pthread_detach(p);
6798 return 0;
6799}
6800
6801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006802if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006803
6804 ac_cv_pthread_is_default=yes
6805 ac_cv_kthread=no
6806 ac_cv_pthread=no
6807
6808else
Matthias Kloseb9621712010-04-24 17:59:49 +00006809 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6812 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006813fi
6814
6815
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006816fi
6817
Matthias Kloseb9621712010-04-24 17:59:49 +00006818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6819$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006820
6821
6822if test $ac_cv_pthread_is_default = yes
6823then
6824 ac_cv_kpthread=no
6825else
6826# -Kpthread, if available, provides the right #defines
6827# and linker options to make pthread_create available
6828# Some compilers won't report that they do not support -Kpthread,
6829# so we need to run a program to see whether it really made the
6830# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6832$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006833if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006834 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006835else
6836 ac_save_cc="$CC"
6837CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006838if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006839 ac_cv_kpthread=no
6840else
Matthias Kloseb9621712010-04-24 17:59:49 +00006841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006842/* end confdefs.h. */
6843
Stefan Krah7dba5942012-11-22 22:49:11 +01006844#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845#include <pthread.h>
6846
6847void* routine(void* p){return NULL;}
6848
6849int main(){
6850 pthread_t p;
6851 if(pthread_create(&p,NULL,routine,NULL)!=0)
6852 return 1;
6853 (void)pthread_detach(p);
6854 return 0;
6855}
6856
6857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006858if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006859 ac_cv_kpthread=yes
6860else
Matthias Kloseb9621712010-04-24 17:59:49 +00006861 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006863rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6864 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006865fi
6866
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006867CC="$ac_save_cc"
6868fi
6869
Matthias Kloseb9621712010-04-24 17:59:49 +00006870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6871$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872fi
6873
6874if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6875then
6876# -Kthread, if available, provides the right #defines
6877# and linker options to make pthread_create available
6878# Some compilers won't report that they do not support -Kthread,
6879# so we need to run a program to see whether it really made the
6880# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6882$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006883if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006884 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885else
6886 ac_save_cc="$CC"
6887CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006888if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006889 ac_cv_kthread=no
6890else
Matthias Kloseb9621712010-04-24 17:59:49 +00006891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006892/* end confdefs.h. */
6893
Stefan Krah7dba5942012-11-22 22:49:11 +01006894#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006895#include <pthread.h>
6896
6897void* routine(void* p){return NULL;}
6898
6899int main(){
6900 pthread_t p;
6901 if(pthread_create(&p,NULL,routine,NULL)!=0)
6902 return 1;
6903 (void)pthread_detach(p);
6904 return 0;
6905}
6906
6907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006908if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006909 ac_cv_kthread=yes
6910else
Matthias Kloseb9621712010-04-24 17:59:49 +00006911 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6914 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006915fi
6916
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006917CC="$ac_save_cc"
6918fi
6919
Matthias Kloseb9621712010-04-24 17:59:49 +00006920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6921$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922fi
6923
6924if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6925then
6926# -pthread, if available, provides the right #defines
6927# and linker options to make pthread_create available
6928# Some compilers won't report that they do not support -pthread,
6929# so we need to run a program to see whether it really made the
6930# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6932$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006933if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006934 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006935else
6936 ac_save_cc="$CC"
6937CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006938if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006939 ac_cv_pthread=no
6940else
Matthias Kloseb9621712010-04-24 17:59:49 +00006941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006942/* end confdefs.h. */
6943
Stefan Krah7dba5942012-11-22 22:49:11 +01006944#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006945#include <pthread.h>
6946
6947void* routine(void* p){return NULL;}
6948
6949int main(){
6950 pthread_t p;
6951 if(pthread_create(&p,NULL,routine,NULL)!=0)
6952 return 1;
6953 (void)pthread_detach(p);
6954 return 0;
6955}
6956
6957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006958if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006959 ac_cv_pthread=yes
6960else
Matthias Kloseb9621712010-04-24 17:59:49 +00006961 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006963rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6964 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006965fi
6966
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006967CC="$ac_save_cc"
6968fi
6969
Matthias Kloseb9621712010-04-24 17:59:49 +00006970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6971$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006972fi
6973
6974# If we have set a CC compiler flag for thread support then
6975# check if it works for CXX, too.
6976ac_cv_cxx_thread=no
6977if test ! -z "$CXX"
6978then
Matthias Kloseb9621712010-04-24 17:59:49 +00006979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6980$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006981ac_save_cxx="$CXX"
6982
6983if test "$ac_cv_kpthread" = "yes"
6984then
6985 CXX="$CXX -Kpthread"
6986 ac_cv_cxx_thread=yes
6987elif test "$ac_cv_kthread" = "yes"
6988then
6989 CXX="$CXX -Kthread"
6990 ac_cv_cxx_thread=yes
6991elif test "$ac_cv_pthread" = "yes"
6992then
6993 CXX="$CXX -pthread"
6994 ac_cv_cxx_thread=yes
6995fi
6996
6997if test $ac_cv_cxx_thread = yes
6998then
6999 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7000 $CXX -c conftest.$ac_ext 2>&5
7001 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7002 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7003 then
7004 ac_cv_cxx_thread=yes
7005 else
7006 ac_cv_cxx_thread=no
7007 fi
7008 rm -fr conftest*
7009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7011$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007012fi
7013CXX="$ac_save_cxx"
7014
7015
7016# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7018$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007019if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007020 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007021else
Matthias Kloseb9621712010-04-24 17:59:49 +00007022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007023/* end confdefs.h. */
7024#include <stdlib.h>
7025#include <stdarg.h>
7026#include <string.h>
7027#include <float.h>
7028
7029int
7030main ()
7031{
7032
7033 ;
7034 return 0;
7035}
7036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007037if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007038 ac_cv_header_stdc=yes
7039else
Matthias Kloseb9621712010-04-24 17:59:49 +00007040 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007041fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7043
7044if test $ac_cv_header_stdc = yes; then
7045 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007047/* end confdefs.h. */
7048#include <string.h>
7049
7050_ACEOF
7051if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007052 $EGREP "memchr" >/dev/null 2>&1; then :
7053
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007054else
7055 ac_cv_header_stdc=no
7056fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007057rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007058
7059fi
7060
7061if test $ac_cv_header_stdc = yes; then
7062 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007064/* end confdefs.h. */
7065#include <stdlib.h>
7066
7067_ACEOF
7068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007069 $EGREP "free" >/dev/null 2>&1; then :
7070
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007071else
7072 ac_cv_header_stdc=no
7073fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007074rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007075
7076fi
7077
7078if test $ac_cv_header_stdc = yes; then
7079 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007080 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007081 :
7082else
Matthias Kloseb9621712010-04-24 17:59:49 +00007083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007084/* end confdefs.h. */
7085#include <ctype.h>
7086#include <stdlib.h>
7087#if ((' ' & 0x0FF) == 0x020)
7088# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7089# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7090#else
7091# define ISLOWER(c) \
7092 (('a' <= (c) && (c) <= 'i') \
7093 || ('j' <= (c) && (c) <= 'r') \
7094 || ('s' <= (c) && (c) <= 'z'))
7095# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7096#endif
7097
7098#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7099int
7100main ()
7101{
7102 int i;
7103 for (i = 0; i < 256; i++)
7104 if (XOR (islower (i), ISLOWER (i))
7105 || toupper (i) != TOUPPER (i))
7106 return 2;
7107 return 0;
7108}
7109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007110if ac_fn_c_try_run "$LINENO"; then :
7111
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007112else
Matthias Kloseb9621712010-04-24 17:59:49 +00007113 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007115rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7116 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007117fi
7118
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007119fi
7120fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7122$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007123if test $ac_cv_header_stdc = yes; then
7124
Matthias Kloseb9621712010-04-24 17:59:49 +00007125$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007126
7127fi
7128
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007129for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007130fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007131ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007132sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007133unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007134poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007135sys/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 +01007136sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007137sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007138sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007139sys/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 -07007140libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007141bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7142sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007143do :
7144 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7145ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007146if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007147 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007148#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007149_ACEOF
7150
7151fi
7152
Guido van Rossum627b2d71993-12-24 10:39:16 +00007153done
7154
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007155ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007156for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007157 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7159$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007160if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007161 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007162else
Matthias Kloseb9621712010-04-24 17:59:49 +00007163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007164/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007165#include <sys/types.h>
7166#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007167
Martin v. Löwis11437992002-04-12 09:54:03 +00007168int
7169main ()
7170{
7171if ((DIR *) 0)
7172return 0;
7173 ;
7174 return 0;
7175}
7176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007177if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007178 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007179else
Matthias Kloseb9621712010-04-24 17:59:49 +00007180 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007184eval ac_res=\$$as_ac_Header
7185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7186$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007187if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007188 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007189#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007190_ACEOF
7191
7192ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007193fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007194
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007195done
7196# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7197if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7199$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007200if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007201 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007202else
Martin v. Löwis11437992002-04-12 09:54:03 +00007203 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007205/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007206
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007207/* Override any GCC internal prototype to avoid an error.
7208 Use char because int might match the return type of a GCC
7209 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007210#ifdef __cplusplus
7211extern "C"
7212#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007213char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007214int
7215main ()
7216{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007217return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007218 ;
7219 return 0;
7220}
7221_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007222for ac_lib in '' dir; do
7223 if test -z "$ac_lib"; then
7224 ac_res="none required"
7225 else
7226 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007227 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007228 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007229 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007230 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007231fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007232rm -f core conftest.err conftest.$ac_objext \
7233 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007234 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007235 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007237done
Victor Stinnere0be4232011-10-25 13:06:09 +02007238if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007239
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007240else
7241 ac_cv_search_opendir=no
7242fi
7243rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007244LIBS=$ac_func_search_save_LIBS
7245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7247$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007248ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007249if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007250 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007251
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007252fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007253
Michael W. Hudson54241132001-12-07 15:38:26 +00007254else
Matthias Kloseb9621712010-04-24 17:59:49 +00007255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7256$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007257if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007258 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007259else
7260 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007262/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007263
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007264/* Override any GCC internal prototype to avoid an error.
7265 Use char because int might match the return type of a GCC
7266 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007267#ifdef __cplusplus
7268extern "C"
7269#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007270char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007271int
7272main ()
7273{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007274return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007275 ;
7276 return 0;
7277}
7278_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007279for ac_lib in '' x; do
7280 if test -z "$ac_lib"; then
7281 ac_res="none required"
7282 else
7283 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007284 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007285 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007286 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007287 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007288fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007289rm -f core conftest.err conftest.$ac_objext \
7290 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007291 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007292 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007294done
Victor Stinnere0be4232011-10-25 13:06:09 +02007295if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007296
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007297else
7298 ac_cv_search_opendir=no
7299fi
7300rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007301LIBS=$ac_func_search_save_LIBS
7302fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7304$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007305ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007306if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007307 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007308
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007309fi
7310
7311fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007312
Matthias Kloseb9621712010-04-24 17:59:49 +00007313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7314$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007315if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007316 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007317else
Matthias Kloseb9621712010-04-24 17:59:49 +00007318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007319/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007320#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007321int
7322main ()
7323{
7324return makedev(0, 0);
7325 ;
7326 return 0;
7327}
7328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007329if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007330 ac_cv_header_sys_types_h_makedev=yes
7331else
Matthias Kloseb9621712010-04-24 17:59:49 +00007332 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007333fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007334rm -f core conftest.err conftest.$ac_objext \
7335 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007336
7337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7339$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007340
7341if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007342ac_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 +02007343if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007344
Matthias Kloseb9621712010-04-24 17:59:49 +00007345$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007346
7347fi
7348
7349
7350
7351 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007352 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 +02007353if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007354
Matthias Kloseb9621712010-04-24 17:59:49 +00007355$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007356
7357fi
7358
7359
7360 fi
7361fi
7362
Michael W. Hudson54241132001-12-07 15:38:26 +00007363
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007364# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7365for ac_header in net/if.h
7366do :
7367 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7368#ifdef STDC_HEADERS
7369# include <stdlib.h>
7370# include <stddef.h>
7371#else
7372# ifdef HAVE_STDLIB_H
7373# include <stdlib.h>
7374# endif
7375#endif
7376#ifdef HAVE_SYS_SOCKET_H
7377# include <sys/socket.h>
7378#endif
7379
7380"
Victor Stinnere0be4232011-10-25 13:06:09 +02007381if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007382 cat >>confdefs.h <<_ACEOF
7383#define HAVE_NET_IF_H 1
7384_ACEOF
7385
7386fi
7387
7388done
7389
7390
Martin v. Löwis11017b12006-01-14 18:12:57 +00007391# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007392for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007393do :
7394 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 +00007395#ifdef HAVE_ASM_TYPES_H
7396#include <asm/types.h>
7397#endif
7398#ifdef HAVE_SYS_SOCKET_H
7399#include <sys/socket.h>
7400#endif
7401
Matthias Kloseb9621712010-04-24 17:59:49 +00007402"
Victor Stinnere0be4232011-10-25 13:06:09 +02007403if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007404 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007405#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007406_ACEOF
7407
7408fi
7409
7410done
7411
7412
Charles-François Natali47413c12011-10-06 19:47:44 +02007413# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007414for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007415do :
7416 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7417ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7418#ifdef HAVE_SYS_SOCKET_H
7419#include <sys/socket.h>
7420#endif
7421
7422"
7423if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7424 cat >>confdefs.h <<_ACEOF
7425#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7426_ACEOF
7427
7428fi
7429
7430done
7431
7432
Guido van Rossum627b2d71993-12-24 10:39:16 +00007433# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007434was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7436$as_echo_n "checking for clock_t in time.h... " >&6; }
7437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007438/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007439#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007440
7441_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007442if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007443 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007444 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007445else
Martin v. Löwis11437992002-04-12 09:54:03 +00007446
7447
Matthias Kloseb9621712010-04-24 17:59:49 +00007448$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007449
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007450
Guido van Rossum627b2d71993-12-24 10:39:16 +00007451fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007452rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007453
Matthias Kloseb9621712010-04-24 17:59:49 +00007454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7455$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007456
Matthias Kloseb9621712010-04-24 17:59:49 +00007457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7458$as_echo_n "checking for makedev... " >&6; }
7459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007460/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007461
Jesus Cea740f53a2010-04-28 11:35:30 +00007462#if defined(MAJOR_IN_MKDEV)
7463#include <sys/mkdev.h>
7464#elif defined(MAJOR_IN_SYSMACROS)
7465#include <sys/sysmacros.h>
7466#else
7467#include <sys/types.h>
7468#endif
7469
Neal Norwitz11690112002-07-30 01:08:28 +00007470int
7471main ()
7472{
Jesus Cea740f53a2010-04-28 11:35:30 +00007473
7474 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007475 ;
7476 return 0;
7477}
Matthias Kloseb159a552010-04-25 21:00:44 +00007478
Neal Norwitz11690112002-07-30 01:08:28 +00007479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007480if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007481 ac_cv_has_makedev=yes
7482else
Matthias Kloseb9621712010-04-24 17:59:49 +00007483 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007484fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007485rm -f core conftest.err conftest.$ac_objext \
7486 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7488$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007489if test "$ac_cv_has_makedev" = "yes"; then
7490
Matthias Kloseb9621712010-04-24 17:59:49 +00007491$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007492
7493fi
7494
Christian Heimes985ecdc2013-11-20 11:46:18 +01007495# byte swapping
7496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7497$as_echo_n "checking for le64toh... " >&6; }
7498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7499/* end confdefs.h. */
7500
7501#ifdef HAVE_ENDIAN_H
7502#include <endian.h>
7503#elif defined(HAVE_SYS_ENDIAN_H)
7504#include <sys/endian.h>
7505#endif
7506
7507int
7508main ()
7509{
7510
7511 le64toh(1)
7512 ;
7513 return 0;
7514}
7515
7516_ACEOF
7517if ac_fn_c_try_link "$LINENO"; then :
7518 ac_cv_has_le64toh=yes
7519else
7520 ac_cv_has_le64toh=no
7521fi
7522rm -f core conftest.err conftest.$ac_objext \
7523 conftest$ac_exeext conftest.$ac_ext
7524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7525$as_echo "$ac_cv_has_le64toh" >&6; }
7526if test "$ac_cv_has_le64toh" = "yes"; then
7527
7528$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7529
7530fi
7531
Martin v. Löwis399a6892002-10-04 10:22:02 +00007532# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7533# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7534# defined, but the compiler does not support pragma redefine_extname,
7535# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7536# structures (such as rlimit64) without declaring them. As a
7537# work-around, disable LFS on such configurations
7538
7539use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7541$as_echo_n "checking Solaris LFS bug... " >&6; }
7542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007543/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007544
7545#define _LARGEFILE_SOURCE 1
7546#define _FILE_OFFSET_BITS 64
7547#include <sys/resource.h>
7548
Martin v. Löwis399a6892002-10-04 10:22:02 +00007549int
7550main ()
7551{
7552struct rlimit foo;
7553 ;
7554 return 0;
7555}
7556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007557if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007558 sol_lfs_bug=no
7559else
Matthias Kloseb9621712010-04-24 17:59:49 +00007560 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7564$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007565if test "$sol_lfs_bug" = "yes"; then
7566 use_lfs=no
7567fi
7568
7569if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007570# Two defines needed to enable largefile support on various platforms
7571# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007572case $ac_sys_system/$ac_sys_release in
7573AIX*)
7574
7575$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7576
7577 ;;
7578esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007579
Matthias Kloseb9621712010-04-24 17:59:49 +00007580$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007581
7582
Matthias Kloseb9621712010-04-24 17:59:49 +00007583$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007584
Martin v. Löwis399a6892002-10-04 10:22:02 +00007585fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007586
Guido van Rossum84e7b241996-08-19 21:59:00 +00007587# Add some code to confdefs.h so that the test for off_t works on SCO
7588cat >> confdefs.h <<\EOF
7589#if defined(SCO_DS)
7590#undef _OFF_T
7591#endif
7592EOF
7593
Guido van Rossumef2255b2000-03-10 22:30:29 +00007594# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007595ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007596if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007597
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007598else
Martin v. Löwis11437992002-04-12 09:54:03 +00007599
7600cat >>confdefs.h <<_ACEOF
7601#define mode_t int
7602_ACEOF
7603
7604fi
7605
Matthias Kloseb9621712010-04-24 17:59:49 +00007606ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007607if test "x$ac_cv_type_off_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
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007612#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007613_ACEOF
7614
7615fi
7616
Matthias Kloseb9621712010-04-24 17:59:49 +00007617ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007618if test "x$ac_cv_type_pid_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
7623#define pid_t int
7624_ACEOF
7625
7626fi
7627
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007628
Martin v. Löwis11437992002-04-12 09:54:03 +00007629cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007630#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007631_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007632
Matthias Kloseb9621712010-04-24 17:59:49 +00007633ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007634if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007635
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007636else
Martin v. Löwis11437992002-04-12 09:54:03 +00007637
7638cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007639#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007640_ACEOF
7641
7642fi
7643
Matthias Kloseb9621712010-04-24 17:59:49 +00007644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7645$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007646if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007647 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007648else
Matthias Kloseb9621712010-04-24 17:59:49 +00007649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007650/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007651#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007652
7653_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007654if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007655 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007656 ac_cv_type_uid_t=yes
7657else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007658 ac_cv_type_uid_t=no
7659fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007660rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007661
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7664$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007665if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007666
Matthias Kloseb9621712010-04-24 17:59:49 +00007667$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007668
7669
Matthias Kloseb9621712010-04-24 17:59:49 +00007670$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007671
7672fi
7673
Mark Dickinson983bc162012-12-02 12:11:38 +00007674
7675# There are two separate checks for each of the exact-width integer types we
7676# need. First we check whether the type is available using the usual
7677# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7678# and <stdint.h> where available). We then also use the special type checks of
7679# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7680# directly, #define's uint32_t to be a suitable type.
7681
7682ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7683if test "x$ac_cv_type_uint32_t" = xyes; then :
7684
7685$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7686
7687fi
7688
Matthias Kloseb9621712010-04-24 17:59:49 +00007689ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7690case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007691 no|yes) ;; #(
7692 *)
7693
Matthias Kloseb9621712010-04-24 17:59:49 +00007694$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007695
7696
7697cat >>confdefs.h <<_ACEOF
7698#define uint32_t $ac_cv_c_uint32_t
7699_ACEOF
7700;;
7701 esac
7702
Mark Dickinson983bc162012-12-02 12:11:38 +00007703
7704ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7705if test "x$ac_cv_type_uint64_t" = xyes; then :
7706
7707$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7708
7709fi
7710
Matthias Kloseb9621712010-04-24 17:59:49 +00007711ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7712case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007713 no|yes) ;; #(
7714 *)
7715
Matthias Kloseb9621712010-04-24 17:59:49 +00007716$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007717
7718
7719cat >>confdefs.h <<_ACEOF
7720#define uint64_t $ac_cv_c_uint64_t
7721_ACEOF
7722;;
7723 esac
7724
Mark Dickinson983bc162012-12-02 12:11:38 +00007725
7726ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7727if test "x$ac_cv_type_int32_t" = xyes; then :
7728
7729$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7730
7731fi
7732
Matthias Kloseb9621712010-04-24 17:59:49 +00007733ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7734case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007735 no|yes) ;; #(
7736 *)
7737
7738cat >>confdefs.h <<_ACEOF
7739#define int32_t $ac_cv_c_int32_t
7740_ACEOF
7741;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007742esac
7743
Mark Dickinson983bc162012-12-02 12:11:38 +00007744
7745ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7746if test "x$ac_cv_type_int64_t" = xyes; then :
7747
7748$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7749
7750fi
7751
Matthias Kloseb9621712010-04-24 17:59:49 +00007752ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7753case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007754 no|yes) ;; #(
7755 *)
7756
7757cat >>confdefs.h <<_ACEOF
7758#define int64_t $ac_cv_c_int64_t
7759_ACEOF
7760;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007761esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007762
Mark Dickinson983bc162012-12-02 12:11:38 +00007763
Matthias Kloseb9621712010-04-24 17:59:49 +00007764ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007765if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007766
Matthias Kloseb9621712010-04-24 17:59:49 +00007767$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007768
7769fi
7770
Stefan Krah1919b7e2012-03-21 18:25:23 +01007771ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7772if test "x$ac_cv_type___uint128_t" = xyes; then :
7773
7774$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7775
7776fi
7777
Jack Jansendd19cf82001-12-06 22:36:17 +00007778
Michael W. Hudson54241132001-12-07 15:38:26 +00007779# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007780# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007781# The cast to long int works around a bug in the HP C Compiler
7782# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7783# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7784# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7786$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007787if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007788 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007789else
Matthias Kloseb9621712010-04-24 17:59:49 +00007790 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 +00007791
Martin v. Löwis11437992002-04-12 09:54:03 +00007792else
Matthias Kloseb9621712010-04-24 17:59:49 +00007793 if test "$ac_cv_type_int" = yes; then
7794 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7795$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007796as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007797See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007798 else
7799 ac_cv_sizeof_int=0
7800 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007802
Martin v. Löwis11437992002-04-12 09:54:03 +00007803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7805$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806
7807
7808
Martin v. Löwis11437992002-04-12 09:54:03 +00007809cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007810#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007811_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007812
7813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007814# The cast to long int works around a bug in the HP C Compiler
7815# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7816# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7817# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7819$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007820if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007821 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007822else
Matthias Kloseb9621712010-04-24 17:59:49 +00007823 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 +00007824
Martin v. Löwis11437992002-04-12 09:54:03 +00007825else
Matthias Kloseb9621712010-04-24 17:59:49 +00007826 if test "$ac_cv_type_long" = yes; then
7827 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7828$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007829as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007830See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831 else
7832 ac_cv_sizeof_long=0
7833 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007835
Martin v. Löwis11437992002-04-12 09:54:03 +00007836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7838$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839
7840
7841
Martin v. Löwis11437992002-04-12 09:54:03 +00007842cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007843#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007844_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007845
7846
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007847# The cast to long int works around a bug in the HP C Compiler
7848# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7849# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7850# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7852$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007853if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007854 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007855else
Matthias Kloseb9621712010-04-24 17:59:49 +00007856 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 +00007857
Martin v. Löwis11437992002-04-12 09:54:03 +00007858else
Matthias Kloseb9621712010-04-24 17:59:49 +00007859 if test "$ac_cv_type_void_p" = yes; then
7860 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007862as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007863See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007864 else
7865 ac_cv_sizeof_void_p=0
7866 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007868
Martin v. Löwis11437992002-04-12 09:54:03 +00007869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7871$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007872
7873
7874
Martin v. Löwis11437992002-04-12 09:54:03 +00007875cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007876#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007877_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007878
7879
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880# The cast to long int works around a bug in the HP C Compiler
7881# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7882# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7883# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7885$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007886if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007887 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007888else
Matthias Kloseb9621712010-04-24 17:59:49 +00007889 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 +00007890
Martin v. Löwis11437992002-04-12 09:54:03 +00007891else
Matthias Kloseb9621712010-04-24 17:59:49 +00007892 if test "$ac_cv_type_short" = yes; then
7893 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7894$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007895as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007896See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007897 else
7898 ac_cv_sizeof_short=0
7899 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007901
Martin v. Löwis11437992002-04-12 09:54:03 +00007902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7904$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007905
7906
7907
Martin v. Löwis11437992002-04-12 09:54:03 +00007908cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007909#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007910_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007911
7912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007913# The cast to long int works around a bug in the HP C Compiler
7914# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7915# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7916# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7918$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007919if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007920 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007921else
Matthias Kloseb9621712010-04-24 17:59:49 +00007922 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 +00007923
Martin v. Löwis11437992002-04-12 09:54:03 +00007924else
Matthias Kloseb9621712010-04-24 17:59:49 +00007925 if test "$ac_cv_type_float" = yes; then
7926 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7927$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007928as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007929See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007930 else
7931 ac_cv_sizeof_float=0
7932 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007934
Martin v. Löwis11437992002-04-12 09:54:03 +00007935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7937$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007938
7939
7940
Martin v. Löwis11437992002-04-12 09:54:03 +00007941cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007942#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007943_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007944
7945
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007946# The cast to long int works around a bug in the HP C Compiler
7947# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7948# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7949# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7951$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007952if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007953 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007954else
Matthias Kloseb9621712010-04-24 17:59:49 +00007955 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 +00007956
Martin v. Löwis11437992002-04-12 09:54:03 +00007957else
Matthias Kloseb9621712010-04-24 17:59:49 +00007958 if test "$ac_cv_type_double" = yes; then
7959 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7960$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007961as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007962See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007963 else
7964 ac_cv_sizeof_double=0
7965 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007967
Martin v. Löwis11437992002-04-12 09:54:03 +00007968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7970$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971
7972
7973
Martin v. Löwis11437992002-04-12 09:54:03 +00007974cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007975#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007976_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007977
7978
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007979# The cast to long int works around a bug in the HP C Compiler
7980# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7981# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7982# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7984$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007985if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007986 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007987else
Matthias Kloseb9621712010-04-24 17:59:49 +00007988 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 +00007989
Martin v. Löwis11437992002-04-12 09:54:03 +00007990else
Matthias Kloseb9621712010-04-24 17:59:49 +00007991 if test "$ac_cv_type_fpos_t" = yes; then
7992 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7993$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007994as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007995See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996 else
7997 ac_cv_sizeof_fpos_t=0
7998 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008000
Martin v. Löwis11437992002-04-12 09:54:03 +00008001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8003$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008004
8005
8006
Martin v. Löwis11437992002-04-12 09:54:03 +00008007cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008008#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008009_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008010
Michael W. Hudson54241132001-12-07 15:38:26 +00008011
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008012# The cast to long int works around a bug in the HP C Compiler
8013# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8014# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8015# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8017$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008018if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008019 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008020else
Matthias Kloseb9621712010-04-24 17:59:49 +00008021 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 +00008022
Martin v. Löwis18e16552006-02-15 17:27:45 +00008023else
Matthias Kloseb9621712010-04-24 17:59:49 +00008024 if test "$ac_cv_type_size_t" = yes; then
8025 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8026$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008027as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008028See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008029 else
8030 ac_cv_sizeof_size_t=0
8031 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008032fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008033
Martin v. Löwis18e16552006-02-15 17:27:45 +00008034fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8036$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008037
8038
8039
Martin v. Löwis18e16552006-02-15 17:27:45 +00008040cat >>confdefs.h <<_ACEOF
8041#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8042_ACEOF
8043
8044
Christian Heimes400adb02008-02-01 08:12:03 +00008045# The cast to long int works around a bug in the HP C Compiler
8046# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8047# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8048# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8050$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008051if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008052 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008053else
Matthias Kloseb9621712010-04-24 17:59:49 +00008054 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 +00008055
Christian Heimes400adb02008-02-01 08:12:03 +00008056else
Matthias Kloseb9621712010-04-24 17:59:49 +00008057 if test "$ac_cv_type_pid_t" = yes; then
8058 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8059$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008060as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008061See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008062 else
8063 ac_cv_sizeof_pid_t=0
8064 fi
8065fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008066
Christian Heimes400adb02008-02-01 08:12:03 +00008067fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8069$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008070
8071
8072
8073cat >>confdefs.h <<_ACEOF
8074#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8075_ACEOF
8076
8077
Michael W. Hudson54241132001-12-07 15:38:26 +00008078
Matthias Kloseb9621712010-04-24 17:59:49 +00008079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8080$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008081have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008083/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008084
Martin v. Löwis11437992002-04-12 09:54:03 +00008085int
8086main ()
8087{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008088long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008089 ;
8090 return 0;
8091}
8092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008093if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008094
8095
Matthias Kloseb9621712010-04-24 17:59:49 +00008096$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008097
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008098 have_long_long=yes
8099
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8103$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008104if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008105# The cast to long int works around a bug in the HP C Compiler
8106# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8107# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8108# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8110$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008111if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008112 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008113else
Matthias Kloseb9621712010-04-24 17:59:49 +00008114 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 +00008115
Martin v. Löwis11437992002-04-12 09:54:03 +00008116else
Matthias Kloseb9621712010-04-24 17:59:49 +00008117 if test "$ac_cv_type_long_long" = yes; then
8118 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8119$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008120as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008121See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008122 else
8123 ac_cv_sizeof_long_long=0
8124 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008125fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008126
Martin v. Löwis11437992002-04-12 09:54:03 +00008127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8129$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008130
8131
8132
Martin v. Löwis11437992002-04-12 09:54:03 +00008133cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008134#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008135_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008136
Michael W. Hudson54241132001-12-07 15:38:26 +00008137
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008138fi
8139
Matthias Kloseb9621712010-04-24 17:59:49 +00008140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8141$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008142have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008144/* end confdefs.h. */
8145
8146int
8147main ()
8148{
8149long double x; x = (long double)0;
8150 ;
8151 return 0;
8152}
8153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008154if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008155
8156
Matthias Kloseb9621712010-04-24 17:59:49 +00008157$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008158
8159 have_long_double=yes
8160
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008161fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8164$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008165if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008166# The cast to long int works around a bug in the HP C Compiler
8167# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8168# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8169# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8171$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008172if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008173 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008174else
Matthias Kloseb9621712010-04-24 17:59:49 +00008175 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 +00008176
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008177else
Matthias Kloseb9621712010-04-24 17:59:49 +00008178 if test "$ac_cv_type_long_double" = yes; then
8179 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8180$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008181as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008182See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008183 else
8184 ac_cv_sizeof_long_double=0
8185 fi
8186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008187
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8190$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008191
8192
8193
8194cat >>confdefs.h <<_ACEOF
8195#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8196_ACEOF
8197
8198
8199fi
8200
8201
Matthias Kloseb9621712010-04-24 17:59:49 +00008202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8203$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008204have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008206/* end confdefs.h. */
8207
8208int
8209main ()
8210{
8211_Bool x; x = (_Bool)0;
8212 ;
8213 return 0;
8214}
8215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008216if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008217
8218
Matthias Kloseb9621712010-04-24 17:59:49 +00008219$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008220
8221 have_c99_bool=yes
8222
Thomas Woutersb2137042007-02-01 18:02:27 +00008223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8226$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008227if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008228# The cast to long int works around a bug in the HP C Compiler
8229# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8230# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8231# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8233$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008234if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008235 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008236else
Matthias Kloseb9621712010-04-24 17:59:49 +00008237 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 +00008238
Thomas Woutersb2137042007-02-01 18:02:27 +00008239else
Matthias Kloseb9621712010-04-24 17:59:49 +00008240 if test "$ac_cv_type__Bool" = yes; then
8241 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8242$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008243as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008244See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008245 else
8246 ac_cv_sizeof__Bool=0
8247 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008249
Thomas Woutersb2137042007-02-01 18:02:27 +00008250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8252$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008253
8254
8255
Thomas Woutersb2137042007-02-01 18:02:27 +00008256cat >>confdefs.h <<_ACEOF
8257#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8258_ACEOF
8259
8260
8261fi
8262
Matthias Kloseb9621712010-04-24 17:59:49 +00008263ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008264 #include <stdint.h>
8265 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008266 #ifdef HAVE_INTTYPES_H
8267 #include <inttypes.h>
8268 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008269"
Victor Stinnere0be4232011-10-25 13:06:09 +02008270if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008271
8272cat >>confdefs.h <<_ACEOF
8273#define HAVE_UINTPTR_T 1
8274_ACEOF
8275
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008276# The cast to long int works around a bug in the HP C Compiler
8277# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8278# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8279# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8281$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008282if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008283 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008284else
Matthias Kloseb9621712010-04-24 17:59:49 +00008285 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 +00008286
Martin v. Löwis11437992002-04-12 09:54:03 +00008287else
Matthias Kloseb9621712010-04-24 17:59:49 +00008288 if test "$ac_cv_type_uintptr_t" = yes; then
8289 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8290$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008291as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008292See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008293 else
8294 ac_cv_sizeof_uintptr_t=0
8295 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008296fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008297
Martin v. Löwis11437992002-04-12 09:54:03 +00008298fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8300$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008301
8302
8303
Martin v. Löwis11437992002-04-12 09:54:03 +00008304cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008305#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008306_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008307
Michael W. Hudson54241132001-12-07 15:38:26 +00008308
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008309fi
8310
Thomas Wouters89f507f2006-12-13 04:49:30 +00008311
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008312# The cast to long int works around a bug in the HP C Compiler
8313# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8314# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8315# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8317$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008318if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008319 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008320else
Matthias Kloseb9621712010-04-24 17:59:49 +00008321 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008322#ifdef HAVE_SYS_TYPES_H
8323#include <sys/types.h>
8324#endif
8325
Matthias Kloseb9621712010-04-24 17:59:49 +00008326"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008327
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008328else
Matthias Kloseb9621712010-04-24 17:59:49 +00008329 if test "$ac_cv_type_off_t" = yes; then
8330 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8331$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008332as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008333See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008334 else
8335 ac_cv_sizeof_off_t=0
8336 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008338
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008339fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8341$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008342
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008343
8344
Martin v. Löwis11437992002-04-12 09:54:03 +00008345cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008346#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008347_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008348
Michael W. Hudson54241132001-12-07 15:38:26 +00008349
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008350
Matthias Kloseb9621712010-04-24 17:59:49 +00008351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8352$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008353if test "$have_long_long" = yes
8354then
8355if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008356 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008357
Matthias Kloseb9621712010-04-24 17:59:49 +00008358$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008359
Matthias Kloseb9621712010-04-24 17:59:49 +00008360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8361$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008362else
Matthias Kloseb9621712010-04-24 17:59:49 +00008363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8364$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008365fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008366else
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8368$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008369fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008370
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008371# The cast to long int works around a bug in the HP C Compiler
8372# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8373# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8374# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8376$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008377if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008378 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008379else
Matthias Kloseb9621712010-04-24 17:59:49 +00008380 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008381#ifdef HAVE_SYS_TYPES_H
8382#include <sys/types.h>
8383#endif
8384#ifdef HAVE_TIME_H
8385#include <time.h>
8386#endif
8387
Matthias Kloseb9621712010-04-24 17:59:49 +00008388"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008389
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008390else
Matthias Kloseb9621712010-04-24 17:59:49 +00008391 if test "$ac_cv_type_time_t" = yes; then
8392 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8393$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008394as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008395See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008396 else
8397 ac_cv_sizeof_time_t=0
8398 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008399fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008400
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008401fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8403$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008404
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008405
8406
Martin v. Löwis11437992002-04-12 09:54:03 +00008407cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008408#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008409_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008410
Michael W. Hudson54241132001-12-07 15:38:26 +00008411
8412
Trent Mick635f6fb2000-08-23 21:33:05 +00008413# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008414ac_save_cc="$CC"
8415if test "$ac_cv_kpthread" = "yes"
8416then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008417elif test "$ac_cv_kthread" = "yes"
8418then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008419elif test "$ac_cv_pthread" = "yes"
8420then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008421fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008422
Matthias Kloseb9621712010-04-24 17:59:49 +00008423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8424$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008425have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008427/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008428
8429 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008430int
8431main ()
8432{
Guido van Rossum12580492000-09-24 16:47:19 +00008433pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008434 ;
8435 return 0;
8436}
Matthias Kloseb159a552010-04-25 21:00:44 +00008437
Martin v. Löwis11437992002-04-12 09:54:03 +00008438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008439if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008440 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8444$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008445if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008446 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008447# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8448# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8449# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8451$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008452if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008453 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008454else
Matthias Kloseb9621712010-04-24 17:59:49 +00008455 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008456#ifdef HAVE_PTHREAD_H
8457#include <pthread.h>
8458#endif
8459
Matthias Kloseb9621712010-04-24 17:59:49 +00008460"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008461
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008462else
Matthias Kloseb9621712010-04-24 17:59:49 +00008463 if test "$ac_cv_type_pthread_t" = yes; then
8464 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8465$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008466as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008467See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008468 else
8469 ac_cv_sizeof_pthread_t=0
8470 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008471fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008472
Trent Mick635f6fb2000-08-23 21:33:05 +00008473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8475$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008476
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008477
8478
Martin v. Löwis11437992002-04-12 09:54:03 +00008479cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008480#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008481_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008482
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008483
Trent Mick635f6fb2000-08-23 21:33:05 +00008484fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008485CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008486
Michael W. Hudson54241132001-12-07 15:38:26 +00008487
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008488case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008489 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008490 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8491 ;;
8492 Darwin/*)
8493 OTHER_LIBTOOL_OPT=""
8494 ;;
8495esac
8496
8497
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008498
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008499case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008500 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008501 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8502 if test "${enable_universalsdk}"; then
8503 :
8504 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008505 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008506 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008507 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008508 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008509 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008510 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008511 if test ${gcc_version} '<' 4.0
8512 then
8513 LIBTOOL_CRUFT="-lcc_dynamic"
8514 else
8515 LIBTOOL_CRUFT=""
8516 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008517 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008518 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008519else
Matthias Kloseb9621712010-04-24 17:59:49 +00008520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008521/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008522
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008523 #include <unistd.h>
8524 int main(int argc, char*argv[])
8525 {
8526 if (sizeof(long) == 4) {
8527 return 0;
8528 } else {
8529 return 1;
8530 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008531 }
8532
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008534if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008535 ac_osx_32bit=yes
8536else
Matthias Kloseb9621712010-04-24 17:59:49 +00008537 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008538fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8540 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008541fi
8542
8543
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008544 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008545 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008546 i386)
8547 MACOSX_DEFAULT_ARCH="i386"
8548 ;;
8549 ppc)
8550 MACOSX_DEFAULT_ARCH="ppc"
8551 ;;
8552 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008553 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008554 ;;
8555 esac
8556 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008557 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008558 i386)
8559 MACOSX_DEFAULT_ARCH="x86_64"
8560 ;;
8561 ppc)
8562 MACOSX_DEFAULT_ARCH="ppc64"
8563 ;;
8564 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008565 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008566 ;;
8567 esac
8568
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008569 fi
8570
8571 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008572 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008573 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008574esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8576$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008577if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008578then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008579 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008580 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008581 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008582
Matthias Kloseb9621712010-04-24 17:59:49 +00008583$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008584
Matthias Kloseb9621712010-04-24 17:59:49 +00008585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8586$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008587 if test $enable_shared = "yes"
8588 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008589 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 +00008590 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008591else
Matthias Kloseb9621712010-04-24 17:59:49 +00008592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8593$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008594fi
8595
Matthias Kloseb9621712010-04-24 17:59:49 +00008596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8597$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008598case $ac_sys_system/$ac_sys_release in
8599 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008600
Matthias Kloseb9621712010-04-24 17:59:49 +00008601$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008602
Matthias Kloseb9621712010-04-24 17:59:49 +00008603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8604$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008605 ;;
8606 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8608$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008609 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008610esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008611
Guido van Rossum0a516c91994-09-12 10:58:40 +00008612# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008613
Michael W. Hudson54241132001-12-07 15:38:26 +00008614
8615
8616
8617
Benjamin Peterson99f03762010-04-11 22:15:28 +00008618
Thomas Wouters477c8d52006-05-27 19:21:47 +00008619
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008620# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8621# -- usually .so, .sl on HP-UX, .dll on Cygwin
8622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8623$as_echo_n "checking the extension of shared libraries... " >&6; }
8624if test -z "$SHLIB_SUFFIX"; then
8625 case $ac_sys_system in
8626 hp*|HP*)
8627 case `uname -m` in
8628 ia64) SHLIB_SUFFIX=.so;;
8629 *) SHLIB_SUFFIX=.sl;;
8630 esac
8631 ;;
8632 CYGWIN*) SHLIB_SUFFIX=.dll;;
8633 *) SHLIB_SUFFIX=.so;;
8634 esac
8635fi
8636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8637$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008638
Guido van Rossum0a516c91994-09-12 10:58:40 +00008639# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008640# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008641# (Shared libraries in this instance are shared modules to be loaded into
8642# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8644$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008645if test -z "$LDSHARED"
8646then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008647 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008648 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008649 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008650 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008651 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008652 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008653 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008654 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008655 if test "$GCC" = "yes" ; then
8656 LDSHARED='$(CC) -shared'
8657 LDCXXSHARED='$(CXX) -shared'
8658 else
8659 LDSHARED='$(CC) -G'
8660 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008661 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008662 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008663 if test "$GCC" = "yes" ; then
8664 LDSHARED='$(CC) -shared'
8665 LDCXXSHARED='$(CXX) -shared'
8666 else
8667 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008668 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008669 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008670 LDSHARED='$(CC) -bundle'
8671 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008672 if test "$enable_framework" ; then
8673 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008674 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8675 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008676 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008677 else
8678 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008679 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008680 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008681 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008682 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008683 LDSHARED='$(CC) -bundle'
8684 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008685 if test "$enable_framework" ; then
8686 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008687 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8688 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008689 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008690 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008691 # No framework, use the Python app as bundle-loader
8692 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008693 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008694 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008695 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008696 Darwin/*)
8697 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8698 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008699
Ned Deily36820b62014-06-25 13:44:22 -07008700 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8701 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8702 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8703 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8704 if test ${dep_target_major} -eq 10 && \
8705 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008706 then
Ned Deily36820b62014-06-25 13:44:22 -07008707 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008708 LDSHARED='$(CC) -bundle'
8709 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008710 if test "$enable_framework" ; then
8711 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008712 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8713 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008714 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008715 else
8716 # No framework, use the Python app as bundle-loader
8717 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8718 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008719 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008720 fi
Ned Deily36820b62014-06-25 13:44:22 -07008721 else
8722 # building for OS X 10.3 and later
8723 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8724 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8725 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008726 fi
8727 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008728 Linux*|GNU*|QNX*)
8729 LDSHARED='$(CC) -shared'
8730 LDCXXSHARED='$(CXX) -shared';;
8731 BSD/OS*/4*)
8732 LDSHARED="gcc -shared"
8733 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008734 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008735 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008736 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008737 LDSHARED='$(CC) -shared'
8738 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008739 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008740 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008741 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008742 OpenBSD*)
8743 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8744 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008745 LDSHARED='$(CC) -shared $(CCSHARED)'
8746 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008747 else
8748 case `uname -r` in
8749 [01].* | 2.[0-7] | 2.[0-7].*)
8750 LDSHARED="ld -Bshareable ${LDFLAGS}"
8751 ;;
8752 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008753 LDSHARED='$(CC) -shared $(CCSHARED)'
8754 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008755 ;;
8756 esac
8757 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008758 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008759 LDSHARED='$(CC) -shared'
8760 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008761 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008762 if test "$GCC" = "yes" ; then
8763 LDSHARED='$(CC) -shared'
8764 LDCXXSHARED='$(CXX) -shared'
8765 else
8766 LDSHARED='$(CC) -G'
8767 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008768 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008769 SCO_SV*)
8770 LDSHARED='$(CC) -Wl,-G,-Bexport'
8771 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8772 CYGWIN*)
8773 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8774 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008775 *) LDSHARED="ld";;
8776 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8779$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008780LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008781BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008782# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008783# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8785$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008786if test -z "$CCSHARED"
8787then
Guido van Rossum07397971997-04-29 21:49:50 +00008788 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008789 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008790 then CCSHARED="-fPIC";
8791 elif test `uname -p` = sparc;
8792 then CCSHARED="-xcode=pic32";
8793 else CCSHARED="-Kpic";
8794 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008795 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008796 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008797 else CCSHARED="+z";
8798 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008799 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008800 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008801 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008802 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008803 if test "$GCC" = "yes"
8804 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008805 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008806 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008807 SCO_SV*)
8808 if test "$GCC" = "yes"
8809 then CCSHARED="-fPIC"
8810 else CCSHARED="-Kpic -belf"
8811 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008812 IRIX*/6*) case $CC in
8813 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008814 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008815 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008816 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8819$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008820# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008821# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8823$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008824if test -z "$LINKFORSHARED"
8825then
Guido van Rossum07397971997-04-29 21:49:50 +00008826 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008827 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008828 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008829 LINKFORSHARED="-Wl,-E -Wl,+s";;
8830# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008831 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008832 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008833 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008834 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008835 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008836
8837 # Issue #18075: the default maximum stack size (8MBytes) is too
8838 # small for the default recursion limit. Increase the stack size
8839 # to ensure that tests don't crash
8840 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8841
Jack Jansene578a632001-08-15 01:27:14 +00008842 if test "$enable_framework"
8843 then
Jack Jansenda49e192005-01-07 13:08:22 +00008844 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008845 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008846 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008847 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008848 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008849 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008850 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008851 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8852 then
8853 LINKFORSHARED="-Wl,--export-dynamic"
8854 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008855 SunOS/5*) case $CC in
8856 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008857 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008858 then
8859 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008860 fi;;
8861 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008862 CYGWIN*)
8863 if test $enable_shared = "no"
8864 then
8865 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8866 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008867 QNX*)
8868 # -Wl,-E causes the symbols to be added to the dynamic
8869 # symbol table so that they can be found when a module
8870 # is loaded. -N 2048K causes the stack size to be set
8871 # to 2048 kilobytes so that the stack doesn't overflow
8872 # when running test_compile.py.
8873 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008874 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008875fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8877$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008878
Michael W. Hudson54241132001-12-07 15:38:26 +00008879
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008880
Matthias Kloseb9621712010-04-24 17:59:49 +00008881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8882$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008883if test ! "$LIBRARY" = "$LDLIBRARY"
8884then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008885 case $ac_sys_system in
8886 CYGWIN*)
8887 # Cygwin needs CCSHARED when building extension DLLs
8888 # but not when building the interpreter DLL.
8889 CFLAGSFORSHARED='';;
8890 *)
8891 CFLAGSFORSHARED='$(CCSHARED)'
8892 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8895$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008896
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008897# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8898# library (with --enable-shared).
8899# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008900# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8901# if it is not required, since it creates a dependency of the shared library
8902# to LIBS. This, in turn, means that applications linking the shared libpython
8903# don't need to link LIBS explicitly. The default should be only changed
8904# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008905
Matthias Kloseb9621712010-04-24 17:59:49 +00008906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8907$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008908case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008909 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008910 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008911esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8913$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008914
8915
Guido van Rossum627b2d71993-12-24 10:39:16 +00008916# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8918$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008919if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008920 $as_echo_n "(cached) " >&6
8921else
8922 ac_check_lib_save_LIBS=$LIBS
8923LIBS="-lsendfile $LIBS"
8924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8925/* end confdefs.h. */
8926
8927/* Override any GCC internal prototype to avoid an error.
8928 Use char because int might match the return type of a GCC
8929 builtin and then its argument prototype would still apply. */
8930#ifdef __cplusplus
8931extern "C"
8932#endif
8933char sendfile ();
8934int
8935main ()
8936{
8937return sendfile ();
8938 ;
8939 return 0;
8940}
8941_ACEOF
8942if ac_fn_c_try_link "$LINENO"; then :
8943 ac_cv_lib_sendfile_sendfile=yes
8944else
8945 ac_cv_lib_sendfile_sendfile=no
8946fi
8947rm -f core conftest.err conftest.$ac_objext \
8948 conftest$ac_exeext conftest.$ac_ext
8949LIBS=$ac_check_lib_save_LIBS
8950fi
8951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8952$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008953if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008954 cat >>confdefs.h <<_ACEOF
8955#define HAVE_LIBSENDFILE 1
8956_ACEOF
8957
8958 LIBS="-lsendfile $LIBS"
8959
8960fi
8961
Matthias Kloseb9621712010-04-24 17:59:49 +00008962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8963$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008964if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008965 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008966else
Martin v. Löwis11437992002-04-12 09:54:03 +00008967 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008968LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008971
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008972/* Override any GCC internal prototype to avoid an error.
8973 Use char because int might match the return type of a GCC
8974 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008975#ifdef __cplusplus
8976extern "C"
8977#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008978char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008979int
8980main ()
8981{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008982return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008983 ;
8984 return 0;
8985}
8986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008987if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008988 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008989else
Matthias Kloseb9621712010-04-24 17:59:49 +00008990 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008992rm -f core conftest.err conftest.$ac_objext \
8993 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008994LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8997$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008998if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008999 cat >>confdefs.h <<_ACEOF
9000#define HAVE_LIBDL 1
9001_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009002
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009003 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009004
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009005fi
9006 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9008$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009009if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009010 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009011else
Martin v. Löwis11437992002-04-12 09:54:03 +00009012 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009013LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009016
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009017/* Override any GCC internal prototype to avoid an error.
9018 Use char because int might match the return type of a GCC
9019 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009020#ifdef __cplusplus
9021extern "C"
9022#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009023char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009024int
9025main ()
9026{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009027return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009028 ;
9029 return 0;
9030}
9031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009032if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009033 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009034else
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009037rm -f core conftest.err conftest.$ac_objext \
9038 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009039LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9042$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009043if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009044 cat >>confdefs.h <<_ACEOF
9045#define HAVE_LIBDLD 1
9046_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009047
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009048 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009049
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009050fi
9051 # Dynamic linking for HP-UX
Victor Stinnerbeeb5122014-11-28 13:28:25 +01009052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
9053$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
9054if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
9055 $as_echo_n "(cached) " >&6
9056else
9057 ac_check_lib_save_LIBS=$LIBS
9058LIBS="-lcrypto $LIBS"
9059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9060/* end confdefs.h. */
9061
9062/* Override any GCC internal prototype to avoid an error.
9063 Use char because int might match the return type of a GCC
9064 builtin and then its argument prototype would still apply. */
9065#ifdef __cplusplus
9066extern "C"
9067#endif
9068char RAND_egd ();
9069int
9070main ()
9071{
9072return RAND_egd ();
9073 ;
9074 return 0;
9075}
9076_ACEOF
9077if ac_fn_c_try_link "$LINENO"; then :
9078 ac_cv_lib_crypto_RAND_egd=yes
9079else
9080 ac_cv_lib_crypto_RAND_egd=no
9081fi
9082rm -f core conftest.err conftest.$ac_objext \
9083 conftest$ac_exeext conftest.$ac_ext
9084LIBS=$ac_check_lib_save_LIBS
9085fi
9086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
9087$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
9088if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
9089
9090$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
9091
9092fi
9093
Martin v. Löwis519adae2003-09-20 10:47:47 +00009094
Georg Brandlb1441c72009-01-03 22:33:39 +00009095# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009096if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9098$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009099if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009100 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009101else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009102 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009105
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009106/* Override any GCC internal prototype to avoid an error.
9107 Use char because int might match the return type of a GCC
9108 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009109#ifdef __cplusplus
9110extern "C"
9111#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009112char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009113int
9114main ()
9115{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009116return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009117 ;
9118 return 0;
9119}
9120_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009121for ac_lib in '' pthread rt posix4; do
9122 if test -z "$ac_lib"; then
9123 ac_res="none required"
9124 else
9125 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009126 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009127 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009128 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009129 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009130fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009131rm -f core conftest.err conftest.$ac_objext \
9132 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009133 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009134 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009136done
Victor Stinnere0be4232011-10-25 13:06:09 +02009137if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009138
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009139else
9140 ac_cv_search_sem_init=no
9141fi
9142rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009143LIBS=$ac_func_search_save_LIBS
9144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9146$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009147ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009148if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009149 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009150
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009151fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009152 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009153 # posix4 on Solaris 2.6
9154 # pthread (first!) on Linux
9155fi
9156
Martin v. Löwis19d17342003-06-14 21:03:05 +00009157# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9159$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009160if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009161 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009162else
9163 ac_check_lib_save_LIBS=$LIBS
9164LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009166/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009167
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009168/* Override any GCC internal prototype to avoid an error.
9169 Use char because int might match the return type of a GCC
9170 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009171#ifdef __cplusplus
9172extern "C"
9173#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009174char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009175int
9176main ()
9177{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009178return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009179 ;
9180 return 0;
9181}
9182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009183if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009184 ac_cv_lib_intl_textdomain=yes
9185else
Matthias Kloseb9621712010-04-24 17:59:49 +00009186 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009187fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009188rm -f core conftest.err conftest.$ac_objext \
9189 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009190LIBS=$ac_check_lib_save_LIBS
9191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9193$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009194if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009195
Matthias Kloseb9621712010-04-24 17:59:49 +00009196$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009197
Brett Cannonc6d936e2009-06-07 20:09:53 +00009198 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009199fi
9200
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009201
9202# checks for system dependent C++ extensions support
9203case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009204 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9205$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009207/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009208
Georg Brandl59e87bd2011-02-15 19:48:59 +00009209 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009210int
9211main ()
9212{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009213loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009214 ;
9215 return 0;
9216}
Matthias Kloseb159a552010-04-25 21:00:44 +00009217
Martin v. Löwis11437992002-04-12 09:54:03 +00009218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009219if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009220
Matthias Kloseb159a552010-04-25 21:00:44 +00009221
Matthias Kloseb9621712010-04-24 17:59:49 +00009222$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009223
Matthias Kloseb159a552010-04-25 21:00:44 +00009224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009225$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009226
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009227else
Matthias Kloseb159a552010-04-25 21:00:44 +00009228
9229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009230$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009231
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009232fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009233rm -f core conftest.err conftest.$ac_objext \
9234 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009235 *) ;;
9236esac
9237
Christian Heimes985ecdc2013-11-20 11:46:18 +01009238# check for systems that require aligned memory access
9239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9240$as_echo_n "checking aligned memory access is required... " >&6; }
9241if test "$cross_compiling" = yes; then :
9242 aligned_required=yes
9243else
9244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9245/* end confdefs.h. */
9246
9247int main()
9248{
9249 char s[16];
9250 int i, *p1, *p2;
9251 for (i=0; i < 16; i++)
9252 s[i] = i;
9253 p1 = (int*)(s+1);
9254 p2 = (int*)(s+2);
9255 if (*p1 == *p2)
9256 return 1;
9257 return 0;
9258}
9259
9260_ACEOF
9261if ac_fn_c_try_run "$LINENO"; then :
9262 aligned_required=no
9263else
9264 aligned_required=yes
9265fi
9266rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9267 conftest.$ac_objext conftest.beam conftest.$ac_ext
9268fi
9269
9270
9271if test "$aligned_required" = yes ; then
9272
9273$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9274
9275fi
9276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9277$as_echo "$aligned_required" >&6; }
9278
9279
9280# str, bytes and memoryview hash algorithm
9281
9282
9283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9284$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9285
9286# Check whether --with-hash_algorithm was given.
9287if test "${with_hash_algorithm+set}" = set; then :
9288 withval=$with_hash_algorithm;
9289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9290$as_echo "$withval" >&6; }
9291case "$withval" in
9292 siphash24)
9293 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9294
9295 ;;
9296 fnv)
9297 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9298
9299 ;;
9300 *)
9301 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9302 ;;
9303esac
9304
9305else
9306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9307$as_echo "default" >&6; }
9308fi
9309
9310
Charles-François Natalid30b0222014-05-08 23:08:51 +01009311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9312$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9313
9314# Check whether --with-address_sanitizer was given.
9315if test "${with_address_sanitizer+set}" = set; then :
9316 withval=$with_address_sanitizer;
9317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9318$as_echo "$withval" >&6; }
9319BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9320LDFLAGS="-fsanitize=address $LDFLAGS"
9321
9322else
9323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9324$as_echo "no" >&6; }
9325fi
9326
9327
Guido van Rossum70c7f481998-03-26 18:44:10 +00009328# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9330$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009331if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009332 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009333else
Martin v. Löwis11437992002-04-12 09:54:03 +00009334 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009335LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009338
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009339/* Override any GCC internal prototype to avoid an error.
9340 Use char because int might match the return type of a GCC
9341 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009342#ifdef __cplusplus
9343extern "C"
9344#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009345char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009346int
9347main ()
9348{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009349return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009350 ;
9351 return 0;
9352}
9353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009354if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009355 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009356else
Matthias Kloseb9621712010-04-24 17:59:49 +00009357 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009358fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009359rm -f core conftest.err conftest.$ac_objext \
9360 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009361LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009362fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9364$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009365if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009366 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009367fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009368 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9370$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009371if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009372 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009373else
Martin v. Löwis11437992002-04-12 09:54:03 +00009374 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009375LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009377/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009378
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009379/* Override any GCC internal prototype to avoid an error.
9380 Use char because int might match the return type of a GCC
9381 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009382#ifdef __cplusplus
9383extern "C"
9384#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009385char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009386int
9387main ()
9388{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009389return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009390 ;
9391 return 0;
9392}
9393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009394if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009395 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009396else
Matthias Kloseb9621712010-04-24 17:59:49 +00009397 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009398fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009399rm -f core conftest.err conftest.$ac_objext \
9400 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009401LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009402fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9404$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009405if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009406 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009407fi
9408 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009409
Matthias Kloseb9621712010-04-24 17:59:49 +00009410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9411$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009412
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009413# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009414if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009415 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9417$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009418LIBS="$withval $LIBS"
9419
9420else
Matthias Kloseb9621712010-04-24 17:59:49 +00009421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9422$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009423fi
9424
Guido van Rossum7f43da71994-08-01 12:15:30 +00009425
Victor Stinner9eb57c52015-03-19 22:21:49 +01009426PKG_PROG_PKG_CONFIG
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009427
9428# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9430$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009431
9432# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009433if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009434 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009435else
9436 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009437fi
9438
9439
Matthias Kloseb9621712010-04-24 17:59:49 +00009440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9441$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009442
9443# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9445$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009446
9447# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009448if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009449 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009450else
9451 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009452fi
9453
9454
9455if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009456 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9457else
9458 LIBFFI_INCLUDEDIR=""
9459fi
9460
9461
Matthias Kloseb9621712010-04-24 17:59:49 +00009462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9463$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009464
Stefan Krah60187b52012-03-23 19:06:27 +01009465# Check for use of the system libmpdec library
9466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9467$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9468
9469# Check whether --with-system_libmpdec was given.
9470if test "${with_system_libmpdec+set}" = set; then :
9471 withval=$with_system_libmpdec;
9472else
9473 with_system_libmpdec="no"
9474fi
9475
9476
9477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9478$as_echo "$with_system_libmpdec" >&6; }
9479
Benjamin Peterson076ed002010-10-31 17:11:02 +00009480# Check for support for loadable sqlite extensions
9481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9482$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9483# Check whether --enable-loadable-sqlite-extensions was given.
9484if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9485 enableval=$enable_loadable_sqlite_extensions;
9486else
9487 enable_loadable_sqlite_extensions="no"
9488fi
9489
9490
9491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9492$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9493
Ned Deilyd819b932013-09-06 01:07:05 -07009494# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9495
9496
9497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9498$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9499
9500# Check whether --with-tcltk-includes was given.
9501if test "${with_tcltk_includes+set}" = set; then :
9502 withval=$with_tcltk_includes;
9503else
9504 with_tcltk_includes="default"
9505fi
9506
9507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9508$as_echo "$with_tcltk_includes" >&6; }
9509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9510$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9511
9512# Check whether --with-tcltk-libs was given.
9513if test "${with_tcltk_libs+set}" = set; then :
9514 withval=$with_tcltk_libs;
9515else
9516 with_tcltk_libs="default"
9517fi
9518
9519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9520$as_echo "$with_tcltk_libs" >&6; }
9521if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9522then
9523 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9524 then
9525 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9526 fi
9527 TCLTK_INCLUDES=""
9528 TCLTK_LIBS=""
9529else
9530 TCLTK_INCLUDES="$with_tcltk_includes"
9531 TCLTK_LIBS="$with_tcltk_libs"
9532fi
9533
Matthias Klose55708cc2009-04-30 08:06:49 +00009534# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9536$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009537
9538# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009539if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009540 withval=$with_dbmliborder;
9541if test x$with_dbmliborder = xyes
9542then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009543as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009544else
9545 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9546 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9547 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009548 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009549 fi
9550 done
9551fi
9552fi
9553
Matthias Kloseb9621712010-04-24 17:59:49 +00009554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9555$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009556
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009557# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009558
9559
Matthias Kloseb9621712010-04-24 17:59:49 +00009560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9561$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009562
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009563# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009564if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009565 withval=$with_signal_module;
9566fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009567
9568
9569if test -z "$with_signal_module"
9570then with_signal_module="yes"
9571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9573$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009574
9575if test "${with_signal_module}" = "yes"; then
9576 USE_SIGNAL_MODULE=""
9577 SIGNAL_OBJS=""
9578else
9579 USE_SIGNAL_MODULE="#"
9580 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9581fi
9582
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009583# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009584
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009585USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009586
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009587
Martin v. Löwis11437992002-04-12 09:54:03 +00009588
9589# Templates for things AC_DEFINEd more than once.
9590# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009591
9592
Martin v. Löwis11437992002-04-12 09:54:03 +00009593
Matthias Kloseb9621712010-04-24 17:59:49 +00009594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9595$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009596
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009597# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009598if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009599 withval=$with_threads;
9600fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009601
9602
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009603# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009604
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009606if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009607 withval=$with_thread; with_threads=$with_thread
9608fi
9609
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009610
9611if test -z "$with_threads"
9612then with_threads="yes"
9613fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9615$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009616
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009617
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009618if test "$with_threads" = "no"
9619then
9620 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009621elif test "$ac_cv_pthread_is_default" = yes
9622then
Matthias Kloseb9621712010-04-24 17:59:49 +00009623 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009624
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009625 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009626 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009627
9628 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009629 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009630elif test "$ac_cv_kpthread" = "yes"
9631then
9632 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009633 if test "$ac_cv_cxx_thread" = "yes"; then
9634 CXX="$CXX -Kpthread"
9635 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009636 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009637
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009638 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009639 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009640elif test "$ac_cv_kthread" = "yes"
9641then
9642 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009643 if test "$ac_cv_cxx_thread" = "yes"; then
9644 CXX="$CXX -Kthread"
9645 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009646 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009647
9648 posix_threads=yes
9649 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009650elif test "$ac_cv_pthread" = "yes"
9651then
9652 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009653 if test "$ac_cv_cxx_thread" = "yes"; then
9654 CXX="$CXX -pthread"
9655 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009656 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009657
9658 posix_threads=yes
9659 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009660else
9661 if test ! -z "$with_threads" -a -d "$with_threads"
9662 then LDFLAGS="$LDFLAGS -L$with_threads"
9663 fi
9664 if test ! -z "$withval" -a -d "$withval"
9665 then LDFLAGS="$LDFLAGS -L$withval"
9666 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009667
9668 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009669 # define _POSIX_THREADS in unistd.h. Some apparently don't
9670 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9672$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009674/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009675
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009676#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009677#ifdef _POSIX_THREADS
9678yes
9679#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009680
9681_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009682if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009683 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009684 unistd_defines_pthreads=yes
9685else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009686 unistd_defines_pthreads=no
9687fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009688rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009689
Matthias Kloseb9621712010-04-24 17:59:49 +00009690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9691$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009692
Matthias Kloseb9621712010-04-24 17:59:49 +00009693 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009694
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009695 # Just looking for pthread_create in libpthread is not enough:
9696 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9697 # So we really have to include pthread.h, and then link.
9698 _libs=$LIBS
9699 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9701$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009703/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009704
9705#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009706#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009707
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009708void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009709int
9710main ()
9711{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009712
9713pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009714 ;
9715 return 0;
9716}
9717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009718if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009719
Matthias Kloseb9621712010-04-24 17:59:49 +00009720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9721$as_echo "yes" >&6; }
9722 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009723
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009724 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009725 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009726else
Martin v. Löwis11437992002-04-12 09:54:03 +00009727
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009728 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009729 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009730if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009731 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009732
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009733 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009734 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009735else
Guido van Rossumad678af1998-10-02 14:42:15 +00009736
Matthias Kloseb9621712010-04-24 17:59:49 +00009737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9738$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009739if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009740 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009741else
Martin v. Löwis11437992002-04-12 09:54:03 +00009742 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009743LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009746
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009747/* Override any GCC internal prototype to avoid an error.
9748 Use char because int might match the return type of a GCC
9749 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009750#ifdef __cplusplus
9751extern "C"
9752#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009753char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009754int
9755main ()
9756{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009757return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009758 ;
9759 return 0;
9760}
9761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009762if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009763 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009764else
Matthias Kloseb9621712010-04-24 17:59:49 +00009765 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009767rm -f core conftest.err conftest.$ac_objext \
9768 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009769LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9772$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009773if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009774 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009775
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009776 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009777 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009778 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009779else
Greg Steinadf63d62000-07-05 10:38:09 +00009780
Matthias Kloseb9621712010-04-24 17:59:49 +00009781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9782$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009783if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009784 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009785else
Martin v. Löwis11437992002-04-12 09:54:03 +00009786 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009787LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009791/* Override any GCC internal prototype to avoid an error.
9792 Use char because int might match the return type of a GCC
9793 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009794#ifdef __cplusplus
9795extern "C"
9796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009797char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009798int
9799main ()
9800{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009801return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009802 ;
9803 return 0;
9804}
9805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009806if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009807 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009808else
Matthias Kloseb9621712010-04-24 17:59:49 +00009809 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009811rm -f core conftest.err conftest.$ac_objext \
9812 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009813LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9816$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009817if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009818 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009819
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009820 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009821 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009822 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009823else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009824
Matthias Kloseb9621712010-04-24 17:59:49 +00009825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9826$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009827if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009828 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009829else
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009831LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009835/* Override any GCC internal prototype to avoid an error.
9836 Use char because int might match the return type of a GCC
9837 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009838#ifdef __cplusplus
9839extern "C"
9840#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009841char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009842int
9843main ()
9844{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009845return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009846 ;
9847 return 0;
9848}
9849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009850if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009851 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009852else
Matthias Kloseb9621712010-04-24 17:59:49 +00009853 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009855rm -f core conftest.err conftest.$ac_objext \
9856 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009857LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9860$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009861if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009862 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009863
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009864 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009865 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009866 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009867else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009868
Matthias Kloseb9621712010-04-24 17:59:49 +00009869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9870$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009871if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009872 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009873else
Martin v. Löwis11437992002-04-12 09:54:03 +00009874 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009875LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009879/* Override any GCC internal prototype to avoid an error.
9880 Use char because int might match the return type of a GCC
9881 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009882#ifdef __cplusplus
9883extern "C"
9884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009885char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009886int
9887main ()
9888{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009889return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009890 ;
9891 return 0;
9892}
9893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009894if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009895 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009896else
Matthias Kloseb9621712010-04-24 17:59:49 +00009897 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009899rm -f core conftest.err conftest.$ac_objext \
9900 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009901LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9904$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009905if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009906 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009907
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009908 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009909 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009910 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009911else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009912
Martin v. Löwis130fb172001-07-19 11:00:41 +00009913 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009914fi
9915
Guido van Rossum627b2d71993-12-24 10:39:16 +00009916
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009917fi
9918
Guido van Rossum0be3e491997-05-22 20:33:33 +00009919fi
9920
Guido van Rossum49545951997-12-02 19:28:29 +00009921fi
9922
Guido van Rossumb93a8621998-05-07 13:27:32 +00009923fi
9924
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009926rm -f core conftest.err conftest.$ac_objext \
9927 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009928
Matthias Kloseb9621712010-04-24 17:59:49 +00009929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9930$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009931if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009932 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009933else
Martin v. Löwis11437992002-04-12 09:54:03 +00009934 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009935LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009939/* Override any GCC internal prototype to avoid an error.
9940 Use char because int might match the return type of a GCC
9941 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009942#ifdef __cplusplus
9943extern "C"
9944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009945char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009946int
9947main ()
9948{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009949return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009950 ;
9951 return 0;
9952}
9953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009954if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009955 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009956else
Matthias Kloseb9621712010-04-24 17:59:49 +00009957 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009959rm -f core conftest.err conftest.$ac_objext \
9960 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009961LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9964$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009965if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009966 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009967
Martin v. Löwis130fb172001-07-19 11:00:41 +00009968 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009969 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009970 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009971fi
9972
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009973
Neal Norwitza978ab02002-11-02 16:58:05 +00009974 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9976$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009977if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009978 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009979else
Martin v. Löwis11437992002-04-12 09:54:03 +00009980 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009981LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009983/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009985/* Override any GCC internal prototype to avoid an error.
9986 Use char because int might match the return type of a GCC
9987 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009988#ifdef __cplusplus
9989extern "C"
9990#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009991char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009992int
9993main ()
9994{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009995return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009996 ;
9997 return 0;
9998}
9999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010000if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010001 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010002else
Matthias Kloseb9621712010-04-24 17:59:49 +000010003 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010004fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010005rm -f core conftest.err conftest.$ac_objext \
10006 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010007LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10010$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010011if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010012 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010013
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010014 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010015 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010016 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010017fi
10018
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010019 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010020fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010021
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010022if test "$posix_threads" = "yes"; then
10023 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010024
Matthias Kloseb9621712010-04-24 17:59:49 +000010025$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010026
10027 fi
10028
10029 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10030 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010031 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010032$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010033
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010034 ;;
10035 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010036$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010037
10038 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010039 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010040$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010041
10042 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010043 esac
10044
Matthias Kloseb9621712010-04-24 17:59:49 +000010045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10046$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010047 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010048 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010049else
Matthias Kloseb9621712010-04-24 17:59:49 +000010050 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010051 ac_cv_pthread_system_supported=no
10052else
Matthias Kloseb9621712010-04-24 17:59:49 +000010053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010054/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010055
10056 #include <stdio.h>
10057 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010058 void *foo(void *parm) {
10059 return NULL;
10060 }
10061 main() {
10062 pthread_attr_t attr;
10063 pthread_t id;
10064 if (pthread_attr_init(&attr)) exit(-1);
10065 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10066 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10067 exit(0);
10068 }
10069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010070if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010071 ac_cv_pthread_system_supported=yes
10072else
Matthias Kloseb9621712010-04-24 17:59:49 +000010073 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010075rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10076 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010077fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010078
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010079
Guido van Rossum627b2d71993-12-24 10:39:16 +000010080fi
10081
Matthias Kloseb9621712010-04-24 17:59:49 +000010082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10083$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010084 if test "$ac_cv_pthread_system_supported" = "yes"; then
10085
Matthias Kloseb9621712010-04-24 17:59:49 +000010086$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010087
10088 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010089 for ac_func in pthread_sigmask
10090do :
10091 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010092if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010093 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010094#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010095_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010096 case $ac_sys_system in
10097 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010098
Matthias Kloseb9621712010-04-24 17:59:49 +000010099$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010100
10101 ;;
10102 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010103fi
10104done
10105
Christian Heimesf77b4b22013-08-21 13:26:05 +020010106 for ac_func in pthread_atfork
10107do :
10108 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10109if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10110 cat >>confdefs.h <<_ACEOF
10111#define HAVE_PTHREAD_ATFORK 1
10112_ACEOF
10113
10114fi
10115done
10116
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010117fi
10118
10119
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010120# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010121
Matthias Kloseb9621712010-04-24 17:59:49 +000010122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10123$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010124# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010125if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010126 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010127 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10129$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010130 ipv6=no
10131 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010132 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10133$as_echo "yes" >&6; }
10134 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010135
10136 ipv6=yes
10137 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010138 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010139else
Martin v. Löwis11437992002-04-12 09:54:03 +000010140
Matthias Kloseb9621712010-04-24 17:59:49 +000010141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010142/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010143 /* AF_INET6 available check */
10144#include <sys/types.h>
10145#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010146int
10147main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010148{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010149int domain = AF_INET6;
10150 ;
10151 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010152}
Martin v. Löwis11437992002-04-12 09:54:03 +000010153_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010154if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010155
Matthias Kloseb9621712010-04-24 17:59:49 +000010156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10157$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010158 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010159
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010160else
Matthias Kloseb159a552010-04-25 21:00:44 +000010161
Matthias Kloseb9621712010-04-24 17:59:49 +000010162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10163$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010164 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010165
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010166fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010168
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010169if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10171$as_echo_n "checking if RFC2553 API is available... " >&6; }
10172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010173/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010174
10175 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010176#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010177int
10178main ()
10179{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010180struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010181 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010182 ;
10183 return 0;
10184}
Matthias Kloseb159a552010-04-25 21:00:44 +000010185
Martin v. Löwis11437992002-04-12 09:54:03 +000010186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010187if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010188
10189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010190$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010191 ipv6=yes
10192
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010193else
Matthias Kloseb159a552010-04-25 21:00:44 +000010194
10195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010196$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010197 ipv6=no
10198
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010201fi
10202
10203if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010204 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010205
10206fi
10207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010208fi
10209
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010210
10211ipv6type=unknown
10212ipv6lib=none
10213ipv6trylibc=no
10214
10215if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10217$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010218 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10219 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010220 case $i in
10221 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010223/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010224
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010225#include <netinet/in.h>
10226#ifdef IPV6_INRIA_VERSION
10227yes
10228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010229_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010230if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010231 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010232 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010233fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010234rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010235
10236 ;;
10237 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010239/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010240
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010241#include <netinet/in.h>
10242#ifdef __KAME__
10243yes
10244#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010245_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010246if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010247 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010248 ipv6type=$i;
10249 ipv6lib=inet6
10250 ipv6libdir=/usr/local/v6/lib
10251 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010252fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010253rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010254
10255 ;;
10256 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010258/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010259
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010260#include <features.h>
10261#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10262yes
10263#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010264_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010265if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010266 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010267 ipv6type=$i;
10268 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010269fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010270rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010271
10272 ;;
10273 linux-inet6)
10274 if test -d /usr/inet6; then
10275 ipv6type=$i
10276 ipv6lib=inet6
10277 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010278 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010279 fi
10280 ;;
10281 solaris)
10282 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010283 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010284 ipv6type=$i
10285 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010286 fi
10287 fi
10288 ;;
10289 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010291/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010292
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010293#include <sys/param.h>
10294#ifdef _TOSHIBA_INET6
10295yes
10296#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010297_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010298if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010300 ipv6type=$i;
10301 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010302 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010303fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010304rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010305
10306 ;;
10307 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010309/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010310
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010311#include </usr/local/v6/include/sys/v6config.h>
10312#ifdef __V6D__
10313yes
10314#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010315_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010316if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010317 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010318 ipv6type=$i;
10319 ipv6lib=v6;
10320 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010321 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010322fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010323rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010324
10325 ;;
10326 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010328/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010329
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010330#include <sys/param.h>
10331#ifdef _ZETA_MINAMI_INET6
10332yes
10333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010334_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010335if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010336 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010337 ipv6type=$i;
10338 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010339 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010340fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010341rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010342
10343 ;;
10344 esac
10345 if test "$ipv6type" != "unknown"; then
10346 break
10347 fi
10348 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10350$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010351fi
10352
10353if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10354 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10355 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10356 echo "using lib$ipv6lib"
10357 else
10358 if test $ipv6trylibc = "yes"; then
10359 echo "using libc"
10360 else
10361 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10362 echo "You need to fetch lib$ipv6lib.a from appropriate"
10363 echo 'ipv6 kit and compile beforehand.'
10364 exit 1
10365 fi
10366 fi
10367fi
10368
Matthias Kloseb9621712010-04-24 17:59:49 +000010369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10370$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010372/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010373
10374 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010375int
10376main ()
10377{
10378FSIORefNum fRef = 0
10379 ;
10380 return 0;
10381}
Matthias Kloseb159a552010-04-25 21:00:44 +000010382
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010384if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010385
Matthias Kloseb159a552010-04-25 21:00:44 +000010386
Matthias Kloseb9621712010-04-24 17:59:49 +000010387$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010388
Matthias Kloseb9621712010-04-24 17:59:49 +000010389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10390$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010391
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010392else
Matthias Kloseb159a552010-04-25 21:00:44 +000010393
Matthias Kloseb9621712010-04-24 17:59:49 +000010394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10395$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010396
10397fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10399
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010400# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10402$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010403
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010404# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010405if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010406 withval=$with_doc_strings;
10407fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010408
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010409
10410if test -z "$with_doc_strings"
10411then with_doc_strings="yes"
10412fi
10413if test "$with_doc_strings" != "no"
10414then
10415
Matthias Kloseb9621712010-04-24 17:59:49 +000010416$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010417
10418fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10420$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010421
Antoine Pitrou042b1282010-08-13 21:15:58 +000010422# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10424$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010426# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010427if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010428 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010429if test "$withval" != no
10430then
10431
Matthias Kloseb9621712010-04-24 17:59:49 +000010432$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010433
Matthias Kloseb9621712010-04-24 17:59:49 +000010434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10435$as_echo "yes" >&6; }
10436else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10437$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010438fi
10439else
Matthias Kloseb9621712010-04-24 17:59:49 +000010440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10441$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010442fi
10443
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010444
10445# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10447$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010449# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010450if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010451 withval=$with_pymalloc;
10452fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010453
Neil Schemenauera35c6882001-02-27 04:45:05 +000010454
Neil Schemenauer16c22972002-03-22 15:34:49 +000010455if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010456then
10457 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010458fi
10459if test "$with_pymalloc" != "no"
10460then
Martin v. Löwis11437992002-04-12 09:54:03 +000010461
Matthias Kloseb9621712010-04-24 17:59:49 +000010462$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010463
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010464 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010465fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10467$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010468
Benjamin Peterson05159c42009-12-03 03:01:27 +000010469# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10471$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010472
10473# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010474if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010475 withval=$with_valgrind;
10476else
10477 with_valgrind=no
10478fi
10479
Matthias Kloseb9621712010-04-24 17:59:49 +000010480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10481$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010482if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010483 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 +020010484if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010485
Matthias Kloseb9621712010-04-24 17:59:49 +000010486$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010487
10488else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010489 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010490
10491fi
10492
10493
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010494 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010495fi
10496
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010497# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010498
Guido van Rossum98935bf2001-09-05 19:13:16 +000010499DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010500
Guido van Rossume97ee181999-12-20 21:27:22 +000010501# the dlopen() function means we might want to use dynload_shlib.o. some
10502# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010503for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010504do :
10505 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010506if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010507 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010508#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010509_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010510
Guido van Rossume97ee181999-12-20 21:27:22 +000010511fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010512done
Guido van Rossume97ee181999-12-20 21:27:22 +000010513
Michael W. Hudson54241132001-12-07 15:38:26 +000010514
Guido van Rossume97ee181999-12-20 21:27:22 +000010515# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10516# loading of modules.
10517
Matthias Kloseb9621712010-04-24 17:59:49 +000010518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10519$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010520if test -z "$DYNLOADFILE"
10521then
10522 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010523 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10524 if test "$ac_cv_func_dlopen" = yes
10525 then DYNLOADFILE="dynload_shlib.o"
10526 else DYNLOADFILE="dynload_aix.o"
10527 fi
10528 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010529 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010530 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10531 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010532 *)
10533 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10534 # out any dynamic loading
10535 if test "$ac_cv_func_dlopen" = yes
10536 then DYNLOADFILE="dynload_shlib.o"
10537 else DYNLOADFILE="dynload_stub.o"
10538 fi
10539 ;;
10540 esac
10541fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10543$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010544if test "$DYNLOADFILE" != "dynload_stub.o"
10545then
Martin v. Löwis11437992002-04-12 09:54:03 +000010546
Matthias Kloseb9621712010-04-24 17:59:49 +000010547$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010548
10549fi
10550
Neil Schemenauer4e425612001-06-19 15:44:15 +000010551# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10552
Michael W. Hudson54241132001-12-07 15:38:26 +000010553
Matthias Kloseb9621712010-04-24 17:59:49 +000010554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10555$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010556if test -z "$MACHDEP_OBJS"
10557then
Jack Jansene578a632001-08-15 01:27:14 +000010558 MACHDEP_OBJS=$extra_machdep_objs
10559else
10560 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010561fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010562if test -z "$MACHDEP_OBJS"; then
10563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10564$as_echo "none" >&6; }
10565else
10566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10567$as_echo "$MACHDEP_OBJS" >&6; }
10568fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010569
Guido van Rossum627b2d71993-12-24 10:39:16 +000010570# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010571for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010572 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010573 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010010574 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010575 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010576 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010577 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010578 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10579 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010580 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010581 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010582 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010583 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010584 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010585 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010586 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10587 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010588 sigaction sigaltstack siginterrupt sigpending sigrelse \
10589 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010590 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010591 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010592 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010593do :
10594 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10595ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010596if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010597 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010598#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010599_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010600
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010601fi
10602done
10603
Michael W. Hudson54241132001-12-07 15:38:26 +000010604
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010605ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10606 #include <dirent.h>
10607"
10608if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10609
10610$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10611
10612fi
10613
10614
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010615# For some functions, having a definition is not sufficient, since
10616# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10618$as_echo_n "checking for chroot... " >&6; }
10619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010620/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010621#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010622int
10623main ()
10624{
10625void *x=chroot
10626 ;
10627 return 0;
10628}
10629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010630if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010631
Matthias Kloseb9621712010-04-24 17:59:49 +000010632$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010633
Matthias Kloseb159a552010-04-25 21:00:44 +000010634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010635$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010636else
Matthias Kloseb9621712010-04-24 17:59:49 +000010637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10638$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010639
10640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10643$as_echo_n "checking for link... " >&6; }
10644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010645/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010646#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010647int
10648main ()
10649{
10650void *x=link
10651 ;
10652 return 0;
10653}
10654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010655if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010656
Matthias Kloseb9621712010-04-24 17:59:49 +000010657$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010658
Matthias Kloseb159a552010-04-25 21:00:44 +000010659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010660$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010661else
Matthias Kloseb9621712010-04-24 17:59:49 +000010662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10663$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010664
10665fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10668$as_echo_n "checking for symlink... " >&6; }
10669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010670/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010671#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010672int
10673main ()
10674{
10675void *x=symlink
10676 ;
10677 return 0;
10678}
10679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010680if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010681
Matthias Kloseb9621712010-04-24 17:59:49 +000010682$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010683
Matthias Kloseb159a552010-04-25 21:00:44 +000010684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010685$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010686else
Matthias Kloseb9621712010-04-24 17:59:49 +000010687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10688$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010689
10690fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10693$as_echo_n "checking for fchdir... " >&6; }
10694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010695/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010696#include <unistd.h>
10697int
10698main ()
10699{
10700void *x=fchdir
10701 ;
10702 return 0;
10703}
10704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010705if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010706
Matthias Kloseb9621712010-04-24 17:59:49 +000010707$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010708
Matthias Kloseb159a552010-04-25 21:00:44 +000010709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010710$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010711else
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10713$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010714
10715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10718$as_echo_n "checking for fsync... " >&6; }
10719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010720/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010721#include <unistd.h>
10722int
10723main ()
10724{
10725void *x=fsync
10726 ;
10727 return 0;
10728}
10729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010730if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010731
Matthias Kloseb9621712010-04-24 17:59:49 +000010732$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010733
Matthias Kloseb159a552010-04-25 21:00:44 +000010734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010735$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010736else
Matthias Kloseb9621712010-04-24 17:59:49 +000010737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10738$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010739
10740fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10743$as_echo_n "checking for fdatasync... " >&6; }
10744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010745/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010746#include <unistd.h>
10747int
10748main ()
10749{
10750void *x=fdatasync
10751 ;
10752 return 0;
10753}
10754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010755if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010756
Matthias Kloseb9621712010-04-24 17:59:49 +000010757$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010758
Matthias Kloseb159a552010-04-25 21:00:44 +000010759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010760$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010761else
Matthias Kloseb9621712010-04-24 17:59:49 +000010762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10763$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010764
10765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10768$as_echo_n "checking for epoll... " >&6; }
10769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010770/* end confdefs.h. */
10771#include <sys/epoll.h>
10772int
10773main ()
10774{
10775void *x=epoll_create
10776 ;
10777 return 0;
10778}
10779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010780if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010781
Matthias Kloseb9621712010-04-24 17:59:49 +000010782$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010783
Matthias Kloseb159a552010-04-25 21:00:44 +000010784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010785$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010786else
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10788$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010789
10790fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10793$as_echo_n "checking for epoll_create1... " >&6; }
10794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10795/* end confdefs.h. */
10796#include <sys/epoll.h>
10797int
10798main ()
10799{
10800void *x=epoll_create1
10801 ;
10802 return 0;
10803}
10804_ACEOF
10805if ac_fn_c_try_compile "$LINENO"; then :
10806
10807$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10808
10809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10810$as_echo "yes" >&6; }
10811else
10812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10813$as_echo "no" >&6; }
10814
10815fi
10816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10818$as_echo_n "checking for kqueue... " >&6; }
10819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010820/* end confdefs.h. */
10821
10822#include <sys/types.h>
10823#include <sys/event.h>
10824
10825int
10826main ()
10827{
10828int x=kqueue()
10829 ;
10830 return 0;
10831}
10832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010833if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010834
Matthias Kloseb9621712010-04-24 17:59:49 +000010835$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010836
Matthias Kloseb159a552010-04-25 21:00:44 +000010837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010838$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010839else
Matthias Kloseb9621712010-04-24 17:59:49 +000010840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10841$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010842
10843fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10846$as_echo_n "checking for prlimit... " >&6; }
10847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10848/* end confdefs.h. */
10849
10850#include <sys/time.h>
10851#include <sys/resource.h>
10852
10853int
10854main ()
10855{
10856void *x=prlimit
10857 ;
10858 return 0;
10859}
10860_ACEOF
10861if ac_fn_c_try_compile "$LINENO"; then :
10862
10863$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10864
10865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10866$as_echo "yes" >&6; }
10867else
10868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10869$as_echo "no" >&6; }
10870
10871fi
10872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10873
Martin v. Löwisd5843682002-11-21 20:41:28 +000010874# On some systems (eg. FreeBSD 5), we would find a definition of the
10875# functions ctermid_r, setgroups in the library, but no prototype
10876# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10877# address to avoid compiler warnings and potential miscompilations
10878# because of the missing prototypes.
10879
Matthias Kloseb9621712010-04-24 17:59:49 +000010880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10881$as_echo_n "checking for ctermid_r... " >&6; }
10882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010883/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010884
Martin v. Löwisd5843682002-11-21 20:41:28 +000010885#include <stdio.h>
10886
Martin v. Löwisd5843682002-11-21 20:41:28 +000010887int
10888main ()
10889{
10890void* p = ctermid_r
10891 ;
10892 return 0;
10893}
10894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010895if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010896
Matthias Kloseb9621712010-04-24 17:59:49 +000010897$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010898
Matthias Kloseb159a552010-04-25 21:00:44 +000010899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010900$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010901else
Matthias Kloseb9621712010-04-24 17:59:49 +000010902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10903$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010904
10905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10907
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10909$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010910if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010911 $as_echo_n "(cached) " >&6
10912else
10913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010914/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010915#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010916int
10917main ()
10918{
10919void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010920
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010921 ;
10922 return 0;
10923}
10924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010925if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010926 ac_cv_flock_decl=yes
10927else
10928 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010929
10930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010932
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010933fi
10934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10935$as_echo "$ac_cv_flock_decl" >&6; }
10936if test "x${ac_cv_flock_decl}" = xyes; then
10937 for ac_func in flock
10938do :
10939 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010940if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010941 cat >>confdefs.h <<_ACEOF
10942#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010943_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010944
Antoine Pitroua3000072010-09-07 14:52:42 +000010945else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010947$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010948if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010949 $as_echo_n "(cached) " >&6
10950else
10951 ac_check_lib_save_LIBS=$LIBS
10952LIBS="-lbsd $LIBS"
10953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10954/* end confdefs.h. */
10955
10956/* Override any GCC internal prototype to avoid an error.
10957 Use char because int might match the return type of a GCC
10958 builtin and then its argument prototype would still apply. */
10959#ifdef __cplusplus
10960extern "C"
10961#endif
10962char flock ();
10963int
10964main ()
10965{
10966return flock ();
10967 ;
10968 return 0;
10969}
10970_ACEOF
10971if ac_fn_c_try_link "$LINENO"; then :
10972 ac_cv_lib_bsd_flock=yes
10973else
10974 ac_cv_lib_bsd_flock=no
10975fi
10976rm -f core conftest.err conftest.$ac_objext \
10977 conftest$ac_exeext conftest.$ac_ext
10978LIBS=$ac_check_lib_save_LIBS
10979fi
10980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10981$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010982if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010983 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010984
10985
10986$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10987
10988
10989fi
10990
10991
10992fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010993done
10994
Antoine Pitroua3000072010-09-07 14:52:42 +000010995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010996
Matthias Kloseb9621712010-04-24 17:59:49 +000010997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10998$as_echo_n "checking for getpagesize... " >&6; }
10999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011000/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011001
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011002#include <unistd.h>
11003
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011004int
11005main ()
11006{
11007void* p = getpagesize
11008 ;
11009 return 0;
11010}
11011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011012if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011013
Matthias Kloseb9621712010-04-24 17:59:49 +000011014$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011015
Matthias Kloseb159a552010-04-25 21:00:44 +000011016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011017$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011018else
Matthias Kloseb9621712010-04-24 17:59:49 +000011019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11020$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011021
11022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011024
Victor Stinner984890f2011-11-24 13:53:38 +010011025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11026$as_echo_n "checking for broken unsetenv... " >&6; }
11027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11028/* end confdefs.h. */
11029
11030#include <stdlib.h>
11031
11032int
11033main ()
11034{
11035int res = unsetenv("DUMMY")
11036 ;
11037 return 0;
11038}
11039_ACEOF
11040if ac_fn_c_try_compile "$LINENO"; then :
11041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11042$as_echo "no" >&6; }
11043else
11044
11045$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11046
11047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11048$as_echo "yes" >&6; }
11049
11050fi
11051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11052
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011053for ac_prog in true
11054do
11055 # Extract the first word of "$ac_prog", so it can be a program name with args.
11056set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11058$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011059if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011060 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011061else
11062 if test -n "$TRUE"; then
11063 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11064else
11065as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11066for as_dir in $PATH
11067do
11068 IFS=$as_save_IFS
11069 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011070 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011071 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011072 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011073 $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 +000011074 break 2
11075 fi
11076done
Matthias Kloseb9621712010-04-24 17:59:49 +000011077 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011078IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011079
11080fi
11081fi
11082TRUE=$ac_cv_prog_TRUE
11083if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11085$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011086else
Matthias Kloseb9621712010-04-24 17:59:49 +000011087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11088$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011089fi
11090
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011091
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011092 test -n "$TRUE" && break
11093done
11094test -n "$TRUE" || TRUE="/bin/true"
11095
11096
Matthias Kloseb9621712010-04-24 17:59:49 +000011097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11098$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011099if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011100 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011101else
11102 ac_check_lib_save_LIBS=$LIBS
11103LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011105/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011107/* Override any GCC internal prototype to avoid an error.
11108 Use char because int might match the return type of a GCC
11109 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011110#ifdef __cplusplus
11111extern "C"
11112#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011113char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011114int
11115main ()
11116{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011117return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011118 ;
11119 return 0;
11120}
11121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011122if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011123 ac_cv_lib_c_inet_aton=yes
11124else
Matthias Kloseb9621712010-04-24 17:59:49 +000011125 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011127rm -f core conftest.err conftest.$ac_objext \
11128 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011129LIBS=$ac_check_lib_save_LIBS
11130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11132$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011133if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011134 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011135else
Matthias Kloseb9621712010-04-24 17:59:49 +000011136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11137$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011138if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011139 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011140else
11141 ac_check_lib_save_LIBS=$LIBS
11142LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011144/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011146/* Override any GCC internal prototype to avoid an error.
11147 Use char because int might match the return type of a GCC
11148 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011149#ifdef __cplusplus
11150extern "C"
11151#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011152char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011153int
11154main ()
11155{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011156return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011157 ;
11158 return 0;
11159}
11160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011161if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011162 ac_cv_lib_resolv_inet_aton=yes
11163else
Matthias Kloseb9621712010-04-24 17:59:49 +000011164 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011166rm -f core conftest.err conftest.$ac_objext \
11167 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011168LIBS=$ac_check_lib_save_LIBS
11169fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11171$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011172if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011173 cat >>confdefs.h <<_ACEOF
11174#define HAVE_LIBRESOLV 1
11175_ACEOF
11176
11177 LIBS="-lresolv $LIBS"
11178
11179fi
11180
11181
11182fi
11183
11184
Christian Heimesd0764e22007-12-04 15:00:33 +000011185# On Tru64, chflags seems to be present, but calling it will
11186# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11188$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011189if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011190 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011191else
Matthias Kloseb9621712010-04-24 17:59:49 +000011192 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011193 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011194else
Matthias Kloseb9621712010-04-24 17:59:49 +000011195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011196/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011197
Christian Heimesd0764e22007-12-04 15:00:33 +000011198#include <sys/stat.h>
11199#include <unistd.h>
11200int main(int argc, char*argv[])
11201{
11202 if(chflags(argv[0], 0) != 0)
11203 return 1;
11204 return 0;
11205}
Ned Deily3eb67d52011-06-28 00:00:28 -070011206
Christian Heimesd0764e22007-12-04 15:00:33 +000011207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011208if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011209 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011210else
Matthias Kloseb9621712010-04-24 17:59:49 +000011211 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011213rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11214 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011215fi
11216
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011217
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11220$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011221if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011222 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011223if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011224 ac_cv_have_chflags="yes"
11225else
11226 ac_cv_have_chflags="no"
11227fi
11228
11229fi
11230if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011231
Matthias Kloseb9621712010-04-24 17:59:49 +000011232$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011233
11234fi
11235
Matthias Kloseb9621712010-04-24 17:59:49 +000011236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11237$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011238if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011239 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011240else
Matthias Kloseb9621712010-04-24 17:59:49 +000011241 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011242 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011243else
Matthias Kloseb9621712010-04-24 17:59:49 +000011244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011245/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011246
Christian Heimesd0764e22007-12-04 15:00:33 +000011247#include <sys/stat.h>
11248#include <unistd.h>
11249int main(int argc, char*argv[])
11250{
11251 if(lchflags(argv[0], 0) != 0)
11252 return 1;
11253 return 0;
11254}
Ned Deily3eb67d52011-06-28 00:00:28 -070011255
Christian Heimesd0764e22007-12-04 15:00:33 +000011256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011257if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011258 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011259else
Matthias Kloseb9621712010-04-24 17:59:49 +000011260 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11263 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011264fi
11265
11266
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011267fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11269$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011270if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011271 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011272if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011273 ac_cv_have_lchflags="yes"
11274else
11275 ac_cv_have_lchflags="no"
11276fi
11277
11278fi
11279if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011280
Matthias Kloseb9621712010-04-24 17:59:49 +000011281$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011282
11283fi
11284
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011285case $ac_sys_system/$ac_sys_release in
11286Darwin/*)
11287 _CUR_CFLAGS="${CFLAGS}"
11288 _CUR_LDFLAGS="${LDFLAGS}"
11289 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11290 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11291 ;;
11292esac
11293
Matthias Kloseb9621712010-04-24 17:59:49 +000011294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11295$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011296if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011297 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011298else
11299 ac_check_lib_save_LIBS=$LIBS
11300LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011302/* end confdefs.h. */
11303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011304/* Override any GCC internal prototype to avoid an error.
11305 Use char because int might match the return type of a GCC
11306 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011307#ifdef __cplusplus
11308extern "C"
11309#endif
11310char inflateCopy ();
11311int
11312main ()
11313{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011314return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011315 ;
11316 return 0;
11317}
11318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011319if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011320 ac_cv_lib_z_inflateCopy=yes
11321else
Matthias Kloseb9621712010-04-24 17:59:49 +000011322 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011323fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011324rm -f core conftest.err conftest.$ac_objext \
11325 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011326LIBS=$ac_check_lib_save_LIBS
11327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11329$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011330if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011331
Matthias Kloseb9621712010-04-24 17:59:49 +000011332$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011333
11334fi
11335
11336
11337case $ac_sys_system/$ac_sys_release in
11338Darwin/*)
11339 CFLAGS="${_CUR_CFLAGS}"
11340 LDFLAGS="${_CUR_LDFLAGS}"
11341 ;;
11342esac
11343
Matthias Kloseb9621712010-04-24 17:59:49 +000011344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11345$as_echo_n "checking for hstrerror... " >&6; }
11346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011347/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011348
Martin v. Löwise9416172003-05-03 10:12:45 +000011349#include <netdb.h>
11350
Martin v. Löwise9416172003-05-03 10:12:45 +000011351int
11352main ()
11353{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011354void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011355 ;
11356 return 0;
11357}
11358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011359if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011360
Matthias Kloseb9621712010-04-24 17:59:49 +000011361$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011362
Matthias Kloseb159a552010-04-25 21:00:44 +000011363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011364$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011365else
Matthias Kloseb9621712010-04-24 17:59:49 +000011366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11367$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011368
11369fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011370rm -f core conftest.err conftest.$ac_objext \
11371 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011372
Matthias Kloseb9621712010-04-24 17:59:49 +000011373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11374$as_echo_n "checking for inet_aton... " >&6; }
11375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011376/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011377
Martin v. Löwis86d66262006-02-17 08:40:11 +000011378#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011379#include <sys/socket.h>
11380#include <netinet/in.h>
11381#include <arpa/inet.h>
11382
Martin v. Löwise9416172003-05-03 10:12:45 +000011383int
11384main ()
11385{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011386void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011387 ;
11388 return 0;
11389}
11390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011391if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011392
Matthias Kloseb9621712010-04-24 17:59:49 +000011393$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011394
Matthias Kloseb159a552010-04-25 21:00:44 +000011395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011396$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011397else
Matthias Kloseb9621712010-04-24 17:59:49 +000011398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11399$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011400
11401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011402rm -f core conftest.err conftest.$ac_objext \
11403 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011404
Matthias Kloseb9621712010-04-24 17:59:49 +000011405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11406$as_echo_n "checking for inet_pton... " >&6; }
11407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011408/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011409
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011410#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011411#include <sys/socket.h>
11412#include <netinet/in.h>
11413#include <arpa/inet.h>
11414
Martin v. Löwise9416172003-05-03 10:12:45 +000011415int
11416main ()
11417{
11418void* p = inet_pton
11419 ;
11420 return 0;
11421}
11422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011423if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011424
Matthias Kloseb9621712010-04-24 17:59:49 +000011425$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011426
Matthias Kloseb159a552010-04-25 21:00:44 +000011427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011428$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011429else
Matthias Kloseb9621712010-04-24 17:59:49 +000011430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11431$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011432
11433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011435
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011436# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11438$as_echo_n "checking for setgroups... " >&6; }
11439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011440/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011441
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011442#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011443#ifdef HAVE_GRP_H
11444#include <grp.h>
11445#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011446
Martin v. Löwisd5843682002-11-21 20:41:28 +000011447int
11448main ()
11449{
11450void* p = setgroups
11451 ;
11452 return 0;
11453}
11454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011455if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011456
Matthias Kloseb9621712010-04-24 17:59:49 +000011457$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011458
Matthias Kloseb159a552010-04-25 21:00:44 +000011459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011460$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011461else
Matthias Kloseb9621712010-04-24 17:59:49 +000011462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11463$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011464
11465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011467
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011468# check for openpty and forkpty
11469
11470for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011471do :
11472 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011473if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011474 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011475#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011476_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011477
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011478else
Matthias Kloseb9621712010-04-24 17:59:49 +000011479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11480$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011481if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011482 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011483else
Martin v. Löwis11437992002-04-12 09:54:03 +000011484 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011485LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011487/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011488
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011489/* Override any GCC internal prototype to avoid an error.
11490 Use char because int might match the return type of a GCC
11491 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011492#ifdef __cplusplus
11493extern "C"
11494#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011495char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011496int
11497main ()
11498{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011499return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011500 ;
11501 return 0;
11502}
11503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011504if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011505 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011506else
Matthias Kloseb9621712010-04-24 17:59:49 +000011507 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011508fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011509rm -f core conftest.err conftest.$ac_objext \
11510 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011511LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011512fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11514$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011515if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011516 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011517 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011518else
Matthias Kloseb9621712010-04-24 17:59:49 +000011519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11520$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011521if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011522 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011523else
11524 ac_check_lib_save_LIBS=$LIBS
11525LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011527/* end confdefs.h. */
11528
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011529/* Override any GCC internal prototype to avoid an error.
11530 Use char because int might match the return type of a GCC
11531 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011532#ifdef __cplusplus
11533extern "C"
11534#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011535char openpty ();
11536int
11537main ()
11538{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011539return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011540 ;
11541 return 0;
11542}
11543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011544if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011545 ac_cv_lib_bsd_openpty=yes
11546else
Matthias Kloseb9621712010-04-24 17:59:49 +000011547 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011549rm -f core conftest.err conftest.$ac_objext \
11550 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011551LIBS=$ac_check_lib_save_LIBS
11552fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11554$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011555if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011556 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011557 LIBS="$LIBS -lbsd"
11558fi
11559
11560
11561fi
11562
Fred Drake8cef4cf2000-06-28 16:40:38 +000011563
11564fi
11565done
11566
11567for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011568do :
11569 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011570if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011571 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011572#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011573_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011574
Fred Drake8cef4cf2000-06-28 16:40:38 +000011575else
Matthias Kloseb9621712010-04-24 17:59:49 +000011576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11577$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011578if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011579 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011580else
Martin v. Löwis11437992002-04-12 09:54:03 +000011581 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011582LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011584/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011586/* Override any GCC internal prototype to avoid an error.
11587 Use char because int might match the return type of a GCC
11588 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011589#ifdef __cplusplus
11590extern "C"
11591#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011592char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011593int
11594main ()
11595{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011596return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011597 ;
11598 return 0;
11599}
11600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011601if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011602 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011603else
Matthias Kloseb9621712010-04-24 17:59:49 +000011604 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011605fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011606rm -f core conftest.err conftest.$ac_objext \
11607 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011608LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011609fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11611$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011612if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011613 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011614 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011615else
Matthias Kloseb9621712010-04-24 17:59:49 +000011616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11617$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011618if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011619 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011620else
11621 ac_check_lib_save_LIBS=$LIBS
11622LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011624/* end confdefs.h. */
11625
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011626/* Override any GCC internal prototype to avoid an error.
11627 Use char because int might match the return type of a GCC
11628 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011629#ifdef __cplusplus
11630extern "C"
11631#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011632char forkpty ();
11633int
11634main ()
11635{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011636return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011637 ;
11638 return 0;
11639}
11640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011641if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011642 ac_cv_lib_bsd_forkpty=yes
11643else
Matthias Kloseb9621712010-04-24 17:59:49 +000011644 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011646rm -f core conftest.err conftest.$ac_objext \
11647 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011648LIBS=$ac_check_lib_save_LIBS
11649fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11651$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011652if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011653 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011654 LIBS="$LIBS -lbsd"
11655fi
11656
11657
11658fi
11659
Fred Drake8cef4cf2000-06-28 16:40:38 +000011660
11661fi
11662done
11663
Jack Jansendd19cf82001-12-06 22:36:17 +000011664
Christian Heimesb186d002008-03-18 15:15:01 +000011665# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011666for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011667do :
11668 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011669if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011670 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011671#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011672_ACEOF
11673
11674fi
11675done
11676
11677
Michael W. Hudson54241132001-12-07 15:38:26 +000011678# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011679for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011680do :
11681 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11682ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011683if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011684 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011685#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011686_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011687
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011688fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011689done
11690
Michael W. Hudson54241132001-12-07 15:38:26 +000011691
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011692ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011693if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011694 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011695
Martin v. Löwis1142de32002-03-29 16:28:31 +000011696else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011697 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011698 *" dup2.$ac_objext "* ) ;;
11699 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011700 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011701esac
11702
Martin v. Löwis1142de32002-03-29 16:28:31 +000011703fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011704
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011705ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011706if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011707 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11708
11709else
11710 case " $LIBOBJS " in
11711 *" strdup.$ac_objext "* ) ;;
11712 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11713 ;;
11714esac
11715
11716fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011717
11718
11719for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011720do :
11721 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011722if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011723 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011724#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011727/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011728#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011729int
11730main ()
11731{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011732getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011733 ;
11734 return 0;
11735}
11736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011737if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011738
Matthias Kloseb9621712010-04-24 17:59:49 +000011739$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011740
Guido van Rossum627b2d71993-12-24 10:39:16 +000011741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011743
Guido van Rossum627b2d71993-12-24 10:39:16 +000011744fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011745done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011746
Jack Jansen150753c2003-03-29 22:07:47 +000011747for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011748do :
11749 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011750if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011751 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011752#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011755/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011756#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011757int
11758main ()
11759{
11760setpgrp(0,0);
11761 ;
11762 return 0;
11763}
11764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011765if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011766
Matthias Kloseb9621712010-04-24 17:59:49 +000011767$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011768
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011771
11772fi
11773done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011774
Thomas Wouters3a584202000-08-05 23:28:51 +000011775for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011776do :
11777 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011778if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011779 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011780#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011783/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011784#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011785int
11786main ()
11787{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011788gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011789 ;
11790 return 0;
11791}
11792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011793if ac_fn_c_try_compile "$LINENO"; then :
11794
Guido van Rossum627b2d71993-12-24 10:39:16 +000011795else
Skip Montanaro6dead952003-09-25 14:50:04 +000011796
Matthias Kloseb9621712010-04-24 17:59:49 +000011797$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011798
Martin v. Löwis11437992002-04-12 09:54:03 +000011799
Guido van Rossum627b2d71993-12-24 10:39:16 +000011800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011802
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011803fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011804done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011805
Michael W. Hudson54241132001-12-07 15:38:26 +000011806
Victor Stinnere0be4232011-10-25 13:06:09 +020011807for ac_func in clock_gettime
11808do :
11809 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11810if test "x$ac_cv_func_clock_gettime" = xyes; then :
11811 cat >>confdefs.h <<_ACEOF
11812#define HAVE_CLOCK_GETTIME 1
11813_ACEOF
11814
11815else
11816
11817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11818$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11819if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11820 $as_echo_n "(cached) " >&6
11821else
11822 ac_check_lib_save_LIBS=$LIBS
11823LIBS="-lrt $LIBS"
11824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11825/* end confdefs.h. */
11826
11827/* Override any GCC internal prototype to avoid an error.
11828 Use char because int might match the return type of a GCC
11829 builtin and then its argument prototype would still apply. */
11830#ifdef __cplusplus
11831extern "C"
11832#endif
11833char clock_gettime ();
11834int
11835main ()
11836{
11837return clock_gettime ();
11838 ;
11839 return 0;
11840}
11841_ACEOF
11842if ac_fn_c_try_link "$LINENO"; then :
11843 ac_cv_lib_rt_clock_gettime=yes
11844else
11845 ac_cv_lib_rt_clock_gettime=no
11846fi
11847rm -f core conftest.err conftest.$ac_objext \
11848 conftest$ac_exeext conftest.$ac_ext
11849LIBS=$ac_check_lib_save_LIBS
11850fi
11851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11852$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11853if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11854
Victor Stinner7efb8332014-08-29 15:41:08 +020011855 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020011856 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11857
11858
11859$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11860
11861
11862fi
11863
11864
11865fi
11866done
11867
11868
11869for ac_func in clock_getres
11870do :
11871 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11872if test "x$ac_cv_func_clock_getres" = xyes; then :
11873 cat >>confdefs.h <<_ACEOF
11874#define HAVE_CLOCK_GETRES 1
11875_ACEOF
11876
11877else
11878
11879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11880$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11881if ${ac_cv_lib_rt_clock_getres+:} false; then :
11882 $as_echo_n "(cached) " >&6
11883else
11884 ac_check_lib_save_LIBS=$LIBS
11885LIBS="-lrt $LIBS"
11886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11887/* end confdefs.h. */
11888
11889/* Override any GCC internal prototype to avoid an error.
11890 Use char because int might match the return type of a GCC
11891 builtin and then its argument prototype would still apply. */
11892#ifdef __cplusplus
11893extern "C"
11894#endif
11895char clock_getres ();
11896int
11897main ()
11898{
11899return clock_getres ();
11900 ;
11901 return 0;
11902}
11903_ACEOF
11904if ac_fn_c_try_link "$LINENO"; then :
11905 ac_cv_lib_rt_clock_getres=yes
11906else
11907 ac_cv_lib_rt_clock_getres=no
11908fi
11909rm -f core conftest.err conftest.$ac_objext \
11910 conftest$ac_exeext conftest.$ac_ext
11911LIBS=$ac_check_lib_save_LIBS
11912fi
11913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11914$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11915if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11916
11917 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11918
11919
11920fi
11921
11922
11923fi
11924done
11925
11926
Matthias Kloseb9621712010-04-24 17:59:49 +000011927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11928$as_echo_n "checking for major... " >&6; }
11929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011930/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011931
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011932#if defined(MAJOR_IN_MKDEV)
11933#include <sys/mkdev.h>
11934#elif defined(MAJOR_IN_SYSMACROS)
11935#include <sys/sysmacros.h>
11936#else
11937#include <sys/types.h>
11938#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011939
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011940int
11941main ()
11942{
11943
11944 makedev(major(0),minor(0));
11945
11946 ;
11947 return 0;
11948}
11949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011950if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011951
11952
Matthias Kloseb9621712010-04-24 17:59:49 +000011953$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011954
Matthias Kloseb9621712010-04-24 17:59:49 +000011955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11956$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011957
11958else
Skip Montanaro6dead952003-09-25 14:50:04 +000011959
Matthias Kloseb9621712010-04-24 17:59:49 +000011960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11961$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011962
11963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011964rm -f core conftest.err conftest.$ac_objext \
11965 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011966
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011967# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011968# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11970$as_echo_n "checking for getaddrinfo... " >&6; }
11971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011972/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011973
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011974#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011975#include <sys/socket.h>
11976#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011977#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011978
Martin v. Löwis11437992002-04-12 09:54:03 +000011979int
11980main ()
11981{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011982getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011983 ;
11984 return 0;
11985}
11986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011987if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011988 have_getaddrinfo=yes
11989else
Matthias Kloseb9621712010-04-24 17:59:49 +000011990 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011991fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011992rm -f core conftest.err conftest.$ac_objext \
11993 conftest$ac_exeext conftest.$ac_ext
11994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11995$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011996if test $have_getaddrinfo = yes
11997then
Matthias Kloseb9621712010-04-24 17:59:49 +000011998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11999$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012000 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012001 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012002else
Matthias Kloseb9621712010-04-24 17:59:49 +000012003 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012004
12005if test "${enable_ipv6+set}" = set; then
12006 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12007else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012008 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012009fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012010else
Matthias Kloseb9621712010-04-24 17:59:49 +000012011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012012/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012013
Stefan Krah19c21392012-11-22 23:47:32 +010012014#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012015#include <sys/types.h>
12016#include <netdb.h>
12017#include <string.h>
12018#include <sys/socket.h>
12019#include <netinet/in.h>
12020
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012021int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012022{
12023 int passive, gaierr, inet4 = 0, inet6 = 0;
12024 struct addrinfo hints, *ai, *aitop;
12025 char straddr[INET6_ADDRSTRLEN], strport[16];
12026
12027 for (passive = 0; passive <= 1; passive++) {
12028 memset(&hints, 0, sizeof(hints));
12029 hints.ai_family = AF_UNSPEC;
12030 hints.ai_flags = passive ? AI_PASSIVE : 0;
12031 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012032 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012033 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12034 (void)gai_strerror(gaierr);
12035 goto bad;
12036 }
12037 for (ai = aitop; ai; ai = ai->ai_next) {
12038 if (ai->ai_addr == NULL ||
12039 ai->ai_addrlen == 0 ||
12040 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12041 straddr, sizeof(straddr), strport, sizeof(strport),
12042 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12043 goto bad;
12044 }
12045 switch (ai->ai_family) {
12046 case AF_INET:
12047 if (strcmp(strport, "54321") != 0) {
12048 goto bad;
12049 }
12050 if (passive) {
12051 if (strcmp(straddr, "0.0.0.0") != 0) {
12052 goto bad;
12053 }
12054 } else {
12055 if (strcmp(straddr, "127.0.0.1") != 0) {
12056 goto bad;
12057 }
12058 }
12059 inet4++;
12060 break;
12061 case AF_INET6:
12062 if (strcmp(strport, "54321") != 0) {
12063 goto bad;
12064 }
12065 if (passive) {
12066 if (strcmp(straddr, "::") != 0) {
12067 goto bad;
12068 }
12069 } else {
12070 if (strcmp(straddr, "::1") != 0) {
12071 goto bad;
12072 }
12073 }
12074 inet6++;
12075 break;
12076 case AF_UNSPEC:
12077 goto bad;
12078 break;
12079 default:
12080 /* another family support? */
12081 break;
12082 }
12083 }
12084 }
12085
12086 if (!(inet4 == 0 || inet4 == 2))
12087 goto bad;
12088 if (!(inet6 == 0 || inet6 == 2))
12089 goto bad;
12090
12091 if (aitop)
12092 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012093 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012094
12095 bad:
12096 if (aitop)
12097 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012098 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012099}
12100
Martin v. Löwis11437992002-04-12 09:54:03 +000012101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012102if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012103 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012104else
Matthias Kloseb9621712010-04-24 17:59:49 +000012105 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012107rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12108 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012110
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012111fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012112
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012114
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12116$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12117
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012118if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012119then
12120 if test $ipv6 = yes
12121 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012122 echo 'Fatal: You must get working getaddrinfo() function.'
12123 echo ' or you can specify "--disable-ipv6"'.
12124 exit 1
12125 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012126else
Martin v. Löwis11437992002-04-12 09:54:03 +000012127
Matthias Kloseb9621712010-04-24 17:59:49 +000012128$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012129
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012130fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012131
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012132for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012133do :
12134 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012135if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012136 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012137#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012138_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012139
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012140fi
12141done
12142
Michael W. Hudson54241132001-12-07 15:38:26 +000012143
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012144# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12146$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012147if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012148 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012149else
Matthias Kloseb9621712010-04-24 17:59:49 +000012150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012151/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012152#include <sys/types.h>
12153#include <sys/time.h>
12154#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012155
Martin v. Löwis11437992002-04-12 09:54:03 +000012156int
12157main ()
12158{
12159if ((struct tm *) 0)
12160return 0;
12161 ;
12162 return 0;
12163}
12164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012165if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012166 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012167else
Matthias Kloseb9621712010-04-24 17:59:49 +000012168 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12173$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012174if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012175
Matthias Kloseb9621712010-04-24 17:59:49 +000012176$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012177
12178fi
12179
Matthias Kloseb9621712010-04-24 17:59:49 +000012180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12181$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012182if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012183 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012184else
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012186/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012187#include <sys/types.h>
12188#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012189
Martin v. Löwis11437992002-04-12 09:54:03 +000012190int
12191main ()
12192{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012193struct tm tm;
12194 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012196 ;
12197 return 0;
12198}
12199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012200if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012201 ac_cv_struct_tm=time.h
12202else
Matthias Kloseb9621712010-04-24 17:59:49 +000012203 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012206fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12208$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012209if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012210
Matthias Kloseb9621712010-04-24 17:59:49 +000012211$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012212
12213fi
12214
Matthias Kloseb9621712010-04-24 17:59:49 +000012215ac_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 +000012216#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012217
Matthias Kloseb9621712010-04-24 17:59:49 +000012218"
Victor Stinnere0be4232011-10-25 13:06:09 +020012219if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012220
12221cat >>confdefs.h <<_ACEOF
12222#define HAVE_STRUCT_TM_TM_ZONE 1
12223_ACEOF
12224
12225
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012226fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012227
Martin v. Löwis11437992002-04-12 09:54:03 +000012228if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12229
Matthias Kloseb9621712010-04-24 17:59:49 +000012230$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012231
12232else
Matthias Kloseb9621712010-04-24 17:59:49 +000012233 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12234"
Victor Stinnere0be4232011-10-25 13:06:09 +020012235if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012236 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012237else
Matthias Kloseb9621712010-04-24 17:59:49 +000012238 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012239fi
12240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012241cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012242#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012243_ACEOF
12244
Matthias Kloseb9621712010-04-24 17:59:49 +000012245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12246$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012247if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012248 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012249else
Matthias Kloseb9621712010-04-24 17:59:49 +000012250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012251/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012252#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012253#if !HAVE_DECL_TZNAME
12254extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012255#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012256
Martin v. Löwis11437992002-04-12 09:54:03 +000012257int
12258main ()
12259{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012260return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012261 ;
12262 return 0;
12263}
12264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012265if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012266 ac_cv_var_tzname=yes
12267else
Matthias Kloseb9621712010-04-24 17:59:49 +000012268 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012270rm -f core conftest.err conftest.$ac_objext \
12271 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12274$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012275 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012276
Matthias Kloseb9621712010-04-24 17:59:49 +000012277$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012278
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012279 fi
12280fi
12281
Matthias Kloseb9621712010-04-24 17:59:49 +000012282ac_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 +020012283if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012284
12285cat >>confdefs.h <<_ACEOF
12286#define HAVE_STRUCT_STAT_ST_RDEV 1
12287_ACEOF
12288
12289
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012290fi
12291
Matthias Kloseb9621712010-04-24 17:59:49 +000012292ac_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 +020012293if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012294
Martin v. Löwis11437992002-04-12 09:54:03 +000012295cat >>confdefs.h <<_ACEOF
12296#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12297_ACEOF
12298
12299
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012300fi
12301
Matthias Kloseb9621712010-04-24 17:59:49 +000012302ac_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 +020012303if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012304
12305cat >>confdefs.h <<_ACEOF
12306#define HAVE_STRUCT_STAT_ST_FLAGS 1
12307_ACEOF
12308
12309
12310fi
12311
Matthias Kloseb9621712010-04-24 17:59:49 +000012312ac_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 +020012313if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012314
12315cat >>confdefs.h <<_ACEOF
12316#define HAVE_STRUCT_STAT_ST_GEN 1
12317_ACEOF
12318
12319
12320fi
12321
Matthias Kloseb9621712010-04-24 17:59:49 +000012322ac_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 +020012323if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012324
12325cat >>confdefs.h <<_ACEOF
12326#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12327_ACEOF
12328
12329
12330fi
12331
Matthias Kloseb9621712010-04-24 17:59:49 +000012332ac_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 +020012333if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012334
Martin v. Löwis11437992002-04-12 09:54:03 +000012335cat >>confdefs.h <<_ACEOF
12336#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12337_ACEOF
12338
12339
Matthias Kloseb9621712010-04-24 17:59:49 +000012340$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012341
12342else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012343 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012344 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012345 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12346 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012347esac
12348
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012349fi
12350
Michael W. Hudson54241132001-12-07 15:38:26 +000012351
Martin v. Löwis11437992002-04-12 09:54:03 +000012352
Matthias Kloseb9621712010-04-24 17:59:49 +000012353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12354$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012355if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012356 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012357else
Matthias Kloseb159a552010-04-25 21:00:44 +000012358
Matthias Kloseb9621712010-04-24 17:59:49 +000012359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012360/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012361#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012362int
12363main ()
12364{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012365return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012366 ;
12367 return 0;
12368}
12369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012370if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012371 ac_cv_header_time_altzone=yes
12372else
Matthias Kloseb9621712010-04-24 17:59:49 +000012373 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012376
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012377fi
12378
Matthias Kloseb9621712010-04-24 17:59:49 +000012379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12380$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012381if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012382
Matthias Kloseb9621712010-04-24 17:59:49 +000012383$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012384
12385fi
12386
Guido van Rossumda88dad1995-01-26 00:46:29 +000012387was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12389$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012391/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012392
12393#include <sys/types.h>
12394#include <sys/select.h>
12395#include <sys/time.h>
12396
Martin v. Löwis11437992002-04-12 09:54:03 +000012397int
12398main ()
12399{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012400;
Martin v. Löwis11437992002-04-12 09:54:03 +000012401 ;
12402 return 0;
12403}
12404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012405if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012406
12407
Matthias Kloseb9621712010-04-24 17:59:49 +000012408$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012409
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012410 was_it_defined=yes
12411
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12415$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012416
Matthias Kloseb9621712010-04-24 17:59:49 +000012417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12418$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012419if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012420 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012421else
Matthias Kloseb9621712010-04-24 17:59:49 +000012422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012423/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012424#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012425int
12426main ()
12427{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012428struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012429 ;
12430 return 0;
12431}
12432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012433if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012434 ac_cv_struct_addrinfo=yes
12435else
Matthias Kloseb9621712010-04-24 17:59:49 +000012436 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12439fi
12440
Matthias Kloseb9621712010-04-24 17:59:49 +000012441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12442$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012443if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012444
Matthias Kloseb9621712010-04-24 17:59:49 +000012445$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012446
12447fi
12448
Matthias Kloseb9621712010-04-24 17:59:49 +000012449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12450$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012451if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012452 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012453else
Matthias Kloseb9621712010-04-24 17:59:49 +000012454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012455/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012456
12457# include <sys/types.h>
12458# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012459int
12460main ()
12461{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012462struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012463 ;
12464 return 0;
12465}
12466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012467if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012468 ac_cv_struct_sockaddr_storage=yes
12469else
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12473fi
12474
Matthias Kloseb9621712010-04-24 17:59:49 +000012475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12476$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012477if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012478
Matthias Kloseb9621712010-04-24 17:59:49 +000012479$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012480
12481fi
12482
Guido van Rossum627b2d71993-12-24 10:39:16 +000012483# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012484
Matthias Kloseb9621712010-04-24 17:59:49 +000012485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12486$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012487if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012489else
Matthias Kloseb9621712010-04-24 17:59:49 +000012490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012491/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012492$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012493int
12494main ()
12495{
12496static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012497test_array [0] = 0;
12498return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012499
12500 ;
12501 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012502}
Martin v. Löwis11437992002-04-12 09:54:03 +000012503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012504if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012505 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012506else
Matthias Kloseb9621712010-04-24 17:59:49 +000012507 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012510fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12512$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012513if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012514 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012515
12516fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012517
Matthias Kloseb9621712010-04-24 17:59:49 +000012518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12519$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012520if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012521 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012522else
Matthias Kloseb9621712010-04-24 17:59:49 +000012523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012524/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012525
Martin v. Löwis11437992002-04-12 09:54:03 +000012526int
12527main ()
12528{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012529
Martin v. Löwis11437992002-04-12 09:54:03 +000012530#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012531 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012532 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012533 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012534 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012535 char const *const *pcpcc;
12536 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012537 /* NEC SVR4.0.2 mips cc rejects this. */
12538 struct point {int x, y;};
12539 static struct point const zero = {0,0};
12540 /* AIX XL C 1.02.0.0 rejects this.
12541 It does not let you subtract one const X* pointer from another in
12542 an arm of an if-expression whose if-part is not a constant
12543 expression */
12544 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012545 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012546 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012547 ++pcpcc;
12548 ppc = (char**) pcpcc;
12549 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012550 { /* SCO 3.2v4 cc rejects this sort of thing. */
12551 char tx;
12552 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012553 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012554
Martin v. Löwis11437992002-04-12 09:54:03 +000012555 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012556 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012557 }
12558 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12559 int x[] = {25, 17};
12560 const int *foo = &x[0];
12561 ++foo;
12562 }
12563 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12564 typedef const int *iptr;
12565 iptr p = 0;
12566 ++p;
12567 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012568 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012569 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012570 struct s { int j; const int *ap[3]; } bx;
12571 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012572 }
12573 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12574 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012575 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012576 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012577 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012578#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012579
Martin v. Löwis11437992002-04-12 09:54:03 +000012580 ;
12581 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012582}
Martin v. Löwis11437992002-04-12 09:54:03 +000012583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012584if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012585 ac_cv_c_const=yes
12586else
Matthias Kloseb9621712010-04-24 17:59:49 +000012587 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012590fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12592$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012593if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012594
Matthias Kloseb9621712010-04-24 17:59:49 +000012595$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012596
12597fi
12598
Michael W. Hudson54241132001-12-07 15:38:26 +000012599
Guido van Rossumda88dad1995-01-26 00:46:29 +000012600works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12602$as_echo_n "checking for working volatile... " >&6; }
12603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012604/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012605
Martin v. Löwis11437992002-04-12 09:54:03 +000012606int
12607main ()
12608{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012609volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012610 ;
12611 return 0;
12612}
12613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012614if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012615 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012616else
Skip Montanaro6dead952003-09-25 14:50:04 +000012617
Matthias Kloseb9621712010-04-24 17:59:49 +000012618$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012619
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012620
Guido van Rossum627b2d71993-12-24 10:39:16 +000012621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12624$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012625
Guido van Rossumda88dad1995-01-26 00:46:29 +000012626works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12628$as_echo_n "checking for working signed char... " >&6; }
12629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012630/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012631
Martin v. Löwis11437992002-04-12 09:54:03 +000012632int
12633main ()
12634{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012635signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012636 ;
12637 return 0;
12638}
12639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012640if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012641 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012642else
Skip Montanaro6dead952003-09-25 14:50:04 +000012643
Matthias Kloseb9621712010-04-24 17:59:49 +000012644$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012645
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012646
Guido van Rossum7f43da71994-08-01 12:15:30 +000012647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12650$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012651
Guido van Rossumda88dad1995-01-26 00:46:29 +000012652have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12654$as_echo_n "checking for prototypes... " >&6; }
12655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012656/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012657int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012658int
12659main ()
12660{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012661return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012662 ;
12663 return 0;
12664}
12665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012666if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012667
Matthias Kloseb9621712010-04-24 17:59:49 +000012668$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012669
Matthias Kloseb159a552010-04-25 21:00:44 +000012670 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12674$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012675
Guido van Rossumda88dad1995-01-26 00:46:29 +000012676works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12678$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012680/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012681
12682#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012683int foo(int x, ...) {
12684 va_list va;
12685 va_start(va, x);
12686 va_arg(va, int);
12687 va_arg(va, char *);
12688 va_arg(va, double);
12689 return 0;
12690}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012691
Martin v. Löwis11437992002-04-12 09:54:03 +000012692int
12693main ()
12694{
Guido van Rossum90eea071996-08-30 20:58:57 +000012695return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012696 ;
12697 return 0;
12698}
12699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012700if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012701
12702
Matthias Kloseb9621712010-04-24 17:59:49 +000012703$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012704
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012705 works=yes
12706
Guido van Rossum627b2d71993-12-24 10:39:16 +000012707fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12710$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012711
Martin v. Löwisd6320502004-08-12 13:45:08 +000012712# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12714$as_echo_n "checking for socketpair... " >&6; }
12715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012716/* end confdefs.h. */
12717
12718#include <sys/types.h>
12719#include <sys/socket.h>
12720
12721int
12722main ()
12723{
12724void *x=socketpair
12725 ;
12726 return 0;
12727}
12728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012729if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012730
Matthias Kloseb9621712010-04-24 17:59:49 +000012731$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012732
Matthias Kloseb159a552010-04-25 21:00:44 +000012733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012734$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012735else
Matthias Kloseb9621712010-04-24 17:59:49 +000012736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12737$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012738
12739fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012741
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012742# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12744$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012746/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012747#include <sys/types.h>
12748#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012749int
12750main ()
12751{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012752struct sockaddr x;
12753x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012754 ;
12755 return 0;
12756}
12757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012758if ac_fn_c_try_compile "$LINENO"; then :
12759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12760$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012761
Matthias Kloseb9621712010-04-24 17:59:49 +000012762$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012763
12764else
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12766$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012767
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012770
Guido van Rossumda88dad1995-01-26 00:46:29 +000012771va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12773$as_echo_n "checking whether va_list is an array... " >&6; }
12774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012775/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012776
12777#ifdef HAVE_STDARG_PROTOTYPES
12778#include <stdarg.h>
12779#else
12780#include <varargs.h>
12781#endif
12782
Martin v. Löwis11437992002-04-12 09:54:03 +000012783int
12784main ()
12785{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012786va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012787 ;
12788 return 0;
12789}
12790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012791if ac_fn_c_try_compile "$LINENO"; then :
12792
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012793else
Skip Montanaro6dead952003-09-25 14:50:04 +000012794
Martin v. Löwis11437992002-04-12 09:54:03 +000012795
Matthias Kloseb9621712010-04-24 17:59:49 +000012796$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012797
Guido van Rossumda88dad1995-01-26 00:46:29 +000012798 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012799
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12803$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012804
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012805# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012806
12807
Matthias Kloseb9621712010-04-24 17:59:49 +000012808ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012809if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012810
Matthias Kloseb9621712010-04-24 17:59:49 +000012811 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012812
Matthias Kloseb9621712010-04-24 17:59:49 +000012813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12814$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012815 OLD_CFLAGS=$CFLAGS
12816 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012818/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012819
12820# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012821
Martin v. Löwis11437992002-04-12 09:54:03 +000012822int
12823main ()
12824{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012825
12826 char *name;
12827 struct hostent *he, *res;
12828 char buffer[2048];
12829 int buflen = 2048;
12830 int h_errnop;
12831
12832 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012833
12834 ;
12835 return 0;
12836}
12837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012838if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012839
Matthias Kloseb9621712010-04-24 17:59:49 +000012840 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012841
Martin v. Löwis11437992002-04-12 09:54:03 +000012842
Matthias Kloseb9621712010-04-24 17:59:49 +000012843$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012844
Matthias Kloseb9621712010-04-24 17:59:49 +000012845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12846$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012847
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012848else
Skip Montanaro6dead952003-09-25 14:50:04 +000012849
Matthias Kloseb9621712010-04-24 17:59:49 +000012850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12851$as_echo "no" >&6; }
12852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12853$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012855/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012856
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012857# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012858
Martin v. Löwis11437992002-04-12 09:54:03 +000012859int
12860main ()
12861{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012862
12863 char *name;
12864 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012865 char buffer[2048];
12866 int buflen = 2048;
12867 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012868
Matthias Kloseb159a552010-04-25 21:00:44 +000012869 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012870
12871 ;
12872 return 0;
12873}
12874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012875if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012876
Matthias Kloseb9621712010-04-24 17:59:49 +000012877 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012878
Martin v. Löwis11437992002-04-12 09:54:03 +000012879
Matthias Kloseb159a552010-04-25 21:00:44 +000012880$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012881
Matthias Kloseb9621712010-04-24 17:59:49 +000012882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12883$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012884
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012885else
Skip Montanaro6dead952003-09-25 14:50:04 +000012886
Matthias Kloseb9621712010-04-24 17:59:49 +000012887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12888$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12890$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12892/* end confdefs.h. */
12893
12894# include <netdb.h>
12895
12896int
12897main ()
12898{
12899
12900 char *name;
12901 struct hostent *he;
12902 struct hostent_data data;
12903
12904 (void) gethostbyname_r(name, he, &data);
12905
12906 ;
12907 return 0;
12908}
12909_ACEOF
12910if ac_fn_c_try_compile "$LINENO"; then :
12911
12912 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12913
12914
12915$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12916
12917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12918$as_echo "yes" >&6; }
12919
12920else
12921
12922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12923$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012924
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012925fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012927
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012930
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012933 CFLAGS=$OLD_CFLAGS
12934
12935else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012936
Matthias Kloseb9621712010-04-24 17:59:49 +000012937 for ac_func in gethostbyname
12938do :
12939 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012940if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012941 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012942#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012943_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012944
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012945fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012946done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012947
Michael W. Hudson54241132001-12-07 15:38:26 +000012948
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012949fi
12950
Michael W. Hudson54241132001-12-07 15:38:26 +000012951
12952
12953
12954
12955
12956
Guido van Rossum627b2d71993-12-24 10:39:16 +000012957# checks for system services
12958# (none yet)
12959
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012960# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012961ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012962if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012963
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012964else
Matthias Kloseb9621712010-04-24 17:59:49 +000012965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12966$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012967if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012968 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012969else
Martin v. Löwis11437992002-04-12 09:54:03 +000012970 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012971LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012973/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012975/* Override any GCC internal prototype to avoid an error.
12976 Use char because int might match the return type of a GCC
12977 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012978#ifdef __cplusplus
12979extern "C"
12980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012981char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012982int
12983main ()
12984{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012985return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012986 ;
12987 return 0;
12988}
12989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012990if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012991 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012992else
Matthias Kloseb9621712010-04-24 17:59:49 +000012993 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012994fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012995rm -f core conftest.err conftest.$ac_objext \
12996 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012997LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13000$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013001if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013002 cat >>confdefs.h <<_ACEOF
13003#define HAVE_LIBIEEE 1
13004_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013005
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013006 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013007
Guido van Rossum627b2d71993-12-24 10:39:16 +000013008fi
13009
Michael W. Hudson54241132001-12-07 15:38:26 +000013010
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013011fi
13012
Michael W. Hudson54241132001-12-07 15:38:26 +000013013
Guido van Rossum7f253911997-05-09 02:42:48 +000013014# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13016$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013018# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013019if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013020 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013021if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013022then
13023
Matthias Kloseb9621712010-04-24 17:59:49 +000013024$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013025
Matthias Kloseb9621712010-04-24 17:59:49 +000013026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13027$as_echo "yes" >&6; }
13028else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13029$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013030fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013031else
Matthias Kloseb9621712010-04-24 17:59:49 +000013032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13033$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013034fi
13035
Guido van Rossum7f253911997-05-09 02:42:48 +000013036
Guido van Rossum7f43da71994-08-01 12:15:30 +000013037# check for --with-libm=...
13038
Guido van Rossum563e7081996-09-10 18:20:48 +000013039case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013040Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013041*) LIBM=-lm
13042esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13044$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013046# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013047if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013048 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013049if test "$withval" = no
13050then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13052$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013053elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013054then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13056$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013057else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013058fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013059else
Matthias Kloseb9621712010-04-24 17:59:49 +000013060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13061$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013062fi
13063
Guido van Rossum7f43da71994-08-01 12:15:30 +000013064
13065# check for --with-libc=...
13066
Matthias Kloseb9621712010-04-24 17:59:49 +000013067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13068$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013069
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013070# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013071if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013072 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013073if test "$withval" = no
13074then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13076$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013077elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013078then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13080$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013081else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013082fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013083else
Matthias Kloseb9621712010-04-24 17:59:49 +000013084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13085$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013086fi
13087
Guido van Rossum7f43da71994-08-01 12:15:30 +000013088
Stefan Krah1919b7e2012-03-21 18:25:23 +010013089# **************************************
13090# * Check for gcc x64 inline assembler *
13091# **************************************
13092
13093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13094$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13096/* end confdefs.h. */
13097
13098int
13099main ()
13100{
13101
13102 __asm__ __volatile__ ("movq %rcx, %rax");
13103
13104 ;
13105 return 0;
13106}
13107_ACEOF
13108if ac_fn_c_try_compile "$LINENO"; then :
13109 have_gcc_asm_for_x64=yes
13110else
13111 have_gcc_asm_for_x64=no
13112fi
13113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13115$as_echo "$have_gcc_asm_for_x64" >&6; }
13116if test "$have_gcc_asm_for_x64" = yes
13117then
13118
13119$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13120
13121fi
13122
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013123# **************************************************
13124# * Check for various properties of floating point *
13125# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013126
Matthias Kloseb9621712010-04-24 17:59:49 +000013127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13128$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013129if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013130 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013131else
13132
Matthias Kloseb9621712010-04-24 17:59:49 +000013133if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013134 ac_cv_little_endian_double=no
13135else
Matthias Kloseb9621712010-04-24 17:59:49 +000013136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013137/* end confdefs.h. */
13138
13139#include <string.h>
13140int main() {
13141 double x = 9006104071832581.0;
13142 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13143 return 0;
13144 else
13145 return 1;
13146}
13147
13148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013149if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013150 ac_cv_little_endian_double=yes
13151else
Matthias Kloseb9621712010-04-24 17:59:49 +000013152 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13155 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013156fi
13157
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013158fi
13159
Matthias Kloseb9621712010-04-24 17:59:49 +000013160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13161$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013162if test "$ac_cv_little_endian_double" = yes
13163then
13164
Matthias Kloseb9621712010-04-24 17:59:49 +000013165$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013166
13167fi
13168
Matthias Kloseb9621712010-04-24 17:59:49 +000013169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13170$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013171if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013172 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013173else
13174
Matthias Kloseb9621712010-04-24 17:59:49 +000013175if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013176 ac_cv_big_endian_double=no
13177else
Matthias Kloseb9621712010-04-24 17:59:49 +000013178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013179/* end confdefs.h. */
13180
13181#include <string.h>
13182int main() {
13183 double x = 9006104071832581.0;
13184 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13185 return 0;
13186 else
13187 return 1;
13188}
13189
13190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013191if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013192 ac_cv_big_endian_double=yes
13193else
Matthias Kloseb9621712010-04-24 17:59:49 +000013194 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013196rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13197 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013198fi
13199
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013200fi
13201
Matthias Kloseb9621712010-04-24 17:59:49 +000013202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13203$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013204if test "$ac_cv_big_endian_double" = yes
13205then
13206
Matthias Kloseb9621712010-04-24 17:59:49 +000013207$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013208
13209fi
13210
13211# Some ARM platforms use a mixed-endian representation for doubles.
13212# While Python doesn't currently have full support for these platforms
13213# (see e.g., issue 1762561), we can at least make sure that float <-> string
13214# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13216$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013217if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013218 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013219else
13220
Matthias Kloseb9621712010-04-24 17:59:49 +000013221if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013222 ac_cv_mixed_endian_double=no
13223else
Matthias Kloseb9621712010-04-24 17:59:49 +000013224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013225/* end confdefs.h. */
13226
13227#include <string.h>
13228int main() {
13229 double x = 9006104071832581.0;
13230 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13231 return 0;
13232 else
13233 return 1;
13234}
13235
13236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013237if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013238 ac_cv_mixed_endian_double=yes
13239else
Matthias Kloseb9621712010-04-24 17:59:49 +000013240 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013242rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13243 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013244fi
13245
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013246fi
13247
Matthias Kloseb9621712010-04-24 17:59:49 +000013248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13249$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013250if test "$ac_cv_mixed_endian_double" = yes
13251then
13252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013254
13255fi
13256
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013257# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013258# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013259# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013260# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013261# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013262# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013263
13264# This inline assembler syntax may also work for suncc and icc,
13265# so we try it on all platforms.
13266
Matthias Kloseb9621712010-04-24 17:59:49 +000013267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13268$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013270/* end confdefs.h. */
13271
13272int
13273main ()
13274{
13275
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013276 unsigned short cw;
13277 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13278 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013279
13280 ;
13281 return 0;
13282}
13283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013284if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013285 have_gcc_asm_for_x87=yes
13286else
Matthias Kloseb9621712010-04-24 17:59:49 +000013287 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013288fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13291$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013292if test "$have_gcc_asm_for_x87" = yes
13293then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013294
Matthias Kloseb9621712010-04-24 17:59:49 +000013295$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013296
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013297fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013298
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13300$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13302/* end confdefs.h. */
13303
13304int
13305main ()
13306{
13307
13308 unsigned int fpcr;
13309 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13310 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13311
13312 ;
13313 return 0;
13314}
13315_ACEOF
13316if ac_fn_c_try_compile "$LINENO"; then :
13317 have_gcc_asm_for_mc68881=yes
13318else
13319 have_gcc_asm_for_mc68881=no
13320fi
13321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13323$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13324if test "$have_gcc_asm_for_mc68881" = yes
13325then
13326
13327$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13328
13329fi
13330
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013331# Detect whether system arithmetic is subject to x87-style double
13332# rounding issues. The result of this test has little meaning on non
13333# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13334# mode is round-to-nearest and double rounding issues are present, and
13335# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13337$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013338# $BASECFLAGS may affect the result
13339ac_save_cc="$CC"
13340CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013341if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013342 ac_cv_x87_double_rounding=no
13343else
Matthias Kloseb9621712010-04-24 17:59:49 +000013344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013345/* end confdefs.h. */
13346
13347#include <stdlib.h>
13348#include <math.h>
13349int main() {
13350 volatile double x, y, z;
13351 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13352 x = 0.99999999999999989; /* 1-2**-53 */
13353 y = 1./x;
13354 if (y != 1.)
13355 exit(0);
13356 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13357 x = 1e16;
13358 y = 2.99999;
13359 z = x + y;
13360 if (z != 1e16+4.)
13361 exit(0);
13362 /* both tests show evidence of double rounding */
13363 exit(1);
13364}
13365
13366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013367if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013368 ac_cv_x87_double_rounding=no
13369else
Matthias Kloseb9621712010-04-24 17:59:49 +000013370 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +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 Dickinson3dc7c6a2009-01-04 15:09:02 +000013374fi
13375
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013376CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13378$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013379if test "$ac_cv_x87_double_rounding" = yes
13380then
13381
Matthias Kloseb9621712010-04-24 17:59:49 +000013382$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013383
13384fi
13385
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013386# ************************************
13387# * Check for mathematical functions *
13388# ************************************
13389
13390LIBS_SAVE=$LIBS
13391LIBS="$LIBS $LIBM"
13392
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013393for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13394do :
13395 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13396ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013397if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013398 cat >>confdefs.h <<_ACEOF
13399#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13400_ACEOF
13401
13402fi
13403done
13404
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013405for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013406do :
13407 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13408ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013409if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013410 cat >>confdefs.h <<_ACEOF
13411#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13412_ACEOF
13413
13414fi
13415done
13416
13417ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13418"
Victor Stinnere0be4232011-10-25 13:06:09 +020013419if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013420 ac_have_decl=1
13421else
13422 ac_have_decl=0
13423fi
13424
13425cat >>confdefs.h <<_ACEOF
13426#define HAVE_DECL_ISINF $ac_have_decl
13427_ACEOF
13428ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13429"
Victor Stinnere0be4232011-10-25 13:06:09 +020013430if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013431 ac_have_decl=1
13432else
13433 ac_have_decl=0
13434fi
13435
13436cat >>confdefs.h <<_ACEOF
13437#define HAVE_DECL_ISNAN $ac_have_decl
13438_ACEOF
13439ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13440"
Victor Stinnere0be4232011-10-25 13:06:09 +020013441if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013442 ac_have_decl=1
13443else
13444 ac_have_decl=0
13445fi
13446
13447cat >>confdefs.h <<_ACEOF
13448#define HAVE_DECL_ISFINITE $ac_have_decl
13449_ACEOF
13450
13451
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013452# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13453# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13455$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013456if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013457 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013458else
13459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013461 ac_cv_tanh_preserves_zero_sign=no
13462else
Matthias Kloseb9621712010-04-24 17:59:49 +000013463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013464/* end confdefs.h. */
13465
13466#include <math.h>
13467#include <stdlib.h>
13468int main() {
13469 /* return 0 if either negative zeros don't exist
13470 on this platform or if negative zeros exist
13471 and tanh(-0.) == -0. */
13472 if (atan2(0., -1.) == atan2(-0., -1.) ||
13473 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13474 else exit(1);
13475}
13476
13477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013478if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013479 ac_cv_tanh_preserves_zero_sign=yes
13480else
Matthias Kloseb9621712010-04-24 17:59:49 +000013481 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013482fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013483rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13484 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013485fi
13486
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013487fi
13488
Matthias Kloseb9621712010-04-24 17:59:49 +000013489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13490$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013491if test "$ac_cv_tanh_preserves_zero_sign" = yes
13492then
13493
Matthias Kloseb9621712010-04-24 17:59:49 +000013494$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013495
13496fi
13497
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013498if test "$ac_cv_func_log1p" = yes
13499then
13500 # On some versions of AIX, log1p(-0.) returns 0. instead of
13501 # -0. See issue #9920.
13502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13503$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013504 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013505 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013506else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013507
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013508 if test "$cross_compiling" = yes; then :
13509 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013510else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13512/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013513
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013514 #include <math.h>
13515 #include <stdlib.h>
13516 int main() {
13517 /* Fail if the signs of log1p(-0.) and -0. can be
13518 distinguished. */
13519 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13520 return 0;
13521 else
13522 return 1;
13523 }
13524
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013525_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013526if ac_fn_c_try_run "$LINENO"; then :
13527 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013528else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013529 ac_cv_log1p_drops_zero_sign=yes
13530fi
13531rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13532 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013533fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013534
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013535fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013536
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13538$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13539fi
13540if test "$ac_cv_log1p_drops_zero_sign" = yes
13541then
13542
13543$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13544
13545fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013546
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013547LIBS=$LIBS_SAVE
13548
Mark Dickinsona614f042009-11-28 12:48:43 +000013549# For multiprocessing module, check that sem_open
13550# actually works. For FreeBSD versions <= 7.2,
13551# the kernel module that provides POSIX semaphores
13552# isn't loaded by default, so an attempt to call
13553# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13555$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013556if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013557 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013558else
Matthias Kloseb9621712010-04-24 17:59:49 +000013559 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013560 ac_cv_posix_semaphores_enabled=yes
13561else
Matthias Kloseb9621712010-04-24 17:59:49 +000013562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013563/* end confdefs.h. */
13564
13565#include <unistd.h>
13566#include <fcntl.h>
13567#include <stdio.h>
13568#include <semaphore.h>
13569#include <sys/stat.h>
13570
13571int main(void) {
13572 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13573 if (a == SEM_FAILED) {
13574 perror("sem_open");
13575 return 1;
13576 }
13577 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013578 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013579 return 0;
13580}
13581
13582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013583if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013584 ac_cv_posix_semaphores_enabled=yes
13585else
Matthias Kloseb9621712010-04-24 17:59:49 +000013586 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13589 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013590fi
13591
13592
Mark Dickinsona614f042009-11-28 12:48:43 +000013593fi
13594
Matthias Kloseb9621712010-04-24 17:59:49 +000013595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13596$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013597if test $ac_cv_posix_semaphores_enabled = no
13598then
13599
Matthias Kloseb9621712010-04-24 17:59:49 +000013600$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013601
13602fi
13603
Mark Dickinson10683072009-04-18 21:18:19 +000013604# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13606$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013607if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013608 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013609else
Matthias Kloseb9621712010-04-24 17:59:49 +000013610 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013611 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013612else
Matthias Kloseb9621712010-04-24 17:59:49 +000013613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013614/* end confdefs.h. */
13615
13616#include <unistd.h>
13617#include <fcntl.h>
13618#include <stdio.h>
13619#include <semaphore.h>
13620#include <sys/stat.h>
13621
13622int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013623 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013624 int count;
13625 int res;
13626 if(a==SEM_FAILED){
13627 perror("sem_open");
13628 return 1;
13629
13630 }
13631 res = sem_getvalue(a, &count);
13632 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013633 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013634 return res==-1 ? 1 : 0;
13635}
13636
Mark Dickinson10683072009-04-18 21:18:19 +000013637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013638if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013639 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013640else
Matthias Kloseb9621712010-04-24 17:59:49 +000013641 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013643rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13644 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013645fi
13646
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013647
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013648fi
13649
Matthias Kloseb9621712010-04-24 17:59:49 +000013650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13651$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013652if test $ac_cv_broken_sem_getvalue = yes
13653then
13654
Matthias Kloseb9621712010-04-24 17:59:49 +000013655$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013656
13657fi
13658
Mark Dickinsonbd792642009-03-18 20:06:12 +000013659# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13661$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013662# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013663if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013664 enableval=$enable_big_digits; case $enable_big_digits in
13665yes)
13666 enable_big_digits=30 ;;
13667no)
13668 enable_big_digits=15 ;;
1366915|30)
13670 ;;
13671*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013672 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 +000013673esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13675$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013676
13677cat >>confdefs.h <<_ACEOF
13678#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13679_ACEOF
13680
13681
13682else
Matthias Kloseb9621712010-04-24 17:59:49 +000013683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13684$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013685fi
13686
13687
Guido van Rossumef2255b2000-03-10 22:30:29 +000013688# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013689ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013690if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013691
13692
Matthias Kloseb9621712010-04-24 17:59:49 +000013693$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013694
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013695 wchar_h="yes"
13696
Guido van Rossumef2255b2000-03-10 22:30:29 +000013697else
Martin v. Löwis11437992002-04-12 09:54:03 +000013698 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013699
13700fi
13701
Michael W. Hudson54241132001-12-07 15:38:26 +000013702
Martin v. Löwis11437992002-04-12 09:54:03 +000013703
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013704# determine wchar_t size
13705if test "$wchar_h" = yes
13706then
Matthias Kloseb9621712010-04-24 17:59:49 +000013707 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013708# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13709# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13710# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13712$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013713if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013714 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013715else
Matthias Kloseb9621712010-04-24 17:59:49 +000013716 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13717"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013718
Martin v. Löwis11437992002-04-12 09:54:03 +000013719else
Matthias Kloseb9621712010-04-24 17:59:49 +000013720 if test "$ac_cv_type_wchar_t" = yes; then
13721 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13722$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013723as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013724See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013725 else
13726 ac_cv_sizeof_wchar_t=0
13727 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013729
Martin v. Löwis11437992002-04-12 09:54:03 +000013730fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13732$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013733
13734
13735
Martin v. Löwis11437992002-04-12 09:54:03 +000013736cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013737#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013738_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013739
Michael W. Hudson54241132001-12-07 15:38:26 +000013740
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013741fi
13742
Matthias Kloseb9621712010-04-24 17:59:49 +000013743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13744$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013745have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013747/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013748
13749#include <tcl.h>
13750#if TCL_UTF_MAX != 6
13751# error "NOT UCS4_TCL"
13752#endif
13753int
13754main ()
13755{
13756
13757 ;
13758 return 0;
13759}
13760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013761if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013762
13763
Matthias Kloseb9621712010-04-24 17:59:49 +000013764$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013765
13766 have_ucs4_tcl=yes
13767
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13771$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013772
Skip Montanaro6dead952003-09-25 14:50:04 +000013773# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013774if test "$wchar_h" = yes
13775then
13776 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13778$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013779 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013781else
13782
Matthias Kloseb9621712010-04-24 17:59:49 +000013783 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013784 ac_cv_wchar_t_signed=yes
13785else
Matthias Kloseb9621712010-04-24 17:59:49 +000013786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013787/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013788
13789 #include <wchar.h>
13790 int main()
13791 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013792 /* Success: exit code 0 */
13793 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013794 }
13795
13796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013797if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013798 ac_cv_wchar_t_signed=yes
13799else
Matthias Kloseb9621712010-04-24 17:59:49 +000013800 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13803 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013804fi
13805
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013806fi
13807
Matthias Kloseb9621712010-04-24 17:59:49 +000013808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13809$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013810fi
13811
Georg Brandl52d168a2008-01-07 18:10:24 +000013812# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013813if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013814 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013815then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013816 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013817
Matthias Kloseb9621712010-04-24 17:59:49 +000013818$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013819
Georg Brandl52d168a2008-01-07 18:10:24 +000013820else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013821 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013822fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13824$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013825
13826# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13828$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013829if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013830 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013831else
Matthias Kloseb9621712010-04-24 17:59:49 +000013832 ac_cv_c_bigendian=unknown
13833 # See if we're dealing with a universal compiler.
13834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13835/* end confdefs.h. */
13836#ifndef __APPLE_CC__
13837 not a universal capable compiler
13838 #endif
13839 typedef int dummy;
13840
Skip Montanaro6dead952003-09-25 14:50:04 +000013841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013842if ac_fn_c_try_compile "$LINENO"; then :
13843
13844 # Check for potential -arch flags. It is not universal unless
13845 # there are at least two -arch flags with different values.
13846 ac_arch=
13847 ac_prev=
13848 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13849 if test -n "$ac_prev"; then
13850 case $ac_word in
13851 i?86 | x86_64 | ppc | ppc64)
13852 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13853 ac_arch=$ac_word
13854 else
13855 ac_cv_c_bigendian=universal
13856 break
13857 fi
13858 ;;
13859 esac
13860 ac_prev=
13861 elif test "x$ac_word" = "x-arch"; then
13862 ac_prev=arch
13863 fi
13864 done
13865fi
13866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13867 if test $ac_cv_c_bigendian = unknown; then
13868 # See if sys/param.h defines the BYTE_ORDER macro.
13869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013870/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013871#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013872 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013873
Martin v. Löwis11437992002-04-12 09:54:03 +000013874int
13875main ()
13876{
Matthias Kloseb9621712010-04-24 17:59:49 +000013877#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13878 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13879 && LITTLE_ENDIAN)
13880 bogus endian macros
13881 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013882
13883 ;
13884 return 0;
13885}
13886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013887if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013888 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013890/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013891#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013892 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013893
Martin v. Löwis11437992002-04-12 09:54:03 +000013894int
13895main ()
13896{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013897#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013898 not big endian
13899 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013900
13901 ;
13902 return 0;
13903}
13904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013905if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013906 ac_cv_c_bigendian=yes
13907else
Matthias Kloseb9621712010-04-24 17:59:49 +000013908 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013911fi
13912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13913 fi
13914 if test $ac_cv_c_bigendian = unknown; then
13915 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013917/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013918#include <limits.h>
13919
Martin v. Löwis11437992002-04-12 09:54:03 +000013920int
13921main ()
13922{
Matthias Kloseb9621712010-04-24 17:59:49 +000013923#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13924 bogus endian macros
13925 #endif
13926
Martin v. Löwis11437992002-04-12 09:54:03 +000013927 ;
13928 return 0;
13929}
13930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013931if ac_fn_c_try_compile "$LINENO"; then :
13932 # It does; now see whether it defined to _BIG_ENDIAN or not.
13933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13934/* end confdefs.h. */
13935#include <limits.h>
13936
13937int
13938main ()
13939{
13940#ifndef _BIG_ENDIAN
13941 not big endian
13942 #endif
13943
13944 ;
13945 return 0;
13946}
13947_ACEOF
13948if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013949 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013950else
Matthias Kloseb9621712010-04-24 17:59:49 +000013951 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013952fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13954fi
13955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13956 fi
13957 if test $ac_cv_c_bigendian = unknown; then
13958 # Compile a test program.
13959 if test "$cross_compiling" = yes; then :
13960 # Try to guess by grepping values from an object file.
13961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13962/* end confdefs.h. */
13963short int ascii_mm[] =
13964 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13965 short int ascii_ii[] =
13966 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13967 int use_ascii (int i) {
13968 return ascii_mm[i] + ascii_ii[i];
13969 }
13970 short int ebcdic_ii[] =
13971 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13972 short int ebcdic_mm[] =
13973 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13974 int use_ebcdic (int i) {
13975 return ebcdic_mm[i] + ebcdic_ii[i];
13976 }
13977 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013978
Matthias Kloseb9621712010-04-24 17:59:49 +000013979int
13980main ()
13981{
13982return use_ascii (foo) == use_ebcdic (foo);
13983 ;
13984 return 0;
13985}
13986_ACEOF
13987if ac_fn_c_try_compile "$LINENO"; then :
13988 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13989 ac_cv_c_bigendian=yes
13990 fi
13991 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13992 if test "$ac_cv_c_bigendian" = unknown; then
13993 ac_cv_c_bigendian=no
13994 else
13995 # finding both strings is unlikely to happen, but who knows?
13996 ac_cv_c_bigendian=unknown
13997 fi
13998 fi
13999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014001else
Matthias Kloseb9621712010-04-24 17:59:49 +000014002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014003/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014004$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014005int
14006main ()
14007{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014008
Matthias Kloseb9621712010-04-24 17:59:49 +000014009 /* Are we little or big endian? From Harbison&Steele. */
14010 union
14011 {
14012 long int l;
14013 char c[sizeof (long int)];
14014 } u;
14015 u.l = 1;
14016 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014017
14018 ;
14019 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014020}
Martin v. Löwis11437992002-04-12 09:54:03 +000014021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014022if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014023 ac_cv_c_bigendian=no
14024else
Matthias Kloseb9621712010-04-24 17:59:49 +000014025 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014026fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014027rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14028 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014030
Matthias Kloseb9621712010-04-24 17:59:49 +000014031 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014032fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14034$as_echo "$ac_cv_c_bigendian" >&6; }
14035 case $ac_cv_c_bigendian in #(
14036 yes)
14037 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14038;; #(
14039 no)
14040 ;; #(
14041 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014042
Matthias Kloseb9621712010-04-24 17:59:49 +000014043$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014044
Matthias Kloseb9621712010-04-24 17:59:49 +000014045 ;; #(
14046 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014047 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014048 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014049 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014050
Michael W. Hudson54241132001-12-07 15:38:26 +000014051
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014052# ABI version string for Python extension modules. This appears between the
14053# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14054# from the following attributes which affect the ABI of this Python build (in
14055# this order):
14056#
14057# * The Python implementation (always 'cpython-' for us)
14058# * The major and minor version numbers
14059# * --with-pydebug (adds a 'd')
14060# * --with-pymalloc (adds a 'm')
14061# * --with-wide-unicode (adds a 'u')
14062#
14063# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014064# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14065# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014066
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14068$as_echo_n "checking ABIFLAGS... " >&6; }
14069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14070$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14072$as_echo_n "checking SOABI... " >&6; }
Antoine Pitrou5bd7bf52015-03-08 20:43:10 +010014073
14074case $ac_sys_system in
14075 Linux*|GNU*)
14076 BITNESS_SUFFIX=-$(($ac_cv_sizeof_void_p * 8))b;;
14077 *)
14078 BITNESS_SUFFIX=;;
14079esac
14080SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${BITNESS_SUFFIX}
14081
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14083$as_echo "$SOABI" >&6; }
14084
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014085
14086case $ac_sys_system in
14087 Linux*|GNU*)
14088 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14089 *)
14090 EXT_SUFFIX=${SHLIB_SUFFIX};;
14091esac
14092
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14094$as_echo_n "checking LDVERSION... " >&6; }
14095LDVERSION='$(VERSION)$(ABIFLAGS)'
14096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14097$as_echo "$LDVERSION" >&6; }
14098
doko@python.org87421192013-01-26 11:39:31 +010014099
14100LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
14101
14102
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014103# Check whether right shifting a negative integer extends the sign bit
14104# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14106$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014107if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014108 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014109else
Martin v. Löwis11437992002-04-12 09:54:03 +000014110
Matthias Kloseb9621712010-04-24 17:59:49 +000014111if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014112 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014113else
Matthias Kloseb9621712010-04-24 17:59:49 +000014114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014115/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014116
14117int main()
14118{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014119 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014120}
14121
Martin v. Löwis11437992002-04-12 09:54:03 +000014122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014123if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014124 ac_cv_rshift_extends_sign=yes
14125else
Matthias Kloseb9621712010-04-24 17:59:49 +000014126 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014128rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14129 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014130fi
14131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014132fi
14133
Matthias Kloseb9621712010-04-24 17:59:49 +000014134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14135$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014136if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014137then
Martin v. Löwis11437992002-04-12 09:54:03 +000014138
Matthias Kloseb9621712010-04-24 17:59:49 +000014139$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014140
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014141fi
14142
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014143# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14145$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014146if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014147 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014148else
Martin v. Löwis11437992002-04-12 09:54:03 +000014149
Matthias Kloseb9621712010-04-24 17:59:49 +000014150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014151/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014152#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014153int
14154main ()
14155{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014156
14157 FILE *f = fopen("/dev/null", "r");
14158 flockfile(f);
14159 getc_unlocked(f);
14160 funlockfile(f);
14161
Martin v. Löwis11437992002-04-12 09:54:03 +000014162 ;
14163 return 0;
14164}
14165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014166if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014167 ac_cv_have_getc_unlocked=yes
14168else
Matthias Kloseb9621712010-04-24 17:59:49 +000014169 ac_cv_have_getc_unlocked=no
14170fi
14171rm -f core conftest.err conftest.$ac_objext \
14172 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014174
Matthias Kloseb9621712010-04-24 17:59:49 +000014175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14176$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014177if test "$ac_cv_have_getc_unlocked" = yes
14178then
Martin v. Löwis11437992002-04-12 09:54:03 +000014179
Matthias Kloseb9621712010-04-24 17:59:49 +000014180$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014181
14182fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014183
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014184# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014185# save the value of LIBS so we don't actually link Python with readline
14186LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014187
Gregory P. Smith18820942008-09-07 06:24:49 +000014188# On some systems we need to link readline to a termcap compatible
14189# library. NOTE: Keep the precedence of listed libraries synchronised
14190# with setup.py.
14191py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14193$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014194for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014195 if test -z "$py_libtermcap"; then
14196 READLINE_LIBS="-lreadline"
14197 else
14198 READLINE_LIBS="-lreadline -l$py_libtermcap"
14199 fi
14200 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014202/* end confdefs.h. */
14203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014204/* Override any GCC internal prototype to avoid an error.
14205 Use char because int might match the return type of a GCC
14206 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014207#ifdef __cplusplus
14208extern "C"
14209#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014210char readline ();
14211int
14212main ()
14213{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014214return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014215 ;
14216 return 0;
14217}
14218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014219if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014220 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014222rm -f core conftest.err conftest.$ac_objext \
14223 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014224 if test $py_cv_lib_readline = yes; then
14225 break
14226 fi
14227done
14228# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14229#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014230if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14232$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014233else
Matthias Kloseb9621712010-04-24 17:59:49 +000014234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14235$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014236
Matthias Kloseb9621712010-04-24 17:59:49 +000014237$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014238
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014239fi
14240
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014241# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14243$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014244if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014245 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014246else
14247 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014248LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014250/* end confdefs.h. */
14251
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014252/* Override any GCC internal prototype to avoid an error.
14253 Use char because int might match the return type of a GCC
14254 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014255#ifdef __cplusplus
14256extern "C"
14257#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014258char rl_callback_handler_install ();
14259int
14260main ()
14261{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014262return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014263 ;
14264 return 0;
14265}
14266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014267if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014268 ac_cv_lib_readline_rl_callback_handler_install=yes
14269else
Matthias Kloseb9621712010-04-24 17:59:49 +000014270 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014271fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014272rm -f core conftest.err conftest.$ac_objext \
14273 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014274LIBS=$ac_check_lib_save_LIBS
14275fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14277$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014278if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014279
Matthias Kloseb9621712010-04-24 17:59:49 +000014280$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014281
14282fi
14283
14284
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014285# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014287/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014288#include <readline/readline.h>
14289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014290if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014291 have_readline=yes
14292else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014293 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014294
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014295fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014296rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014297if test $have_readline = yes
14298then
Matthias Kloseb9621712010-04-24 17:59:49 +000014299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014300/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014301#include <readline/readline.h>
14302
14303_ACEOF
14304if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014305 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014306
Matthias Kloseb9621712010-04-24 17:59:49 +000014307$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014308
14309fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014310rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014311
Matthias Kloseb9621712010-04-24 17:59:49 +000014312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014313/* end confdefs.h. */
14314#include <readline/readline.h>
14315
14316_ACEOF
14317if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014318 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014319
Matthias Kloseb9621712010-04-24 17:59:49 +000014320$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014321
14322fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014323rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014324
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014325fi
14326
Martin v. Löwis0daad592001-09-30 21:09:59 +000014327# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14329$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014330if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014331 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014332else
Martin v. Löwis11437992002-04-12 09:54:03 +000014333 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014334LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014338/* Override any GCC internal prototype to avoid an error.
14339 Use char because int might match the return type of a GCC
14340 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014341#ifdef __cplusplus
14342extern "C"
14343#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014344char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014345int
14346main ()
14347{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014348return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014349 ;
14350 return 0;
14351}
14352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014353if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014354 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014355else
Matthias Kloseb9621712010-04-24 17:59:49 +000014356 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014358rm -f core conftest.err conftest.$ac_objext \
14359 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014360LIBS=$ac_check_lib_save_LIBS
14361fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14363$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014364if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014365
Matthias Kloseb9621712010-04-24 17:59:49 +000014366$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014367
Martin v. Löwis0daad592001-09-30 21:09:59 +000014368fi
14369
Michael W. Hudson54241132001-12-07 15:38:26 +000014370
Thomas Wouters89d996e2007-09-08 17:39:28 +000014371# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14373$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014374if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014375 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014376else
14377 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014378LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014380/* end confdefs.h. */
14381
14382/* Override any GCC internal prototype to avoid an error.
14383 Use char because int might match the return type of a GCC
14384 builtin and then its argument prototype would still apply. */
14385#ifdef __cplusplus
14386extern "C"
14387#endif
14388char rl_completion_display_matches_hook ();
14389int
14390main ()
14391{
14392return rl_completion_display_matches_hook ();
14393 ;
14394 return 0;
14395}
14396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014397if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014398 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14399else
Matthias Kloseb9621712010-04-24 17:59:49 +000014400 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014402rm -f core conftest.err conftest.$ac_objext \
14403 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014404LIBS=$ac_check_lib_save_LIBS
14405fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14407$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014408if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014409
Matthias Kloseb9621712010-04-24 17:59:49 +000014410$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014411
14412fi
14413
14414
Martin v. Löwis0daad592001-09-30 21:09:59 +000014415# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14417$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014418if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014419 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014420else
Martin v. Löwis11437992002-04-12 09:54:03 +000014421 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014422LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014426/* Override any GCC internal prototype to avoid an error.
14427 Use char because int might match the return type of a GCC
14428 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014429#ifdef __cplusplus
14430extern "C"
14431#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014432char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014433int
14434main ()
14435{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014436return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014437 ;
14438 return 0;
14439}
14440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014441if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014442 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014443else
Matthias Kloseb9621712010-04-24 17:59:49 +000014444 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014445fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014446rm -f core conftest.err conftest.$ac_objext \
14447 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014448LIBS=$ac_check_lib_save_LIBS
14449fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14451$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014452if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014453
Matthias Kloseb9621712010-04-24 17:59:49 +000014454$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014455
Guido van Rossum353ae582001-07-10 16:45:32 +000014456fi
14457
Jack Jansendd19cf82001-12-06 22:36:17 +000014458
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014459# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014461/* end confdefs.h. */
14462#include <readline/readline.h>
14463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014464if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014465 have_readline=yes
14466else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014467 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014468
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014469fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014470rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014471if test $have_readline = yes
14472then
Matthias Kloseb9621712010-04-24 17:59:49 +000014473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014474/* end confdefs.h. */
14475#include <readline/readline.h>
14476
14477_ACEOF
14478if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014479 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014480
Matthias Kloseb9621712010-04-24 17:59:49 +000014481$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014482
14483fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014484rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014485
14486fi
14487
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060014488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
14489$as_echo_n "checking for append_history in -lreadline... " >&6; }
14490if ${ac_cv_lib_readline_append_history+:} false; then :
14491 $as_echo_n "(cached) " >&6
14492else
14493 ac_check_lib_save_LIBS=$LIBS
14494LIBS="-lreadline $READLINE_LIBS $LIBS"
14495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14496/* end confdefs.h. */
14497
14498/* Override any GCC internal prototype to avoid an error.
14499 Use char because int might match the return type of a GCC
14500 builtin and then its argument prototype would still apply. */
14501#ifdef __cplusplus
14502extern "C"
14503#endif
14504char append_history ();
14505int
14506main ()
14507{
14508return append_history ();
14509 ;
14510 return 0;
14511}
14512_ACEOF
14513if ac_fn_c_try_link "$LINENO"; then :
14514 ac_cv_lib_readline_append_history=yes
14515else
14516 ac_cv_lib_readline_append_history=no
14517fi
14518rm -f core conftest.err conftest.$ac_objext \
14519 conftest$ac_exeext conftest.$ac_ext
14520LIBS=$ac_check_lib_save_LIBS
14521fi
14522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
14523$as_echo "$ac_cv_lib_readline_append_history" >&6; }
14524if test "x$ac_cv_lib_readline_append_history" = xyes; then :
14525
14526$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
14527
14528fi
14529
14530
Martin v. Löwis82bca632006-02-10 20:49:30 +000014531# End of readline checks: restore LIBS
14532LIBS=$LIBS_no_readline
14533
Matthias Kloseb9621712010-04-24 17:59:49 +000014534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14535$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014536if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014537 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014538else
Martin v. Löwis11437992002-04-12 09:54:03 +000014539
Matthias Kloseb9621712010-04-24 17:59:49 +000014540if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014541 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014542else
Matthias Kloseb9621712010-04-24 17:59:49 +000014543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014544/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014545
14546int main()
14547{
14548 int val1 = nice(1);
14549 if (val1 != -1 && val1 == nice(2))
14550 exit(0);
14551 exit(1);
14552}
14553
Martin v. Löwis11437992002-04-12 09:54:03 +000014554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014555if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014556 ac_cv_broken_nice=yes
14557else
Matthias Kloseb9621712010-04-24 17:59:49 +000014558 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014559fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14561 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014562fi
14563
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014564fi
14565
Matthias Kloseb9621712010-04-24 17:59:49 +000014566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14567$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014568if test "$ac_cv_broken_nice" = yes
14569then
Martin v. Löwis11437992002-04-12 09:54:03 +000014570
Matthias Kloseb9621712010-04-24 17:59:49 +000014571$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014572
14573fi
14574
Matthias Kloseb9621712010-04-24 17:59:49 +000014575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14576$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014577if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014579else
Matthias Kloseb9621712010-04-24 17:59:49 +000014580 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014581 ac_cv_broken_poll=no
14582else
Matthias Kloseb9621712010-04-24 17:59:49 +000014583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014584/* end confdefs.h. */
14585
14586#include <poll.h>
14587
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014588int main()
14589{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014590 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014591 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014592
14593 close (42);
14594
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014595 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014596 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014597 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014598 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014599 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014600 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014601 return 1;
14602}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014603
14604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014605if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014606 ac_cv_broken_poll=yes
14607else
Matthias Kloseb9621712010-04-24 17:59:49 +000014608 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014609fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014610rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14611 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014613
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014614fi
14615
Matthias Kloseb9621712010-04-24 17:59:49 +000014616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14617$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014618if test "$ac_cv_broken_poll" = yes
14619then
14620
Matthias Kloseb9621712010-04-24 17:59:49 +000014621$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014622
14623fi
14624
Brett Cannon43802422005-02-10 20:48:03 +000014625# 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 +000014626# (which is not required by ISO C or UNIX spec) and/or if we support
14627# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014628ac_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 +000014629#include <$ac_cv_struct_tm>
14630
Matthias Kloseb9621712010-04-24 17:59:49 +000014631"
Victor Stinnere0be4232011-10-25 13:06:09 +020014632if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014633
14634cat >>confdefs.h <<_ACEOF
14635#define HAVE_STRUCT_TM_TM_ZONE 1
14636_ACEOF
14637
14638
14639fi
14640
14641if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14642
Matthias Kloseb9621712010-04-24 17:59:49 +000014643$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014644
14645else
Matthias Kloseb9621712010-04-24 17:59:49 +000014646 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14647"
Victor Stinnere0be4232011-10-25 13:06:09 +020014648if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014649 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014650else
Matthias Kloseb9621712010-04-24 17:59:49 +000014651 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014652fi
14653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014654cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014655#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014656_ACEOF
14657
Matthias Kloseb9621712010-04-24 17:59:49 +000014658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14659$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014660if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014661 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014662else
Matthias Kloseb9621712010-04-24 17:59:49 +000014663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014664/* end confdefs.h. */
14665#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014666#if !HAVE_DECL_TZNAME
14667extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014668#endif
14669
14670int
14671main ()
14672{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014673return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014674 ;
14675 return 0;
14676}
14677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014678if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014679 ac_cv_var_tzname=yes
14680else
Matthias Kloseb9621712010-04-24 17:59:49 +000014681 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014682fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014683rm -f core conftest.err conftest.$ac_objext \
14684 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014685fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14687$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014688 if test $ac_cv_var_tzname = yes; then
14689
Matthias Kloseb9621712010-04-24 17:59:49 +000014690$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014691
14692 fi
14693fi
14694
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014695
Martin v. Löwis1d459062005-03-14 21:23:33 +000014696# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14698$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014699if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014700 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014701else
14702
Matthias Kloseb9621712010-04-24 17:59:49 +000014703if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014704 ac_cv_working_tzset=no
14705else
Matthias Kloseb9621712010-04-24 17:59:49 +000014706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014707/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014708
14709#include <stdlib.h>
14710#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014711#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014712
14713#if HAVE_TZNAME
14714extern char *tzname[];
14715#endif
14716
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014717int main()
14718{
Brett Cannon18367812003-09-19 00:59:16 +000014719 /* Note that we need to ensure that not only does tzset(3)
14720 do 'something' with localtime, but it works as documented
14721 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014722 This includes making sure that tzname is set properly if
14723 tm->tm_zone does not exist since it is the alternative way
14724 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014725
14726 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014727 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014728 */
14729
Martin v. Löwis1d459062005-03-14 21:23:33 +000014730 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014731 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14732
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014733 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014734 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014735 if (localtime(&groundhogday)->tm_hour != 0)
14736 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014737#if HAVE_TZNAME
14738 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14739 if (strcmp(tzname[0], "UTC") ||
14740 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14741 exit(1);
14742#endif
Brett Cannon18367812003-09-19 00:59:16 +000014743
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014744 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014745 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014746 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014747 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014748#if HAVE_TZNAME
14749 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14750 exit(1);
14751#endif
Brett Cannon18367812003-09-19 00:59:16 +000014752
14753 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14754 tzset();
14755 if (localtime(&groundhogday)->tm_hour != 11)
14756 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014757#if HAVE_TZNAME
14758 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14759 exit(1);
14760#endif
14761
14762#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014763 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14764 exit(1);
14765 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14766 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014767#endif
Brett Cannon18367812003-09-19 00:59:16 +000014768
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014769 exit(0);
14770}
14771
14772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014773if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014774 ac_cv_working_tzset=yes
14775else
Matthias Kloseb9621712010-04-24 17:59:49 +000014776 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014777fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014778rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14779 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014780fi
14781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014782fi
14783
Matthias Kloseb9621712010-04-24 17:59:49 +000014784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14785$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014786if test "$ac_cv_working_tzset" = yes
14787then
14788
Matthias Kloseb9621712010-04-24 17:59:49 +000014789$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014790
14791fi
14792
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014793# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14795$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014796if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014797 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014798else
Matthias Kloseb9621712010-04-24 17:59:49 +000014799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014800/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014801#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014802int
14803main ()
14804{
14805
14806struct stat st;
14807st.st_mtim.tv_nsec = 1;
14808
14809 ;
14810 return 0;
14811}
14812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014813if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014814 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014815else
Matthias Kloseb9621712010-04-24 17:59:49 +000014816 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14819fi
14820
Matthias Kloseb9621712010-04-24 17:59:49 +000014821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14822$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014823if test "$ac_cv_stat_tv_nsec" = yes
14824then
14825
Matthias Kloseb9621712010-04-24 17:59:49 +000014826$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014827
14828fi
14829
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014830# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14832$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014833if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014834 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014835else
Matthias Kloseb9621712010-04-24 17:59:49 +000014836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014837/* end confdefs.h. */
14838#include <sys/stat.h>
14839int
14840main ()
14841{
14842
14843struct stat st;
14844st.st_mtimespec.tv_nsec = 1;
14845
14846 ;
14847 return 0;
14848}
14849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014850if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014851 ac_cv_stat_tv_nsec2=yes
14852else
Matthias Kloseb9621712010-04-24 17:59:49 +000014853 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14856fi
14857
Matthias Kloseb9621712010-04-24 17:59:49 +000014858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14859$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014860if test "$ac_cv_stat_tv_nsec2" = yes
14861then
14862
Matthias Kloseb9621712010-04-24 17:59:49 +000014863$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014864
14865fi
14866
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014867# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014868ac_save_cppflags="$CPPFLAGS"
14869CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014870
14871for ac_header in curses.h ncurses.h
14872do :
14873 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14874ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14875if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14876 cat >>confdefs.h <<_ACEOF
14877#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14878_ACEOF
14879
14880fi
14881
14882done
14883
14884
14885# On Solaris, term.h requires curses.h
14886for ac_header in term.h
14887do :
14888 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14889#ifdef HAVE_CURSES_H
14890#include <curses.h>
14891#endif
14892
14893"
14894if test "x$ac_cv_header_term_h" = xyes; then :
14895 cat >>confdefs.h <<_ACEOF
14896#define HAVE_TERM_H 1
14897_ACEOF
14898
14899fi
14900
14901done
14902
14903
Jack Jansen666b1e72001-10-31 12:11:48 +000014904# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14906$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014907if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014908 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014909else
Matthias Kloseb9621712010-04-24 17:59:49 +000014910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014911/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014912#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014913int
14914main ()
14915{
Jack Jansen666b1e72001-10-31 12:11:48 +000014916
14917 int rtn;
14918 rtn = mvwdelch(0,0,0);
14919
Martin v. Löwis11437992002-04-12 09:54:03 +000014920 ;
14921 return 0;
14922}
14923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014924if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014925 ac_cv_mvwdelch_is_expression=yes
14926else
Matthias Kloseb9621712010-04-24 17:59:49 +000014927 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14930fi
14931
Matthias Kloseb9621712010-04-24 17:59:49 +000014932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14933$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014934
14935if test "$ac_cv_mvwdelch_is_expression" = yes
14936then
Martin v. Löwis11437992002-04-12 09:54:03 +000014937
Matthias Kloseb9621712010-04-24 17:59:49 +000014938$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014939
14940fi
14941
Matthias Kloseb9621712010-04-24 17:59:49 +000014942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14943$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014944if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014945 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014946else
Matthias Kloseb9621712010-04-24 17:59:49 +000014947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014948/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014949#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014950int
14951main ()
14952{
Jack Jansen666b1e72001-10-31 12:11:48 +000014953
14954 WINDOW *w;
14955 w->_flags = 0;
14956
Martin v. Löwis11437992002-04-12 09:54:03 +000014957 ;
14958 return 0;
14959}
14960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014961if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014962 ac_cv_window_has_flags=yes
14963else
Matthias Kloseb9621712010-04-24 17:59:49 +000014964 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14967fi
14968
Matthias Kloseb9621712010-04-24 17:59:49 +000014969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14970$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014971
Jack Jansen666b1e72001-10-31 12:11:48 +000014972
14973if test "$ac_cv_window_has_flags" = yes
14974then
Martin v. Löwis11437992002-04-12 09:54:03 +000014975
Matthias Kloseb9621712010-04-24 17:59:49 +000014976$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014977
14978fi
14979
Matthias Kloseb9621712010-04-24 17:59:49 +000014980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14981$as_echo_n "checking for is_term_resized... " >&6; }
14982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014983/* end confdefs.h. */
14984#include <curses.h>
14985int
14986main ()
14987{
14988void *x=is_term_resized
14989 ;
14990 return 0;
14991}
14992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014993if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014994
Matthias Kloseb9621712010-04-24 17:59:49 +000014995$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014996
Matthias Kloseb159a552010-04-25 21:00:44 +000014997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014998$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014999else
Matthias Kloseb9621712010-04-24 17:59:49 +000015000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15001$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015002
15003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15005
Matthias Kloseb9621712010-04-24 17:59:49 +000015006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15007$as_echo_n "checking for resize_term... " >&6; }
15008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015009/* end confdefs.h. */
15010#include <curses.h>
15011int
15012main ()
15013{
15014void *x=resize_term
15015 ;
15016 return 0;
15017}
15018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015019if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015020
Matthias Kloseb9621712010-04-24 17:59:49 +000015021$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015022
Matthias Kloseb159a552010-04-25 21:00:44 +000015023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015024$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015025else
Matthias Kloseb9621712010-04-24 17:59:49 +000015026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15027$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015028
15029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15031
Matthias Kloseb9621712010-04-24 17:59:49 +000015032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15033$as_echo_n "checking for resizeterm... " >&6; }
15034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015035/* end confdefs.h. */
15036#include <curses.h>
15037int
15038main ()
15039{
15040void *x=resizeterm
15041 ;
15042 return 0;
15043}
15044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015045if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015046
Matthias Kloseb9621712010-04-24 17:59:49 +000015047$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015048
Matthias Kloseb159a552010-04-25 21:00:44 +000015049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015050$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015051else
Matthias Kloseb9621712010-04-24 17:59:49 +000015052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15053$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015054
15055fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015057# last curses configure check
15058CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015059
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15061$as_echo "$as_me: checking for device files" >&6;}
15062
15063if test "x$cross_compiling" = xyes; then
15064 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15066$as_echo_n "checking for /dev/ptmx... " >&6; }
15067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15068$as_echo "not set" >&6; }
15069 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15070 fi
15071 if test "${ac_cv_file__dev_ptc+set}" != set; then
15072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15073$as_echo_n "checking for /dev/ptc... " >&6; }
15074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15075$as_echo "not set" >&6; }
15076 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15077 fi
15078fi
15079
Matthias Kloseb9621712010-04-24 17:59:49 +000015080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15081$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015082if ${ac_cv_file__dev_ptmx+:} false; then :
15083 $as_echo_n "(cached) " >&6
15084else
15085 test "$cross_compiling" = yes &&
15086 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15087if test -r "/dev/ptmx"; then
15088 ac_cv_file__dev_ptmx=yes
15089else
15090 ac_cv_file__dev_ptmx=no
15091fi
15092fi
15093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15094$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15095if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015096
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015097fi
15098
15099if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015100
Matthias Kloseb9621712010-04-24 17:59:49 +000015101$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015102
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015103fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15105$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015106if ${ac_cv_file__dev_ptc+:} false; then :
15107 $as_echo_n "(cached) " >&6
15108else
15109 test "$cross_compiling" = yes &&
15110 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15111if test -r "/dev/ptc"; then
15112 ac_cv_file__dev_ptc=yes
15113else
15114 ac_cv_file__dev_ptc=no
15115fi
15116fi
15117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15118$as_echo "$ac_cv_file__dev_ptc" >&6; }
15119if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015120
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015121fi
15122
15123if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015124
Matthias Kloseb9621712010-04-24 17:59:49 +000015125$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015126
Neal Norwitz865400f2003-03-21 01:42:58 +000015127fi
15128
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015129if test "$have_long_long" = yes
15130then
Matthias Kloseb9621712010-04-24 17:59:49 +000015131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15132$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015133 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015134 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015135else
Matthias Kloseb9621712010-04-24 17:59:49 +000015136 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015137 ac_cv_have_long_long_format="cross -- assuming no"
15138 if test x$GCC = xyes; then
15139 save_CFLAGS=$CFLAGS
15140 CFLAGS="$CFLAGS -Werror -Wformat"
15141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15142/* end confdefs.h. */
15143
15144 #include <stdio.h>
15145 #include <stddef.h>
15146
15147int
15148main ()
15149{
15150
15151 char *buffer;
15152 sprintf(buffer, "%lld", (long long)123);
15153 sprintf(buffer, "%lld", (long long)-123);
15154 sprintf(buffer, "%llu", (unsigned long long)123);
15155
15156 ;
15157 return 0;
15158}
15159_ACEOF
15160if ac_fn_c_try_compile "$LINENO"; then :
15161 ac_cv_have_long_long_format=yes
15162
15163fi
15164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15165 CFLAGS=$save_CFLAGS
15166 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015167else
Matthias Kloseb9621712010-04-24 17:59:49 +000015168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015169/* end confdefs.h. */
15170
15171 #include <stdio.h>
15172 #include <stddef.h>
15173 #include <string.h>
15174
15175 #ifdef HAVE_SYS_TYPES_H
15176 #include <sys/types.h>
15177 #endif
15178
15179 int main()
15180 {
15181 char buffer[256];
15182
15183 if (sprintf(buffer, "%lld", (long long)123) < 0)
15184 return 1;
15185 if (strcmp(buffer, "123"))
15186 return 1;
15187
15188 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15189 return 1;
15190 if (strcmp(buffer, "-123"))
15191 return 1;
15192
15193 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15194 return 1;
15195 if (strcmp(buffer, "123"))
15196 return 1;
15197
15198 return 0;
15199 }
15200
15201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015202if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015203 ac_cv_have_long_long_format=yes
15204else
Matthias Kloseb9621712010-04-24 17:59:49 +000015205 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015206fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015207rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15208 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015209fi
15210
15211
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015212fi
15213
Matthias Kloseb9621712010-04-24 17:59:49 +000015214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15215$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015216fi
15217
Mark Dickinson89d7d412009-12-31 20:50:59 +000015218if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015219then
15220
Matthias Kloseb9621712010-04-24 17:59:49 +000015221$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015222
15223fi
15224
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015225if test $ac_sys_system = Darwin
15226then
15227 LIBS="$LIBS -framework CoreFoundation"
15228fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015229
Matthias Kloseb9621712010-04-24 17:59:49 +000015230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15231$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015232if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015233 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015234else
Matthias Kloseb9621712010-04-24 17:59:49 +000015235 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015236 ac_cv_have_size_t_format="cross -- assuming yes"
15237
Thomas Wouters477c8d52006-05-27 19:21:47 +000015238else
Matthias Kloseb9621712010-04-24 17:59:49 +000015239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015240/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015241
Thomas Wouters477c8d52006-05-27 19:21:47 +000015242#include <stdio.h>
15243#include <stddef.h>
15244#include <string.h>
15245
Christian Heimes2c181612007-12-17 20:04:13 +000015246#ifdef HAVE_SYS_TYPES_H
15247#include <sys/types.h>
15248#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015249
15250#ifdef HAVE_SSIZE_T
15251typedef ssize_t Py_ssize_t;
15252#elif SIZEOF_VOID_P == SIZEOF_LONG
15253typedef long Py_ssize_t;
15254#else
15255typedef int Py_ssize_t;
15256#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015257
Christian Heimes2c181612007-12-17 20:04:13 +000015258int main()
15259{
15260 char buffer[256];
15261
Thomas Wouters477c8d52006-05-27 19:21:47 +000015262 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15263 return 1;
15264
Thomas Wouters89f507f2006-12-13 04:49:30 +000015265 if (strcmp(buffer, "123"))
15266 return 1;
15267
15268 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15269 return 1;
15270
15271 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015272 return 1;
15273
15274 return 0;
15275}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015276
Thomas Wouters477c8d52006-05-27 19:21:47 +000015277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015278if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015279 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015280else
Matthias Kloseb9621712010-04-24 17:59:49 +000015281 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015283rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15284 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015285fi
15286
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015287fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15289$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015290if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015291
Matthias Kloseb9621712010-04-24 17:59:49 +000015292$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015293
15294fi
15295
Matthias Kloseb9621712010-04-24 17:59:49 +000015296ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015297#ifdef HAVE_SYS_TYPES_H
15298#include <sys/types.h>
15299#endif
15300#ifdef HAVE_SYS_SOCKET_H
15301#include <sys/socket.h>
15302#endif
15303
Matthias Kloseb9621712010-04-24 17:59:49 +000015304"
Victor Stinnere0be4232011-10-25 13:06:09 +020015305if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015306
Martin v. Löwis11437992002-04-12 09:54:03 +000015307else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015308
Matthias Kloseb9621712010-04-24 17:59:49 +000015309$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015310
15311fi
15312
Michael W. Hudson54241132001-12-07 15:38:26 +000015313
Matthias Kloseb9621712010-04-24 17:59:49 +000015314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15315$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015316if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015317 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015318else
Matthias Kloseb9621712010-04-24 17:59:49 +000015319 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015320 ac_cv_broken_mbstowcs=no
15321else
Matthias Kloseb9621712010-04-24 17:59:49 +000015322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015323/* end confdefs.h. */
15324
Stefan Krah19c21392012-11-22 23:47:32 +010015325#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015326#include<stdlib.h>
15327int main() {
15328 size_t len = -1;
15329 const char *str = "text";
15330 len = mbstowcs(NULL, str, 0);
15331 return (len != 4);
15332}
15333
15334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015335if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015336 ac_cv_broken_mbstowcs=no
15337else
Matthias Kloseb9621712010-04-24 17:59:49 +000015338 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015339fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015340rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15341 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015342fi
15343
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015344fi
15345
Matthias Kloseb9621712010-04-24 17:59:49 +000015346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15347$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015348if test "$ac_cv_broken_mbstowcs" = yes
15349then
15350
Matthias Kloseb9621712010-04-24 17:59:49 +000015351$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015352
15353fi
15354
Antoine Pitroub52ec782009-01-25 16:34:23 +000015355# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15357$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015358
15359# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015360if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015361 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015362if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015363then
15364
Matthias Kloseb9621712010-04-24 17:59:49 +000015365$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015366
Matthias Kloseb9621712010-04-24 17:59:49 +000015367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15368$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015369fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015370if test "$withval" = no
15371then
15372
15373$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15374
Matthias Kloseb9621712010-04-24 17:59:49 +000015375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15376$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015377fi
15378
Antoine Pitrou042b1282010-08-13 21:15:58 +000015379else
15380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15381$as_echo "no value specified" >&6; }
15382fi
15383
Antoine Pitroub52ec782009-01-25 16:34:23 +000015384
Matthias Kloseb17289e2012-03-15 19:51:34 +010015385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15386$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15387if ${ac_cv_computed_gotos+:} false; then :
15388 $as_echo_n "(cached) " >&6
15389else
15390 if test "$cross_compiling" = yes; then :
15391 if test "${with_computed_gotos+set}" = set; then
15392 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15393 else
15394 ac_cv_computed_gotos=no
15395 fi
15396else
15397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15398/* end confdefs.h. */
15399
15400int main(int argc, char **argv)
15401{
15402 static void *targets[1] = { &&LABEL1 };
15403 goto LABEL2;
15404LABEL1:
15405 return 0;
15406LABEL2:
15407 goto *targets[0];
15408 return 1;
15409}
15410
15411_ACEOF
15412if ac_fn_c_try_run "$LINENO"; then :
15413 ac_cv_computed_gotos=yes
15414else
15415 ac_cv_computed_gotos=no
15416fi
15417rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15418 conftest.$ac_objext conftest.beam conftest.$ac_ext
15419fi
15420
15421fi
15422
15423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15424$as_echo "$ac_cv_computed_gotos" >&6; }
15425case "$ac_cv_computed_gotos" in yes*)
15426
15427$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15428
15429esac
15430
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015431case $ac_sys_system in
15432AIX*)
15433
15434$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15435 ;;
15436esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015437
Michael W. Hudson54241132001-12-07 15:38:26 +000015438
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015439
15440
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015441for h in `(cd $srcdir;echo Python/thread_*.h)`
15442do
15443 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15444done
15445
Michael W. Hudson54241132001-12-07 15:38:26 +000015446
Ned Deily0db50cf2014-07-25 12:41:31 -070015447SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15449$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015450for dir in $SRCDIRS; do
15451 if test ! -d $dir; then
15452 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015453 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015454done
Matthias Kloseb9621712010-04-24 17:59:49 +000015455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15456$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015457
Stefan Krah1919b7e2012-03-21 18:25:23 +010015458# Availability of -O2:
15459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15460$as_echo_n "checking for -O2... " >&6; }
15461saved_cflags="$CFLAGS"
15462CFLAGS="-O2"
15463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15464/* end confdefs.h. */
15465
15466int
15467main ()
15468{
15469
15470
15471 ;
15472 return 0;
15473}
15474_ACEOF
15475if ac_fn_c_try_compile "$LINENO"; then :
15476 have_O2=yes
15477else
15478 have_O2=no
15479fi
15480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15482$as_echo "$have_O2" >&6; }
15483CFLAGS="$saved_cflags"
15484
15485# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15486# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15488$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15489saved_cflags="$CFLAGS"
15490CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15491if test "$have_O2" = no; then
15492 CFLAGS=""
15493fi
15494if test "$cross_compiling" = yes; then :
15495 have_glibc_memmove_bug=undefined
15496else
15497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15498/* end confdefs.h. */
15499
15500#include <stdio.h>
15501#include <stdlib.h>
15502#include <string.h>
15503void foo(void *p, void *q) { memmove(p, q, 19); }
15504int main() {
15505 char a[32] = "123456789000000000";
15506 foo(&a[9], a);
15507 if (strcmp(a, "123456789123456789000000000") != 0)
15508 return 1;
15509 foo(a, &a[9]);
15510 if (strcmp(a, "123456789000000000") != 0)
15511 return 1;
15512 return 0;
15513}
15514
15515_ACEOF
15516if ac_fn_c_try_run "$LINENO"; then :
15517 have_glibc_memmove_bug=no
15518else
15519 have_glibc_memmove_bug=yes
15520fi
15521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15522 conftest.$ac_objext conftest.beam conftest.$ac_ext
15523fi
15524
15525CFLAGS="$saved_cflags"
15526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15527$as_echo "$have_glibc_memmove_bug" >&6; }
15528if test "$have_glibc_memmove_bug" = yes; then
15529
15530$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15531
15532fi
15533
15534if test "$have_gcc_asm_for_x87" = yes; then
15535 # Some versions of gcc miscompile inline asm:
15536 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15537 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15538 case $CC in
15539 *gcc*)
15540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15541$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15542 saved_cflags="$CFLAGS"
15543 CFLAGS="-O2"
15544 if test "$cross_compiling" = yes; then :
15545 have_ipa_pure_const_bug=undefined
15546else
15547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15548/* end confdefs.h. */
15549
15550 __attribute__((noinline)) int
15551 foo(int *p) {
15552 int r;
15553 asm ( "movl \$6, (%1)\n\t"
15554 "xorl %0, %0\n\t"
15555 : "=r" (r) : "r" (p) : "memory"
15556 );
15557 return r;
15558 }
15559 int main() {
15560 int p = 8;
15561 if ((foo(&p) ? : p) != 6)
15562 return 1;
15563 return 0;
15564 }
15565
15566_ACEOF
15567if ac_fn_c_try_run "$LINENO"; then :
15568 have_ipa_pure_const_bug=no
15569else
15570 have_ipa_pure_const_bug=yes
15571fi
15572rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15573 conftest.$ac_objext conftest.beam conftest.$ac_ext
15574fi
15575
15576 CFLAGS="$saved_cflags"
15577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15578$as_echo "$have_ipa_pure_const_bug" >&6; }
15579 if test "$have_ipa_pure_const_bug" = yes; then
15580
15581$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15582
15583 fi
15584 ;;
15585 esac
15586fi
15587
Victor Stinner4f5366e2015-01-09 02:13:19 +010015588# Check for stdatomic.h
15589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
15590$as_echo_n "checking for stdatomic.h... " >&6; }
15591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15592/* end confdefs.h. */
15593
15594
15595 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010015596 atomic_int value = ATOMIC_VAR_INIT(1);
15597 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010015598 int main() {
15599 int loaded_value = atomic_load(&value);
15600 return 0;
15601 }
15602
15603
15604_ACEOF
15605if ac_fn_c_try_link "$LINENO"; then :
15606 have_stdatomic_h=yes
15607else
15608 have_stdatomic_h=no
15609fi
15610rm -f core conftest.err conftest.$ac_objext \
15611 conftest$ac_exeext conftest.$ac_ext
15612
15613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
15614$as_echo "$have_stdatomic_h" >&6; }
15615
15616if test "$have_stdatomic_h" = yes; then
15617
15618$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
15619
15620fi
15621
15622# Check for GCC >= 4.7 __atomic builtins
15623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
15624$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
15625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15626/* end confdefs.h. */
15627
15628
15629 volatile int val = 1;
15630 int main() {
15631 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
15632 return 0;
15633 }
15634
15635
15636_ACEOF
15637if ac_fn_c_try_link "$LINENO"; then :
15638 have_builtin_atomic=yes
15639else
15640 have_builtin_atomic=no
15641fi
15642rm -f core conftest.err conftest.$ac_objext \
15643 conftest$ac_exeext conftest.$ac_ext
15644
15645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
15646$as_echo "$have_builtin_atomic" >&6; }
15647
15648if test "$have_builtin_atomic" = yes; then
15649
15650$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
15651
15652fi
15653
Ned Deily322f5ba2013-11-21 23:01:59 -080015654# ensurepip option
15655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15656$as_echo_n "checking for ensurepip... " >&6; }
15657
15658# Check whether --with-ensurepip was given.
15659if test "${with_ensurepip+set}" = set; then :
15660 withval=$with_ensurepip;
15661else
15662 with_ensurepip=upgrade
15663fi
15664
15665case $with_ensurepip in #(
15666 yes|upgrade) :
15667 ENSUREPIP=upgrade ;; #(
15668 install) :
15669 ENSUREPIP=install ;; #(
15670 no) :
15671 ENSUREPIP=no ;; #(
15672 *) :
15673 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15674esac
15675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15676$as_echo "$ENSUREPIP" >&6; }
15677
15678
Victor Stinner35a97c02015-03-08 02:59:09 +010015679# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
15680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
15681$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
15682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15683/* end confdefs.h. */
15684
15685
15686 #include <dirent.h>
15687
15688 int main() {
15689 struct dirent entry;
15690 return entry.d_type == DT_UNKNOWN;
15691 }
15692
15693
15694_ACEOF
15695if ac_fn_c_try_link "$LINENO"; then :
15696 have_dirent_d_type=yes
15697else
15698 have_dirent_d_type=no
15699fi
15700rm -f core conftest.err conftest.$ac_objext \
15701 conftest$ac_exeext conftest.$ac_ext
15702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
15703$as_echo "$have_dirent_d_type" >&6; }
15704
15705if test "$have_dirent_d_type" = yes; then
15706
15707$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
15708
15709fi
15710
Victor Stinner9eb57c52015-03-19 22:21:49 +010015711# check if the Linux getrandom() syscall is available
15712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
15713$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
15714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15715/* end confdefs.h. */
15716
15717
15718 #include <sys/syscall.h>
15719
15720 int main() {
15721 const int flags = 0;
15722 char buffer[1];
15723 int n;
15724 /* ignore the result, Python checks for ENOSYS at runtime */
15725 (void)syscall(SYS_getrandom, buffer, sizeof(buffer), flags);
15726 return 0;
15727 }
15728
15729
15730_ACEOF
15731if ac_fn_c_try_link "$LINENO"; then :
15732 have_getrandom_syscall=yes
15733else
15734 have_getrandom_syscall=no
15735fi
15736rm -f core conftest.err conftest.$ac_objext \
15737 conftest$ac_exeext conftest.$ac_ext
15738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
15739$as_echo "$have_getrandom_syscall" >&6; }
15740
15741if test "$have_getrandom_syscall" = yes; then
15742
15743$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
15744
15745fi
15746
Guido van Rossum627b2d71993-12-24 10:39:16 +000015747# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015748ac_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 +000015749
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015750ac_config_files="$ac_config_files Modules/ld_so_aix"
15751
Martin v. Löwis11437992002-04-12 09:54:03 +000015752cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015753# This file is a shell script that caches the results of configure
15754# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015755# scripts and configure runs, see configure's option --config-cache.
15756# It is not useful on other systems. If it contains results you don't
15757# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015758#
Martin v. Löwis11437992002-04-12 09:54:03 +000015759# config.status only pays attention to the cache file if you give it
15760# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015761#
Skip Montanaro6dead952003-09-25 14:50:04 +000015762# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015763# loading this file, other *unset* `ac_cv_foo' will be assigned the
15764# following values.
15765
15766_ACEOF
15767
Guido van Rossumf78abae1997-01-21 22:02:36 +000015768# The following way of writing the cache mishandles newlines in values,
15769# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015770# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015771# Ultrix sh set writes to stderr and can't be redirected directly,
15772# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015773(
15774 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15775 eval ac_val=\$$ac_var
15776 case $ac_val in #(
15777 *${as_nl}*)
15778 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015779 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15780$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015781 esac
15782 case $ac_var in #(
15783 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015784 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15785 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015786 esac ;;
15787 esac
15788 done
15789
Martin v. Löwis11437992002-04-12 09:54:03 +000015790 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015791 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15792 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015793 # `set' does not quote correctly, so add quotes: double-quote
15794 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015795 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015796 "s/'/'\\\\''/g;
15797 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015798 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015799 *)
15800 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015801 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015802 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015803 esac |
15804 sort
15805) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015806 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015807 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015808 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015809 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015810 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15811 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015812 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15813 :end' >>confcache
15814if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15815 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015816 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015817 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15818$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015819 if test ! -f "$cache_file" || test -h "$cache_file"; then
15820 cat confcache >"$cache_file"
15821 else
15822 case $cache_file in #(
15823 */* | ?:*)
15824 mv -f confcache "$cache_file"$$ &&
15825 mv -f "$cache_file"$$ "$cache_file" ;; #(
15826 *)
15827 mv -f confcache "$cache_file" ;;
15828 esac
15829 fi
15830 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015831 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015832 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15833$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015834 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015835fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015836rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015837
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015838test "x$prefix" = xNONE && prefix=$ac_default_prefix
15839# Let make expand exec_prefix.
15840test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015841
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015842DEFS=-DHAVE_CONFIG_H
15843
Skip Montanaro6dead952003-09-25 14:50:04 +000015844ac_libobjs=
15845ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015846U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015847for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15848 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015849 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015850 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015851 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15852 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015853 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15854 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015855done
15856LIBOBJS=$ac_libobjs
15857
15858LTLIBOBJS=$ac_ltlibobjs
15859
15860
Martin v. Löwis11437992002-04-12 09:54:03 +000015861
Matthias Kloseb9621712010-04-24 17:59:49 +000015862
Victor Stinnere0be4232011-10-25 13:06:09 +020015863: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015864ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015865ac_clean_files_save=$ac_clean_files
15866ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015867{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15868$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15869as_write_fail=0
15870cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015871#! $SHELL
15872# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015873# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015874# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015875# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015876
Martin v. Löwis11437992002-04-12 09:54:03 +000015877debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015878ac_cs_recheck=false
15879ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015880
Matthias Kloseb9621712010-04-24 17:59:49 +000015881SHELL=\${CONFIG_SHELL-$SHELL}
15882export SHELL
15883_ASEOF
15884cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15885## -------------------- ##
15886## M4sh Initialization. ##
15887## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015889# Be more Bourne compatible
15890DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015891if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015892 emulate sh
15893 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015894 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015895 # is contrary to our usage. Disable this feature.
15896 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015897 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015898else
Matthias Kloseb9621712010-04-24 17:59:49 +000015899 case `(set -o) 2>/dev/null` in #(
15900 *posix*) :
15901 set -o posix ;; #(
15902 *) :
15903 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015904esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015905fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015906
15907
Matthias Kloseb9621712010-04-24 17:59:49 +000015908as_nl='
15909'
15910export as_nl
15911# Printing a long string crashes Solaris 7 /usr/bin/printf.
15912as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15913as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15914as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15915# Prefer a ksh shell builtin over an external printf program on Solaris,
15916# but without wasting forks for bash or zsh.
15917if test -z "$BASH_VERSION$ZSH_VERSION" \
15918 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15919 as_echo='print -r --'
15920 as_echo_n='print -rn --'
15921elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15922 as_echo='printf %s\n'
15923 as_echo_n='printf %s'
15924else
15925 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15926 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15927 as_echo_n='/usr/ucb/echo -n'
15928 else
15929 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15930 as_echo_n_body='eval
15931 arg=$1;
15932 case $arg in #(
15933 *"$as_nl"*)
15934 expr "X$arg" : "X\\(.*\\)$as_nl";
15935 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15936 esac;
15937 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15938 '
15939 export as_echo_n_body
15940 as_echo_n='sh -c $as_echo_n_body as_echo'
15941 fi
15942 export as_echo_body
15943 as_echo='sh -c $as_echo_body as_echo'
15944fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015945
15946# The user is always right.
15947if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015948 PATH_SEPARATOR=:
15949 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15950 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15951 PATH_SEPARATOR=';'
15952 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015953fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015955
15956# IFS
15957# We need space, tab and new line, in precisely that order. Quoting is
15958# there to prevent editors from complaining about space-tab.
15959# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15960# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015961IFS=" "" $as_nl"
15962
15963# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015964as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015965case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015966 *[\\/]* ) as_myself=$0 ;;
15967 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015968for as_dir in $PATH
15969do
15970 IFS=$as_save_IFS
15971 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015972 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15973 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015974IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015976 ;;
15977esac
15978# We did not find ourselves, most probably we were run as `sh COMMAND'
15979# in which case we are not to be found in the path.
15980if test "x$as_myself" = x; then
15981 as_myself=$0
15982fi
15983if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015984 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15985 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015986fi
15987
Matthias Kloseb9621712010-04-24 17:59:49 +000015988# Unset variables that we do not need and which cause bugs (e.g. in
15989# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15990# suppresses any "Segmentation fault" message there. '((' could
15991# trigger a bug in pdksh 5.2.14.
15992for as_var in BASH_ENV ENV MAIL MAILPATH
15993do eval test x\${$as_var+set} = xset \
15994 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015995done
15996PS1='$ '
15997PS2='> '
15998PS4='+ '
15999
16000# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016001LC_ALL=C
16002export LC_ALL
16003LANGUAGE=C
16004export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016005
Matthias Kloseb9621712010-04-24 17:59:49 +000016006# CDPATH.
16007(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16008
16009
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016010# as_fn_error STATUS ERROR [LINENO LOG_FD]
16011# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016012# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16013# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016014# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016015as_fn_error ()
16016{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016017 as_status=$1; test $as_status -eq 0 && as_status=1
16018 if test "$4"; then
16019 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16020 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016021 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016022 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016023 as_fn_exit $as_status
16024} # as_fn_error
16025
16026
16027# as_fn_set_status STATUS
16028# -----------------------
16029# Set $? to STATUS, without forking.
16030as_fn_set_status ()
16031{
16032 return $1
16033} # as_fn_set_status
16034
16035# as_fn_exit STATUS
16036# -----------------
16037# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16038as_fn_exit ()
16039{
16040 set +e
16041 as_fn_set_status $1
16042 exit $1
16043} # as_fn_exit
16044
16045# as_fn_unset VAR
16046# ---------------
16047# Portably unset VAR.
16048as_fn_unset ()
16049{
16050 { eval $1=; unset $1;}
16051}
16052as_unset=as_fn_unset
16053# as_fn_append VAR VALUE
16054# ----------------------
16055# Append the text in VALUE to the end of the definition contained in VAR. Take
16056# advantage of any shell optimizations that allow amortized linear growth over
16057# repeated appends, instead of the typical quadratic growth present in naive
16058# implementations.
16059if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16060 eval 'as_fn_append ()
16061 {
16062 eval $1+=\$2
16063 }'
16064else
16065 as_fn_append ()
16066 {
16067 eval $1=\$$1\$2
16068 }
16069fi # as_fn_append
16070
16071# as_fn_arith ARG...
16072# ------------------
16073# Perform arithmetic evaluation on the ARGs, and store the result in the
16074# global $as_val. Take advantage of shells that can avoid forks. The arguments
16075# must be portable across $(()) and expr.
16076if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16077 eval 'as_fn_arith ()
16078 {
16079 as_val=$(( $* ))
16080 }'
16081else
16082 as_fn_arith ()
16083 {
16084 as_val=`expr "$@" || test $? -eq 1`
16085 }
16086fi # as_fn_arith
16087
16088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016089if expr a : '\(a\)' >/dev/null 2>&1 &&
16090 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16091 as_expr=expr
16092else
16093 as_expr=false
16094fi
16095
16096if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16097 as_basename=basename
16098else
16099 as_basename=false
16100fi
16101
Matthias Kloseb9621712010-04-24 17:59:49 +000016102if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16103 as_dirname=dirname
16104else
16105 as_dirname=false
16106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016108as_me=`$as_basename -- "$0" ||
16109$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16110 X"$0" : 'X\(//\)$' \| \
16111 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016112$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016113 sed '/^.*\/\([^/][^/]*\)\/*$/{
16114 s//\1/
16115 q
16116 }
16117 /^X\/\(\/\/\)$/{
16118 s//\1/
16119 q
16120 }
16121 /^X\/\(\/\).*/{
16122 s//\1/
16123 q
16124 }
16125 s/.*/./; q'`
16126
Matthias Kloseb9621712010-04-24 17:59:49 +000016127# Avoid depending upon Character Ranges.
16128as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16129as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16130as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16131as_cr_digits='0123456789'
16132as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016133
16134ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016135case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016136-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016137 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016138 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016139 xy) ECHO_C='\c';;
16140 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16141 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016142 esac;;
16143*)
16144 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016145esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016146
Martin v. Löwis11437992002-04-12 09:54:03 +000016147rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016148if test -d conf$$.dir; then
16149 rm -f conf$$.dir/conf$$.file
16150else
16151 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016152 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016154if (echo >conf$$.file) 2>/dev/null; then
16155 if ln -s conf$$.file conf$$ 2>/dev/null; then
16156 as_ln_s='ln -s'
16157 # ... but there are two gotchas:
16158 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16159 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016160 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016161 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016162 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016163 elif ln conf$$.file conf$$ 2>/dev/null; then
16164 as_ln_s=ln
16165 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016166 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016167 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016168else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016169 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016171rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16172rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016173
Matthias Kloseb9621712010-04-24 17:59:49 +000016174
16175# as_fn_mkdir_p
16176# -------------
16177# Create "$as_dir" as a directory, including parents if necessary.
16178as_fn_mkdir_p ()
16179{
16180
16181 case $as_dir in #(
16182 -*) as_dir=./$as_dir;;
16183 esac
16184 test -d "$as_dir" || eval $as_mkdir_p || {
16185 as_dirs=
16186 while :; do
16187 case $as_dir in #(
16188 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16189 *) as_qdir=$as_dir;;
16190 esac
16191 as_dirs="'$as_qdir' $as_dirs"
16192 as_dir=`$as_dirname -- "$as_dir" ||
16193$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16194 X"$as_dir" : 'X\(//\)[^/]' \| \
16195 X"$as_dir" : 'X\(//\)$' \| \
16196 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16197$as_echo X"$as_dir" |
16198 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16199 s//\1/
16200 q
16201 }
16202 /^X\(\/\/\)[^/].*/{
16203 s//\1/
16204 q
16205 }
16206 /^X\(\/\/\)$/{
16207 s//\1/
16208 q
16209 }
16210 /^X\(\/\).*/{
16211 s//\1/
16212 q
16213 }
16214 s/.*/./; q'`
16215 test -d "$as_dir" && break
16216 done
16217 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016218 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016219
16220
16221} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016222if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016223 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016224else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016225 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016226 as_mkdir_p=false
16227fi
16228
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016229
16230# as_fn_executable_p FILE
16231# -----------------------
16232# Test if FILE is an executable regular file.
16233as_fn_executable_p ()
16234{
16235 test -f "$1" && test -x "$1"
16236} # as_fn_executable_p
16237as_test_x='test -x'
16238as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016239
16240# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016241as_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 +000016242
16243# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016244as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016245
16246
Martin v. Löwis11437992002-04-12 09:54:03 +000016247exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016248## ----------------------------------- ##
16249## Main body of $CONFIG_STATUS script. ##
16250## ----------------------------------- ##
16251_ASEOF
16252test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016253
Matthias Kloseb9621712010-04-24 17:59:49 +000016254cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16255# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016256# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016257# values after options handling.
16258ac_log="
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016259This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016260generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016261
16262 CONFIG_FILES = $CONFIG_FILES
16263 CONFIG_HEADERS = $CONFIG_HEADERS
16264 CONFIG_LINKS = $CONFIG_LINKS
16265 CONFIG_COMMANDS = $CONFIG_COMMANDS
16266 $ $0 $@
16267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016268on `(hostname || uname -n) 2>/dev/null | sed 1q`
16269"
16270
Martin v. Löwis11437992002-04-12 09:54:03 +000016271_ACEOF
16272
Matthias Kloseb9621712010-04-24 17:59:49 +000016273case $ac_config_files in *"
16274"*) set x $ac_config_files; shift; ac_config_files=$*;;
16275esac
16276
16277case $ac_config_headers in *"
16278"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16279esac
16280
16281
16282cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016283# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016284config_files="$ac_config_files"
16285config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016286
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016287_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016288
Matthias Kloseb9621712010-04-24 17:59:49 +000016289cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016290ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016291\`$as_me' instantiates files and other configuration actions
16292from templates according to the current configuration. Unless the files
16293and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016294
Matthias Kloseb9621712010-04-24 17:59:49 +000016295Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016296
16297 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016298 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016299 --config print configuration, then exit
16300 -q, --quiet, --silent
16301 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016302 -d, --debug don't remove temporary files
16303 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016304 --file=FILE[:TEMPLATE]
16305 instantiate the configuration file FILE
16306 --header=FILE[:TEMPLATE]
16307 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016308
16309Configuration files:
16310$config_files
16311
16312Configuration headers:
16313$config_headers
16314
Matthias Kloseb9621712010-04-24 17:59:49 +000016315Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016318cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16319ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016320ac_cs_version="\\
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016321python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016322configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016323 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016324
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016325Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016326This config.status script is free software; the Free Software Foundation
16327gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016328
16329ac_pwd='$ac_pwd'
16330srcdir='$srcdir'
16331INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016332MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016333test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016334_ACEOF
16335
Matthias Kloseb9621712010-04-24 17:59:49 +000016336cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16337# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016338ac_need_defaults=:
16339while test $# != 0
16340do
16341 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016342 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016343 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16344 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016345 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016346 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016347 --*=)
16348 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16349 ac_optarg=
16350 ac_shift=:
16351 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016352 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016353 ac_option=$1
16354 ac_optarg=$2
16355 ac_shift=shift
16356 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016357 esac
16358
Skip Montanaro6dead952003-09-25 14:50:04 +000016359 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016360 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016361 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16362 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016363 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016364 $as_echo "$ac_cs_version"; exit ;;
16365 --config | --confi | --conf | --con | --co | --c )
16366 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016367 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016368 debug=: ;;
16369 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016370 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016371 case $ac_optarg in
16372 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016373 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016374 esac
16375 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016376 ac_need_defaults=false;;
16377 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016378 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016379 case $ac_optarg in
16380 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16381 esac
16382 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016383 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016384 --he | --h)
16385 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016386 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016387Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016388 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016389 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016390 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16391 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16392 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016393
16394 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016395 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016396Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016397
Matthias Kloseb9621712010-04-24 17:59:49 +000016398 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016399 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016400
16401 esac
16402 shift
16403done
16404
Skip Montanaro6dead952003-09-25 14:50:04 +000016405ac_configure_extra_args=
16406
16407if $ac_cs_silent; then
16408 exec 6>/dev/null
16409 ac_configure_extra_args="$ac_configure_extra_args --silent"
16410fi
16411
16412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016413cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016414if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016415 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016416 shift
16417 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16418 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016419 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016420 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016421fi
16422
Martin v. Löwis11437992002-04-12 09:54:03 +000016423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016424cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016425exec 5>>config.log
16426{
16427 echo
16428 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16429## Running $as_me. ##
16430_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016431 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016432} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016433
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016435cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016436_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016437
Matthias Kloseb9621712010-04-24 17:59:49 +000016438cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016439
16440# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016441for ac_config_target in $ac_config_targets
16442do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016443 case $ac_config_target in
16444 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16445 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16446 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016447 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16448 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016449 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16450 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016451 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016452 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016453 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016454
Victor Stinnere0be4232011-10-25 13:06:09 +020016455 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016456 esac
16457done
16458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016459
Martin v. Löwis11437992002-04-12 09:54:03 +000016460# If the user did not use the arguments to specify the items to instantiate,
16461# then the envvar interface is used. Set only those that are not.
16462# We use the long form for the default assignment because of an extremely
16463# bizarre bug on SunOS 4.1.3.
16464if $ac_need_defaults; then
16465 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16466 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16467fi
16468
Skip Montanaro6dead952003-09-25 14:50:04 +000016469# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016470# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016471# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016472# Hook for its removal unless debugging.
16473# Note that there is a small window in which the directory will not be cleaned:
16474# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016475$debug ||
16476{
Victor Stinnere0be4232011-10-25 13:06:09 +020016477 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016478 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016479 : "${ac_tmp:=$tmp}"
16480 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016481' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016482 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016483}
Martin v. Löwis11437992002-04-12 09:54:03 +000016484# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016485
Martin v. Löwis11437992002-04-12 09:54:03 +000016486{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016487 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016488 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016489} ||
16490{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016491 tmp=./conf$$-$RANDOM
16492 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016493} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016494ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016495
Matthias Kloseb9621712010-04-24 17:59:49 +000016496# Set up the scripts for CONFIG_FILES section.
16497# No need to generate them if there are no CONFIG_FILES.
16498# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016499if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016500
Matthias Kloseb9621712010-04-24 17:59:49 +000016501
16502ac_cr=`echo X | tr X '\015'`
16503# On cygwin, bash can eat \r inside `` if the user requested igncr.
16504# But we know of no other shell where ac_cr would be empty at this
16505# point, so we can use a bashism as a fallback.
16506if test "x$ac_cr" = x; then
16507 eval ac_cr=\$\'\\r\'
16508fi
16509ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16510if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016511 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016512else
16513 ac_cs_awk_cr=$ac_cr
16514fi
16515
Victor Stinnere0be4232011-10-25 13:06:09 +020016516echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016517_ACEOF
16518
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016519
Matthias Kloseb9621712010-04-24 17:59:49 +000016520{
16521 echo "cat >conf$$subs.awk <<_ACEOF" &&
16522 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16523 echo "_ACEOF"
16524} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016525 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16526ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016527ac_delim='%!_!# '
16528for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016529 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016530 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016531
Matthias Kloseb9621712010-04-24 17:59:49 +000016532 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16533 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016534 break
16535 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016536 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016537 else
16538 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016539 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016540done
Matthias Kloseb9621712010-04-24 17:59:49 +000016541rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016542
Matthias Kloseb9621712010-04-24 17:59:49 +000016543cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016544cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016546sed -n '
16547h
16548s/^/S["/; s/!.*/"]=/
16549p
16550g
16551s/^[^!]*!//
16552:repl
16553t repl
16554s/'"$ac_delim"'$//
16555t delim
16556:nl
16557h
16558s/\(.\{148\}\)..*/\1/
16559t more1
16560s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16561p
16562n
16563b repl
16564:more1
16565s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16566p
16567g
16568s/.\{148\}//
16569t nl
16570:delim
16571h
16572s/\(.\{148\}\)..*/\1/
16573t more2
16574s/["\\]/\\&/g; s/^/"/; s/$/"/
16575p
16576b
16577:more2
16578s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16579p
16580g
16581s/.\{148\}//
16582t delim
16583' <conf$$subs.awk | sed '
16584/^[^""]/{
16585 N
16586 s/\n//
16587}
16588' >>$CONFIG_STATUS || ac_write_fail=1
16589rm -f conf$$subs.awk
16590cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16591_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016592cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016593 for (key in S) S_is_set[key] = 1
16594 FS = ""
16595
16596}
16597{
16598 line = $ 0
16599 nfields = split(line, field, "@")
16600 substed = 0
16601 len = length(field[1])
16602 for (i = 2; i < nfields; i++) {
16603 key = field[i]
16604 keylen = length(key)
16605 if (S_is_set[key]) {
16606 value = S[key]
16607 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16608 len += length(value) + length(field[++i])
16609 substed = 1
16610 } else
16611 len += 1 + keylen
16612 }
16613
16614 print line
16615}
16616
16617_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016619cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16620if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16621 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16622else
16623 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016624fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016625 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016626_ACEOF
16627
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016628# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16629# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016630# trailing colons and then remove the whole line if VPATH becomes empty
16631# (actually we leave an empty line to preserve line numbers).
16632if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016633 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16634h
16635s///
16636s/^/:/
16637s/[ ]*$/:/
16638s/:\$(srcdir):/:/g
16639s/:\${srcdir}:/:/g
16640s/:@srcdir@:/:/g
16641s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016642s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016643x
16644s/\(=[ ]*\).*/\1/
16645G
16646s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016647s/^[^=]*=[ ]*$//
16648}'
16649fi
16650
Matthias Kloseb9621712010-04-24 17:59:49 +000016651cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016652fi # test -n "$CONFIG_FILES"
16653
Matthias Kloseb9621712010-04-24 17:59:49 +000016654# Set up the scripts for CONFIG_HEADERS section.
16655# No need to generate them if there are no CONFIG_HEADERS.
16656# This happens for instance with `./config.status Makefile'.
16657if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016658cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016659BEGIN {
16660_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016661
Matthias Kloseb9621712010-04-24 17:59:49 +000016662# Transform confdefs.h into an awk script `defines.awk', embedded as
16663# here-document in config.status, that substitutes the proper values into
16664# config.h.in to produce config.h.
16665
16666# Create a delimiter string that does not exist in confdefs.h, to ease
16667# handling of long lines.
16668ac_delim='%!_!# '
16669for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016670 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16671 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016672 break
16673 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016674 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016675 else
16676 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16677 fi
16678done
16679
16680# For the awk script, D is an array of macro values keyed by name,
16681# likewise P contains macro parameters if any. Preserve backslash
16682# newline sequences.
16683
16684ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16685sed -n '
16686s/.\{148\}/&'"$ac_delim"'/g
16687t rset
16688:rset
16689s/^[ ]*#[ ]*define[ ][ ]*/ /
16690t def
16691d
16692:def
16693s/\\$//
16694t bsnl
16695s/["\\]/\\&/g
16696s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16697D["\1"]=" \3"/p
16698s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16699d
16700:bsnl
16701s/["\\]/\\&/g
16702s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16703D["\1"]=" \3\\\\\\n"\\/p
16704t cont
16705s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16706t cont
16707d
16708:cont
16709n
16710s/.\{148\}/&'"$ac_delim"'/g
16711t clear
16712:clear
16713s/\\$//
16714t bsnlc
16715s/["\\]/\\&/g; s/^/"/; s/$/"/p
16716d
16717:bsnlc
16718s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16719b cont
16720' <confdefs.h | sed '
16721s/'"$ac_delim"'/"\\\
16722"/g' >>$CONFIG_STATUS || ac_write_fail=1
16723
16724cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16725 for (key in D) D_is_set[key] = 1
16726 FS = ""
16727}
16728/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16729 line = \$ 0
16730 split(line, arg, " ")
16731 if (arg[1] == "#") {
16732 defundef = arg[2]
16733 mac1 = arg[3]
16734 } else {
16735 defundef = substr(arg[1], 2)
16736 mac1 = arg[2]
16737 }
16738 split(mac1, mac2, "(") #)
16739 macro = mac2[1]
16740 prefix = substr(line, 1, index(line, defundef) - 1)
16741 if (D_is_set[macro]) {
16742 # Preserve the white space surrounding the "#".
16743 print prefix "define", macro P[macro] D[macro]
16744 next
16745 } else {
16746 # Replace #undef with comments. This is necessary, for example,
16747 # in the case of _POSIX_SOURCE, which is predefined and required
16748 # on some systems where configure will not decide to define it.
16749 if (defundef == "undef") {
16750 print "/*", prefix defundef, macro, "*/"
16751 next
16752 }
16753 }
16754}
16755{ print }
16756_ACAWK
16757_ACEOF
16758cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016759 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016760fi # test -n "$CONFIG_HEADERS"
16761
16762
16763eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16764shift
16765for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016766do
16767 case $ac_tag in
16768 :[FHLC]) ac_mode=$ac_tag; continue;;
16769 esac
16770 case $ac_mode$ac_tag in
16771 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016772 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016773 :[FH]-) ac_tag=-:-;;
16774 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16775 esac
16776 ac_save_IFS=$IFS
16777 IFS=:
16778 set x $ac_tag
16779 IFS=$ac_save_IFS
16780 shift
16781 ac_file=$1
16782 shift
16783
16784 case $ac_mode in
16785 :L) ac_source=$1;;
16786 :[FH])
16787 ac_file_inputs=
16788 for ac_f
16789 do
16790 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016791 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016792 *) # Look for the file first in the build tree, then in the source tree
16793 # (if the path is not absolute). The absolute path cannot be DOS-style,
16794 # because $ac_f cannot contain `:'.
16795 test -f "$ac_f" ||
16796 case $ac_f in
16797 [\\/$]*) false;;
16798 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16799 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016800 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016801 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016802 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16803 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016804 done
16805
16806 # Let's still pretend it is `configure' which instantiates (i.e., don't
16807 # use $as_me), people would be surprised to read:
16808 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016809 configure_input='Generated from '`
16810 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16811 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016812 if test x"$ac_file" != x-; then
16813 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016814 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16815$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016816 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016817 # Neutralize special characters interpreted by sed in replacement strings.
16818 case $configure_input in #(
16819 *\&* | *\|* | *\\* )
16820 ac_sed_conf_input=`$as_echo "$configure_input" |
16821 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16822 *) ac_sed_conf_input=$configure_input;;
16823 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016824
16825 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016826 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16827 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016828 esac
16829 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016830 esac
16831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016832 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016833$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016834 X"$ac_file" : 'X\(//\)[^/]' \| \
16835 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016836 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016837$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016838 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16839 s//\1/
16840 q
16841 }
16842 /^X\(\/\/\)[^/].*/{
16843 s//\1/
16844 q
16845 }
16846 /^X\(\/\/\)$/{
16847 s//\1/
16848 q
16849 }
16850 /^X\(\/\).*/{
16851 s//\1/
16852 q
16853 }
16854 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016855 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016856 ac_builddir=.
16857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016858case "$ac_dir" in
16859.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16860*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016861 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016862 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016863 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016864 case $ac_top_builddir_sub in
16865 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16866 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16867 esac ;;
16868esac
16869ac_abs_top_builddir=$ac_pwd
16870ac_abs_builddir=$ac_pwd$ac_dir_suffix
16871# for backward compatibility:
16872ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016873
16874case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016875 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016876 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016877 ac_top_srcdir=$ac_top_builddir_sub
16878 ac_abs_top_srcdir=$ac_pwd ;;
16879 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016880 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016881 ac_top_srcdir=$srcdir
16882 ac_abs_top_srcdir=$srcdir ;;
16883 *) # Relative name.
16884 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16885 ac_top_srcdir=$ac_top_build_prefix$srcdir
16886 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016887esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016888ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016889
Martin v. Löwis11437992002-04-12 09:54:03 +000016890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016891 case $ac_mode in
16892 :F)
16893 #
16894 # CONFIG_FILE
16895 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016896
16897 case $INSTALL in
16898 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016899 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016900 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016901 ac_MKDIR_P=$MKDIR_P
16902 case $MKDIR_P in
16903 [\\/$]* | ?:[\\/]* ) ;;
16904 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16905 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016906_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016907
Matthias Kloseb9621712010-04-24 17:59:49 +000016908cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016909# If the template does not know about datarootdir, expand it.
16910# FIXME: This hack should be removed a few years after 2.60.
16911ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016912ac_sed_dataroot='
16913/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016914 p
16915 q
16916}
16917/@datadir@/p
16918/@docdir@/p
16919/@infodir@/p
16920/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016921/@mandir@/p'
16922case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016923*datarootdir*) ac_datarootdir_seen=yes;;
16924*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016925 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16926$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016928cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016929 ac_datarootdir_hack='
16930 s&@datadir@&$datadir&g
16931 s&@docdir@&$docdir&g
16932 s&@infodir@&$infodir&g
16933 s&@localedir@&$localedir&g
16934 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016935 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016936esac
16937_ACEOF
16938
16939# Neutralize VPATH when `$srcdir' = `.'.
16940# Shell code in configure.ac might set extrasub.
16941# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016942cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16943ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016944$extrasub
16945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016946cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016947:t
16948/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016949s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016950s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016951s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016952s&@srcdir@&$ac_srcdir&;t t
16953s&@abs_srcdir@&$ac_abs_srcdir&;t t
16954s&@top_srcdir@&$ac_top_srcdir&;t t
16955s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16956s&@builddir@&$ac_builddir&;t t
16957s&@abs_builddir@&$ac_abs_builddir&;t t
16958s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16959s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016960s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016961$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016962"
Victor Stinnere0be4232011-10-25 13:06:09 +020016963eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16964 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016965
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016966test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016967 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16968 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16969 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016970 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016971which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016972$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016973which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016974
Victor Stinnere0be4232011-10-25 13:06:09 +020016975 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016976 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016977 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16978 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016979 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016980 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016981 ;;
16982 :H)
16983 #
16984 # CONFIG_HEADER
16985 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016986 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016987 {
16988 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016989 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16990 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016991 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016992 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016993 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16994$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016995 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016996 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016997 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016998 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016999 fi
17000 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017001 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017002 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017003 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017004 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017005 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017006
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017007
17008 esac
17009
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017010
17011 case $ac_file$ac_mode in
17012 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17013
17014 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017015done # for ac_tag
17016
Guido van Rossum627b2d71993-12-24 10:39:16 +000017017
Matthias Kloseb9621712010-04-24 17:59:49 +000017018as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017019_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017020ac_clean_files=$ac_clean_files_save
17021
Matthias Kloseb9621712010-04-24 17:59:49 +000017022test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017023 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017024
Martin v. Löwis11437992002-04-12 09:54:03 +000017025
17026# configure is writing to config.log, and then calls config.status.
17027# config.status does its own redirection, appending to config.log.
17028# Unfortunately, on DOS this fails, as config.log is still kept open
17029# by configure, so config.status won't be able to write to it; its
17030# output is simply discarded. So we exec the FD to /dev/null,
17031# effectively closing config.log, so it can be properly (re)opened and
17032# appended to by config.status. When coming back to configure, we
17033# need to make the FD available again.
17034if test "$no_create" != yes; then
17035 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017036 ac_config_status_args=
17037 test "$silent" = yes &&
17038 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017039 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017040 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017041 exec 5>>config.log
17042 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17043 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017044 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017045fi
17046if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17047 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17048$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017049fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017050
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017051
Christian Heimes75ed8902013-11-20 01:11:18 +010017052echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017053if test ! -f Modules/Setup
17054then
17055 cp $srcdir/Modules/Setup.dist Modules/Setup
17056fi
17057
Christian Heimes75ed8902013-11-20 01:11:18 +010017058echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017059if test ! -f Modules/Setup.local
17060then
17061 echo "# Edit this file for local setup changes" >Modules/Setup.local
17062fi
17063
Christian Heimes75ed8902013-11-20 01:11:18 +010017064echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017065$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17066 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017067 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017068mv config.c Modules